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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7f5ce0ce16524e32f3fa5619e70681edde9ef344
| 216
|
py
|
Python
|
Print/findHbonds.py
|
MooersLab/jupyterlabpymolpysnipsplus
|
b886750d63372434df53d4d6d7cdad6cb02ae4e7
|
[
"MIT"
] | null | null | null |
Print/findHbonds.py
|
MooersLab/jupyterlabpymolpysnipsplus
|
b886750d63372434df53d4d6d7cdad6cb02ae4e7
|
[
"MIT"
] | null | null | null |
Print/findHbonds.py
|
MooersLab/jupyterlabpymolpysnipsplus
|
b886750d63372434df53d4d6d7cdad6cb02ae4e7
|
[
"MIT"
] | null | null | null |
# Description: Find H-bonds around a residue.
# Source: placeHolder
"""
cmd.do('remove element h; distance hbonds, all, all, 3.2, mode=2;')
"""
cmd.do('remove element h; distance hbonds, all, all, 3.2, mode=2;')
| 24
| 67
| 0.666667
| 35
| 216
| 4.114286
| 0.542857
| 0.069444
| 0.152778
| 0.25
| 0.638889
| 0.638889
| 0.638889
| 0.638889
| 0.638889
| 0.638889
| 0
| 0.032967
| 0.157407
| 216
| 8
| 68
| 27
| 0.758242
| 0.62037
| 0
| 0
| 0
| 0
| 0.780822
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7f8f764ea44a74662218e55712c3b182a5dd7a90
| 144
|
py
|
Python
|
app/api/routes.py
|
thekiharani/FlaskPlayground
|
9287431f431cc00a150b0759448b9e4ad64ad139
|
[
"MIT"
] | null | null | null |
app/api/routes.py
|
thekiharani/FlaskPlayground
|
9287431f431cc00a150b0759448b9e4ad64ad139
|
[
"MIT"
] | null | null | null |
app/api/routes.py
|
thekiharani/FlaskPlayground
|
9287431f431cc00a150b0759448b9e4ad64ad139
|
[
"MIT"
] | null | null | null |
from flask import Blueprint
api = Blueprint('api', __name__, url_prefix='/api')
@api.route('/')
def api_index():
return {'key': 'value'}
| 16
| 51
| 0.652778
| 19
| 144
| 4.631579
| 0.736842
| 0.272727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152778
| 144
| 8
| 52
| 18
| 0.721311
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 0.4
| 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
| 0
| 1
| 1
| 0
|
0
| 5
|
7fb659123fb677d577e7ee4dedfcc48b78c3b168
| 20,173
|
py
|
Python
|
upf/test/test_problem.py
|
aiplan4eu/upf
|
334df5f86fb3704d98e048b8bc8e0ba19073c06e
|
[
"Apache-2.0"
] | 14
|
2021-03-24T06:37:34.000Z
|
2022-01-28T12:36:45.000Z
|
upf/test/test_problem.py
|
aiplan4eu/upf
|
334df5f86fb3704d98e048b8bc8e0ba19073c06e
|
[
"Apache-2.0"
] | 58
|
2021-06-08T10:00:58.000Z
|
2022-01-31T16:31:07.000Z
|
upf/test/test_problem.py
|
aiplan4eu/upf
|
334df5f86fb3704d98e048b8bc8e0ba19073c06e
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2021 AIPlan4EU project
#
# 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 upf
from upf.shortcuts import *
from upf.test import TestCase, main
from upf.test.examples import get_example_problems
class TestProblem(TestCase):
def setUp(self):
TestCase.setUp(self)
self.problems = get_example_problems()
def test_problem_kind(self):
problem_kind = ProblemKind()
self.assertFalse(problem_kind.has_discrete_time())
self.assertFalse(problem_kind.has_continuous_time())
problem_kind.set_time('DISCRETE_TIME')
self.assertTrue(problem_kind.has_discrete_time())
problem_kind.set_time('CONTINUOUS_TIME')
self.assertTrue(problem_kind.has_continuous_time())
def test_basic(self):
problem = self.problems['basic'].problem
x = problem.fluent('x')
self.assertEqual(x.name(), 'x')
self.assertEqual(str(x), 'bool x')
self.assertEqual(x.arity(), 0)
self.assertTrue(x.type().is_bool_type())
a = problem.action('a')
self.assertEqual(a.name, 'a')
self.assertEqual(len(a.preconditions()), 1)
self.assertEqual(len(a.effects()), 1)
a_str = str(a)
self.assertIn('action a', a_str)
self.assertIn('preconditions', a_str)
self.assertIn('not x', a_str)
self.assertIn('effects', a_str)
self.assertIn('x := true', a_str)
self.assertEqual(problem.name, 'basic')
self.assertEqual(len(problem.fluents()), 1)
self.assertEqual(len(problem.actions()), 1)
self.assertTrue(problem.initial_value(x) is not None)
self.assertEqual(len(problem.goals()), 1)
problem_str = str(problem)
self.assertIn('fluents', problem_str)
self.assertIn('actions', problem_str)
self.assertIn('initial values', problem_str)
self.assertIn('goals', problem_str)
def test_basic_conditional(self):
problem = self.problems['basic_conditional'].problem
x = problem.fluent('x')
self.assertEqual(x.name(), 'x')
self.assertEqual(str(x), 'bool x')
self.assertEqual(x.arity(), 0)
self.assertTrue(x.type().is_bool_type())
y = problem.fluent('y')
self.assertEqual(y.name(), 'y')
self.assertEqual(str(y), 'bool y')
self.assertEqual(y.arity(), 0)
self.assertTrue(y.type().is_bool_type())
a_x = problem.action('a_x')
self.assertEqual(a_x.name, 'a_x')
self.assertEqual(len(a_x.preconditions()), 1)
self.assertEqual(len(a_x.effects()), 1)
ax_str = str(a_x)
self.assertIn('action a_x', ax_str)
self.assertIn('preconditions', ax_str)
self.assertIn('not x', ax_str)
self.assertIn('effects', ax_str)
self.assertIn('if y then x := true', ax_str)
a_y = problem.action('a_y')
self.assertEqual(a_y.name, 'a_y')
self.assertEqual(len(a_y.preconditions()), 1)
self.assertEqual(len(a_y.effects()), 1)
ay_str = str(a_y)
self.assertIn('action a_y', ay_str)
self.assertIn('preconditions', ay_str)
self.assertIn('not y', ay_str)
self.assertIn('effects', ay_str)
self.assertIn('y := true', ay_str)
self.assertEqual(problem.name, 'basic_conditional')
self.assertEqual(len(problem.fluents()), 2)
self.assertEqual(len(problem.actions()), 2)
self.assertTrue(problem.initial_value(x) is not None)
self.assertTrue(problem.initial_value(y) is not None)
self.assertEqual(len(problem.goals()), 1)
problem_str = str(problem)
self.assertIn('fluents', problem_str)
self.assertIn('actions', problem_str)
self.assertIn('initial values', problem_str)
self.assertIn('goals', problem_str)
def test_robot(self):
problem = self.problems['robot'].problem
Location = problem.user_type('Location')
self.assertTrue(Location.is_user_type())
self.assertEqual(Location.name(), 'Location')
self.assertEqual(str(Location), 'Location')
robot_at = problem.fluent('robot_at')
self.assertEqual(robot_at.name(), 'robot_at')
self.assertEqual(str(robot_at), 'bool robot_at[Location]')
self.assertEqual(robot_at.arity(), 1)
self.assertEqual(robot_at.signature(), [Location])
self.assertTrue(robot_at.type().is_bool_type())
battery_charge = problem.fluent('battery_charge')
self.assertEqual(battery_charge.name(), 'battery_charge')
self.assertEqual(str(battery_charge), 'real[0, 100] battery_charge')
self.assertEqual(battery_charge.arity(), 0)
self.assertTrue(battery_charge.type().is_real_type())
move = problem.action('move')
l_from = move.parameter('l_from')
l_to = move.parameter('l_to')
self.assertEqual(move.name, 'move')
self.assertEqual(len(move.parameters()), 2)
self.assertEqual(l_from.name(), 'l_from')
self.assertEqual(l_from.type(), Location)
self.assertEqual(l_to.name(), 'l_to')
self.assertEqual(l_to.type(), Location)
self.assertEqual(len(move.preconditions()), 4)
self.assertEqual(len(move.effects()), 3)
move_str = str(move)
self.assertTrue('action move(Location l_from, Location l_to)' in move_str)
self.assertTrue('preconditions' in move_str)
self.assertTrue('10 <= battery_charge' in move_str)
self.assertTrue('not (l_from == l_to)' in move_str)
self.assertTrue('robot_at(l_from)' in move_str)
self.assertTrue('not robot_at(l_to)' in move_str)
self.assertTrue('effects' in move_str)
self.assertTrue('robot_at(l_from) := false' in move_str)
self.assertTrue('robot_at(l_to) := true' in move_str)
self.assertTrue('battery_charge := (battery_charge - 10)' in move_str)
l1 = problem.object('l1')
l2 = problem.object('l2')
self.assertEqual(l1.name(), 'l1')
self.assertEqual(str(l1), 'l1')
self.assertEqual(l1.type(), Location)
self.assertEqual(l2.name(), 'l2')
self.assertEqual(str(l2), 'l2')
self.assertEqual(l2.type(), Location)
self.assertEqual(problem.name, 'robot')
self.assertEqual(len(problem.fluents()), 2)
self.assertEqual(problem.fluent('robot_at'), robot_at)
self.assertEqual(problem.fluent('battery_charge'), battery_charge)
self.assertEqual(len(problem.user_types()), 1)
self.assertEqual(problem.user_type('Location'), Location)
self.assertEqual(len(problem.objects(Location)), 2)
self.assertEqual(problem.objects(Location), [l1, l2])
self.assertEqual(len(problem.actions()), 1)
self.assertEqual(problem.action('move'), move)
self.assertTrue(problem.initial_value(robot_at(l1)) is not None)
self.assertTrue(problem.initial_value(robot_at(l2)) is not None)
self.assertTrue(problem.initial_value(battery_charge) is not None)
self.assertEqual(len(problem.goals()), 1)
problem_str = str(problem)
self.assertTrue('types' in problem_str)
self.assertTrue('fluents' in problem_str)
self.assertTrue('actions' in problem_str)
self.assertTrue('objects' in problem_str)
self.assertTrue('initial values' in problem_str)
self.assertTrue('goals' in problem_str)
def test_robot_loader(self):
problem = self.problems['robot_loader'].problem
Location = problem.user_type('Location')
self.assertTrue(Location.is_user_type())
self.assertEqual(Location.name(), 'Location')
robot_at = problem.fluent('robot_at')
self.assertEqual(robot_at.name(), 'robot_at')
self.assertEqual(robot_at.arity(), 1)
self.assertEqual(robot_at.signature(), [Location])
self.assertTrue(robot_at.type().is_bool_type())
cargo_at = problem.fluent('cargo_at')
self.assertEqual(cargo_at.name(), 'cargo_at')
self.assertEqual(cargo_at.arity(), 1)
self.assertEqual(cargo_at.signature(), [Location])
self.assertTrue(cargo_at.type().is_bool_type())
cargo_mounted = problem.fluent('cargo_mounted')
self.assertEqual(cargo_mounted.name(), 'cargo_mounted')
self.assertEqual(cargo_mounted.arity(), 0)
self.assertTrue(cargo_mounted.type().is_bool_type())
move = problem.action('move')
l_from = move.parameter('l_from')
l_to = move.parameter('l_to')
self.assertEqual(move.name, 'move')
self.assertEqual(len(move.parameters()), 2)
self.assertEqual(l_from.name(), 'l_from')
self.assertEqual(l_from.type(), Location)
self.assertEqual(l_to.name(), 'l_to')
self.assertEqual(l_to.type(), Location)
self.assertEqual(len(move.preconditions()), 3)
self.assertEqual(len(move.effects()), 2)
load = problem.action('load')
loc = load.parameter('loc')
self.assertEqual(load.name, 'load')
self.assertEqual(len(load.parameters()), 1)
self.assertEqual(loc.name(), 'loc')
self.assertEqual(loc.type(), Location)
self.assertEqual(len(load.preconditions()), 3)
self.assertEqual(len(load.effects()), 2)
unload = problem.action('unload')
loc = unload.parameter('loc')
self.assertEqual(unload.name, 'unload')
self.assertEqual(len(unload.parameters()), 1)
self.assertEqual(loc.name(), 'loc')
self.assertEqual(loc.type(), Location)
self.assertEqual(len(unload.preconditions()), 3)
self.assertEqual(len(unload.effects()), 2)
l1 = problem.object('l1')
l2 = problem.object('l2')
self.assertEqual(l1.name(), 'l1')
self.assertEqual(l1.type(), Location)
self.assertEqual(l2.name(), 'l2')
self.assertEqual(l2.type(), Location)
self.assertEqual(problem.name, 'robot_loader')
self.assertEqual(len(problem.fluents()), 3)
self.assertEqual(problem.fluent('robot_at'), robot_at)
self.assertEqual(problem.fluent('cargo_at'), cargo_at)
self.assertEqual(problem.fluent('cargo_mounted'), cargo_mounted)
self.assertEqual(len(problem.user_types()), 1)
self.assertEqual(problem.user_type('Location'), Location)
self.assertEqual(len(problem.objects(Location)), 2)
self.assertEqual(problem.objects(Location), [l1, l2])
self.assertEqual(len(problem.actions()), 3)
self.assertEqual(problem.action('move'), move)
self.assertEqual(problem.action('load'), load)
self.assertEqual(problem.action('unload'), unload)
self.assertTrue(problem.initial_value(robot_at(l1)) is not None)
self.assertTrue(problem.initial_value(robot_at(l2)) is not None)
self.assertTrue(problem.initial_value(cargo_at(l1)) is not None)
self.assertTrue(problem.initial_value(cargo_at(l2)) is not None)
self.assertTrue(problem.initial_value(cargo_mounted) is not None)
self.assertEqual(len(problem.goals()), 1)
def test_robot_loader_adv(self):
problem = self.problems['robot_loader_adv'].problem
Location = problem.user_type('Location')
self.assertTrue(Location.is_user_type())
self.assertEqual(Location.name(), 'Location')
Robot = problem.user_type('Robot')
self.assertTrue(Robot.is_user_type())
self.assertEqual(Robot.name(), 'Robot')
Container = problem.user_type('Container')
self.assertTrue(Container.is_user_type())
self.assertEqual(Container.name(), 'Container')
robot_at = problem.fluent('robot_at')
self.assertEqual(robot_at.name(), 'robot_at')
self.assertEqual(robot_at.arity(), 2)
self.assertEqual(robot_at.signature(), [Robot, Location])
self.assertTrue(robot_at.type().is_bool_type())
cargo_at = problem.fluent('cargo_at')
self.assertEqual(cargo_at.name(), 'cargo_at')
self.assertEqual(cargo_at.arity(), 2)
self.assertEqual(cargo_at.signature(), [Container, Location])
self.assertTrue(cargo_at.type().is_bool_type())
cargo_mounted = problem.fluent('cargo_mounted')
self.assertEqual(cargo_mounted.name(), 'cargo_mounted')
self.assertEqual(cargo_mounted.arity(), 2)
self.assertEqual(cargo_mounted.signature(), [Container, Robot])
self.assertTrue(cargo_mounted.type().is_bool_type())
move = problem.action('move')
l_from = move.parameter('l_from')
l_to = move.parameter('l_to')
r = move.parameter('r')
self.assertEqual(move.name, 'move')
self.assertEqual(len(move.parameters()), 3)
self.assertEqual(l_from.name(), 'l_from')
self.assertEqual(l_from.type(), Location)
self.assertEqual(l_to.name(), 'l_to')
self.assertEqual(l_to.type(), Location)
self.assertEqual(r.name(), 'r')
self.assertEqual(r.type(), Robot)
self.assertEqual(len(move.preconditions()), 3)
self.assertEqual(len(move.effects()), 2)
load = problem.action('load')
loc = load.parameter('loc')
r = load.parameter('r')
c = load.parameter('c')
self.assertEqual(load.name, 'load')
self.assertEqual(len(load.parameters()), 3)
self.assertEqual(loc.name(), 'loc')
self.assertEqual(loc.type(), Location)
self.assertEqual(r.name(), 'r')
self.assertEqual(r.type(), Robot)
self.assertEqual(c.name(), 'c')
self.assertEqual(c.type(), Container)
self.assertEqual(len(load.preconditions()), 3)
self.assertEqual(len(load.effects()), 2)
unload = problem.action('unload')
loc = unload.parameter('loc')
r = unload.parameter('r')
c = unload.parameter('c')
self.assertEqual(unload.name, 'unload')
self.assertEqual(len(unload.parameters()), 3)
self.assertEqual(loc.name(), 'loc')
self.assertEqual(loc.type(), Location)
self.assertEqual(r.name(), 'r')
self.assertEqual(r.type(), Robot)
self.assertEqual(c.name(), 'c')
self.assertEqual(c.type(), Container)
self.assertEqual(len(unload.preconditions()), 3)
self.assertEqual(len(unload.effects()), 2)
l1 = problem.object('l1')
l2 = problem.object('l2')
l3 = problem.object('l3')
r1 = problem.object('r1')
c1 = problem.object('c1')
self.assertEqual(l1.name(), 'l1')
self.assertEqual(l1.type(), Location)
self.assertEqual(l2.name(), 'l2')
self.assertEqual(l2.type(), Location)
self.assertEqual(l3.name(), 'l3')
self.assertEqual(l3.type(), Location)
self.assertEqual(r1.name(), 'r1')
self.assertEqual(r1.type(), Robot)
self.assertEqual(c1.name(), 'c1')
self.assertEqual(c1.type(), Container)
self.assertEqual(problem.name, 'robot_loader_adv')
self.assertEqual(len(problem.fluents()), 3)
self.assertEqual(problem.fluent('robot_at'), robot_at)
self.assertEqual(problem.fluent('cargo_at'), cargo_at)
self.assertEqual(problem.fluent('cargo_mounted'), cargo_mounted)
self.assertEqual(len(problem.user_types()), 3)
self.assertEqual(problem.user_type('Location'), Location)
self.assertEqual(len(problem.objects(Location)), 3)
self.assertEqual(problem.objects(Location), [l1, l2, l3])
self.assertEqual(problem.user_type('Robot'), Robot)
self.assertEqual(len(problem.objects(Robot)), 1)
self.assertEqual(problem.objects(Robot), [r1])
self.assertEqual(problem.user_type('Container'), Container)
self.assertEqual(len(problem.objects(Container)), 1)
self.assertEqual(problem.objects(Container), [c1])
self.assertEqual(len(problem.actions()), 3)
self.assertEqual(problem.action('move'), move)
self.assertEqual(problem.action('load'), load)
self.assertEqual(problem.action('unload'), unload)
self.assertTrue(problem.initial_value(robot_at(r1, l1)) is not None)
self.assertTrue(problem.initial_value(robot_at(r1, l2)) is not None)
self.assertTrue(problem.initial_value(robot_at(r1, l3)) is not None)
self.assertTrue(problem.initial_value(cargo_at(c1, l1)) is not None)
self.assertTrue(problem.initial_value(cargo_at(c1, l2)) is not None)
self.assertTrue(problem.initial_value(cargo_at(c1, l3)) is not None)
self.assertTrue(problem.initial_value(cargo_mounted(c1, r1)) is not None)
self.assertEqual(len(problem.goals()), 2)
def test_fluents_defaults(self):
Location = UserType('Location')
robot_at = Fluent('robot_at', BoolType(), [Location])
distance = Fluent('distance', RealType(), [Location, Location])
N = 10
locations = [Object(f'l{i}', Location) for i in range(N)]
problem = Problem('robot')
problem.add_fluent(robot_at, default_initial_value=False)
problem.add_fluent(distance, default_initial_value=Fraction(-1))
problem.add_objects(locations)
problem.set_initial_value(robot_at(locations[0]), True)
for i in range(N-1):
problem.set_initial_value(distance(locations[i], locations[i+1]), Fraction(10))
self.assertEqual(problem.initial_value(robot_at(locations[0])), TRUE())
for i in range(1, N):
self.assertEqual(problem.initial_value(robot_at(locations[i])), FALSE())
for i in range(N):
for j in range(N):
if j == i+1:
self.assertEqual(problem.initial_value(distance(locations[i], locations[j])),
Real(Fraction(10)))
else:
self.assertEqual(problem.initial_value(distance(locations[i], locations[j])),
Real(Fraction(-1)))
def test_problem_defaults(self):
Location = UserType('Location')
robot_at = Fluent('robot_at', BoolType(), [Location])
distance = Fluent('distance', IntType(), [Location, Location])
cost = Fluent('cost', IntType(), [Location, Location])
N = 10
locations = [Object(f'l{i}', Location) for i in range(N)]
problem = Problem('robot', initial_defaults={IntType(): 0})
problem.add_fluent(robot_at, default_initial_value=False)
problem.add_fluent(distance, default_initial_value=-1)
problem.add_fluent(cost)
problem.add_objects(locations)
problem.set_initial_value(robot_at(locations[0]), True)
for i in range(N-1):
problem.set_initial_value(distance(locations[i], locations[i+1]), 10)
problem.set_initial_value(cost(locations[i], locations[i+1]), 100)
self.assertEqual(problem.initial_value(robot_at(locations[0])), TRUE())
for i in range(1, N):
self.assertEqual(problem.initial_value(robot_at(locations[i])), FALSE())
for i in range(N):
for j in range(N):
if j == i+1:
self.assertEqual(problem.initial_value(distance(locations[i], locations[j])), Int(10))
self.assertEqual(problem.initial_value(cost(locations[i], locations[j])), Int(100))
else:
self.assertEqual(problem.initial_value(distance(locations[i], locations[j])), Int(-1))
self.assertEqual(problem.initial_value(cost(locations[i], locations[j])), Int(0))
if __name__ == "__main__":
main()
| 44.142232
| 106
| 0.640212
| 2,497
| 20,173
| 5.027633
| 0.067681
| 0.225824
| 0.07169
| 0.045802
| 0.80556
| 0.723036
| 0.681934
| 0.668711
| 0.654214
| 0.645292
| 0
| 0.0122
| 0.215783
| 20,173
| 456
| 107
| 44.239035
| 0.781353
| 0.027462
| 0
| 0.551546
| 0
| 0
| 0.06988
| 0
| 0
| 0
| 0
| 0
| 0.685567
| 1
| 0.023196
| false
| 0
| 0.010309
| 0
| 0.036082
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f68e3711e43babbd9570d38a0981fb1e29c9cdd3
| 912
|
py
|
Python
|
external/plex/dist/tests/test10.py
|
almartin82/bayeslite
|
a27f243b5f16cc6a01e84336a829e5b65d665b7b
|
[
"Apache-2.0"
] | 964
|
2015-09-24T15:02:05.000Z
|
2022-03-29T21:41:21.000Z
|
external/plex/dist/tests/test10.py
|
almartin82/bayeslite
|
a27f243b5f16cc6a01e84336a829e5b65d665b7b
|
[
"Apache-2.0"
] | 435
|
2015-09-23T16:46:58.000Z
|
2020-04-19T12:32:03.000Z
|
external/plex/dist/tests/test10.py
|
almartin82/bayeslite
|
a27f243b5f16cc6a01e84336a829e5b65d665b7b
|
[
"Apache-2.0"
] | 86
|
2015-10-24T20:08:30.000Z
|
2021-08-09T13:53:00.000Z
|
# Test traditional regular expression syntax.
import Test
from Plex.Traditional import re
from Plex.Errors import PlexError
from Plex import Seq, AnyBut
def test_err(s):
try:
print re(s)
except PlexError, e:
print e
print re("")
print re("a")
print re("[a]")
print re("[ab]")
print re("[abc]")
print re("[a-c]")
print re("[a-cd]")
print re("[a-cg-i]")
print re("[^a]")
print re("[^a-cg-i]")
print re("[-]")
print re("[-abc]")
print re("[abc-]")
print re("[]]")
print re("[]-]")
print re("[^-]")
print re("[^-abc]")
print re("[^abc-]")
print re("[^]]")
print re("[^]-]")
print re("a*")
print re("a+")
print re("a?")
print re("a*+?")
print re("ab")
print re("a|b")
print re("abcde")
print re("a|b|c|d|e")
print re("abc|def|ghi")
print re("abc(def|ghi)")
print re("ab\(c\[de")
print re("^abc$")
print str(re(".")) == str(Seq(AnyBut('\n')))
test_err("abc(de")
test_err("abc[de")
test_err("abc)de")
| 17.207547
| 45
| 0.586623
| 160
| 912
| 3.31875
| 0.2125
| 0.435028
| 0.195857
| 0.184557
| 0.53484
| 0.516008
| 0.514124
| 0.386064
| 0.318267
| 0.318267
| 0
| 0
| 0.131579
| 912
| 52
| 46
| 17.538462
| 0.670455
| 0.047149
| 0
| 0
| 0
| 0
| 0.209249
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.088889
| null | null | 0.777778
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
f69ead0b920e235a9228db1c22ec3be2e3e969f5
| 62
|
py
|
Python
|
drake_pytorch/__init__.py
|
DAIRLab/drake-pytorch
|
3c7e33d58f1ad26008bd89f3e0fe1951b5175d3b
|
[
"BSD-3-Clause"
] | 9
|
2022-01-17T04:24:41.000Z
|
2022-02-11T17:53:04.000Z
|
drake_pytorch/__init__.py
|
DAIRLab/drake-pytorch
|
3c7e33d58f1ad26008bd89f3e0fe1951b5175d3b
|
[
"BSD-3-Clause"
] | null | null | null |
drake_pytorch/__init__.py
|
DAIRLab/drake-pytorch
|
3c7e33d58f1ad26008bd89f3e0fe1951b5175d3b
|
[
"BSD-3-Clause"
] | null | null | null |
from drake_pytorch.symbolic import sym_to_pytorch, Simplifier
| 31
| 61
| 0.887097
| 9
| 62
| 5.777778
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080645
| 62
| 1
| 62
| 62
| 0.912281
| 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
|
f6c116dd578bdf437eaa2d2616535e0083e92c22
| 7,080
|
py
|
Python
|
scripts/models/covidNet.py
|
anudeepsekhar/Lane-Detection-Pytorch
|
cfddda8a0768cf83afd87e29d605fd58aa89df59
|
[
"MIT"
] | 1
|
2022-01-11T16:43:50.000Z
|
2022-01-11T16:43:50.000Z
|
scripts/models/covidNet.py
|
anudeepsekhar/Lane-Detection-Pytorch
|
cfddda8a0768cf83afd87e29d605fd58aa89df59
|
[
"MIT"
] | null | null | null |
scripts/models/covidNet.py
|
anudeepsekhar/Lane-Detection-Pytorch
|
cfddda8a0768cf83afd87e29d605fd58aa89df59
|
[
"MIT"
] | null | null | null |
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from models.layers import denseBlock2, convBlock, unetUp, outconv
class Net(nn.Module):
"""Some Information about Net"""
def __init__(self, in_channels=3, n_classes=2, feature_scale=2, is_deconv=True, is_batchnorm=True):
super(Net, self).__init__()
self.is_deconv = is_deconv
self.is_batchnorm = is_batchnorm
self.lowconv = nn.Conv2d(in_channels, 32, 3, 1, 1)
self.relu = nn.ReLU(inplace=True)
self.dense1 = denseBlock2(32, 128, 32, 3)
self.maxpool1 = nn.MaxPool2d(2)
self.dense2 = denseBlock2(128, 256, 32, 3)
self.maxpool2 = nn.MaxPool2d(2)
self.dense3 = denseBlock2(224, 352, 32, 4)
self.maxpool3 = nn.MaxPool2d(2)
self.dense4 = denseBlock2(352, 576, 32, 6)
self.maxpool4 = nn.MaxPool2d(2)
self.trasit1 = convBlock(128,68)
self.trasit2 = convBlock(224,136)
self.trasit3 = convBlock(352,272)
self.bottleneck = nn.Conv2d(544, 1088, 3, 1, 1)
self.up_cat1 = unetUp(1088, 544, self.is_deconv)
self.up_cat2 = unetUp(544, 272, self.is_deconv)
self.up_cat3 = unetUp(272, 136, self.is_deconv)
self.up_cat4 = unetUp(136, 68, self.is_deconv)
self.outconv = outconv(68, n_classes)
def forward(self, x):
c1 = self.lowconv(x)
c1 = self.relu(c1)
# print(c1.shape)
d1 = self.dense1(c1)
d1_ = self.trasit1(d1)
# print(d1.shape)
m1 = self.maxpool1(d1)
# print(m1.shape)
d2 = self.dense2(m1)
d2_ = self.trasit2(d2)
# print(d2.shape)
m2 = self.maxpool2(d2)
# print(m2.shape)
d3 = self.dense3(m2)
d3_ = self.trasit3(d3)
# print(d3.shape)
m3 = self.maxpool3(d3)
# print(m3.shape)
d4 = self.dense4(m3)
# print(d4.shape)
m4 = self.maxpool4(d4)
# print(m4.shape)
bn = self.bottleneck(m4)
# print(bn.shape)
up1 = self.up_cat1(bn, d4)
# print(up1.shape)
up2 = self.up_cat2(up1, d3_)
# print(up2.shape)
up3 = self.up_cat3(up2, d2_)
# print(up3.shape)
up4 = self.up_cat4(up3, d1_)
# print(up4.shape)
out = self.outconv(up4)
# print(out.shape)
return out
class Net2(nn.Module):
"""Some Information about Net"""
def __init__(self, in_channels=1, n_classes=2, feature_scale=2, is_deconv=True, is_batchnorm=True):
super(Net2, self).__init__()
self.is_deconv = is_deconv
self.is_batchnorm = is_batchnorm
self.lowconv = nn.Conv2d(in_channels, 32, 3, 1, 1)
self.relu = nn.ReLU(inplace=True)
self.dense1 = denseBlock2(32, 64, 32, 1)
self.maxpool1 = nn.MaxPool2d(2)
self.dense2 = denseBlock2(64, 128, 32, 2)
self.maxpool2 = nn.MaxPool2d(2)
self.dense3 = denseBlock2(128, 256, 32, 4)
self.maxpool3 = nn.MaxPool2d(2)
self.dense4 = denseBlock2(256, 512, 32, 8)
self.maxpool4 = nn.MaxPool2d(2)
# self.trasit1 = convBlock(128,68)
# self.trasit2 = convBlock(224,136)
# self.trasit3 = convBlock(352,272)
self.bottleneck = nn.Conv2d(512, 1024, 3, 1, 1)
self.up_cat1 = unetUp(1024, 512, self.is_deconv)
self.up_cat2 = unetUp(512, 256, self.is_deconv)
self.up_cat3 = unetUp(256, 128, self.is_deconv)
self.up_cat4 = unetUp(128, 64, self.is_deconv)
self.outconv = outconv(64, n_classes)
def forward(self, x):
c1 = self.lowconv(x)
c1 = self.relu(c1)
# print(c1.shape)
d1 = self.dense1(c1)
# d1_ = self.trasit1(d1)
# print(d1.shape)
m1 = self.maxpool1(d1)
# print(m1.shape)
d2 = self.dense2(m1)
# d2_ = self.trasit2(d2)
# print(d2.shape)
m2 = self.maxpool2(d2)
# print(m2.shape)
d3 = self.dense3(m2)
# d3_ = self.trasit3(d3)
# print(d3.shape)
m3 = self.maxpool3(d3)
# print(m3.shape)
d4 = self.dense4(m3)
# print(d4.shape)
m4 = self.maxpool4(d4)
# print(m4.shape)
bn = self.bottleneck(m4)
# print(bn.shape)
up1 = self.up_cat1(bn, d4)
# print(up1.shape)
up2 = self.up_cat2(up1, d3)
# print(up2.shape)
up3 = self.up_cat3(up2, d2)
# print(up3.shape)
up4 = self.up_cat4(up3, d1)
# print(up4.shape)
out = self.outconv(up4)
# print(out.shape)
return out
class Net3(nn.Module):
"""Some Information about Net"""
def __init__(self, in_channels=3, n_classes=1, feature_scale=2, is_deconv=False, is_batchnorm=True):
super(Net3, self).__init__()
self.is_deconv = is_deconv
self.is_batchnorm = is_batchnorm
self.lowconv = nn.Conv2d(in_channels, 32, 3, 1, 1)
self.relu = nn.ReLU(inplace=True)
self.dense1 = denseBlock2(32, 64, 8, 4)
self.maxpool1 = nn.MaxPool2d(2)
self.dense2 = denseBlock2(64, 96, 8, 4)
self.maxpool2 = nn.MaxPool2d(2)
self.dense3 = denseBlock2(96, 128, 8, 4)
self.maxpool3 = nn.MaxPool2d(2)
self.dense4 = denseBlock2(128, 160, 8, 4)
self.maxpool4 = nn.MaxPool2d(2)
self.trasit1 = nn.Conv2d(64,40, kernel_size=1, padding=0, stride=1)
self.trasit2 = nn.Conv2d(96,80, kernel_size=1, padding=0, stride=1)
self.trasit3 = nn.Conv2d(128,160, kernel_size=1, padding=0, stride=1)
self.trasit4 = nn.Conv2d(160,320, kernel_size=1, padding=0, stride=1)
self.bottleneck = nn.Conv2d(160, 640, 3, 1, 1)
self.up_cat1 = unetUp(640, 320, self.is_deconv)
self.up_cat2 = unetUp(320, 160, self.is_deconv)
self.up_cat3 = unetUp(160, 80, self.is_deconv)
self.up_cat4 = unetUp(80, 40, self.is_deconv)
self.outconv = outconv(40, n_classes)
def forward(self, x):
c1 = self.lowconv(x)
c1 = self.relu(c1)
# print(c1.shape)
d1 = self.dense1(c1)
d1_ = self.trasit1(d1)
# print(d1.shape)
m1 = self.maxpool1(d1)
# print(m1.shape)
d2 = self.dense2(m1)
d2_ = self.trasit2(d2)
# print(d2.shape)
m2 = self.maxpool2(d2)
# print(m2.shape)
d3 = self.dense3(m2)
d3_ = self.trasit3(d3)
# print(d3.shape)
m3 = self.maxpool3(d3)
# print(m3.shape)
d4 = self.dense4(m3)
d4_ = self.trasit4(d4)
# print(d4_.shape)
m4 = self.maxpool4(d4)
# print(m4.shape)
bn = self.bottleneck(m4)
# print(bn.shape)
up1 = self.up_cat1(bn, d4_)
# print(up1.shape)
up2 = self.up_cat2(up1, d3_)
# print(up2.shape)
up3 = self.up_cat3(up2, d2_)
# print(up3.shape)
up4 = self.up_cat4(up3, d1_)
# print(up4.shape)
out = self.outconv(up4)
# print(out.shape)
return out
| 34.705882
| 104
| 0.572175
| 982
| 7,080
| 4.008147
| 0.113035
| 0.036585
| 0.045732
| 0.04878
| 0.882876
| 0.877541
| 0.854675
| 0.767276
| 0.691057
| 0.655488
| 0
| 0.117565
| 0.294774
| 7,080
| 204
| 105
| 34.705882
| 0.670739
| 0.139407
| 0
| 0.588235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.044118
| false
| 0
| 0.036765
| 0
| 0.125
| 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
|
f6cd342794cebbe8e48ea420cfe82721c3ebaac1
| 226
|
py
|
Python
|
skroute/metaheuristics/simulated_annealing/__init__.py
|
arubiales/scikit-route
|
83262d9d41ff700c911927f5bb6c93feb0c595e4
|
[
"MIT"
] | 2
|
2020-12-30T19:01:08.000Z
|
2022-01-17T09:50:59.000Z
|
skroute/metaheuristics/simulated_annealing/__init__.py
|
arubiales/scikit-route
|
83262d9d41ff700c911927f5bb6c93feb0c595e4
|
[
"MIT"
] | 39
|
2020-12-30T14:58:45.000Z
|
2021-06-21T20:50:02.000Z
|
skroute/metaheuristics/simulated_annealing/__init__.py
|
arubiales/scikit-route
|
83262d9d41ff700c911927f5bb6c93feb0c595e4
|
[
"MIT"
] | 1
|
2020-12-31T00:41:10.000Z
|
2020-12-31T00:41:10.000Z
|
from ._base_simulated_annealing._base_simulated_annealing import SimulatedAnnealing
from ._base_ensemble_simulated_annealing import EnsembleSimulatedAnnealing
__all__ = ['SimmulatedAnnealing', "EnsembleSimulatedAnnealing"]
| 32.285714
| 83
| 0.884956
| 19
| 226
| 9.789474
| 0.526316
| 0.290323
| 0.236559
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066372
| 226
| 6
| 84
| 37.666667
| 0.881517
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0.115556
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 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
|
f6e29b4a47ef0265e3f5606bd03ed92364986f48
| 22
|
py
|
Python
|
SeqGAN/seqgan_train.py
|
rickyHong/GANs-Repository-repl
|
c86b83fe1c5fea19c9ca15f8bc302953ef0687a6
|
[
"MIT"
] | 3
|
2019-01-02T00:08:44.000Z
|
2019-05-19T21:08:46.000Z
|
SeqGAN/seqgan_train.py
|
siavelis/Awesome-GANs
|
9add33fdfcb9fead75c37dd7afdbede625a303c9
|
[
"MIT"
] | null | null | null |
SeqGAN/seqgan_train.py
|
siavelis/Awesome-GANs
|
9add33fdfcb9fead75c37dd7afdbede625a303c9
|
[
"MIT"
] | 4
|
2018-12-01T19:04:08.000Z
|
2020-09-14T05:27:50.000Z
|
# initial python file
| 11
| 21
| 0.772727
| 3
| 22
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 22
| 1
| 22
| 22
| 0.944444
| 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
|
f6fcefb38448955119a26fd31bff711a8a5d9760
| 38
|
py
|
Python
|
fasteve/io/mongo/__init__.py
|
Wytamma/fasteve
|
7400b20f926ee877cb4d1b18682f4260c9bb3c65
|
[
"BSD-3-Clause-Clear"
] | 31
|
2019-08-02T01:02:33.000Z
|
2022-03-31T19:18:43.000Z
|
fasteve/io/mongo/__init__.py
|
Wytamma/fasteve
|
7400b20f926ee877cb4d1b18682f4260c9bb3c65
|
[
"BSD-3-Clause-Clear"
] | 14
|
2019-09-02T12:58:03.000Z
|
2022-03-17T15:54:14.000Z
|
fasteve/io/mongo/__init__.py
|
Wytamma/fasteve
|
7400b20f926ee877cb4d1b18682f4260c9bb3c65
|
[
"BSD-3-Clause-Clear"
] | null | null | null |
from .mongo import Mongo, MongoClient
| 19
| 37
| 0.815789
| 5
| 38
| 6.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131579
| 38
| 1
| 38
| 38
| 0.939394
| 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
|
63e5c417e606b42f04da1597d08948782ae76e70
| 63
|
py
|
Python
|
aristotle/__main__.py
|
secureworks/aristotle
|
28e853d6ad1ae23d13cdd8835932b74bbca81bfd
|
[
"Apache-2.0"
] | 12
|
2019-10-23T05:34:05.000Z
|
2021-03-13T21:04:17.000Z
|
aristotle/__main__.py
|
secureworks/aristotle
|
28e853d6ad1ae23d13cdd8835932b74bbca81bfd
|
[
"Apache-2.0"
] | null | null | null |
aristotle/__main__.py
|
secureworks/aristotle
|
28e853d6ad1ae23d13cdd8835932b74bbca81bfd
|
[
"Apache-2.0"
] | 3
|
2019-10-16T18:52:37.000Z
|
2021-03-17T11:03:14.000Z
|
from .aristotle import main as aristotle_main
aristotle_main()
| 21
| 45
| 0.84127
| 9
| 63
| 5.666667
| 0.555556
| 0.509804
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 63
| 2
| 46
| 31.5
| 0.910714
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
63e70834403e0ea6840a0dd2a0ead4e10978cbd7
| 41
|
py
|
Python
|
spike/backends/x86_32/__init__.py
|
spikeio/lang
|
33be3b51eaf22f873ddc94f2f9e381f605a2499f
|
[
"BSD-2-Clause"
] | 1
|
2020-06-15T07:38:12.000Z
|
2020-06-15T07:38:12.000Z
|
spike/backends/x86_32/__init__.py
|
spikeio/lang
|
33be3b51eaf22f873ddc94f2f9e381f605a2499f
|
[
"BSD-2-Clause"
] | 1
|
2021-11-12T11:01:45.000Z
|
2021-11-12T11:01:45.000Z
|
spike/backends/x86_32/__init__.py
|
spikeio/lang
|
33be3b51eaf22f873ddc94f2f9e381f605a2499f
|
[
"BSD-2-Clause"
] | null | null | null |
from CodeGenerator import CodeGenerator
| 13.666667
| 39
| 0.878049
| 4
| 41
| 9
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121951
| 41
| 2
| 40
| 20.5
| 1
| 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
|
d60aab262122bbb01897c5ca4b2c77dc2d9f3b53
| 38
|
py
|
Python
|
tox/__main__.py
|
doismellburning/tox
|
3eeca8300df3d5732b35c282f74557e61cf97ed4
|
[
"MIT"
] | 1
|
2016-09-19T11:16:07.000Z
|
2016-09-19T11:16:07.000Z
|
tox/__main__.py
|
doismellburning/tox
|
3eeca8300df3d5732b35c282f74557e61cf97ed4
|
[
"MIT"
] | null | null | null |
tox/__main__.py
|
doismellburning/tox
|
3eeca8300df3d5732b35c282f74557e61cf97ed4
|
[
"MIT"
] | null | null | null |
from tox._cmdline import main
main()
| 9.5
| 29
| 0.763158
| 6
| 38
| 4.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 38
| 3
| 30
| 12.666667
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 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
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d63b4e8bdcbae41fdbfb960ce4bddbe7c7ad3416
| 77
|
py
|
Python
|
okl4_kernel/okl4_2.1.1-patch.9/tools/magpie-parsers/src/magpieparsers/mig/__init__.py
|
CyberQueenMara/baseband-research
|
e1605537e10c37e161fff1a3416b908c9894f204
|
[
"MIT"
] | 77
|
2018-12-31T22:12:09.000Z
|
2021-12-31T22:56:13.000Z
|
okl4_kernel/okl4_2.1.1-patch.9/tools/magpie-parsers/src/magpieparsers/mig/__init__.py
|
CyberQueenMara/baseband-research
|
e1605537e10c37e161fff1a3416b908c9894f204
|
[
"MIT"
] | null | null | null |
okl4_kernel/okl4_2.1.1-patch.9/tools/magpie-parsers/src/magpieparsers/mig/__init__.py
|
CyberQueenMara/baseband-research
|
e1605537e10c37e161fff1a3416b908c9894f204
|
[
"MIT"
] | 24
|
2019-01-20T15:51:52.000Z
|
2021-12-25T18:29:13.000Z
|
from magpieparsers.mig.parser import parse_to_pt
__ALL__ = ['parse_to_pt']
| 15.4
| 48
| 0.792208
| 12
| 77
| 4.416667
| 0.75
| 0.264151
| 0.339623
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116883
| 77
| 4
| 49
| 19.25
| 0.779412
| 0
| 0
| 0
| 0
| 0
| 0.144737
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 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
|
d641dd9cbb72dbc40d7453d53b204ddd4e1977da
| 2,781
|
py
|
Python
|
modules/empire_spray.py
|
Exhorder6/PurpleSpray
|
913e8c88e59c0378a25806c9abe19d0c8108dc12
|
[
"BSD-3-Clause"
] | 46
|
2019-04-28T02:51:43.000Z
|
2021-08-07T19:20:01.000Z
|
modules/empire_spray.py
|
Exhorder6/PurpleSpray
|
913e8c88e59c0378a25806c9abe19d0c8108dc12
|
[
"BSD-3-Clause"
] | 1
|
2019-05-08T02:36:06.000Z
|
2019-05-08T02:36:06.000Z
|
modules/empire_spray.py
|
Exhorder6/PurpleSpray
|
913e8c88e59c0378a25806c9abe19d0c8108dc12
|
[
"BSD-3-Clause"
] | 7
|
2019-04-28T13:49:21.000Z
|
2022-01-05T14:25:16.000Z
|
#!/usr/bin/env python
# AUTHOR OF MODULE NAME
AUTHOR="Mauricio Velazco (@mvelazco)"
# DESCRIPTION OF THE MODULE
DESCRIPTION="This module simulates an adversary leveraging a compromised host to perform password spray attacks."
LONGDESCRIPTION="This scenario can occur if an adversary has obtained control of a domain joined computer through a --spear phishing attack or any other kind of client side attack.--Spray_empire leverages the Powershell Empire framework and its API to instruct Empire agents--to perform password spray attacks by using Invoke-SMBLogin (https://github.com/mvelazc0/Invoke-SMBLogin).--The module will connect to the Empire server and leverage existing agents. If no agents are found,--it will use impackets wmiexec to execute an Empire stager on a remote host defined on the settings."
# TODO
OPTIONS="""{"Dc": {"Description": "Domain Controller Ip address", "Required": "True", "Value": ""}, "Domain": {"Description": "Root domain name ( org.com )", "Required": "True", "Value": ""}, "Username": {"Description": "Domain user for ldap queries", "Required": "True", "Value": ""}, "Password": {"Description": "Domain user password for ldap queries", "Required": "True", "Value": ""}, "DomainUsers": {"Description": "Use domain users to spray. If False, random usernames will be used", "Required": "True", "Value": "True"}, "Nusers": {"Description": "Number of domain users to spray", "Required": "True", "Value": "10"}, "Type": {"Description": "Type of simulation", "Required": "True", "Value": "0"}, "UseKerberos": {"Description": "Kerberos or NTLM", "Required": "True", "Value": "True"}, "SprayPassword": {"Description": "Password used to spray", "Required": "True", "Value": "Winter2019"}}"""
ADVANCED_OPTIONS="""{ "EmpireHost": {"Description": "Ip address of the Empire Server ", "Required": "True", "Value": ""}, "EmpirePort": {"Description": "Rest API port number", "Required": "True", "Value": "1337"}, "EmpirePassword": {"Description": "Empire Rest API Password", "Required": "True", "Value": ""} ,"SimulationHost": {"Description": "Ip address of the simulation host", "Required": "False", "Value": ""}, "SimulationUser": {"Description": "Used against the simulation host. Requires admin privs", "Required": "False", "Value": ""} , "SimulationPass": {"Description": "Used against the simulation hos", "Required": "False", "Value": ""}, "Sleep": {"Description": "Time to sleep between each authentication attempt", "Required": "True", "Value": "0"} }"""
TYPES="""{"0": {"Description": "Perform the spray against a randomly picked domain controller"},"1": {"Description": "Perform the spray against a randomly picked domain computer "} , "2": {"Description": "Perform the spray against randomly picked domain computers. One auth per computer"}}"""
| 173.8125
| 900
| 0.704782
| 340
| 2,781
| 5.758824
| 0.429412
| 0.079673
| 0.11287
| 0.039837
| 0.219101
| 0.086823
| 0.055158
| 0.055158
| 0.055158
| 0
| 0
| 0.006563
| 0.123337
| 2,781
| 16
| 901
| 173.8125
| 0.796555
| 0.02625
| 0
| 0
| 0
| 0.666667
| 0.960813
| 0.007763
| 0
| 0
| 0
| 0.0625
| 0
| 1
| 0
| false
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
d648c453e7741028f7e8f7526d028f64c4fe55c9
| 69
|
py
|
Python
|
video_processing/video_constants.py
|
UrosOgrizovic/CelebCaption
|
6f3469829462cb08fb132e68ac2be0f713c3e6ec
|
[
"MIT"
] | 2
|
2021-11-27T00:15:36.000Z
|
2021-12-16T08:48:51.000Z
|
video_processing/video_constants.py
|
UrosOgrizovic/CelebCaption
|
6f3469829462cb08fb132e68ac2be0f713c3e6ec
|
[
"MIT"
] | null | null | null |
video_processing/video_constants.py
|
UrosOgrizovic/CelebCaption
|
6f3469829462cb08fb132e68ac2be0f713c3e6ec
|
[
"MIT"
] | null | null | null |
RECTANGLE_COLOR = (255, 200, 0) # (B, G, R)
LABEL_COLOR = (255, 0, 0)
| 34.5
| 43
| 0.594203
| 13
| 69
| 3
| 0.692308
| 0.410256
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.214286
| 0.188406
| 69
| 2
| 44
| 34.5
| 0.482143
| 0.130435
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 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
|
c3bcdf17d02d09bec18028f95da203f31425c064
| 256
|
py
|
Python
|
curator/validators/config_file.py
|
rprabhat/curator
|
b0c7ad652a0141799cc499c43c4b9fa56328b4ff
|
[
"Apache-2.0"
] | 1
|
2019-06-24T17:59:03.000Z
|
2019-06-24T17:59:03.000Z
|
curator/validators/config_file.py
|
rprabhat/curator
|
b0c7ad652a0141799cc499c43c4b9fa56328b4ff
|
[
"Apache-2.0"
] | null | null | null |
curator/validators/config_file.py
|
rprabhat/curator
|
b0c7ad652a0141799cc499c43c4b9fa56328b4ff
|
[
"Apache-2.0"
] | null | null | null |
from voluptuous import *
from ..defaults import client_defaults
def client():
return Schema(
{
Optional('client'): client_defaults.config_client(),
Optional('logging'): client_defaults.config_logging(),
}
)
| 23.272727
| 66
| 0.625
| 24
| 256
| 6.458333
| 0.458333
| 0.270968
| 0.258065
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.265625
| 256
| 10
| 67
| 25.6
| 0.824468
| 0
| 0
| 0
| 0
| 0
| 0.050781
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| true
| 0
| 0.222222
| 0.111111
| 0.444444
| 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
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
c3dc1fb00f3fdd030a9eddf385dc8f595d113643
| 95
|
py
|
Python
|
clio/dummy_module.py
|
nestauk/nesta-flask
|
3799ed80c5193f77e559588dcb270bb0f40c6080
|
[
"MIT"
] | null | null | null |
clio/dummy_module.py
|
nestauk/nesta-flask
|
3799ed80c5193f77e559588dcb270bb0f40c6080
|
[
"MIT"
] | null | null | null |
clio/dummy_module.py
|
nestauk/nesta-flask
|
3799ed80c5193f77e559588dcb270bb0f40c6080
|
[
"MIT"
] | null | null | null |
class dummy_model:
def query(self, q):
return "Query had length {}".format(len(q))
| 23.75
| 51
| 0.621053
| 14
| 95
| 4.142857
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.231579
| 95
| 3
| 52
| 31.666667
| 0.794521
| 0
| 0
| 0
| 0
| 0
| 0.2
| 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
|
c3dccab1efeae6377eff643502fc510e05e08e8e
| 157
|
py
|
Python
|
protonfixes/gamefixes/280200.py
|
Citiroller/protonfixes
|
6e0116bd1cd2172b6f0ff9905667bbc59595cdb7
|
[
"BSD-2-Clause"
] | 213
|
2018-10-06T01:40:26.000Z
|
2022-03-16T16:17:37.000Z
|
protonfixes/gamefixes/280200.py
|
Citiroller/protonfixes
|
6e0116bd1cd2172b6f0ff9905667bbc59595cdb7
|
[
"BSD-2-Clause"
] | 88
|
2018-10-06T17:38:56.000Z
|
2022-02-19T13:27:26.000Z
|
protonfixes/gamefixes/280200.py
|
Citiroller/protonfixes
|
6e0116bd1cd2172b6f0ff9905667bbc59595cdb7
|
[
"BSD-2-Clause"
] | 67
|
2018-10-09T16:57:16.000Z
|
2022-03-14T13:06:25.000Z
|
""" Game fix for Eterium
"""
#pylint: disable=C0103
from protonfixes import util
def main():
""" Install xna40
"""
util.protontricks('xna40')
| 13.083333
| 30
| 0.636943
| 18
| 157
| 5.555556
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065041
| 0.216561
| 157
| 11
| 31
| 14.272727
| 0.747967
| 0.388535
| 0
| 0
| 0
| 0
| 0.060976
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c3ebebc1de65eb37681458fe11e6405c9dc4cdc0
| 198
|
py
|
Python
|
src/core/utils.py
|
saiblo/saiblo-local-judger
|
a330c16e5349b300249655ae1b68094b4c1828b1
|
[
"MIT"
] | 4
|
2022-01-16T08:30:23.000Z
|
2022-01-21T09:04:37.000Z
|
src/core/utils.py
|
saiblo/saiblo-local-judger
|
a330c16e5349b300249655ae1b68094b4c1828b1
|
[
"MIT"
] | null | null | null |
src/core/utils.py
|
saiblo/saiblo-local-judger
|
a330c16e5349b300249655ae1b68094b4c1828b1
|
[
"MIT"
] | null | null | null |
def bytes2int(data: bytes) -> int:
return int.from_bytes(data, byteorder="big", signed=True)
def int2bytes(x: int) -> bytes:
return int.to_bytes(x, length=4, byteorder="big", signed=True)
| 28.285714
| 66
| 0.691919
| 30
| 198
| 4.5
| 0.533333
| 0.133333
| 0.266667
| 0.325926
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017751
| 0.146465
| 198
| 6
| 67
| 33
| 0.781065
| 0
| 0
| 0
| 0
| 0
| 0.030303
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
7f187106535567622c108f6099cee381ca425782
| 15,584
|
py
|
Python
|
modred/tests/testltigalerkinproj.py
|
pythonpadawanEXE/modred
|
6c23926e1bf0d762db3948c741b2deb6d18f9faa
|
[
"BSD-2-Clause"
] | 55
|
2015-01-14T07:59:47.000Z
|
2022-02-24T02:06:00.000Z
|
modred/tests/testltigalerkinproj.py
|
pythonpadawanEXE/modred
|
6c23926e1bf0d762db3948c741b2deb6d18f9faa
|
[
"BSD-2-Clause"
] | 44
|
2015-01-18T03:45:33.000Z
|
2021-05-04T16:00:10.000Z
|
modred/tests/testltigalerkinproj.py
|
pythonpadawanEXE/modred
|
6c23926e1bf0d762db3948c741b2deb6d18f9faa
|
[
"BSD-2-Clause"
] | 37
|
2015-01-28T17:58:12.000Z
|
2022-02-10T15:11:17.000Z
|
#!/usr/bin/env python
"""Test ltigalerkinproj module"""
import unittest
import os
from os.path import join
from shutil import rmtree
import numpy as np
from modred import ltigalerkinproj as lgp, parallel, util
from modred import util
from modred.py2to3 import range
from modred.vectors import VecHandlePickle
#@unittest.skip('Testing something else.')
class TestLTIGalerkinProjectionBase(unittest.TestCase):
def setUp(self):
if not os.access('.', os.W_OK):
raise RuntimeError('Cannot write to current directory')
self.test_dir ='files_LTIGalerkinProj_DELETE_ME'
if parallel.is_rank_zero() and not os.path.exists(self.test_dir):
os.mkdir(self.test_dir)
parallel.barrier()
def tearDown(self):
parallel.barrier()
parallel.call_from_rank_zero(rmtree, self.test_dir, ignore_errors=True)
parallel.barrier()
def test_put_reduced_arrays(self):
"""Test putting reduced mats"""
A_reduced_path = join(self.test_dir, 'A.txt')
B_reduced_path = join(self.test_dir, 'B.txt')
C_reduced_path = join(self.test_dir, 'C.txt')
A = parallel.call_and_bcast(np.random.random, ((10, 10)))
B = parallel.call_and_bcast(np.random.random, ((1, 10)))
C = parallel.call_and_bcast(np.random.random, ((10, 2)))
LTI_proj = lgp.LTIGalerkinProjectionBase()
LTI_proj.A_reduced = A.copy()
LTI_proj.B_reduced = B.copy()
LTI_proj.C_reduced = C.copy()
LTI_proj.put_model(A_reduced_path, B_reduced_path, C_reduced_path)
np.testing.assert_equal(util.load_array_text(A_reduced_path), A)
np.testing.assert_equal(util.load_array_text(B_reduced_path), B)
np.testing.assert_equal(util.load_array_text(C_reduced_path), C)
#@unittest.skip('Testing something else.')
@unittest.skipIf(parallel.is_distributed(), 'Serial only')
class TestLTIGalerkinProjectionArrays(unittest.TestCase):
"""Tests that can find the correct A, B, and C arrays."""
def setUp(self):
self.num_basis_vecs = 10
self.num_adjoint_basis_vecs = 10
self.num_states = 11
self.num_inputs = 3
self.num_outputs = 2
self.generate_data_set(
self.num_basis_vecs, self.num_adjoint_basis_vecs,
self.num_states, self.num_inputs, self.num_outputs)
self.LTI_proj = lgp.LTIGalerkinProjectionArrays(
self.basis_vecs, adjoint_basis_vecs=self.adjoint_basis_vecs,
is_basis_orthonormal=True)
def tearDown(self):
pass
def test_init(self):
""" """
pass
def generate_data_set(
self, num_basis_vecs, num_adjoint_basis_vecs,
num_states, num_inputs, num_outputs):
"""Generates random data, saves, and computes true reduced A, B, C."""
self.basis_vecs = (
parallel.call_and_bcast(
np.random.random, (num_states, num_basis_vecs)) +
1j * parallel.call_and_bcast(
np.random.random, (num_states, num_basis_vecs)))
self.adjoint_basis_vecs =(
parallel.call_and_bcast(
np.random.random, (num_states, num_basis_vecs)) +
1j * parallel.call_and_bcast(
np.random.random, (num_states, num_basis_vecs)))
self.A_array = (
parallel.call_and_bcast(
np.random.random, (num_states, num_states)) +
1j * parallel.call_and_bcast(
np.random.random, (num_states, num_states)))
self.B_array = (
parallel.call_and_bcast(
np.random.random, (num_states, num_inputs)) +
1j * parallel.call_and_bcast(
np.random.random, (num_states, num_inputs)))
self.C_array = (
parallel.call_and_bcast(
np.random.random, (num_outputs, num_states)) +
1j * parallel.call_and_bcast(
np.random.random, (num_outputs, num_states)))
self.A_on_basis_vecs = self.A_array.dot(self.basis_vecs)
self.B_on_standard_basis_array = self.B_array
self.C_on_basis_vecs = self.C_array.dot(self.basis_vecs).squeeze()
parallel.barrier()
self.A_true = self.adjoint_basis_vecs.conj().T.dot(
self.A_array.dot(
self.basis_vecs))
self.B_true = self.adjoint_basis_vecs.conj().T.dot(self.B_array)
self.C_true = self.C_array.dot(self.basis_vecs)
self.proj_array = np.linalg.inv(
self.adjoint_basis_vecs.conj().T.dot(self.basis_vecs))
self.A_true_non_orth = self.proj_array.dot(self.A_true)
self.B_true_non_orth = self.proj_array.dot(self.B_true)
#@unittest.skip('Testing something else')
def test_reduce_A(self):
"""Reduction of A array for Array, LookUp operators and in_memory."""
A_returned = self.LTI_proj.reduce_A(self.A_on_basis_vecs)
np.testing.assert_equal(A_returned, self.A_true)
LTI_proj = lgp.LTIGalerkinProjectionArrays(
self.basis_vecs, adjoint_basis_vecs=self.adjoint_basis_vecs,
is_basis_orthonormal=False)
A_returned = LTI_proj.reduce_A(self.A_on_basis_vecs)
np.testing.assert_equal(LTI_proj._proj_array, self.proj_array)
np.testing.assert_equal(A_returned, self.A_true_non_orth)
#@unittest.skip('Testing something else')
def test_reduce_B(self):
"""Given modes, test reduced B array"""
B_returned = self.LTI_proj.reduce_B(self.B_on_standard_basis_array)
np.testing.assert_equal(B_returned, self.B_true)
LTI_proj = lgp.LTIGalerkinProjectionArrays(
self.basis_vecs, adjoint_basis_vecs=self.adjoint_basis_vecs,
is_basis_orthonormal=False)
B_returned = LTI_proj.reduce_B(self.B_on_standard_basis_array)
np.testing.assert_allclose(B_returned, self.B_true_non_orth)
#@unittest.skip('Testing something else')
def test_reduce_C(self):
"""Test that, given modes, can find correct C array"""
C_returned = self.LTI_proj.reduce_C(self.C_on_basis_vecs)
np.testing.assert_equal(C_returned, self.C_true)
#@unittest.skip('Testing something else')
def test_compute_model(self):
# No test; just check it runs. Results are checked in other tests.
A, B, C = self.LTI_proj.compute_model(
self.A_on_basis_vecs, self.B_on_standard_basis_array,
self.C_on_basis_vecs)
#@unittest.skip('Testing something else')
def test_adjoint_basis_vec_optional(self):
"""Test that adjoint modes default to direct modes"""
no_adjoints_LTI_proj = lgp.LTIGalerkinProjectionArrays(
self.basis_vecs, is_basis_orthonormal=True)
np.testing.assert_equal(
no_adjoints_LTI_proj.adjoint_basis_vecs,
self.basis_vecs)
#@unittest.skip('Testing something else.')
#@unittest.skipIf(parallel.is_distributed(), 'Only test in serial')
class TestLTIGalerkinProjectionHandles(unittest.TestCase):
"""Tests that can find the correct A, B, and C arrays from modes."""
def setUp(self):
if not os.access('.', os.W_OK):
raise RuntimeError('Cannot write to current directory')
self.test_dir ='file_LTIGalerkinProj_DELETE_ME'
if parallel.is_rank_zero() and not os.path.exists(self.test_dir):
os.mkdir(self.test_dir)
parallel.barrier()
self.basis_vec_path = join(self.test_dir, 'basis_vec_%02d.txt')
self.adjoint_basis_vec_path = join(
self.test_dir, 'adjoint_basis_vec_%02d.txt')
self.A_on_basis_vec_path = join(self.test_dir, 'A_on_mode_%02d.txt')
self.B_on_basis_path = join(self.test_dir, 'B_on_basis_%02d.txt')
self.C_on_basis_vec_path = join(self.test_dir, 'C_on_mode_%02d.txt')
self.num_basis_vecs = 10
self.num_adjoint_basis_vecs = 10
self.num_states = 11
self.num_inputs = 3
self.num_outputs = 2
self.generate_data_set(
self.num_basis_vecs, self.num_adjoint_basis_vecs,
self.num_states, self.num_inputs, self.num_outputs)
self.LTI_proj = lgp.LTIGalerkinProjectionHandles(
np.vdot, self.basis_vec_handles,
adjoint_basis_vec_handles=self.adjoint_basis_vec_handles,
is_basis_orthonormal=True, verbosity=0)
def tearDown(self):
parallel.barrier()
if parallel.is_rank_zero():
rmtree(self.test_dir, ignore_errors=True)
parallel.barrier()
def test_init(self):
""" """
pass
def generate_data_set(self, num_basis_vecs, num_adjoint_basis_vecs,
num_states, num_inputs, num_outputs):
"""Generates random data, saves, and computes true reduced A,B,C."""
self.basis_vec_handles = [
VecHandlePickle(self.basis_vec_path % i)
for i in range(self.num_basis_vecs)]
self.adjoint_basis_vec_handles = [
VecHandlePickle(self.adjoint_basis_vec_path % i)
for i in range(self.num_adjoint_basis_vecs)]
self.A_on_basis_vec_handles = [
VecHandlePickle(self.A_on_basis_vec_path % i)
for i in range(self.num_basis_vecs)]
self.B_on_standard_basis_handles = [
VecHandlePickle(self.B_on_basis_path % i)
for i in range(self.num_inputs)]
self.C_on_basis_vec_handles = [
VecHandlePickle(self.C_on_basis_vec_path % i)
for i in range(self.num_basis_vecs)]
self.basis_vec_array = (
parallel.call_and_bcast(
np.random.random, (num_states, num_basis_vecs)) +
1j * parallel.call_and_bcast(
np.random.random, (num_states, num_basis_vecs)))
self.adjoint_basis_vec_array = (
parallel.call_and_bcast(
np.random.random, (num_states, num_adjoint_basis_vecs)) +
1j * parallel.call_and_bcast(
np.random.random, (num_states, num_adjoint_basis_vecs)))
self.A_array = (
parallel.call_and_bcast(
np.random.random, (num_states, num_states)) +
1j * parallel.call_and_bcast(
np.random.random, (num_states, num_states)))
self.B_array = (
parallel.call_and_bcast(
np.random.random, (num_states, num_inputs)) +
1j * parallel.call_and_bcast(
np.random.random, (num_states, num_inputs)))
self.C_array = (
parallel.call_and_bcast(
np.random.random, (num_outputs, num_states)) +
1j * parallel.call_and_bcast(
np.random.random, (num_outputs, num_states)))
self.basis_vecs = [
self.basis_vec_array[:, i].squeeze() for i in range(num_basis_vecs)]
self.adjoint_basis_vecs = [
self.adjoint_basis_vec_array[:, i].squeeze()
for i in range(num_adjoint_basis_vecs)]
self.A_on_basis_vecs = [
self.A_array.dot(basis_vec).squeeze()
for basis_vec in self.basis_vecs]
self.B_on_basis = [
self.B_array[:, i].squeeze() for i in range(self.num_inputs)]
self.C_on_basis_vecs = [
np.array(self.C_array.dot(basis_vec).squeeze(), ndmin=1)
for basis_vec in self.basis_vecs]
if parallel.is_rank_zero():
for handle,vec in zip(self.basis_vec_handles, self.basis_vecs):
handle.put(vec)
for handle,vec in zip(
self.adjoint_basis_vec_handles, self.adjoint_basis_vecs):
handle.put(vec)
for handle,vec in zip(
self.A_on_basis_vec_handles, self.A_on_basis_vecs):
handle.put(vec)
for handle,vec in zip(
self.B_on_standard_basis_handles, self.B_on_basis):
handle.put(vec)
for handle,vec in zip(
self.C_on_basis_vec_handles, self.C_on_basis_vecs):
handle.put(vec)
parallel.barrier()
self.A_true = self.adjoint_basis_vec_array.conj().T.dot(
self.A_array.dot(self.basis_vec_array))
self.B_true = self.adjoint_basis_vec_array.conj().T.dot(self.B_array)
self.C_true = self.C_array.dot(self.basis_vec_array)
self.proj_array = np.linalg.inv(
self.adjoint_basis_vec_array.conj().T.dot(self.basis_vec_array))
self.A_true_non_orth = self.proj_array.dot(self.A_true)
self.B_true_non_orth = self.proj_array.dot(self.B_true)
#@unittest.skip('Testing something else')
def test_derivs(self):
"""Test can take derivs"""
dt = 0.1
true_derivs = []
num_vecs = len(self.basis_vec_handles)
for i in range(num_vecs):
true_derivs.append((
self.A_on_basis_vec_handles[i].get() -
self.basis_vec_handles[i].get()).squeeze() / dt)
deriv_handles = [
VecHandlePickle(join(self.test_dir, 'deriv_test%d' % i))
for i in range(num_vecs)]
lgp.compute_derivs_handles(
self.basis_vec_handles, self.A_on_basis_vec_handles,
deriv_handles, dt)
derivs_loaded = [v.get() for v in deriv_handles]
derivs_loaded = list(map(np.squeeze, derivs_loaded))
list(map(np.testing.assert_allclose, derivs_loaded, true_derivs))
#@unittest.skip('Testing something else')
def test_reduce_A(self):
"""Reduction of A array for Array, LookUp operators and in_memory."""
A_returned = self.LTI_proj.reduce_A(self.A_on_basis_vec_handles)
np.testing.assert_allclose(A_returned, self.A_true)
LTI_proj = lgp.LTIGalerkinProjectionHandles(
np.vdot, self.basis_vec_handles,
adjoint_basis_vec_handles=self.adjoint_basis_vec_handles,
is_basis_orthonormal=False, verbosity=0)
A_returned = LTI_proj.reduce_A(self.A_on_basis_vec_handles)
np.testing.assert_allclose(LTI_proj._proj_array, self.proj_array)
np.testing.assert_allclose(A_returned, self.A_true_non_orth)
#@unittest.skip('Testing something else')
def test_reduce_B(self):
"""Given modes, test reduced B array, orthogonal and non-orthogonal."""
B_returned = self.LTI_proj.reduce_B(self.B_on_standard_basis_handles)
np.testing.assert_allclose(B_returned, self.B_true)
LTI_proj = lgp.LTIGalerkinProjectionHandles(
np.vdot, self.basis_vec_handles,
adjoint_basis_vec_handles=self.adjoint_basis_vec_handles,
is_basis_orthonormal=False, verbosity=0)
B_returned = LTI_proj.reduce_B(self.B_on_standard_basis_handles)
np.testing.assert_allclose(B_returned, self.B_true_non_orth)
#@unittest.skip('Testing something else')
def test_reduce_C(self):
"""Test that, given modes, can find correct C array"""
C_returned = self.LTI_proj.reduce_C(self.C_on_basis_vecs)
np.testing.assert_allclose(C_returned, self.C_true)
#@unittest.skip('Testing something else')
def test_adjoint_basis_vec_optional(self):
"""Test that adjoint modes default to direct modes"""
no_adjoints_LTI_proj = lgp.LTIGalerkinProjectionHandles(
np.vdot, self.basis_vec_handles, is_basis_orthonormal=True,
verbosity=0)
np.testing.assert_equal(
no_adjoints_LTI_proj.adjoint_basis_vec_handles,
self.basis_vec_handles)
if __name__ == '__main__':
unittest.main()
| 40.689295
| 80
| 0.653298
| 2,131
| 15,584
| 4.435946
| 0.086814
| 0.062837
| 0.039882
| 0.048662
| 0.871046
| 0.822808
| 0.777002
| 0.732677
| 0.694594
| 0.646038
| 0
| 0.00469
| 0.247497
| 15,584
| 382
| 81
| 40.795812
| 0.801398
| 0.090734
| 0
| 0.498246
| 0
| 0
| 0.019481
| 0.006186
| 0
| 0
| 0
| 0
| 0.063158
| 1
| 0.073684
| false
| 0.010526
| 0.031579
| 0
| 0.115789
| 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
|
6137e5f298abc622514c481c3285d77f39574c10
| 77
|
py
|
Python
|
openslides_backend/action/motion_category/__init__.py
|
reiterl/openslides-backend
|
d36667f00087ae8baf25853d4cef18a5e6dc7b3b
|
[
"MIT"
] | null | null | null |
openslides_backend/action/motion_category/__init__.py
|
reiterl/openslides-backend
|
d36667f00087ae8baf25853d4cef18a5e6dc7b3b
|
[
"MIT"
] | null | null | null |
openslides_backend/action/motion_category/__init__.py
|
reiterl/openslides-backend
|
d36667f00087ae8baf25853d4cef18a5e6dc7b3b
|
[
"MIT"
] | null | null | null |
from . import create_update_delete, sort, sort_motions_in_categories # noqa
| 38.5
| 76
| 0.831169
| 11
| 77
| 5.363636
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116883
| 77
| 1
| 77
| 77
| 0.867647
| 0.051948
| 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
|
614cc4649673df5e61ff260415e36d010cde631e
| 36,336
|
py
|
Python
|
tests/clients/settings/test_org_settings.py
|
PixelogicDev/py42
|
ccb100b03025fff1a060a39635bee3e76a251a85
|
[
"MIT"
] | null | null | null |
tests/clients/settings/test_org_settings.py
|
PixelogicDev/py42
|
ccb100b03025fff1a060a39635bee3e76a251a85
|
[
"MIT"
] | null | null | null |
tests/clients/settings/test_org_settings.py
|
PixelogicDev/py42
|
ccb100b03025fff1a060a39635bee3e76a251a85
|
[
"MIT"
] | null | null | null |
import json
from copy import deepcopy
import pytest
from tests.clients.conftest import param
from tests.clients.conftest import PHOTOS_REGEX
from tests.clients.conftest import PICTURES_REGEX
from tests.clients.conftest import TEST_ADDED_EXCLUDED_PATH
from tests.clients.conftest import TEST_ADDED_PATH
from tests.clients.conftest import TEST_EXTERNAL_DOCUMENTS_DIR
from tests.clients.conftest import TEST_HOME_DIR
from tests.clients.conftest import TEST_PHOTOS_DIR
from py42.clients.settings import get_val
from py42.clients.settings.org_settings import OrgSettings
from py42.exceptions import Py42Error
ONEGB = 1000000000
TEST_T_SETTINGS_DICT = {
"device_upgrade_delay": {
"scope": "ORG",
"value": "60",
"locked": False,
"id": 510808,
},
"org-securityTools-device-detection-enable": {
"scope": "ORG",
"value": "true",
"locked": False,
"id": 537575,
},
"device_engine_pause_allowedTypes": {
"scope": "ORG",
"value": '["legalHold","backup"]',
"locked": False,
"id": 537575,
},
"device_advancedExfiltrationDetection_enabled": {
"scope": "ORG",
"value": "true",
"locked": False,
"id": 537575,
},
"org_securityTools_printer_detection_enable": {
"scope": "ORG",
"value": "true",
"locked": False,
"id": 537575,
},
"device_network_dscp_preferIP4": {
"scope": "ORG",
"value": "false",
"locked": False,
"id": 537575,
},
"org-securityTools-cloud-detection-enable": {
"scope": "ORG",
"value": "true",
"locked": False,
"id": 537575,
},
"org-securityTools-enable": {
"scope": "ORG",
"value": "true",
"locked": False,
"id": 537575,
},
"c42.msa.acceptance": {
"scope": "ORG",
"value": "917633711460206173;tim.putnam+legacyadmin@code42.com;2019-09-05T17:05:09:046",
"locked": True,
"id": 510682,
},
"org-securityTools-yara-scanner-enable": {
"scope": "ORG",
"value": "true",
"locked": False,
"id": 510853,
},
"org-securityTools-restore-detection-enable": {
"scope": "ORG",
"value": "true",
"locked": False,
"id": 510853,
},
"device_fileForensics_enabled": {
"scope": "ORG",
"value": "true",
"locked": False,
"id": 537575,
},
"device_webRestore_enabled": {
"scope": "ORG",
"value": "false",
"locked": False,
"id": 510808,
},
"device_network_utilization_schedule_enabled": {
"scope": "ORG",
"value": "true",
"locked": True,
"id": 537575,
},
"device_network_utilization_schedule_rate": {
"scope": "ORG",
"value": '{"peak":{"wan":{"active":"256","idle":"0"},"lan":{"active":"256","idle":"256"}},"offPeak":{"wan":{"active":0,"idle":0},"lan":{"active":0,"idle":0}}}',
"locked": True,
"id": 537575,
},
"org-securityTools-open-file-detection-enable": {
"scope": "ORG",
"value": "true",
"locked": False,
"id": 537575,
},
"device_network_utilization_schedule": {
"scope": "ORG",
"value": '{"sun":{"included":"true","startTimeOfDay":"09:00","endTimeOfDay":"17:00"},"mon":{"included":"true","startTimeOfDay":"09:00","endTimeOfDay":"17:00"},"tue":{"included":"true","startTimeOfDay":"09:00","endTimeOfDay":"17:00"},"wed":{"included":true,"startTimeOfDay":"12:00","endTimeOfDay":"19:00"},"thu":{"included":"true","startTimeOfDay":"09:00","endTimeOfDay":"17:00"},"fri":{"included":"true","startTimeOfDay":"09:00","endTimeOfDay":"17:00"},"sat":{"included":"true","startTimeOfDay":"09:00","endTimeOfDay":"17:00"}}',
"locked": True,
"id": 537575,
},
}
@pytest.fixture
def org_settings_dict():
with open("tests/clients/settings/org_settings_not_inherited.json", "r") as f:
data = json.load(f)
return data["data"]
@pytest.fixture
def org_settings_inherited_dict():
with open("tests/clients/settings/org_settings_inherited.json", "r") as f:
data = json.load(f)
return data["data"]
@pytest.fixture
def org_device_defaults_with_empty_values(org_settings_dict):
org_settings_dict = deepcopy(org_settings_dict)
# set empty file selection
org_settings_dict["deviceDefaults"]["serviceBackupConfig"]["backupConfig"][
"backupSets"
]["backupSet"][0]["backupPaths"]["pathset"] = [
{"paths": {"@os": "Linux", "path": [], "@cleared": "true"}}
]
# set empty filename exclusions
org_settings_dict["deviceDefaults"]["serviceBackupConfig"]["backupConfig"][
"backupSets"
]["backupSet"][0]["backupPaths"]["excludeUser"] = [
{u"windows": [], u"linux": [], u"macintosh": []}
]
return org_settings_dict
@pytest.fixture
def org_device_defaults_with_single_values(org_settings_dict):
org_settings_dict = deepcopy(org_settings_dict)
# set single path file selection
org_settings_dict["deviceDefaults"]["serviceBackupConfig"]["backupConfig"][
"backupSets"
]["backupSet"][0]["backupPaths"]["pathset"] = [
{"path": {"@include": TEST_HOME_DIR}, "@os": "Linux"}
]
# set single filename exclusions
org_settings_dict["deviceDefaults"]["serviceBackupConfig"]["backupConfig"][
"backupSets"
]["backupSet"][0]["backupPaths"]["excludeUser"] = [
{
"windows": [],
"pattern": {"@regex": PHOTOS_REGEX},
"linux": [],
"macintosh": [],
}
]
return org_settings_dict
@pytest.fixture
def org_device_defaults_with_multiple_values(org_settings_dict):
org_settings_dict = deepcopy(org_settings_dict)
org_settings_dict["deviceDefaults"]["serviceBackupConfig"]["backupConfig"][
"backupSets"
]["backupSet"][0]["backupPaths"]["pathset"] = [
{
"path": [
{"@include": TEST_HOME_DIR},
{"@include": TEST_EXTERNAL_DOCUMENTS_DIR},
{"@exclude": TEST_PHOTOS_DIR},
],
"@os": "Linux",
}
]
org_settings_dict["deviceDefaults"]["serviceBackupConfig"]["backupConfig"][
"backupSets"
]["backupSet"][0]["backupPaths"]["excludeUser"] = [
{
"windows": [],
"pattern": [{"@regex": PHOTOS_REGEX}, {"@regex": PICTURES_REGEX}],
"linux": [],
"macintosh": [],
}
]
return org_settings_dict
class TestOrgSettings(object):
@pytest.mark.parametrize(
"param",
[
("org_name", "TEST_ORG"),
("external_reference", "test_ref"),
("notes", "test_note"),
("archive_hold_days", 365),
("maximum_user_subscriptions", 99),
("org_backup_quota", -1),
("user_backup_quota", -1),
("web_restore_admin_limit", 500),
("web_restore_user_limit", 250),
("backup_warning_email_days", 3),
("backup_critical_email_days", 14),
("backup_alert_recipient_emails", ["test@example.com"]),
],
)
def test_org_settings_properties_retrieve_expected_results(
self, param, org_settings_dict
):
org_settings = OrgSettings(org_settings_dict, TEST_T_SETTINGS_DICT)
attr, expected = param
assert getattr(org_settings, attr) == expected
def test_inherited_org_settings_inheritance_flags_return_true(
self, org_settings_inherited_dict
):
org_settings = OrgSettings(org_settings_inherited_dict, TEST_T_SETTINGS_DICT)
assert org_settings.quota_settings_inherited
assert org_settings.reporting_settings_inherited
@pytest.mark.parametrize(
"param",
[
("archive_hold_days", 14),
("maximum_user_subscriptions", -1),
("org_backup_quota", -1),
("user_backup_quota", -1),
("web_restore_admin_limit", 250),
("web_restore_user_limit", 250),
("backup_warning_email_days", 7),
("backup_critical_email_days", 14),
("backup_alert_recipient_emails", []),
],
)
def test_inherited_org_settings_properties_retrieve_expected_results(
self, param, org_settings_inherited_dict
):
org_settings = OrgSettings(org_settings_inherited_dict, TEST_T_SETTINGS_DICT)
attr, expected = param
assert getattr(org_settings, attr) == expected
@pytest.mark.parametrize(
"param",
[
("archive_hold_days", 15),
("maximum_user_subscriptions", 100),
("org_backup_quota", 10000),
("user_backup_quota", 10000),
],
)
def test_inherited_org_quota_settings_setattr_removes_inheritance(
self, param, org_settings_inherited_dict
):
org_settings = OrgSettings(org_settings_inherited_dict, TEST_T_SETTINGS_DICT)
attr, val = param
setattr(org_settings, attr, val)
assert not org_settings.quota_settings_inherited
@pytest.mark.parametrize(
"param",
[
(
"available_destinations",
{
"632540230984925185": "PROe Cloud, US - West",
"43": "PROe Cloud, US",
"673679195225718785": "PROe Cloud, AMS",
"587738803578339329": "PROe Cloud, SIN",
},
),
("warning_email_enabled", False),
("critical_email_enabled", False),
("warning_alert_days", 3),
("critical_alert_days", 5),
("backup_status_email_enabled", False),
("backup_status_email_frequency_days", 7),
],
)
def test_org_settings_device_defaults_retrieve_expected_results(
self, param, org_settings_dict
):
org_settings = OrgSettings(org_settings_dict, TEST_T_SETTINGS_DICT)
attr, expected = param
assert getattr(org_settings.device_defaults, attr) == expected
def test_org_settings_endpoint_monitoring_enabled_returns_expected_results(
self, org_settings_dict
):
t_setting = deepcopy(TEST_T_SETTINGS_DICT)
t_setting["org-securityTools-enable"]["value"] = "true"
org_settings = OrgSettings(org_settings_dict, t_setting)
assert org_settings.endpoint_monitoring_enabled is True
t_setting["org-securityTools-enable"]["value"] = "false"
org_settings = OrgSettings(org_settings_dict, t_setting)
assert org_settings.endpoint_monitoring_enabled is False
def test_org_settings_set_endpoint_monitoring_enabled_to_true_from_false_creates_expected_packets(
self, org_settings_dict
):
t_setting = deepcopy(TEST_T_SETTINGS_DICT)
t_setting["org-securityTools-enable"]["value"] = "true"
org_settings = OrgSettings(org_settings_dict, t_setting)
org_settings.endpoint_monitoring_enabled = False
assert {
"key": "org-securityTools-enable",
"value": "false",
"locked": False,
} in org_settings.packets
assert {
"key": "device_advancedExfiltrationDetection_enabled",
"value": "false",
"locked": False,
} in org_settings.packets
assert {
"key": "org-securityTools-cloud-detection-enable",
"value": "false",
"locked": False,
} in org_settings.packets
assert {
"key": "org-securityTools-open-file-detection-enable",
"value": "false",
"locked": False,
} in org_settings.packets
assert {
"key": "org-securityTools-device-detection-enable",
"value": "false",
"locked": False,
} in org_settings.packets
assert {
"key": "org_securityTools_printer_detection_enable",
"value": "false",
"locked": False,
} in org_settings.packets
assert len(org_settings.packets) == 6
def test_org_settings_set_endpoint_monitoring_enabled_to_false_from_true_creates_expected_packets(
self, org_settings_dict
):
t_setting = deepcopy(TEST_T_SETTINGS_DICT)
t_setting["org-securityTools-enable"]["value"] = "false"
org_settings = OrgSettings(org_settings_dict, t_setting)
org_settings.endpoint_monitoring_enabled = True
assert {
"key": "org-securityTools-enable",
"value": "true",
"locked": False,
} in org_settings.packets
assert {
"key": "device_advancedExfiltrationDetection_enabled",
"value": "true",
"locked": False,
} in org_settings.packets
assert len(org_settings.packets) == 2
@pytest.mark.parametrize(
"param",
[
(
"endpoint_monitoring_removable_media_enabled",
"org-securityTools-device-detection-enable",
),
(
"endpoint_monitoring_cloud_sync_enabled",
"org-securityTools-cloud-detection-enable",
),
(
"endpoint_monitoring_browser_and_applications_enabled",
"org-securityTools-open-file-detection-enable",
),
(
"endpoint_monitoring_file_metadata_collection_enabled",
"device_fileForensics_enabled",
),
],
)
def test_org_settings_set_endpoint_monitoring_sub_categories_when_endpoint_monitoring_disabled_sets_endpoint_monitoring_enabled(
self, param, org_settings_dict
):
attr, key = param
t_setting = deepcopy(TEST_T_SETTINGS_DICT)
settings = deepcopy(org_settings_dict)
t_setting["org-securityTools-enable"]["value"] = "false"
org_settings = OrgSettings(settings, t_setting)
setattr(org_settings, attr, True)
packet_keys = [packet["key"] for packet in org_settings.packets]
assert key in packet_keys
assert "org-securityTools-enable" in packet_keys
for packet in org_settings.packets:
if packet["key"] == "org-securityTools-enable":
assert packet["value"] == "true"
if packet["key"] == key:
assert packet["value"] == "true"
@pytest.mark.parametrize(
"param",
[
param(
name="endpoint_monitoring_file_metadata_scan_enabled",
new_val=True,
expected_stored_val="true",
dict_location="device_fileForensics_scan_enabled",
),
param(
name="endpoint_monitoring_file_metadata_ingest_scan_enabled",
new_val=True,
expected_stored_val="true",
dict_location="device_fileForensics_enqueue_scan_events_during_ingest",
),
param(
name="endpoint_monitoring_background_priority_enabled",
new_val=True,
expected_stored_val="true",
dict_location="device_background_priority_enabled",
),
param(
name="web_restore_enabled",
new_val=True,
expected_stored_val="true",
dict_location="device_webRestore_enabled",
),
],
)
def test_org_settings_set_independent_t_setting_properties(
self, param, org_settings_dict
):
t_setting = deepcopy(TEST_T_SETTINGS_DICT)
settings = deepcopy(org_settings_dict)
org_settings = OrgSettings(settings, t_setting)
setattr(org_settings, param.name, param.new_val)
packet_keys = [packet["key"] for packet in org_settings.packets]
assert param.dict_location in packet_keys
for packet in org_settings.packets:
if packet["key"] == param.dict_location:
assert packet["value"] == "true"
setattr(org_settings, param.name, False)
packet_keys = [packet["key"] for packet in org_settings.packets]
assert param.dict_location in packet_keys
for packet in org_settings.packets:
if packet["key"] == param.dict_location:
assert packet["value"] == "false"
def test_missing_t_settings_return_none_when_accessed_by_property(
self, org_settings_dict
):
org_settings = OrgSettings(org_settings_dict, TEST_T_SETTINGS_DICT)
assert org_settings.endpoint_monitoring_file_metadata_scan_enabled is None
assert (
org_settings.endpoint_monitoring_file_metadata_ingest_scan_enabled is None
)
assert org_settings.endpoint_monitoring_background_priority_enabled is None
assert org_settings.endpoint_monitoring_custom_applications_win is None
assert org_settings.endpoint_monitoring_custom_applications_mac is None
assert (
org_settings.endpoint_monitoring_file_metadata_collection_exclusions is None
)
@pytest.mark.parametrize(
"param",
[
param(
name="org_name",
new_val="Org Name Updated",
expected_stored_val="Org Name Updated",
dict_location=["orgName"],
),
param(
name="external_reference",
new_val="Updated Reference",
expected_stored_val="Updated Reference",
dict_location=["orgExtRef"],
),
param(
name="notes",
new_val="Updated Note",
expected_stored_val="Updated Note",
dict_location=["notes"],
),
param(
name="maximum_user_subscriptions",
new_val=99,
expected_stored_val=99,
dict_location=["settings", "maxSeats"],
),
param(
name="org_backup_quota",
new_val=42,
expected_stored_val=ONEGB * 42,
dict_location=["settings", "maxBytes"],
),
param(
name="user_backup_quota",
new_val=42,
expected_stored_val=ONEGB * 42,
dict_location=["settings", "defaultUserMaxBytes"],
),
param(
name="web_restore_admin_limit",
new_val=42,
expected_stored_val=42,
dict_location=["settings", "webRestoreAdminLimitMb"],
),
param(
name="web_restore_user_limit",
new_val=42,
expected_stored_val=42,
dict_location=["settings", "webRestoreUserLimitMb"],
),
param(
name="backup_warning_email_days",
new_val=14,
expected_stored_val=14,
dict_location=["settings", "warnInDays"],
),
param(
name="backup_critical_email_days",
new_val=25,
expected_stored_val=25,
dict_location=["settings", "alertInDays"],
),
param(
name="backup_alert_recipient_emails",
new_val="test2@example.com", # test string input
expected_stored_val=["test2@example.com"],
dict_location=["settings", "recipients"],
),
param(
name="backup_alert_recipient_emails",
new_val=["test@example.com", "test2@example.com"], # test list input
expected_stored_val=["test@example.com", "test2@example.com"],
dict_location=["settings", "recipients"],
),
],
)
def test_org_settings_setting_mutable_property_updates_dict_correctly_and_registers_changes(
self, param, org_settings_dict
):
org_settings = OrgSettings(org_settings_dict, TEST_T_SETTINGS_DICT)
setattr(org_settings, param.name, param.new_val)
assert (
get_val(org_settings.data, param.dict_location) == param.expected_stored_val
)
assert param.name in org_settings.changes
class TestOrgDeviceSettingsDefaultsBackupSets(object):
def test_backup_set_destinations_property_returns_expected_value(
self, org_settings_dict
):
backup_set_0_expected_destinations = {}
backup_set_1_expected_destinations = {
"43": "PROe Cloud, US <LOCKED>",
"673679195225718785": "PROe Cloud, AMS",
}
org_settings = OrgSettings(org_settings_dict, TEST_T_SETTINGS_DICT)
assert (
org_settings.device_defaults.backup_sets[0].destinations
== backup_set_0_expected_destinations
)
assert (
org_settings.device_defaults.backup_sets[1].destinations
== backup_set_1_expected_destinations
)
def test_backup_set_add_destination_when_destination_available(
self, org_settings_dict
):
org_settings = OrgSettings(org_settings_dict, TEST_T_SETTINGS_DICT)
org_settings.device_defaults.backup_sets[0].add_destination(632540230984925185)
expected_destinations_property = {
"43": "PROe Cloud, US <LOCKED>",
"673679195225718785": "PROe Cloud, AMS",
}
expected_destinations_list = [
{"@id": "43", "@locked": "true"},
{"@id": "632540230984925185"},
{"@id": "673679195225718785"},
]
assert (
org_settings.device_defaults.backup_sets[1].destinations
== expected_destinations_property
)
for destination in expected_destinations_list:
destination in org_settings.device_defaults["settings"][
"serviceBackupConfig"
]["backupConfig"]["backupSets"]["backupSet"][1]["destinations"]
def test_backup_set_add_destination_when_destination_not_available_raises(
self, org_settings_dict
):
org_settings = OrgSettings(org_settings_dict, TEST_T_SETTINGS_DICT)
expected_destinations_property = {
"43": "PROe Cloud, US <LOCKED>",
"673679195225718785": "PROe Cloud, AMS",
}
with pytest.raises(Py42Error):
org_settings.device_defaults.backup_sets[1].add_destination(404)
assert (
org_settings.device_defaults.backup_sets[1].destinations
== expected_destinations_property
)
def test_backup_set_remove_destination_when_destination_available(
self, org_settings_dict
):
org_settings = OrgSettings(org_settings_dict, TEST_T_SETTINGS_DICT)
expected_destinations_property = {"673679195225718785": "PROe Cloud, AMS"}
expected_destinations_dict = [{"@id": "673679195225718785"}]
org_settings.device_defaults.backup_sets[1].remove_destination(43)
assert (
org_settings.device_defaults.backup_sets[1].destinations
== expected_destinations_property
)
assert (
org_settings.device_defaults["settings"]["serviceBackupConfig"][
"backupConfig"
]["backupSets"]["backupSet"][1]["destinations"]
== expected_destinations_dict
)
def test_backup_set_remove_destination_when_destination_not_available_raises(
self, org_settings_dict
):
org_settings = OrgSettings(org_settings_dict, TEST_T_SETTINGS_DICT)
expected_destinations_property = {
"43": "PROe Cloud, US <LOCKED>",
"673679195225718785": "PROe Cloud, AMS",
}
with pytest.raises(Py42Error):
org_settings.device_defaults.backup_sets[1].remove_destination(404)
assert (
org_settings.device_defaults.backup_sets[1].destinations
== expected_destinations_property
)
def test_backup_set_lock_destination(self, org_settings_dict):
org_settings = OrgSettings(org_settings_dict, TEST_T_SETTINGS_DICT)
expected_destinations_property = {
"43": "PROe Cloud, US <LOCKED>",
"673679195225718785": "PROe Cloud, AMS <LOCKED>",
}
expected_destinations_dict = [
{"@id": "43", "@locked": "true"},
{"@id": "673679195225718785", "@locked": "true"},
]
org_settings.device_defaults.backup_sets[1].lock_destination(673679195225718785)
assert (
org_settings.device_defaults.backup_sets[1].destinations
== expected_destinations_property
)
assert (
org_settings.device_defaults["settings"]["serviceBackupConfig"][
"backupConfig"
]["backupSets"]["backupSet"][1]["destinations"]
== expected_destinations_dict
)
def test_backup_set_unlock_destination(self, org_settings_dict):
org_settings = OrgSettings(org_settings_dict, TEST_T_SETTINGS_DICT)
expected_destinations_property = {
"43": "PROe Cloud, US",
"673679195225718785": "PROe Cloud, AMS",
}
expected_destinations_dict = [
{"@id": "43"},
{"@id": "673679195225718785"},
]
org_settings.device_defaults.backup_sets[1].unlock_destination(43)
assert (
org_settings.device_defaults.backup_sets[1].destinations
== expected_destinations_property
)
assert (
org_settings.device_defaults["settings"]["serviceBackupConfig"][
"backupConfig"
]["backupSets"]["backupSet"][1]["destinations"]
== expected_destinations_dict
)
def test_backup_set_included_files_returns_expected_values(
self,
org_device_defaults_with_empty_values,
org_device_defaults_with_single_values,
org_device_defaults_with_multiple_values,
):
# empty pathset
org_settings = OrgSettings(
org_device_defaults_with_empty_values, TEST_T_SETTINGS_DICT
)
assert org_settings.device_defaults.backup_sets[0].included_files == []
# single path pathset
org_settings = OrgSettings(
org_device_defaults_with_single_values, TEST_T_SETTINGS_DICT
)
assert org_settings.device_defaults.backup_sets[0].included_files == [
TEST_HOME_DIR
]
# multiple path pathset
org_settings = OrgSettings(
org_device_defaults_with_multiple_values, TEST_T_SETTINGS_DICT
)
assert org_settings.device_defaults.backup_sets[0].included_files == [
TEST_HOME_DIR,
TEST_EXTERNAL_DOCUMENTS_DIR,
]
def test_backup_set_included_files_append_produces_expected_pathset_value_and_registers_change(
self, org_device_defaults_with_multiple_values
):
org_settings = OrgSettings(
org_device_defaults_with_multiple_values, TEST_T_SETTINGS_DICT
)
org_settings.device_defaults.backup_sets[0].pop("@locked")
expected_path_list = [
{"@include": TEST_HOME_DIR, "@und": "false"},
{"@include": TEST_EXTERNAL_DOCUMENTS_DIR, "@und": "false"},
{"@include": TEST_ADDED_PATH, "@und": "false"},
{"@exclude": TEST_PHOTOS_DIR, "@und": "false"},
]
org_settings.device_defaults.backup_sets[0].included_files.append(
TEST_ADDED_PATH
)
actual_path_list = org_settings.device_defaults["settings"][
"serviceBackupConfig"
]["backupConfig"]["backupSets"]["backupSet"][0]["backupPaths"]["pathset"][
"paths"
][
"path"
]
assert actual_path_list == expected_path_list
assert "included_files" in org_settings.device_defaults.changes
assert (
"-> {}".format(
[TEST_HOME_DIR, TEST_EXTERNAL_DOCUMENTS_DIR, TEST_ADDED_PATH]
)
in org_settings.device_defaults.changes["included_files"]
)
def test_backup_set_included_files_remove_produces_expected_pathset_value(
self, org_device_defaults_with_multiple_values
):
org_settings = OrgSettings(
org_device_defaults_with_multiple_values, TEST_T_SETTINGS_DICT
)
org_settings.device_defaults.backup_sets[0].pop("@locked")
expected_path_list = [
{"@include": TEST_HOME_DIR, "@und": "false"},
{"@exclude": TEST_PHOTOS_DIR, "@und": "false"},
]
org_settings.device_defaults.backup_sets[0].included_files.remove(
TEST_EXTERNAL_DOCUMENTS_DIR
)
actual_path_list = org_settings.device_defaults["settings"][
"serviceBackupConfig"
]["backupConfig"]["backupSets"]["backupSet"][0]["backupPaths"]["pathset"][
"paths"
][
"path"
]
assert actual_path_list == expected_path_list
assert "included_files" in org_settings.device_defaults.changes
assert (
"-> {}".format([TEST_HOME_DIR])
in org_settings.device_defaults.changes["included_files"]
)
def test_backup_set_excluded_files_returns_expected_values(
self,
org_device_defaults_with_empty_values,
org_device_defaults_with_multiple_values,
):
# empty file selection
org_settings = OrgSettings(
org_device_defaults_with_empty_values, TEST_T_SETTINGS_DICT
)
assert org_settings.device_defaults.backup_sets[0].excluded_files == []
# multiple path pathset
org_settings = OrgSettings(
org_device_defaults_with_multiple_values, TEST_T_SETTINGS_DICT
)
assert org_settings.device_defaults.backup_sets[0].excluded_files == [
TEST_PHOTOS_DIR
]
def test_backup_set_excluded_files_append_produces_expected_pathset_value_and_registers_change(
self, org_device_defaults_with_multiple_values
):
org_settings = OrgSettings(
org_device_defaults_with_multiple_values, TEST_T_SETTINGS_DICT
)
org_settings.device_defaults.backup_sets[0].pop("@locked")
org_settings.device_defaults.backup_sets[0].excluded_files.append(
TEST_ADDED_EXCLUDED_PATH
)
expected_path_list = [
{"@include": TEST_HOME_DIR, "@und": "false"},
{"@exclude": TEST_PHOTOS_DIR, "@und": "false"},
{"@exclude": TEST_ADDED_EXCLUDED_PATH, "@und": "false"},
]
actual_path_list = org_settings.device_defaults["settings"][
"serviceBackupConfig"
]["backupConfig"]["backupSets"]["backupSet"][0]["backupPaths"]["pathset"][
"paths"
][
"path"
]
for path in expected_path_list:
assert path in actual_path_list
assert "excluded_files" in org_settings.device_defaults.changes
assert (
"-> {}".format([TEST_PHOTOS_DIR, TEST_ADDED_EXCLUDED_PATH])
in org_settings.device_defaults.changes["excluded_files"]
)
def test_backup_set_excluded_files_remove_produces_expected_pathset_value(
self, org_device_defaults_with_multiple_values
):
org_settings = OrgSettings(
org_device_defaults_with_multiple_values, TEST_T_SETTINGS_DICT
)
org_settings.device_defaults.backup_sets[0].pop("@locked")
expected_path_list = [
{"@include": TEST_HOME_DIR, "@und": "false"},
]
org_settings.device_defaults.backup_sets[0].excluded_files.remove(
TEST_PHOTOS_DIR
)
actual_path_list = org_settings.device_defaults["settings"][
"serviceBackupConfig"
]["backupConfig"]["backupSets"]["backupSet"][0]["backupPaths"]["pathset"][
"paths"
][
"path"
]
for path in expected_path_list:
assert path in actual_path_list
assert "excluded_files" in org_settings.device_defaults.changes
assert (
"-> {}".format([]) in org_settings.device_defaults.changes["excluded_files"]
)
def test_backup_set_filename_exclusions_returns_expected_list_results(
self,
org_device_defaults_with_empty_values,
org_device_defaults_with_single_values,
org_device_defaults_with_multiple_values,
):
# empty exclude list
org_settings = OrgSettings(
org_device_defaults_with_empty_values, TEST_T_SETTINGS_DICT
)
assert org_settings.device_defaults.backup_sets[0].filename_exclusions == []
# single exclude
org_settings = OrgSettings(
org_device_defaults_with_single_values, TEST_T_SETTINGS_DICT
)
assert org_settings.device_defaults.backup_sets[0].filename_exclusions == [
PHOTOS_REGEX
]
# multiple excludes
org_settings = OrgSettings(
org_device_defaults_with_multiple_values, TEST_T_SETTINGS_DICT
)
assert org_settings.device_defaults.backup_sets[0].filename_exclusions == [
PHOTOS_REGEX,
PICTURES_REGEX,
]
def test_backup_set_filename_exclusions_append_produces_expected_values(
self,
org_device_defaults_with_empty_values,
org_device_defaults_with_single_values,
org_device_defaults_with_multiple_values,
):
# empty starting filename exclusions
org_settings = OrgSettings(
org_device_defaults_with_empty_values, TEST_T_SETTINGS_DICT
)
org_settings.device_defaults.backup_sets[0].pop("@locked")
org_settings.device_defaults.backup_sets[0].filename_exclusions.append(
PHOTOS_REGEX
)
assert org_settings["deviceDefaults"]["serviceBackupConfig"]["backupConfig"][
"backupSets"
]["backupSet"][0]["backupPaths"]["excludeUser"]["patternList"]["pattern"] == [
{"@regex": PHOTOS_REGEX}
]
assert "filename_exclusions" in org_settings.changes
assert PHOTOS_REGEX in org_settings.changes["filename_exclusions"]
# single starting filename exclusion
org_settings = OrgSettings(
org_device_defaults_with_single_values, TEST_T_SETTINGS_DICT
)
org_settings.device_defaults.backup_sets[0].pop("@locked")
org_settings.device_defaults.backup_sets[0].filename_exclusions.append(
PICTURES_REGEX
)
assert org_settings["deviceDefaults"]["serviceBackupConfig"]["backupConfig"][
"backupSets"
]["backupSet"][0]["backupPaths"]["excludeUser"]["patternList"]["pattern"] == [
{"@regex": PHOTOS_REGEX},
{"@regex": PICTURES_REGEX},
]
assert "filename_exclusions" in org_settings.changes
assert PHOTOS_REGEX in org_settings.changes["filename_exclusions"]
assert PICTURES_REGEX in org_settings.changes["filename_exclusions"]
# multiple starting filename exclusions
NEW_REGEX = ".*/Logs/"
org_settings = OrgSettings(
org_device_defaults_with_multiple_values, TEST_T_SETTINGS_DICT
)
org_settings.device_defaults.backup_sets[0].pop("@locked")
org_settings.device_defaults.backup_sets[0].filename_exclusions.append(
NEW_REGEX
)
assert org_settings["deviceDefaults"]["serviceBackupConfig"]["backupConfig"][
"backupSets"
]["backupSet"][0]["backupPaths"]["excludeUser"]["patternList"]["pattern"] == [
{"@regex": PHOTOS_REGEX},
{"@regex": PICTURES_REGEX},
{"@regex": NEW_REGEX},
]
assert "filename_exclusions" in org_settings.changes
assert PHOTOS_REGEX in org_settings.changes["filename_exclusions"]
assert PICTURES_REGEX in org_settings.changes["filename_exclusions"]
assert NEW_REGEX in org_settings.changes["filename_exclusions"]
| 37.929019
| 537
| 0.614212
| 3,601
| 36,336
| 5.80561
| 0.084143
| 0.110495
| 0.043911
| 0.064575
| 0.809815
| 0.774084
| 0.74151
| 0.702143
| 0.666938
| 0.610447
| 0
| 0.027068
| 0.277108
| 36,336
| 957
| 538
| 37.968652
| 0.768835
| 0.011256
| 0
| 0.588501
| 0
| 0.003382
| 0.208666
| 0.088864
| 0
| 0
| 0
| 0
| 0.086809
| 1
| 0.036077
| false
| 0
| 0.015784
| 0
| 0.059752
| 0.002255
| 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
|
615cb7396f03427ad5e2992be3a697137fc16b6c
| 109
|
py
|
Python
|
src/exec/__init__.py
|
feimaomiao/PWDS
|
5859abc9ec8f46594f2d6f1113dd6f4433097b42
|
[
"MIT"
] | 2
|
2020-01-15T05:33:16.000Z
|
2020-01-23T19:50:44.000Z
|
src/exec/__init__.py
|
feimaomiao/PWDS
|
5859abc9ec8f46594f2d6f1113dd6f4433097b42
|
[
"MIT"
] | null | null | null |
src/exec/__init__.py
|
feimaomiao/PWDS
|
5859abc9ec8f46594f2d6f1113dd6f4433097b42
|
[
"MIT"
] | null | null | null |
from .alterPrefs import *
from .enc import *
from .funcs import *
from .pwd import *
from .userClass import *
| 21.8
| 25
| 0.733945
| 15
| 109
| 5.333333
| 0.466667
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174312
| 109
| 5
| 26
| 21.8
| 0.888889
| 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
|
616e45e3a4aaad2bfe944201676f35f76e2dadda
| 14,104
|
py
|
Python
|
sdk/python/pulumi_equinix_metal/organization.py
|
pulumi/pulumi-equinix-metal
|
79213497bddc7ae806d3b27c3f349fdff935a19f
|
[
"ECL-2.0",
"Apache-2.0"
] | 1
|
2021-01-08T21:57:33.000Z
|
2021-01-08T21:57:33.000Z
|
sdk/python/pulumi_equinix_metal/organization.py
|
pulumi/pulumi-equinix-metal
|
79213497bddc7ae806d3b27c3f349fdff935a19f
|
[
"ECL-2.0",
"Apache-2.0"
] | 33
|
2020-12-23T21:37:39.000Z
|
2022-03-25T19:23:17.000Z
|
sdk/python/pulumi_equinix_metal/organization.py
|
pulumi/pulumi-equinix-metal
|
79213497bddc7ae806d3b27c3f349fdff935a19f
|
[
"ECL-2.0",
"Apache-2.0"
] | 1
|
2021-01-08T21:24:44.000Z
|
2021-01-08T21:24:44.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
__all__ = ['OrganizationArgs', 'Organization']
@pulumi.input_type
class OrganizationArgs:
def __init__(__self__, *,
description: Optional[pulumi.Input[str]] = None,
logo: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
twitter: Optional[pulumi.Input[str]] = None,
website: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a Organization resource.
:param pulumi.Input[str] description: Description string
:param pulumi.Input[str] logo: Logo URL
:param pulumi.Input[str] name: The name of the Organization
:param pulumi.Input[str] twitter: Twitter handle
:param pulumi.Input[str] website: Website link
"""
if description is not None:
pulumi.set(__self__, "description", description)
if logo is not None:
pulumi.set(__self__, "logo", logo)
if name is not None:
pulumi.set(__self__, "name", name)
if twitter is not None:
pulumi.set(__self__, "twitter", twitter)
if website is not None:
pulumi.set(__self__, "website", website)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Description string
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def logo(self) -> Optional[pulumi.Input[str]]:
"""
Logo URL
"""
return pulumi.get(self, "logo")
@logo.setter
def logo(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "logo", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the Organization
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def twitter(self) -> Optional[pulumi.Input[str]]:
"""
Twitter handle
"""
return pulumi.get(self, "twitter")
@twitter.setter
def twitter(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "twitter", value)
@property
@pulumi.getter
def website(self) -> Optional[pulumi.Input[str]]:
"""
Website link
"""
return pulumi.get(self, "website")
@website.setter
def website(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "website", value)
@pulumi.input_type
class _OrganizationState:
def __init__(__self__, *,
created: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
logo: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
twitter: Optional[pulumi.Input[str]] = None,
updated: Optional[pulumi.Input[str]] = None,
website: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering Organization resources.
:param pulumi.Input[str] description: Description string
:param pulumi.Input[str] logo: Logo URL
:param pulumi.Input[str] name: The name of the Organization
:param pulumi.Input[str] twitter: Twitter handle
:param pulumi.Input[str] website: Website link
"""
if created is not None:
pulumi.set(__self__, "created", created)
if description is not None:
pulumi.set(__self__, "description", description)
if logo is not None:
pulumi.set(__self__, "logo", logo)
if name is not None:
pulumi.set(__self__, "name", name)
if twitter is not None:
pulumi.set(__self__, "twitter", twitter)
if updated is not None:
pulumi.set(__self__, "updated", updated)
if website is not None:
pulumi.set(__self__, "website", website)
@property
@pulumi.getter
def created(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "created")
@created.setter
def created(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "created", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Description string
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def logo(self) -> Optional[pulumi.Input[str]]:
"""
Logo URL
"""
return pulumi.get(self, "logo")
@logo.setter
def logo(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "logo", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the Organization
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def twitter(self) -> Optional[pulumi.Input[str]]:
"""
Twitter handle
"""
return pulumi.get(self, "twitter")
@twitter.setter
def twitter(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "twitter", value)
@property
@pulumi.getter
def updated(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "updated")
@updated.setter
def updated(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "updated", value)
@property
@pulumi.getter
def website(self) -> Optional[pulumi.Input[str]]:
"""
Website link
"""
return pulumi.get(self, "website")
@website.setter
def website(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "website", value)
class Organization(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
description: Optional[pulumi.Input[str]] = None,
logo: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
twitter: Optional[pulumi.Input[str]] = None,
website: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Provides a resource to manage organization resource in Equinix Metal.
## Example Usage
```python
import pulumi
import pulumi_equinix_metal as equinix_metal
# Create a new Project
tf_organization1 = equinix_metal.Organization("tfOrganization1", description="quux")
```
## Import
This resource can be imported using an existing organization ID
```sh
$ pulumi import equinix-metal:index/organization:Organization metal_organization {existing_organization_id}
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] description: Description string
:param pulumi.Input[str] logo: Logo URL
:param pulumi.Input[str] name: The name of the Organization
:param pulumi.Input[str] twitter: Twitter handle
:param pulumi.Input[str] website: Website link
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: Optional[OrganizationArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Provides a resource to manage organization resource in Equinix Metal.
## Example Usage
```python
import pulumi
import pulumi_equinix_metal as equinix_metal
# Create a new Project
tf_organization1 = equinix_metal.Organization("tfOrganization1", description="quux")
```
## Import
This resource can be imported using an existing organization ID
```sh
$ pulumi import equinix-metal:index/organization:Organization metal_organization {existing_organization_id}
```
:param str resource_name: The name of the resource.
:param OrganizationArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(OrganizationArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
description: Optional[pulumi.Input[str]] = None,
logo: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
twitter: Optional[pulumi.Input[str]] = None,
website: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = OrganizationArgs.__new__(OrganizationArgs)
__props__.__dict__["description"] = description
__props__.__dict__["logo"] = logo
__props__.__dict__["name"] = name
__props__.__dict__["twitter"] = twitter
__props__.__dict__["website"] = website
__props__.__dict__["created"] = None
__props__.__dict__["updated"] = None
super(Organization, __self__).__init__(
'equinix-metal:index/organization:Organization',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
created: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
logo: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
twitter: Optional[pulumi.Input[str]] = None,
updated: Optional[pulumi.Input[str]] = None,
website: Optional[pulumi.Input[str]] = None) -> 'Organization':
"""
Get an existing Organization resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] description: Description string
:param pulumi.Input[str] logo: Logo URL
:param pulumi.Input[str] name: The name of the Organization
:param pulumi.Input[str] twitter: Twitter handle
:param pulumi.Input[str] website: Website link
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _OrganizationState.__new__(_OrganizationState)
__props__.__dict__["created"] = created
__props__.__dict__["description"] = description
__props__.__dict__["logo"] = logo
__props__.__dict__["name"] = name
__props__.__dict__["twitter"] = twitter
__props__.__dict__["updated"] = updated
__props__.__dict__["website"] = website
return Organization(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def created(self) -> pulumi.Output[str]:
return pulumi.get(self, "created")
@property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
"""
Description string
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def logo(self) -> pulumi.Output[Optional[str]]:
"""
Logo URL
"""
return pulumi.get(self, "logo")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
The name of the Organization
"""
return pulumi.get(self, "name")
@property
@pulumi.getter
def twitter(self) -> pulumi.Output[Optional[str]]:
"""
Twitter handle
"""
return pulumi.get(self, "twitter")
@property
@pulumi.getter
def updated(self) -> pulumi.Output[str]:
return pulumi.get(self, "updated")
@property
@pulumi.getter
def website(self) -> pulumi.Output[Optional[str]]:
"""
Website link
"""
return pulumi.get(self, "website")
| 34.23301
| 134
| 0.607204
| 1,516
| 14,104
| 5.437335
| 0.097625
| 0.102754
| 0.127381
| 0.141453
| 0.783331
| 0.751183
| 0.708237
| 0.698653
| 0.663229
| 0.641635
| 0
| 0.000494
| 0.282331
| 14,104
| 411
| 135
| 34.316302
| 0.813871
| 0.225326
| 0
| 0.733051
| 1
| 0
| 0.062064
| 0.004483
| 0
| 0
| 0
| 0
| 0
| 1
| 0.161017
| false
| 0.004237
| 0.021186
| 0.016949
| 0.279661
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
61b9070fc71c42d0f0365addea813de802301d89
| 223
|
py
|
Python
|
functions/charge.py
|
pangq2/charge
|
0f859c6cae90b865c26888cc642946abe001b273
|
[
"MIT"
] | null | null | null |
functions/charge.py
|
pangq2/charge
|
0f859c6cae90b865c26888cc642946abe001b273
|
[
"MIT"
] | null | null | null |
functions/charge.py
|
pangq2/charge
|
0f859c6cae90b865c26888cc642946abe001b273
|
[
"MIT"
] | null | null | null |
from sys import *
import os
def read_ACF():
""" read the ACF.dat file
parameters
---------------
The index number of the atoms
Return
----------------
The charge of the selected atoms
"""
| 14.866667
| 36
| 0.520179
| 27
| 223
| 4.259259
| 0.666667
| 0.086957
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.29148
| 223
| 14
| 37
| 15.928571
| 0.727848
| 0.609865
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.666667
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f626e3d438ee193ffdd5c4f6c68bb43f0936eccb
| 81
|
py
|
Python
|
src/main.py
|
chezyn/ir-sender
|
91e105c919970a6635f49ef9078e0b13d78863f2
|
[
"MIT"
] | 1
|
2019-04-27T08:40:12.000Z
|
2019-04-27T08:40:12.000Z
|
src/main.py
|
chezyn/ir-sender
|
91e105c919970a6635f49ef9078e0b13d78863f2
|
[
"MIT"
] | 2
|
2019-04-27T05:13:04.000Z
|
2019-05-01T09:55:00.000Z
|
src/main.py
|
chezyn/ir-sender
|
91e105c919970a6635f49ef9078e0b13d78863f2
|
[
"MIT"
] | 1
|
2019-04-27T08:49:27.000Z
|
2019-04-27T08:49:27.000Z
|
from irsender.irsender import IrSender
irsender = IrSender()
irsender.start()
| 11.571429
| 38
| 0.777778
| 9
| 81
| 7
| 0.444444
| 1.015873
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135802
| 81
| 6
| 39
| 13.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 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
|
f62e38b8a544ac522f37ff292178999ea20190e9
| 79
|
py
|
Python
|
tf2onnx/version.py
|
lucienwang1009/tensorflow-onnx
|
aa197443579bba6fdf8990f5005d955ab515a39a
|
[
"MIT"
] | 1
|
2020-04-03T07:57:20.000Z
|
2020-04-03T07:57:20.000Z
|
tf2onnx/version.py
|
lucienwang1009/tensorflow-onnx
|
aa197443579bba6fdf8990f5005d955ab515a39a
|
[
"MIT"
] | null | null | null |
tf2onnx/version.py
|
lucienwang1009/tensorflow-onnx
|
aa197443579bba6fdf8990f5005d955ab515a39a
|
[
"MIT"
] | 1
|
2020-10-01T09:26:58.000Z
|
2020-10-01T09:26:58.000Z
|
version = '1.6.0'
git_version = '82f805f8fe7d2fa91e6ca9d39e153712f6887fec'
| 19.75
| 57
| 0.772152
| 7
| 79
| 8.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.391304
| 0.126582
| 79
| 3
| 58
| 26.333333
| 0.478261
| 0
| 0
| 0
| 0
| 0
| 0.6
| 0.533333
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f6314f3da150b4aa48bbb7c49c7a8f7b721fe06f
| 145
|
py
|
Python
|
integralpsychology/settings/production.py
|
djangulo/integralpsychology.life
|
941e6c1ad1f274d7489d8ecdea5ae72f4889cc4b
|
[
"MIT"
] | null | null | null |
integralpsychology/settings/production.py
|
djangulo/integralpsychology.life
|
941e6c1ad1f274d7489d8ecdea5ae72f4889cc4b
|
[
"MIT"
] | null | null | null |
integralpsychology/settings/production.py
|
djangulo/integralpsychology.life
|
941e6c1ad1f274d7489d8ecdea5ae72f4889cc4b
|
[
"MIT"
] | null | null | null |
from .base import *
from integralpsychology.secrets import SECRET_KEY
DEBUG = False
try:
from .local import *
except ImportError:
pass
| 14.5
| 49
| 0.744828
| 18
| 145
| 5.944444
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 145
| 9
| 50
| 16.111111
| 0.922414
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.142857
| 0.571429
| 0
| 0.571429
| 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
|
f63d37f8361e0e84749596f7d0000c73bed9ec17
| 99
|
py
|
Python
|
creds_example.py
|
kellerjustin/rpi-examples
|
1c6c5bac637413e3e7bcbe80f6a960abd9216196
|
[
"MIT"
] | null | null | null |
creds_example.py
|
kellerjustin/rpi-examples
|
1c6c5bac637413e3e7bcbe80f6a960abd9216196
|
[
"MIT"
] | null | null | null |
creds_example.py
|
kellerjustin/rpi-examples
|
1c6c5bac637413e3e7bcbe80f6a960abd9216196
|
[
"MIT"
] | null | null | null |
PASSWORD = "PASSW0RD2019"
TO = ["test@gmail.com",
"test2@gmail.com"]
FROM = "test@gmail.com"
| 19.8
| 25
| 0.636364
| 13
| 99
| 4.846154
| 0.615385
| 0.380952
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072289
| 0.161616
| 99
| 4
| 26
| 24.75
| 0.686747
| 0
| 0
| 0
| 0
| 0
| 0.555556
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.25
| 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
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
f6769506d6250a54d52c915d42e52a1281f0e579
| 141
|
py
|
Python
|
config.py
|
enwawerueli/footprints
|
d9b2a0064b21495edfd0563cb521b0675ee4363d
|
[
"MIT"
] | 1
|
2018-10-11T19:23:08.000Z
|
2018-10-11T19:23:08.000Z
|
config.py
|
enwawerueli/footprints
|
d9b2a0064b21495edfd0563cb521b0675ee4363d
|
[
"MIT"
] | null | null | null |
config.py
|
enwawerueli/footprints
|
d9b2a0064b21495edfd0563cb521b0675ee4363d
|
[
"MIT"
] | null | null | null |
class Config(object):
ORG_NAME = 'footprints'
ORG_DOMAIN = 'footprints.devel'
APP_NAME = 'Footprints'
APP_VERSION = '0.4.0'
| 20.142857
| 35
| 0.652482
| 18
| 141
| 4.888889
| 0.666667
| 0.318182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027273
| 0.219858
| 141
| 6
| 36
| 23.5
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0.29078
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 1
| 0.6
| 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
| 0
| 0
| 1
| 1
|
0
| 5
|
9cb085ed90c460205e9bce982d727e90ef5946e8
| 151
|
py
|
Python
|
privacy/tests/test_app/admin.py
|
bitlabstudio/django-privacy
|
2dda89b411794d35c623ef060c18f45faba32986
|
[
"MIT"
] | 2
|
2017-11-06T21:52:07.000Z
|
2019-07-15T19:18:05.000Z
|
privacy/tests/test_app/admin.py
|
bitlabstudio/django-privacy
|
2dda89b411794d35c623ef060c18f45faba32986
|
[
"MIT"
] | null | null | null |
privacy/tests/test_app/admin.py
|
bitlabstudio/django-privacy
|
2dda89b411794d35c623ef060c18f45faba32986
|
[
"MIT"
] | null | null | null |
"""Admin for the ``test_app`` app."""
from django.contrib import admin
from .models import DummyProfileModel
admin.site.register(DummyProfileModel)
| 18.875
| 38
| 0.774834
| 19
| 151
| 6.105263
| 0.684211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112583
| 151
| 7
| 39
| 21.571429
| 0.865672
| 0.205298
| 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
|
9cb4f01d16f49652d825eeafa0f205de148d9d96
| 358
|
py
|
Python
|
deep_tracking/deeptracking/data/sensors/sensorbase.py
|
birlrobotics/birlBaxter_demos
|
a4871cbf2587a759c958c8451746554e1663e829
|
[
"MIT"
] | 24
|
2016-12-29T11:17:41.000Z
|
2021-12-06T00:49:10.000Z
|
deep_tracking/deeptracking/data/sensors/sensorbase.py
|
birlrobotics/birlBaxter_demos
|
a4871cbf2587a759c958c8451746554e1663e829
|
[
"MIT"
] | 2
|
2019-11-20T05:52:02.000Z
|
2019-12-30T09:07:56.000Z
|
deep_tracking/deeptracking/data/sensors/sensorbase.py
|
birlrobotics/birlBaxter_demos
|
a4871cbf2587a759c958c8451746554e1663e829
|
[
"MIT"
] | 9
|
2018-02-10T06:12:12.000Z
|
2021-10-11T11:56:07.000Z
|
import abc
class SensorBase:
@abc.abstractmethod
def start(self):
pass
@abc.abstractmethod
def stop(self):
pass
@abc.abstractmethod
def intrinsics(self):
"""
return CameraParameters
:return:
"""
pass
@abc.abstractmethod
def get_frame(self, block=True):
pass
| 15.565217
| 36
| 0.561453
| 34
| 358
| 5.882353
| 0.5
| 0.34
| 0.4
| 0.36
| 0.28
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.351955
| 358
| 23
| 37
| 15.565217
| 0.862069
| 0.089385
| 0
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.285714
| 0.071429
| 0
| 0.428571
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
9cb73ed13598dae6355f4d35fc045cb7591c026e
| 171
|
py
|
Python
|
pyrfuniverse/utils/__init__.py
|
happyCoderJDFJJ/pyrfuniverse
|
8ddb6e0d8f113015ba820a327388a528a8b215c7
|
[
"Apache-2.0"
] | null | null | null |
pyrfuniverse/utils/__init__.py
|
happyCoderJDFJJ/pyrfuniverse
|
8ddb6e0d8f113015ba820a327388a528a8b215c7
|
[
"Apache-2.0"
] | null | null | null |
pyrfuniverse/utils/__init__.py
|
happyCoderJDFJJ/pyrfuniverse
|
8ddb6e0d8f113015ba820a327388a528a8b215c7
|
[
"Apache-2.0"
] | null | null | null |
from .controller import RFUniverseController
from .tobor_controller import RFUniverseToborController
__all__ = [
'RFUniverseController', 'RFUniverseToborController'
]
| 28.5
| 55
| 0.836257
| 12
| 171
| 11.5
| 0.583333
| 0.231884
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 171
| 6
| 56
| 28.5
| 0.901961
| 0
| 0
| 0
| 0
| 0
| 0.261628
| 0.145349
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 1
| 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
|
142a65beb4450f520d10bdcd101b53eaca0c0724
| 120
|
py
|
Python
|
users/admin.py
|
vladcalin/konnector
|
eab327c3b4e9e519d770dd42b516a420f50a4571
|
[
"MIT"
] | null | null | null |
users/admin.py
|
vladcalin/konnector
|
eab327c3b4e9e519d770dd42b516a420f50a4571
|
[
"MIT"
] | null | null | null |
users/admin.py
|
vladcalin/konnector
|
eab327c3b4e9e519d770dd42b516a420f50a4571
|
[
"MIT"
] | 1
|
2020-03-26T12:55:54.000Z
|
2020-03-26T12:55:54.000Z
|
from django.contrib import admin
from users.models import User
# Register your models here.
admin.site.register(User)
| 17.142857
| 32
| 0.8
| 18
| 120
| 5.333333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 120
| 6
| 33
| 20
| 0.923077
| 0.216667
| 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
|
142c1ba23332a416c732d6716f720316e22d5f41
| 51
|
py
|
Python
|
webapp/conf/__init__.py
|
buppter/EMS
|
be6016747974d738ef6131e782faf5279d2ff06e
|
[
"MIT"
] | 2
|
2020-02-07T14:35:38.000Z
|
2021-03-21T14:52:49.000Z
|
webapp/conf/__init__.py
|
buppter/EMS
|
be6016747974d738ef6131e782faf5279d2ff06e
|
[
"MIT"
] | 12
|
2020-02-05T11:48:28.000Z
|
2021-03-20T02:53:12.000Z
|
webapp/conf/__init__.py
|
buppter/EMS
|
be6016747974d738ef6131e782faf5279d2ff06e
|
[
"MIT"
] | 1
|
2020-03-24T03:10:35.000Z
|
2020-03-24T03:10:35.000Z
|
"""
author: buppter
datetime: 2020/1/16 9:57 下午
"""
| 12.75
| 27
| 0.647059
| 9
| 51
| 3.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.227273
| 0.137255
| 51
| 4
| 28
| 12.75
| 0.522727
| 0.843137
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 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
|
145d3cd2dad8312270464451a96d0c61e2249b6c
| 295
|
py
|
Python
|
clan_blog/routes.py
|
Claire-Clan/clan-site
|
38ceb0f47ae97b48e16427ca4906ff30e03463c2
|
[
"MIT"
] | null | null | null |
clan_blog/routes.py
|
Claire-Clan/clan-site
|
38ceb0f47ae97b48e16427ca4906ff30e03463c2
|
[
"MIT"
] | 7
|
2019-12-31T02:04:45.000Z
|
2020-01-21T14:39:12.000Z
|
clan_blog/routes.py
|
Claire-Clan/clan-site
|
38ceb0f47ae97b48e16427ca4906ff30e03463c2
|
[
"MIT"
] | null | null | null |
""" Set default routes for app """
from flask import current_app as app, db
from flask import render_template, url_for
@app.route('/')
def home():
return render_template('index.html')
@app.route('/login', methods=['GET'])
def login():
return render_template('login.html') # Incomplete
| 24.583333
| 53
| 0.705085
| 42
| 295
| 4.833333
| 0.571429
| 0.206897
| 0.147783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142373
| 295
| 11
| 54
| 26.818182
| 0.802372
| 0.132203
| 0
| 0
| 0
| 0
| 0.120482
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.25
| 0.25
| 0.75
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
147eeeff177b639ba41c6a48b7be4c1d1d4ce883
| 2,991
|
py
|
Python
|
pytorch2keras/linear_layers.py
|
ShuangLiu1992/pytorch2keras
|
3fcf8709e40fa9c67663a5ca584511c945f91be0
|
[
"MIT"
] | 2
|
2019-08-02T18:52:46.000Z
|
2021-07-09T00:21:31.000Z
|
pytorch2keras/linear_layers.py
|
ShuangLiu1992/pytorch2keras
|
3fcf8709e40fa9c67663a5ca584511c945f91be0
|
[
"MIT"
] | null | null | null |
pytorch2keras/linear_layers.py
|
ShuangLiu1992/pytorch2keras
|
3fcf8709e40fa9c67663a5ca584511c945f91be0
|
[
"MIT"
] | 1
|
2019-08-29T05:14:23.000Z
|
2019-08-29T05:14:23.000Z
|
import keras.layers
import numpy as np
import random
import string
import tensorflow as tf
from .common import random_string
def convert_gemm(params, w_name, scope_name, inputs, layers, weights, names):
"""
Convert Linear.
Args:
params: dictionary with layer parameters
w_name: name prefix in state_dict
scope_name: pytorch scope name
inputs: pytorch node inputs
layers: dictionary with keras tensors
weights: pytorch state_dict
names: use short names for keras layers
"""
print('Converting Linear ...')
if names == 'short':
tf_name = 'FC' + random_string(6)
elif names == 'keep':
tf_name = w_name
else:
tf_name = w_name + str(random.random())
bias_name = '{0}.bias'.format(w_name)
weights_name = '{0}.weight'.format(w_name)
W = weights[weights_name].numpy().transpose()
input_channels, output_channels = W.shape
keras_weights = [W]
has_bias = False
if bias_name in weights:
bias = weights[bias_name].numpy()
keras_weights = [W, bias]
has_bias = True
dense = keras.layers.Dense(
output_channels,
weights=keras_weights, use_bias=has_bias, name=tf_name, bias_initializer='zeros', kernel_initializer='zeros',
)
layers[scope_name] = dense(layers[inputs[0]])
def convert_matmul(params, w_name, scope_name, inputs, layers, weights, names):
"""
Convert matmul layer.
Args:
params: dictionary with layer parameters
w_name: name prefix in state_dict
scope_name: pytorch scope name
inputs: pytorch node inputs
layers: dictionary with keras tensors
weights: pytorch state_dict
names: use short names for keras layers
"""
print('Converting matmul ...')
if names == 'short':
tf_name = 'MMUL' + random_string(4)
elif names == 'keep':
tf_name = w_name
else:
tf_name = w_name + str(random.random())
if len(inputs) == 1:
weights_name = '{0}.weight'.format(w_name)
W = weights[weights_name].numpy().transpose()
input_channels, output_channels = W.shape
keras_weights = [W]
dense = keras.layers.Dense(
output_channels,
weights=keras_weights, use_bias=False, name=tf_name, bias_initializer='zeros', kernel_initializer='zeros',
)
layers[scope_name] = dense(layers[inputs[0]])
elif len(inputs) == 2:
weights_name = '{0}.weight'.format(w_name)
W = weights[weights_name].numpy().transpose()
input_channels, output_channels = W.shape
keras_weights = [W]
dense = keras.layers.Dense(
output_channels,
weights=keras_weights, use_bias=False, name=tf_name, bias_initializer='zeros', kernel_initializer='zeros',
)
layers[scope_name] = dense(layers[inputs[0]])
else:
raise AssertionError('Cannot convert matmul layer')
| 29.323529
| 118
| 0.636576
| 372
| 2,991
| 4.919355
| 0.193548
| 0.032787
| 0.032787
| 0.024044
| 0.791257
| 0.771585
| 0.771585
| 0.771585
| 0.771585
| 0.771585
| 0
| 0.004968
| 0.259779
| 2,991
| 101
| 119
| 29.613861
| 0.82159
| 0.196255
| 0
| 0.576271
| 0
| 0
| 0.069727
| 0
| 0
| 0
| 0
| 0
| 0.016949
| 1
| 0.033898
| false
| 0
| 0.101695
| 0
| 0.135593
| 0.033898
| 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
|
1ae51d277ffcdd3e5e70d16a50be96c823ac3950
| 26
|
py
|
Python
|
env.example.py
|
linnil1/sync-ytchat-to-discord
|
fb307ae1d55876ffa4ea22f0a96763681f5b3f37
|
[
"MIT"
] | 2
|
2021-03-20T03:01:41.000Z
|
2021-10-04T12:43:28.000Z
|
env.example.py
|
linnil1/sync-ytchat-to-discord
|
fb307ae1d55876ffa4ea22f0a96763681f5b3f37
|
[
"MIT"
] | 1
|
2021-10-04T08:14:01.000Z
|
2021-10-04T11:37:25.000Z
|
env.example.py
|
linnil1/sync-ytchat-to-discord
|
fb307ae1d55876ffa4ea22f0a96763681f5b3f37
|
[
"MIT"
] | null | null | null |
DISCORD_TOKEN="123123123"
| 13
| 25
| 0.846154
| 3
| 26
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.36
| 0.038462
| 26
| 1
| 26
| 26
| 0.48
| 0
| 0
| 0
| 0
| 0
| 0.346154
| 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
|
2155a704864b8b1c988895584fb9dfc22ec0af48
| 271
|
py
|
Python
|
build/lib/ctrlengine/filters/__init__.py
|
0xJeremy/ctrl.engine
|
19abba70df149a05edc5722cc95ceacc538448e6
|
[
"MIT"
] | 3
|
2020-04-18T19:28:15.000Z
|
2021-02-25T18:48:08.000Z
|
build/lib/ctrlengine/filters/__init__.py
|
0xJeremy/ctrl.engine
|
19abba70df149a05edc5722cc95ceacc538448e6
|
[
"MIT"
] | null | null | null |
build/lib/ctrlengine/filters/__init__.py
|
0xJeremy/ctrl.engine
|
19abba70df149a05edc5722cc95ceacc538448e6
|
[
"MIT"
] | null | null | null |
from .simple_moving_average import simple_moving_average
simple_moving_average = simple_moving_average
from .exponentially_weighted_moving_average import exponentially_weighted_moving_average
exponentially_weighted_moving_average = exponentially_weighted_moving_average
| 45.166667
| 88
| 0.929889
| 32
| 271
| 7.25
| 0.21875
| 0.448276
| 0.327586
| 0.586207
| 0.685345
| 0.685345
| 0.439655
| 0.439655
| 0
| 0
| 0
| 0
| 0.055351
| 271
| 5
| 89
| 54.2
| 0.90625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 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
| 1
| 0
| 0
| 0
|
0
| 5
|
dcbe64058423634c6f06d4e0e8ebc93b0f6f8c5d
| 10,631
|
py
|
Python
|
tlr/fixtures/temperature1.py
|
bpptkg/tlr
|
99a07837fac95d29737275b86e2dbef3f6dab077
|
[
"MIT"
] | null | null | null |
tlr/fixtures/temperature1.py
|
bpptkg/tlr
|
99a07837fac95d29737275b86e2dbef3f6dab077
|
[
"MIT"
] | null | null | null |
tlr/fixtures/temperature1.py
|
bpptkg/tlr
|
99a07837fac95d29737275b86e2dbef3f6dab077
|
[
"MIT"
] | null | null | null |
raw_data = [
b'\x1cT#01 61.01,\r\nT#03 88.07,90.78,90.17,29.48,14.41\r\n \r\n \xae$\xe2\x02\xe0D\x143P\x02\xe0',
b'T#01 56.92,\r\nT#03 88.10,90.62,90.42,29.68,14.39\r\n \r\n C \xfc',
b'T#01 63.51,\r\nT#03 87.98,90.36,90.15,29.30,14.41\r\n \r\n \x03\x82\x01\x80$\x9f\xd8\xbc\x0f\x08',
b'T#01 56.05,\r\nT#03 87.99,90.66,90.52,29.00,14.40\r\n \r\n \x080"',
b'T#01 59.20,\r\nT#03 88.17,91.09,90.62,28.79,14.41\r\n \r\n \x803\x06\x18\xf8',
b'T#01 52.21,\r\nT#03 87.93,90.57,90.56,28.65,14.40\r\n \r\n \xf83\x0b\x1c',
b'T#01 49.17,\r\nT#03 87.75,90.50,90.40,28.24,14.41\r\n \r\n :\x02@\x8c\x06',
b'T#01 45.93,\r\nT#03 87.86,91.08,90.75,27.81,14.42\r\n \r\n \x01\x80\xa1s\x86\xe7\x03\xfc',
b'T#01 50.86,\r\nT#03 87.79,90.61,90.53,27.23,14.43\r\n \r\n \x86\x16 \x80\xf0\xc7\xf2\xc0',
b'\x1e\x80\xf8T#01 47.12,\r\nT#03 87.54,90.59,90.41,26.66,14.42\r\n \r\n \xf1\x17a\x80\x02\xfe',
b'T#01 50.26,\r\nT#03 87.60,90.97,90.42,26.95,14.40\r\n \r\n \xc0\xf3[\xd3\x81\xfc9\xf5\xb8\x06\x80\xfe',
b'T#01 57.21,\r\nT#03 87.64,90.55,90.13,25.40,14.42\r\n \r\n \x04\x08\x93\x98\xd9\xfc',
b'T#01 54.55,\r\nT#03 87.86,90.88,90.43,25.55,14.40\r\n \r\n \x01\x80\t\x18\xc6!`\xfe',
b'#01 53.39,\r\nT#03 87.89,90.84,90.12,25.71,14.41\r\n \r\n \x01(\x12 \xfe',
b'T#01 52.59,\r\nT#03 88.06,90.75,90.29,26.29,14.40\r\n \r\n \xf2\x83l\x1e<\x90\x04',
b'\xfeT#01 54.47,\r\nT#03 87.93,90.83,90.04,26.48,14.41\r\n \r\n k|^y\xfe',
b'T#01 55.85,\r\nT#03 87.83,90.89,90.51,26.45,14.42\r\n \r\n \xc4\xd6>4\xfa',
b'T#01 52.55,\r\nT#03 87.59,90.84,90.53,25.37,14.42\r\n \r\n \x02:\\@\x84G\x01\x84',
b'T#01 54.72,\r\nT#03 87.76,90.86,90.25,25.36,14.40\r\n \r\n \x90\x80B\xc8;\x80\x0e\x80',
b'T#01 54.70,\r\nT#03 87.78,90.64,90.08,25.54,14.40\r\n \r\n \x88P\xc2\x06',
b'T#01 55.10,\r\nT#03 87.96,90.90,90.54,26.46,14.41\r\n \r\n @\xf0kT\xfc',
b'T#01 53.83,\r\nT#03 87.90,90.91,90.32,25.77,14.42\r\n \r\n \x12\x0e"\xf2 \xbb\x0f\x80',
b'T#01 54.64,\r\nT#03 87.99,90.50,90.26,26.15,14.43\r\n \r\n ',
b'T#01 53.13,\r\nT#03 87.85,91.07,90.40,25.94,14.43\r\n \r\n \x80\xf8',
b'T#01 60.26,\r\nT#03 87.62,91.09,90.31,25.16,14.42\r\n \r\n \x18A\x04',
b'T#01 56.29,\r\nT#03 87.71,91.03,90.17,24.70,14.40\r\n \r\n "\xc8H\xc0',
b'T#01 66.20,\r\nT#03 87.77,91.03,90.26,24.44,14.40\r\n \r\n ',
b'T#01 57.08,\r\nT#03 87.82,91.13,90.22,24.22,14.40\r\n \r\n \x01\x02\x80@\x04',
b'T#01 61.81,\r\nT#03 87.69,91.07,90.28,24.03,14.40\r\n \r\n \xf3',
b'T#01 59.01,\r\nT#03 87.73,90.70,90.07,23.99,14.42\r\n \r\n @\xfc',
b'T#01 56.05,\r\nT#03 87.69,91.02,90.36,24.32,14.40\r\n \r\n \xa0\x8f\x0b\x07\x01',
b'T#01 63.64,\r\nT#03 87.72,90.99,90.34,24.45,14.41\r\nT#01 64.58,\r\n \r\n \xfe',
b'\xfcT#01 67.45,\r\nT#03 87.80,90.83,90.22,24.52,14.42\r\n \r\n \x02\x04\xfe ,@\xa3\x03',
b'T#01 60.04,\r\nT#03 87.69,90.80,90.57,24.98,14.41\r\n \r\n \xe0\x01\x14',
b'T#01 59.57,\r\nT#03 87.72,90.96,90.57,25.91,14.42\r\n \r\n \x01\xe4s\xe10D\x03\xe0',
b'T#01 61.67,\r\nT#03 87.73,91.05,90.40,26.04,14.42\r\n \r\n \xe0\xfa\xe2\xc8\x84\x1e',
b'\x12\xf8T#01 85.78,\r\nT#03 87.71,91.21,90.41,25.67,14.39\r\n \r\n 2\x011\x95\x89\x80\r\xf0',
b'T#01 69.74,\r\nT#03 87.91,90.97,90.49,25.24,14.42\r\n \r\n \xf0',
b'T#01 65.01,\r\nT#03 87.93,90.61,90.60,25.28,14.41\r\n \r\n \x01\xf3HB',
b'T#01 63.63,\r\nT#03 87.97,90.90,90.92,26.12,14.40\r\n \r\n \xfe',
b'T#01 61.84,\r\nT#03 88.17,91.13,90.78,26.92,14.42\r\n \r\n \x80H\xf0',
b'T#01 65.72,\r\nT#03 87.72,90.93,90.51,26.14,14.40\r\n \r\n \xfe1\x8e',
b'T#01 61.01,\r\nT#03 87.61,90.94,90.65,25.93,14.40\r\n \r\n \x02\x1cH\xe0',
b'T#01 60.10,\r\nT#03 87.62,90.97,90.60,25.87,14.39\r\n \r\n \xf1',
b'T#01 61.83,\r\nT#03 87.83,91.03,90.29,25.60,14.43\r\n \r\n \xf8\xe8',
b'T#01 65.53,\r\nT#03 88.13,90.71,90.49,25.44,14.42\r\n \r\n \xc7a"\x12\x04',
b'T#01 67.88,\r\nT#03 87.83,91.02,90.20,25.28,14.42\r\n \r\n 0\x07@\x12D',
b'T#01 77.61,\r\nT#03 87.68,91.06,90.27,24.85,14.42\r\n \r\n \x800\xfb\x02\xdc\x03\x01\x1e',
b'T#01 67.28,\r\nT#03 87.94,91.08,90.61,24.95,14.40\r\n \r\n \xc0|\xdb\xe8g<',
b'T#01 63.90,\r\nT#03 87.86,90.98,90.53,24.97,14.43\r\n \r\n \xc7\x02\x80',
b'T#01 60.11,\r\nT#03 87.76,90.91,90.52,25.06,14.40\r\n \r\n ',
b'T#01 66.12,\r\nT#03 87.65,90.85,90.69,25.25,14.42\r\n \r\n \xe0\x02\x80X\t\x04@',
b'T#01 71.97,\r\nT#03 87.81,90.91,90.32,25.65,14.42\r\n \r\n \xc8\x06\x047',
b'T#01 66.58,\r\nT#03 87.79,91.06,90.35,25.46,14.43\r\n \r\n `\x80\x88\xa4\xfc',
b'T#01 58.96,\r\nT#03 87.32,90.92,90.27,25.17,14.39\r\n \r\n \x08\xfa',
b'T#01 58.30,\r\nT#03 87.23,90.91,90.43,24.80,14.41\r\n \r\n ',
b'T#01 56.55,\r\nT#03 87.35,90.98,90.50,24.71,14.39\r\n \r\n \xf8<-\x0c',
b'T#01 58.05,\r\nT#03 87.40,90.91,90.18,24.76,14.41\r\n \r\n \x05',
b'T#01 76.65,\r\nT#03 87.64,91.03,90.22,24.38,14.42\r\n \r\n `\x81\xc2\xc0#\x0c\x1c',
b'T#01 65.58,\r\nT#03 87.69,90.56,90.21,24.26,14.40\r\n \r\n \xc8',
b'T#01 62.54,\r\nT#03 87.65,90.73,90.48,24.64,14.42\r\n \r\n \x0e7\x124\r\xfe',
b'T#01 62.07,\r\nT#03 87.48,90.98,90.17,25.01,14.42\r\n \r\n \x80\xfea\x92\xc4\xae',
b'T#01 63.46,\r\nT#03 87.52,91.04,90.37,24.83,14.40\r\n \r\n \x80\xc0',
b'T#01 60.82,\r\nT#03 87.18,90.87,90.26,24.67,14.39\r\n \r\n \x03?h\x04\xb1\x98\t\x80\x0f\x81\x01\x80',
b'T#01 54.87,\r\nT#03 87.27,90.85,90.50,24.82,14.41\r\n \r\n \xfc(\x04B\x1c\xf0',
b'T#01 73.36,\r\nT#03 87.56,90\xfc\x04\x01\x12\x12\xf5\x1e0\x01\x80',
b'T#01 71.44,\r\nT#03 87.76,91.00,90.31,24.82,14.14\r\n \r\n \xc0t',
b'T#01 64.59,\r\nT#03 87.24,91.05,90.08,24.17,14.42\r\n \r\n \x02\xe0',
b'T#01 72.30,\r\nT#03 87.32,91.08,90.14,23.47,14.42\r\n \r\n @H\x80\x01\xa0\x19\x15\x03',
b'T#01 65.38,\r\nT#03 87.48,90.94,90.24,23.25,14.44\r\n \r\n \x03\x10\x06\x85l0\x18',
b'T#01 64.02,\r\nT#03 87.45,90.98,90.18,22.97,14.42\r\n \r\n \x80\xfe\x1b',
b'\x01\xf9T#01 87.72,\r\nT#03 87.60,91.12,90.06,22.60,14.27\r\n \r\n \x80\xf8\x8c\x10\x8b',
b'T#01 80.09,\r\nT#03 87.47,91.07,89.97,22.08,14.09\r\nT#01 86.17,\r\nT#03 87.47,91.09,90.05,21.94,14.04\r\n \r\n \xfcM\x06D\x06',
b'T#01 67.42,\r\nT#03 87.45,91.03,90.00,21.38,14.42\r\n \r\n \xfd9P\x0c\\\x04',
b'T#01 72.79,\r\nT#03 87.40,91.07,90.09,20.90,14.13\r\n \r\n \xc1\x03',
b'T#01 72.22,\r\nT#03 87.66,91.27,90.00,20.44,13.91\r\n \r\n \x10\x10\x80\x0c\xd0t\xc4\x17\x0c\x80',
b'T#01 71.30,\r\nT#03 87.56,91.18,90.11,20.04,13.76\r\n \r\n \x01\xea',
b'T#01 83.55,\r\nT#03 87.52,90.96,89.86,19.28,13.64\r\n \r\n \xf4',
b'T#01 77.06,\r\nT#03 87.75,91.30,90.21,18.97,13.49\r\n \r\n \xa0\x8a&\x02',
b'T#01 79.01,\r\nT#03 87.55,91.02,90.12,18.57,13.39\r\n \r\n \x0c\x03\x03\xc0\xe1\x80 \xfc',
b'T#01 91.21,\r\nT#03 87.67,91.03,90.01,18.39,13.28\r\n \r\n \xe6\x19\xd0\x01\xd0',
b'T#01 89.87,\r\nT#03 88.16,91.20,90.12,18.07,13.16\r\n \r\n \xe0\xc4\x90\xc2\x03\xf0',
b'T#01 89.64,\r\nT#03 87.91,90.82,89.80,17.45,13.08\r\n \r\n \x02\x02\x13\xc0c\xc8\x19\xfc',
b'T#01 88.11,\r\nT#03 87.94,90.98,89.85,17.33,13.01\r\n \r\n \x80\r\x18\xfe',
b'T#01 89.66,\r\nT#03 87.88,91.42,89.75,17.03,12.96\r\n \r\n \xc0x\x80\x08\xbd\x0f',
b'T#01 92.55,\r\nT#03 87.94,90.80,89.64,16.70,12.93\r\n \r\n \xfev\xa9\x04',
b'T#01 88.17,\r\nT#03 87.94,91.15,89.74,16.60,12.93\r\n \r\n \x050\x89\xc1\x81\xe7V\x06&',
b'T#01 92.07,\r\nT#03 87.76,90.92,89.62,16.64,12.93\r\n \r\n \xfc\x01<\xe0\x08\x04',
b'T#01 89.57,\r\nT#03 87.67,90.97,89.57,16.57,12.93\r\n \r\n \x01"\x80\x04\xfe',
b'T#01 88.74,\r\nT#03 88.18,91.11,90.09,16.61,12.93\r\n \r\n \x03\x060\xfe\x8f\x97\x0e\x170\x01\xc0',
b'T#01 88.81,\r\nT#03 87.98,90.89,89.86,16.19,12.95\r\n \r\n \xf0\x85\x0e8\xe8\x03',
b'T#01 95.93,\r\nT#03 87.88,90.96,90.01,16.06,12.96\r\n \r\n \xfa',
b'\xf8T#01 92.55,\r\nT#03 87.87,90.92,90.17,15.88,12.96\r\n \r\n \xc9\x08,',
b'T#01 93.25,\r\nT#03 87.74,90.88,89.86,15.81,12.96\r\n \r\n \xfe%m\x03\x91\x0f',
b'\x0c\xc0T#01 94.89,\r\nT#03 87.81,91.07,89.78,15.67,12.96\r\n \r\n \x01\xfa0\x08',
b'T#01 92.07,\r\nT#03 87.87,90.94,89.96,15.63,12.96\r\n \r\n \xfe\x0b\xe0\xc3',
b'T#01 97.30,\r\nT#03 87.75,91.06,90.04,15.38,12.96\r\n \r\n \x02@',
b'T#01 95.69,\r\nT#03 87.68,91.04,89.88,15.24,12.96\r\n \r\n \x900\xe4',
b'T#01 95.21,\r\nT#03 87.78,90.99,89.73,15.18,12.96\r\n \r\n C\xfe\x1cD\n\x89\x81',
b'T#01 91.75,\r\nT#03 87.90,90.96,89.65,15.18,12.96\r\n \r\n @\xf2,A',
]
clean_data = [
[['61.01', ], ],
[['56.92', ], ],
[['63.51', ], ],
[['56.05', ], ],
[['59.20', ], ],
[['52.21', ], ],
[['49.17', ], ],
[['45.93', ], ],
[['50.86', ], ],
[['47.12', ], ],
[['50.26', ], ],
[['57.21', ], ],
[['54.55', ], ],
[['53.39', ], ],
[['52.59', ], ],
[['54.47', ], ],
[['55.85', ], ],
[['52.55', ], ],
[['54.72', ], ],
[['54.70', ], ],
[['55.10', ], ],
[['53.83', ], ],
[['54.64', ], ],
[['53.13', ], ],
[['60.26', ], ],
[['56.29', ], ],
[['66.20', ], ],
[['57.08', ], ],
[['61.81', ], ],
[['59.01', ], ],
[['56.05', ], ],
[['63.64', ], ['64.58', ], ],
[['67.45', ], ],
[['60.04', ], ],
[['59.57', ], ],
[['61.67', ], ],
[['85.78', ], ],
[['69.74', ], ],
[['65.01', ], ],
[['63.63', ], ],
[['61.84', ], ],
[['65.72', ], ],
[['61.01', ], ],
[['60.10', ], ],
[['61.83', ], ],
[['65.53', ], ],
[['67.88', ], ],
[['77.61', ], ],
[['67.28', ], ],
[['63.90', ], ],
[['60.11', ], ],
[['66.12', ], ],
[['71.97', ], ],
[['66.58', ], ],
[['58.96', ], ],
[['58.30', ], ],
[['56.55', ], ],
[['58.05', ], ],
[['76.65', ], ],
[['65.58', ], ],
[['62.54', ], ],
[['62.07', ], ],
[['63.46', ], ],
[['60.82', ], ],
[['54.87', ], ],
[['73.36', ], ],
[['71.44', ], ],
[['64.59', ], ],
[['72.30', ], ],
[['65.38', ], ],
[['64.02', ], ],
[['87.72', ], ],
[['80.09', ], ['86.17', ], ],
[['67.42', ], ],
[['72.79', ], ],
[['72.22', ], ],
[['71.30', ], ],
[['83.55', ], ],
[['77.06', ], ],
[['79.01', ], ],
[['91.21', ], ],
[['89.87', ], ],
[['89.64', ], ],
[['88.11', ], ],
[['89.66', ], ],
[['92.55', ], ],
[['88.17', ], ],
[['92.07', ], ],
[['89.57', ], ],
[['88.74', ], ],
[['88.81', ], ],
[['95.93', ], ],
[['92.55', ], ],
[['93.25', ], ],
[['94.89', ], ],
[['92.07', ], ],
[['97.30', ], ],
[['95.69', ], ],
[['95.21', ], ],
[['91.75', ], ],
]
| 51.606796
| 134
| 0.502869
| 2,803
| 10,631
| 1.906529
| 0.093471
| 0.074102
| 0.094499
| 0.074102
| 0.375561
| 0.258421
| 0.079154
| 0.025075
| 0.015719
| 0
| 0
| 0.417453
| 0.152761
| 10,631
| 205
| 135
| 51.858537
| 0.175863
| 0
| 0
| 0.039216
| 0
| 0.490196
| 0.76023
| 0.386041
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
dcce37fbac0b3ec19021465e95e35978241049bc
| 65
|
py
|
Python
|
woke/woke/e_ast_parsing/__init__.py
|
kevinkanak/woke-readme
|
49944ec3ca4bc8c830c88dbc549d6330985a3436
|
[
"0BSD"
] | 7
|
2022-01-28T06:50:00.000Z
|
2022-02-14T11:34:32.000Z
|
woke/woke/e_ast_parsing/__init__.py
|
kevinkanak/woke-readme
|
49944ec3ca4bc8c830c88dbc549d6330985a3436
|
[
"0BSD"
] | 30
|
2022-01-26T17:54:48.000Z
|
2022-03-21T12:33:53.000Z
|
woke/woke/e_ast_parsing/__init__.py
|
Ackee-Blockchain/woke
|
0d27de25720142beb9619a89619b7a94c3556af1
|
[
"ISC"
] | null | null | null |
# TODO: Implement woke/ast_parsing
# assignees: michprev, manfm
| 21.666667
| 34
| 0.769231
| 8
| 65
| 6.125
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138462
| 65
| 2
| 35
| 32.5
| 0.875
| 0.923077
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0.5
| 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
|
dce8141b0ab104bae94ea8b9b7f5853c87eed6a4
| 22,520
|
py
|
Python
|
tests/test_banner_module.py
|
tate138/Martindale_Automation
|
082169df9f88ddc96fa81365f9c5e8aa460f7d14
|
[
"Apache-2.0"
] | null | null | null |
tests/test_banner_module.py
|
tate138/Martindale_Automation
|
082169df9f88ddc96fa81365f9c5e8aa460f7d14
|
[
"Apache-2.0"
] | null | null | null |
tests/test_banner_module.py
|
tate138/Martindale_Automation
|
082169df9f88ddc96fa81365f9c5e8aa460f7d14
|
[
"Apache-2.0"
] | null | null | null |
from library.page_models.martindale.martindale_module_setup import MartindaleModuleSetup
from library.page_models.martindale.martindale_login import MartindaleLogin
from library.page_models.martindale.martindale_navigation import MartindaleNavigation
from library.selenium_actions import *
from library.tools import Tools
from library.page_data.martindale_app.banner_module_data import BannerModuleData
from library.page_data.martindale_app.martindale_data import MartindalePageData
from tests.test_setup.common_setup import CommonSetup, TestRailStatus
import pytest
import sys
####
# Banner Module Test
####
'''
python -m pytest "Documents/IB/Martindale Automation/tests/test_banner_module.py" -s
'''
class TestBannerModule(CommonSetup):
####
# Suite Setup and Teardown
####
@pytest.fixture(autouse=True, scope='module')
def set_up_class(self):
'''
Will be run once first before any test
'''
web_driver = self.fetch_webdriver()
Tools.log("Executing Banner module tests...")
MartindaleNavigation.navigate_to_home_page(web_driver)
MartindaleLogin.login_to_app(web_driver)
CommonSetup.selected_module = "banner"
MartindaleModuleSetup.module_open(web_driver)
# will run at end of all tests
def teardown_class(self):
'''
Will be run once when all tests are complete
'''
Tools.log("Banner module test run complete.")
####
# Case Setup and Teardown
####
def case_setup(self):
'''
Methods that will be run to setup individual cases
called in test as
self.case_setup()
'''
def case_teardown(self):
'''
Methods that will be run to cleanup individual cases
called in test as
self.case_teardown()
'''
self.common_test_teardown()
####
# Test Case Setup and Teardown
####
def test_c18513007(self):
test_case_number = "18513007"
web_driver = self.fetch_webdriver()
try:
click_banner_module = SeleniumActions.fetch_web_element(web_driver, MartindalePageData.MODULE)
SeleniumActions.click_element(web_driver, click_banner_module)
Tools.sleep(2)
click_banner_name = \
SeleniumActions.fetch_web_element(web_driver, BannerModuleData.BANNER_MODULE_HEADER)
SeleniumActions.click_element(web_driver, click_banner_name)
Tools.sleep(2)
click_edit_button = \
SeleniumActions.fetch_web_element(web_driver, MartindalePageData.IFRAME_EDIT_BUTTON)
SeleniumActions.click_element(web_driver, click_edit_button)
Tools.sleep(5)
web_driver.switch_to.default_content()
element_path = BannerModuleData.GALLERY_BANNER_TITLE
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
banner_text = SeleniumActions.read_web_element_text(web_element)
try:
assert(banner_text == "BANNER MODULE")
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '')
except:
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '')
except:
print("C18513007 Not Tested")
e = sys.exc_info()[0]
print("<p>Error: %s</p>" % e)
def test_c18513008(self):
test_case_number = "18513008"
web_driver = self.fetch_webdriver()
try:
click_settings_tab = \
SeleniumActions.fetch_web_element(web_driver, BannerModuleData.BANNER_MODULE_SETTINGS_TAB)
SeleniumActions.click_element(web_driver, click_settings_tab)
element_path = BannerModuleData.BANNER_MODULE_SETTINGS_ELEMENT_VISIBILITY
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
element_visibility_text = SeleniumActions.read_web_element_text(web_element)
click_layout_tab = \
SeleniumActions.fetch_web_element(web_driver, BannerModuleData.BANNER_MODULE_LAYOUT_TAB)
SeleniumActions.click_element(web_driver, click_layout_tab)
element_path = BannerModuleData.BANNER_MODULE_LAYOUT_TYPE
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
layout_type_text = SeleniumActions.read_web_element_text(web_element)
click_content_tab = \
SeleniumActions.fetch_web_element(web_driver, BannerModuleData.BANNER_MODULE_CONTENT_TAB)
SeleniumActions.click_element(web_driver, click_content_tab)
element_path = BannerModuleData.BANNER_MODULE_CONENT_MANAGE_CONTENT
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
manage_content_text = SeleniumActions.read_web_element_text(web_element)
try:
assert(element_visibility_text == "ELEMENT VISIBILITY"
and layout_type_text == "LAYOUT TYPE"
and manage_content_text == "Manage Content")
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '')
except:
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '')
except:
print("C18513008 Not Tested")
e = sys.exc_info()[0]
print("<p>Error: %s</p>" % e)
def test_c18521018(self):
test_case_number = "18521018"
web_driver = self.fetch_webdriver()
try:
click_add_banner = \
SeleniumActions.fetch_web_element(web_driver, BannerModuleData.BANNER_MODULE_CONTENT_ADD_BANNER_BUTTON)
SeleniumActions.click_element(web_driver, click_add_banner)
Tools.sleep(5)
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_BANNER
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
add_banner_text = SeleniumActions.read_web_element_text(web_element)
try:
assert(add_banner_text == "ADD BANNER")
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '')
except:
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '')
except:
print("C18521018 Not Tested")
e = sys.exc_info()[0]
print("<p>Error: %s</p>" % e)
def test_c18521037(self):
test_case_number = "18521037"
web_driver = self.fetch_webdriver()
try:
# CTA Button 1
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_LINK_APPEARANCE
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
SeleniumActions.select_by_index(web_element, "0")
link_text = SeleniumActions.read_select_text(web_element)
SeleniumActions.select_by_index(web_element, "1")
button_text = SeleniumActions.read_select_text(web_element)
SeleniumActions.select_by_index(web_element, "2")
icon_only = SeleniumActions.read_select_text(web_element)
SeleniumActions.select_by_index(web_element, "3")
icon_and_button = SeleniumActions.read_select_text(web_element)
# CTA Button 2
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_LINK_APPEARANCE_TWO
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
Tools.sleep(2)
SeleniumActions.select_by_index(web_element, "0")
link_text_two = SeleniumActions.read_select_text(web_element)
SeleniumActions.select_by_index(web_element, "1")
button_text_two = SeleniumActions.read_select_text(web_element)
SeleniumActions.select_by_index(web_element, "2")
icon_only_two = SeleniumActions.read_select_text(web_element)
SeleniumActions.select_by_index(web_element, "3")
icon_and_button_two = SeleniumActions.read_select_text(web_element)
try:
assert(link_text == "Text Link" and button_text == "Text Button" and icon_only == "Icon Only"
and icon_and_button == "Icon & Text Button" and link_text_two == "Text Link"
and button_text_two == "Text Button" and icon_only_two == "Icon Only"
and icon_and_button_two == "Icon & Text Button")
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '')
except:
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '')
except:
print("C18521037 Not Tested")
e = sys.exc_info()[0]
print("<p>Error: %s</p>" % e)
def test_c18521024(self):
test_case_number = "18521024"
web_driver = self.fetch_webdriver()
try:
# CTA Button 1
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_LINK_TYPE
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
Tools.sleep(2)
SeleniumActions.select_by_index(web_element, "0")
my_pages = SeleniumActions.read_select_text(web_element)
SeleniumActions.select_by_index(web_element, "1")
external_link = SeleniumActions.read_select_text(web_element)
SeleniumActions.select_by_index(web_element, "2")
no_link = SeleniumActions.read_select_text(web_element)
# CTA Button 2
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_LINK_TYPE_TWO
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
Tools.sleep(2)
SeleniumActions.select_by_index(web_element, "0")
my_pages_two = SeleniumActions.read_select_text(web_element)
SeleniumActions.select_by_index(web_element, "1")
external_link_two = SeleniumActions.read_select_text(web_element)
SeleniumActions.select_by_index(web_element, "2")
no_link_two = SeleniumActions.read_select_text(web_element)
try:
assert(my_pages == "My Pages" and external_link == "External Link" and no_link == "No Link"
and my_pages_two == "My Pages" and external_link_two == "External Link"
and no_link_two == "No Link")
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '')
except:
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '')
except:
print("C18521024 Not Tested")
e = sys.exc_info()[0]
print("<p>Error: %s</p>" % e)
def test_c18521040(self):
test_case_number = "18521040"
web_driver = self.fetch_webdriver()
try:
# CTA Button 1
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_LINK_TYPE
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
SeleniumActions.select_by_index(web_element, "0")
Tools.sleep(2)
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_LINK_PAGE_LABEL
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
link_page_element = SeleniumActions.read_web_element_text(web_element)
# CTA Button 2
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_LINK_TYPE_TWO
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
SeleniumActions.select_by_index(web_element, "0")
Tools.sleep(2)
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_LINK_PAGE_LABEL_TWO
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
link_page_element_two = SeleniumActions.read_web_element_text(web_element)
try:
assert(link_page_element == "Link Page *" and link_page_element_two == "Link Page *")
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '')
except:
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '')
except:
print("C18521040 Not Tested")
e = sys.exc_info()[0]
print("<p>Error: %s</p>" % e)
def test_c18521041(self):
test_case_number = "18521041"
web_driver = self.fetch_webdriver()
try:
# CTA Button 1
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_LINK_TYPE
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
SeleniumActions.select_by_index(web_element, "1")
Tools.sleep(2)
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_LINK_PAGE_URL_LABEL
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
link_page_element = SeleniumActions.read_web_element_text(web_element)
# CTA Button 2
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_LINK_TYPE_TWO
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
SeleniumActions.select_by_index(web_element, "1")
Tools.sleep(2)
element_path = BannerModuleData.BANNER_MODULE_CONTENT_ADD_LINK_PAGE_URL_LABEL_TWO
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
link_page_element_two = SeleniumActions.read_web_element_text(web_element)
try:
assert(link_page_element == "URL *" and link_page_element_two == "URL *")
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '')
except:
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '')
except:
print("C18521041 Not Tested")
e = sys.exc_info()[0]
print("<p>Error: %s</p>" % e)
def test_c18521042(self):
test_case_number = "18521042"
web_driver = self.fetch_webdriver()
try:
click_save_button = \
SeleniumActions.fetch_web_element(web_driver, BannerModuleData.ADD_BANNER_SAVE_BUTTON)
SeleniumActions.click_element(web_driver, click_save_button)
element_path = BannerModuleData.BANNER_TITLE_ERROR
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
banner_title_error = SeleniumActions.read_web_element_text(web_element)
element_path = BannerModuleData.BANNER_CAPTION_ERROR
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
banner_caption_error = SeleniumActions.read_web_element_text(web_element)
banner_title = SeleniumActions.fetch_web_element(web_driver, BannerModuleData.BANNER_TITLE)
SeleniumActions.write_to_element \
(web_driver, banner_title, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ012")
banner_caption = SeleniumActions.fetch_web_element(web_driver, BannerModuleData.BANNER_CAPTION)
SeleniumActions.write_to_element \
(web_driver, banner_caption, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ012ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ012")
click_save_button = \
SeleniumActions.fetch_web_element(web_driver, BannerModuleData.ADD_BANNER_SAVE_BUTTON)
SeleniumActions.click_element(web_driver, click_save_button)
element_path = BannerModuleData.BANNER_TITLE_ERROR
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
banner_title_error_two = SeleniumActions.read_web_element_text(web_element)
element_path = BannerModuleData.BANNER_CAPTION_ERROR
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
banner_caption_error_two = SeleniumActions.read_web_element_text(web_element)
try:
assert(banner_title_error == "This field is required."
and banner_caption_error == "This field is required."
and banner_title_error_two == "Please enter no more than 100 characters."
and banner_caption_error_two == "Please enter no more than 200 characters.")
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '')
except:
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '')
except:
print("C18521042 Not Tested")
e = sys.exc_info()[0]
print("<p>Error: %s</p>" % e)
def test_c18521043(self):
test_case_number = "18521043"
web_driver = self.fetch_webdriver()
try:
banner_title = SeleniumActions.fetch_web_element(web_driver, BannerModuleData.BANNER_TITLE)
SeleniumActions.clearTextField(web_driver, banner_title)
SeleniumActions.write_to_element(web_driver, banner_title, "Automated")
banner_caption = SeleniumActions.fetch_web_element(web_driver, BannerModuleData.BANNER_CAPTION)
SeleniumActions.clearTextField(web_driver, banner_caption)
SeleniumActions.write_to_element(web_driver, banner_caption, "Test")
click_save_button = \
SeleniumActions.fetch_web_element(web_driver, BannerModuleData.ADD_BANNER_SAVE_BUTTON)
SeleniumActions.click_element(web_driver, click_save_button)
Tools.sleep(4)
web_element = SeleniumActions.find_by_xpath(web_driver, "//*[contains(@id, 'item_item-')]")
new_banner_test = SeleniumActions.read_web_element_text(web_element)
try:
assert(new_banner_test == "Title: Automated\nTest")
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '')
except:
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '')
except:
print("C18521043 Not Tested")
e = sys.exc_info()[0]
print("<p>Error: %s</p>" % e)
def test_c18521045(self):
test_case_number = "18521045"
web_driver = self.fetch_webdriver()
try:
web_element = SeleniumActions.find_by_xpath(web_driver, "//*[contains(@id, 'edit_item-')]")
SeleniumActions.click_element(web_driver, web_element)
Tools.sleep(3)
banner_title = SeleniumActions.fetch_web_element(web_driver, BannerModuleData.BANNER_TITLE)
try:
assert(SeleniumActions.element_is_visible(web_driver, banner_title))
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '')
except:
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '')
except:
print("C18521045 Not Tested")
e = sys.exc_info()[0]
print("<p>Error: %s</p>" % e)
def test_c18521044(self):
test_case_number = "18521044"
web_driver = self.fetch_webdriver()
try:
web_element = SeleniumActions.find_by_xpath(web_driver, BannerModuleData.ADD_BANNER_CANCEL_BUTTON)
SeleniumActions.click_element(web_driver, web_element)
Tools.sleep(3)
element_path = BannerModuleData.GALLERY_BANNER_TITLE
web_element = SeleniumActions.find_by_xpath(web_driver, element_path)
try:
assert(SeleniumActions.element_is_visible(web_driver, web_element))
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '')
except:
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '')
except:
print("C18521044 Not Tested")
e = sys.exc_info()[0]
print("<p>Error: %s</p>" % e)
def test_c18521046(self):
test_case_number = "18521046"
web_driver = self.fetch_webdriver()
try:
web_element = SeleniumActions.find_by_xpath(web_driver, "//*[contains(@id, 'delete_item-')]")
SeleniumActions.click_element(web_driver, web_element)
Tools.sleep(2)
web_element = SeleniumActions.find_by_xpath(web_driver, BannerModuleData.DELETE_BANNER_CONFIRMATION)
SeleniumActions.element_is_visible(web_driver, web_element)
web_element = SeleniumActions.find_by_xpath(web_driver, BannerModuleData.DELETE_BANNER_CANCEL_BUTTON)
SeleniumActions.click_element(web_driver, web_element)
Tools.sleep(2)
web_element = SeleniumActions.find_by_xpath(web_driver, "//*[contains(@id, 'item_item-')]")
SeleniumActions.element_is_visible(web_driver, web_element)
web_element = SeleniumActions.find_by_xpath(web_driver, "//*[contains(@id, 'delete_item-')]")
SeleniumActions.click_element(web_driver, web_element)
Tools.sleep(2)
web_element = SeleniumActions.find_by_xpath(web_driver, BannerModuleData.DELETE_BANNER_OK_BUTTON)
SeleniumActions.click_element(web_driver, web_element)
Tools.sleep(4)
web_element = SeleniumActions.find_by_xpath(web_driver, "//*[contains(@id, 'item_item-')]")
new_banner_test = SeleniumActions.read_web_element_text(web_element)
try:
assert(new_banner_test == "Title: Title\nCaption")
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().PASS, '')
except:
CommonSetup.report_test_rail(self, test_case_number, TestRailStatus().FAIL, '')
self.case_teardown()
except:
print("C18521230 Not Tested")
e = sys.exc_info()[0]
print("<p>Error: %s</p>" % e)
| 37.039474
| 250
| 0.662256
| 2,452
| 22,520
| 5.689233
| 0.081566
| 0.084588
| 0.075269
| 0.046452
| 0.826022
| 0.802079
| 0.769534
| 0.712186
| 0.696057
| 0.673118
| 0
| 0.025049
| 0.257238
| 22,520
| 607
| 251
| 37.100494
| 0.808932
| 0.021936
| 0
| 0.592798
| 0
| 0
| 0.071356
| 0.013922
| 0
| 0
| 0
| 0
| 0.033241
| 1
| 0.044321
| false
| 0.033241
| 0.027701
| 0
| 0.074792
| 0.066482
| 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
|
dce826b31f29b9f613f0b58e4e3ddba2d12e55ad
| 6,315
|
py
|
Python
|
Lists.py
|
shyed2001/Python_Programming
|
93ef958e3d8aa77f9191b550972235ce4fe4a6cb
|
[
"bzip2-1.0.6"
] | 2
|
2019-05-01T04:32:14.000Z
|
2019-05-04T11:28:18.000Z
|
Lists.py
|
shyed2001/python-learning-basics
|
93ef958e3d8aa77f9191b550972235ce4fe4a6cb
|
[
"bzip2-1.0.6"
] | null | null | null |
Lists.py
|
shyed2001/python-learning-basics
|
93ef958e3d8aa77f9191b550972235ce4fe4a6cb
|
[
"bzip2-1.0.6"
] | null | null | null |
#-------------------------------------------------------------------------------
# Name: module2
# Purpose:
#
# Author: user
#
# Created: 28/03/2019
# Copyright: (c) user 2019
# Licence: <your licence>
#-------------------------------------------------------------------------------
print("LISTS")
print("Working with LISTS")
print('''
lists=[], this is an epty list
''')
list=["kevin", 5, 7.9, True]
# list values are indexed
friend=["kevin", "KAren", "Jim", "Toddy", "Frog"]
# 0 1 2 3 4
print('''
list=["kevin", 5, 7.9, True]
# list values are indexed
friend=["kevin", "KAren", "Jim", "Toddy", "Frog"]
# 0 1 2 3 4
''')
print(''' print(friend[0])
=''')
print(friend[0])
print('''
print(friend[-1])
''')
print(friend[-1])
print('''
print(friend[-3])
''')
print(friend[-3])
print('''
print(friend[1:2])
''')
print(friend[1:2])
print('''
print(friend[1:3])
''')
print(friend[1:3])
print('''
print(friend[1:4])
=''')
print(friend[1:4])
print('''
update or modify list values
friend[0]= "000"
print(friend[0])
=''')
friend[0]= "000"
print(friend[0])
print(''' update or modify list values
friend[0:1]= ["000", "ttt"]
print(friend[0:2])
=''')
friend[0:1]= ["000", "ttt"]
print(friend[0:2])
print('''
List Functions
print('
List Functions
')
''')
print('''
Items=["car", "chair", "table", "mat"]
num=[8.8, 7.7,9.9,5.5,25,34,35,43,45,50,52,53,55,61,70,71,77,91,92,93,99,105,115,
122,125,133,151,155,160,170,171,177,181,192,205,250,322,331]
numbers=[4,8,15,16,23,42]
FRINDS=["kevin", "KAren", "Jim", "Toddy", "Frog", "Todd", "Jorge", "Lang"]
# 0 1 2 3 4 5 7 8
''')
Items=["car", "chair", "table", "mat"]
num=[8.8, 7.7,9.9,5.5,25,34,35,43,45,50,52,53,55,61,70,71,77,91,92,93,99,105,115,
122,125,133,151,155,160,170,171,177,181,192,205,250,322,331]
numbers=[4,8,15,16,23,42]
FRINDS=["kevin", "KAren", "Jim", "Toddy", "Frog", "Todd", "Jorge", "Lang"]
# 0 1 2 3 4 5 7 8
print('''
FRINDS.extend(numbers)
print(FRINDS)
=''')
FRINDS.extend(numbers)
print(FRINDS)
print('''
FRINDS.append(num)
print(FRINDS)
=''')
FRINDS.append(num)
print(FRINDS)
print('''
FRINDS.extend(Items)
FRINDS.extend("77777777777")
print(FRINDS)
=''')
FRINDS.extend(Items)
FRINDS.extend("77777777777")
print(FRINDS)
print('''
FRINDS.append(Items)
FRINDS.append("55555555555")
print(FRINDS)
=''')
FRINDS.append(Items)
FRINDS.append("55555555555")
print(FRINDS)
print('''
FRINDS.insert(1,"00000000000000")
# index 1, replace with
print(FRINDS)
=''')
FRINDS.insert(1,"00000000000000")
# index 1, replace with this
print(FRINDS)
print('''
=''')
print('''
FRINDS.insert(7,Items*3)
print(FRINDS)
=''')
FRINDS.insert(7,Items*3)
print(FRINDS)
print(''' remove one item
FRINDS.remove("00000000000000")
print(FRINDS)
=''')
FRINDS.remove("00000000000000" )
print(FRINDS)
print(''' clear or remove last element\item of the list
FRINDS.pop()
print(FRINDS)
=''')
FRINDS.pop()
print(FRINDS)
print(''' find element\item of the list
FRINDS.index('Toddy')
FRINDS.index("car")
print(FRINDS.index("car"))
=''')
print(''' count number of a value
print(FRINDS.count("car"))
print(FRINDS.count("7"))
=''')
print(FRINDS.index("car"))
print(FRINDS.index('Toddy'))
print(FRINDS.count("car"))
print(FRINDS.count("7"))
print(''' clear all items
FRINDS.clear()
print(FRINDS)
=''')
FRINDS.clear()
print(FRINDS)
FRINDS=["You","HE", "he", "WE", "we","We", "wE"]
math=[3, 33, 4.4, 9.0, 9, .1, 0.1, 0, 0.0, .0, .00, 00, 00.00, 00.000, 0000]
print(''' sort/arrange all items alphabetically in assending order
FRINDS=["You","HE", "he", "WE", "we","We", "wE"]
math=[3, 33, 4.4, 9.0, 9, .1, 0.1, 0, 0.0, .0, .00, 00, 00.00, 00.000, 0000]
FRINDS.sort()
math.sort()
print(FRINDS)
print(math)
=''')
FRINDS.sort()
math.sort()
print(FRINDS)
print(math)
print(""" reverse the list items
FRINDS.reverse()
math.reverse()
print(FRINDS)
print(math)
""")
FRINDS.reverse()
math.reverse()
print(FRINDS)
print(math)
print(""" copy the list items to another list
FRINDS3=math
FRINDS2=math.copy()
FRINDS3=math
print(FRINDS2)
print(FRINDS3)
""")
FRINDS3=math
FRINDS2=math.copy()
FRINDS3=math
print(FRINDS2)
print(FRINDS3)
#-------------------------------------------------------------------------------
# Name: Print Book pages module1
# Purpose: Get printed missing pages / numbers
#
# Author: user/shyed
#
# Created: 27/03/2019
# Copyright: (c) user 2019
# Licence: <your licence>
#-------------------------------------------------------------------------------
a=225 # start at 225
b=226 # start at 226
l=599 # stop at 599
list1=[] # initialize an empty list
for i in range(a,l+1,4): list1.append(i)
for j in range(b,l, 4): list1.append(j)
list1.sort()
print(list1)
print('''
a=225
b=226
l=599
list1=[]
for i in range(a,l+1,4): list1.append(i)
for j in range(b,l, 4): list1.append(j)
list1.sort()
print(list1)
''')
print(""" That code will result this list,
[225, 226, 229, 230, 233, 234, 237, 238, 241, 242, 245, 246,
249, 250, 253, 254, 257, 258, 261, 262, 265, 266, 269, 270, 273, 274,
277, 278, 281, 282, 285, 286, 289, 290, 293, 294, 297, 298, 301, 302,
305, 306, 309, 310, 313, 314, 317, 318, 321, 322, 325, 326, 329,
330, 333, 334, 337, 338, 341, 342, 345, 346, 349, 350, 353, 354,
357, 358, 361, 362, 365, 366, 369, 370, 373, 374, 377, 378, 381,
382, 385, 386, 389, 390, 393, 394, 397, 398, 401, 402, 405, 406,
409, 410, 413, 414, 417, 418, 421, 422, 425, 426, 429, 430, 433,
434, 437, 438, 441, 442, 445, 446, 449, 450, 453, 454, 457, 458,
461, 462, 465, 466, 469, 470, 473, 474, 477, 478, 481, 482, 485,
486, 489, 490, 493, 494, 497, 498, 501, 502, 505, 506, 509, 510,
513, 514, 517, 518, 521, 522, 525, 526, 529, 530, 533, 534,
537, 538, 541, 542, 545, 546, 549, 550, 553, 554, 557, 558,
561, 562, 565, 566, 569, 570, 573, 574, 577, 578, 581, 582,
585, 586, 589, 590, 593, 594, 597, 598]""")
| 22.880435
| 82
| 0.548535
| 932
| 6,315
| 3.716738
| 0.374464
| 0.111143
| 0.055427
| 0.020785
| 0.636836
| 0.535219
| 0.492206
| 0.474885
| 0.32448
| 0.26097
| 0
| 0.217702
| 0.202059
| 6,315
| 275
| 83
| 22.963636
| 0.469736
| 0.137292
| 0
| 0.816038
| 0
| 0.084906
| 0.646384
| 0.081454
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.40566
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
0d0528aa5591fe271385dd9fb464d87bb790c3d5
| 80
|
py
|
Python
|
__init__.py
|
mattyx17/LenasPostmodernTeam
|
afb0681bbf02165c43f17f2c7e24d12491f85791
|
[
"Apache-2.0"
] | null | null | null |
__init__.py
|
mattyx17/LenasPostmodernTeam
|
afb0681bbf02165c43f17f2c7e24d12491f85791
|
[
"Apache-2.0"
] | null | null | null |
__init__.py
|
mattyx17/LenasPostmodernTeam
|
afb0681bbf02165c43f17f2c7e24d12491f85791
|
[
"Apache-2.0"
] | 2
|
2018-11-18T14:53:54.000Z
|
2018-11-18T16:13:34.000Z
|
from GiftTheCode2018.camp_quality_dashboard import create_camper_history_charts
| 40
| 79
| 0.9375
| 10
| 80
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0.05
| 80
| 1
| 80
| 80
| 0.868421
| 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
|
0d13124cd7caa63e780d24ffe6da05a89016df8a
| 36
|
py
|
Python
|
src/test/data/pa3/AdditionalTestCase/UnitTest/IfExpr_else.py
|
Leo-Enrique-Wu/chocopy_compiler_code_generation
|
4606be0531b3de77411572aae98f73169f46b3b9
|
[
"BSD-2-Clause"
] | null | null | null |
src/test/data/pa3/AdditionalTestCase/UnitTest/IfExpr_else.py
|
Leo-Enrique-Wu/chocopy_compiler_code_generation
|
4606be0531b3de77411572aae98f73169f46b3b9
|
[
"BSD-2-Clause"
] | null | null | null |
src/test/data/pa3/AdditionalTestCase/UnitTest/IfExpr_else.py
|
Leo-Enrique-Wu/chocopy_compiler_code_generation
|
4606be0531b3de77411572aae98f73169f46b3b9
|
[
"BSD-2-Clause"
] | null | null | null |
print("then" if (8 > 9) else "else")
| 36
| 36
| 0.583333
| 7
| 36
| 3
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0.166667
| 36
| 1
| 36
| 36
| 0.633333
| 0
| 0
| 0
| 0
| 0
| 0.216216
| 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
|
0d24ee6c4319c59c369e7e72ee9366ac6e9df462
| 70
|
py
|
Python
|
src/bio2bel_ddr/__init__.py
|
bio2bel/ddr
|
6e4cae605d798c15049970a65d5a6fcf69255b36
|
[
"MIT"
] | 1
|
2020-09-26T12:20:06.000Z
|
2020-09-26T12:20:06.000Z
|
src/bio2bel_ddr/__init__.py
|
bio2bel/ddr
|
6e4cae605d798c15049970a65d5a6fcf69255b36
|
[
"MIT"
] | 5
|
2019-01-22T14:13:10.000Z
|
2019-02-08T14:43:01.000Z
|
src/bio2bel_ddr/__init__.py
|
bio2bel/ddr
|
6e4cae605d798c15049970a65d5a6fcf69255b36
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""Bio2BEL DDR."""
from .ddr import Manager
| 11.666667
| 24
| 0.571429
| 9
| 70
| 4.444444
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035088
| 0.185714
| 70
| 5
| 25
| 14
| 0.666667
| 0.5
| 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
|
0d2aa6e542e598b19f46ebe268a99ede7496288c
| 227
|
py
|
Python
|
bullet-gym-primitive/showKerasCEMCartPoleExample.py
|
benelot/bullet-gym
|
863cbc25c74e3fcecdc84f68bde0cbba1a65f070
|
[
"MIT"
] | 55
|
2017-04-12T19:12:57.000Z
|
2021-04-17T12:54:50.000Z
|
bullet-gym-primitive/showKerasCEMCartPoleExample.py
|
shipjobs/bullet-gym
|
1e064b135175546172acd1a5a996863469759b6d
|
[
"MIT"
] | 10
|
2017-03-25T20:55:30.000Z
|
2017-07-14T08:27:42.000Z
|
bullet-gym-primitive/showKerasCEMCartPoleExample.py
|
shipjobs/bullet-gym
|
1e064b135175546172acd1a5a996863469759b6d
|
[
"MIT"
] | 9
|
2017-11-04T15:33:40.000Z
|
2021-08-29T19:36:31.000Z
|
#!/usr/bin/python
import os
os.system('python runTrainer.py --agent=KerasCEMAgent --env=CartPolev0Env --train-for=0 --test-for=10000000 --delay=0.005 --gui --show-test --load-file=checkpoints/KerasCEM-CartPolev0-chkpt-1.h5')
| 45.4
| 196
| 0.744493
| 34
| 227
| 4.970588
| 0.852941
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080189
| 0.066079
| 227
| 4
| 197
| 56.75
| 0.716981
| 0.070485
| 0
| 0
| 0
| 0.5
| 0.875598
| 0.358852
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
0d49d43122757689850a6fd2832e38ea5571118e
| 114
|
py
|
Python
|
src/coin_price/admin.py
|
HaotingS/Python-Django-CRUD-project
|
1f0d063747188181f22f9e7f2e4184865f681994
|
[
"bzip2-1.0.6"
] | null | null | null |
src/coin_price/admin.py
|
HaotingS/Python-Django-CRUD-project
|
1f0d063747188181f22f9e7f2e4184865f681994
|
[
"bzip2-1.0.6"
] | null | null | null |
src/coin_price/admin.py
|
HaotingS/Python-Django-CRUD-project
|
1f0d063747188181f22f9e7f2e4184865f681994
|
[
"bzip2-1.0.6"
] | null | null | null |
from django.contrib import admin
# Register your models here.
from .models import Coin
admin.site.register(Coin)
| 19
| 32
| 0.798246
| 17
| 114
| 5.352941
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131579
| 114
| 6
| 33
| 19
| 0.919192
| 0.22807
| 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
|
0d57b2d36bfc36141db309ee6ce71110dfe95916
| 321
|
py
|
Python
|
migration/migrator/migrations/course/20190710182514_add_view_date_for_teams.py
|
elihschiff/Submitty
|
8b980997b6f1dfcd73eb4cf4cca43398e67f96dc
|
[
"BSD-3-Clause"
] | 411
|
2016-06-14T20:52:25.000Z
|
2022-03-31T21:20:25.000Z
|
migration/migrator/migrations/course/20190710182514_add_view_date_for_teams.py
|
KaelanWillauer/Submitty
|
cf9b6ceda15ec0a661e2ca81ea7864790094c64a
|
[
"BSD-3-Clause"
] | 5,730
|
2016-05-23T21:04:32.000Z
|
2022-03-31T10:08:06.000Z
|
migration/migrator/migrations/course/20190710182514_add_view_date_for_teams.py
|
KaelanWillauer/Submitty
|
cf9b6ceda15ec0a661e2ca81ea7864790094c64a
|
[
"BSD-3-Clause"
] | 423
|
2016-09-22T21:11:30.000Z
|
2022-03-29T18:55:28.000Z
|
"""Migration for a given Submitty course database."""
def up(config, database, semester, course):
if not database.table_has_column('teams', 'last_viewed_time'):
database.execute('ALTER TABLE teams ADD COLUMN last_viewed_time timestamp with time zone')
def down(config, database, semester, course):
pass
| 35.666667
| 98
| 0.741433
| 44
| 321
| 5.272727
| 0.636364
| 0.12069
| 0.189655
| 0.241379
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155763
| 321
| 8
| 99
| 40.125
| 0.856089
| 0.146417
| 0
| 0
| 0
| 0
| 0.339552
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.2
| 0
| 0
| 0.4
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
b49addd8426547bc0db734643e24e33ebebfef3c
| 52
|
py
|
Python
|
tests/test_portproxy.py
|
pseeth/portproxy
|
7b5d13b5157b8c27b1487243c733adb604371870
|
[
"MIT"
] | 1
|
2021-02-12T17:09:12.000Z
|
2021-02-12T17:09:12.000Z
|
tests/test_portproxy.py
|
pseeth/portproxy
|
7b5d13b5157b8c27b1487243c733adb604371870
|
[
"MIT"
] | null | null | null |
tests/test_portproxy.py
|
pseeth/portproxy
|
7b5d13b5157b8c27b1487243c733adb604371870
|
[
"MIT"
] | null | null | null |
def test_portproxy():
# No tests yet...
pass
| 17.333333
| 21
| 0.596154
| 7
| 52
| 4.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.269231
| 52
| 3
| 22
| 17.333333
| 0.789474
| 0.288462
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
b4b6550cf45e48d4e0fb7f5264bf7efe9ae6a969
| 252
|
py
|
Python
|
office365/onedrive/driveitems/thumbnail.py
|
rikeshtailor/Office365-REST-Python-Client
|
ca7bfa1b22212137bb4e984c0457632163e89a43
|
[
"MIT"
] | 544
|
2016-08-04T17:10:16.000Z
|
2022-03-31T07:17:20.000Z
|
office365/onedrive/driveitems/thumbnail.py
|
rikeshtailor/Office365-REST-Python-Client
|
ca7bfa1b22212137bb4e984c0457632163e89a43
|
[
"MIT"
] | 438
|
2016-10-11T12:24:22.000Z
|
2022-03-31T19:30:35.000Z
|
office365/onedrive/driveitems/thumbnail.py
|
rikeshtailor/Office365-REST-Python-Client
|
ca7bfa1b22212137bb4e984c0457632163e89a43
|
[
"MIT"
] | 202
|
2016-08-22T19:29:40.000Z
|
2022-03-30T20:26:15.000Z
|
from office365.runtime.client_value import ClientValue
class Thumbnail(ClientValue):
"""
The thumbnail resource type represents a thumbnail for an image, video, document,
or any item that has a bitmap representation.
"""
pass
| 25.2
| 85
| 0.722222
| 31
| 252
| 5.83871
| 0.870968
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015228
| 0.218254
| 252
| 9
| 86
| 28
| 0.903553
| 0.519841
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 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
|
371a82ecf86322e4a321f33af4c1b5f4ae5b26ab
| 154
|
py
|
Python
|
gram/admin.py
|
swanapole/insta
|
2f54893b118fc371d67c8fa8e0095a1911fd16dd
|
[
"Unlicense"
] | null | null | null |
gram/admin.py
|
swanapole/insta
|
2f54893b118fc371d67c8fa8e0095a1911fd16dd
|
[
"Unlicense"
] | null | null | null |
gram/admin.py
|
swanapole/insta
|
2f54893b118fc371d67c8fa8e0095a1911fd16dd
|
[
"Unlicense"
] | null | null | null |
from django.contrib import admin
from .models import Post,Location
# Register your models here.
admin.site.register(Post)
admin.site.register(Location)
| 19.25
| 33
| 0.805195
| 22
| 154
| 5.636364
| 0.545455
| 0.145161
| 0.274194
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11039
| 154
| 7
| 34
| 22
| 0.905109
| 0.168831
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2ea1e6a0d681b870454de8255e9894dd5b709478
| 3,526
|
py
|
Python
|
backend/kale/tests/unit_tests/test_kfputils.py
|
brness/kale
|
d90310dbebc765c68915df0cf832a7a5d1ec1551
|
[
"Apache-2.0"
] | 502
|
2019-07-18T16:19:16.000Z
|
2022-03-30T19:45:31.000Z
|
backend/kale/tests/unit_tests/test_kfputils.py
|
brness/kale
|
d90310dbebc765c68915df0cf832a7a5d1ec1551
|
[
"Apache-2.0"
] | 333
|
2021-01-28T07:17:46.000Z
|
2022-03-26T11:43:41.000Z
|
backend/kale/tests/unit_tests/test_kfputils.py
|
brness/kale
|
d90310dbebc765c68915df0cf832a7a5d1ec1551
|
[
"Apache-2.0"
] | 111
|
2019-09-25T20:28:47.000Z
|
2022-03-24T01:31:46.000Z
|
# Copyright 2020 The Kale Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import json
from testfixtures import mock
from kale.common import kfputils
@mock.patch('kale.common.kfputils.workflowutils')
@mock.patch('kale.common.kfputils.podutils')
def test_update_uimetadata_not_exists(podutils, workflowutils, tmpdir):
"""Test the uimetadata file is created when it does not exists."""
podutils.get_pod_name.return_value = 'test_pod'
podutils.get_namespace.return_value = 'test_ns'
workflowutils.get_workflow_name.return_value = 'test_wk'
filepath = os.path.join(tmpdir, 'tmp_uimetadata.json')
# update tmp file
kfputils.update_uimetadata('test', uimetadata_path=filepath)
# check file has been updated correctly
updated = json.loads(open(filepath).read())
target = {"outputs": [{
'type': 'web-app',
'storage': 'minio',
'source': 'minio://mlpipeline/artifacts/test_wk/test_pod/test.tgz'
}]}
assert updated == target
@mock.patch('kale.common.kfputils.workflowutils')
@mock.patch('kale.common.kfputils.podutils')
def test_update_uimetadata_from_empty(podutils, workflowutils, tmpdir):
"""Test that the uimetadata file is updated inplace correctly."""
podutils.get_pod_name.return_value = 'test_pod'
podutils.get_namespace.return_value = 'test_ns'
workflowutils.get_workflow_name.return_value = 'test_wk'
# create base tmp file
base = {"outputs": []}
filepath = os.path.join(tmpdir, 'tmp_uimetadata.json')
json.dump(base, open(filepath, 'w'))
# update tmp file
kfputils.update_uimetadata('test', uimetadata_path=filepath)
# check file has been updated correctly
updated = json.loads(open(filepath).read())
target = {"outputs": [{
'type': 'web-app',
'storage': 'minio',
'source': 'minio://mlpipeline/artifacts/test_wk/test_pod/test.tgz'
}]}
assert updated == target
@mock.patch('kale.common.kfputils.workflowutils')
@mock.patch('kale.common.kfputils.podutils')
def test_update_uimetadata_from_not_empty(podutils, workflowutils, tmpdir):
"""Test that the uimetadata file is updated inplace correctly."""
podutils.get_pod_name.return_value = 'test_pod'
podutils.get_namespace.return_value = 'test_ns'
workflowutils.get_workflow_name.return_value = 'test_wk'
# create base tmp file
markdown = {
'type': 'markdown',
'storage': 'inline',
'source': '#Some markdown'
}
base = {"outputs": [markdown]}
filepath = os.path.join(tmpdir, 'tmp_uimetadata.json')
json.dump(base, open(filepath, 'w'))
# update tmp file
kfputils.update_uimetadata('test', uimetadata_path=filepath)
# check file has been updated correctly
updated = json.loads(open(filepath).read())
target = {"outputs": [markdown, {
'type': 'web-app',
'storage': 'minio',
'source': 'minio://mlpipeline/artifacts/test_wk/test_pod/test.tgz'
}]}
assert updated == target
| 35.26
| 75
| 0.701361
| 450
| 3,526
| 5.36
| 0.282222
| 0.041045
| 0.05597
| 0.047264
| 0.713101
| 0.713101
| 0.713101
| 0.713101
| 0.696103
| 0.696103
| 0
| 0.00276
| 0.177822
| 3,526
| 99
| 76
| 35.616162
| 0.829251
| 0.269427
| 0
| 0.741379
| 0
| 0
| 0.257874
| 0.138189
| 0
| 0
| 0
| 0
| 0.051724
| 1
| 0.051724
| false
| 0
| 0.068966
| 0
| 0.12069
| 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
|
2ebc31b3db80ac52a752697afa967fbb39cb0582
| 25,413
|
py
|
Python
|
data_analysis/audiocommons_ffont/scripts/fsl4_ids.py
|
aframires/freesound-loop-annotator
|
a24e0c23bfc671e41e8627150e7b9fcae5c8cb13
|
[
"Apache-2.0"
] | 18
|
2020-01-22T14:58:18.000Z
|
2022-02-21T12:07:51.000Z
|
data_analysis/audiocommons_ffont/scripts/fsl4_ids.py
|
aframires/freesound-loop-annotator
|
a24e0c23bfc671e41e8627150e7b9fcae5c8cb13
|
[
"Apache-2.0"
] | 2
|
2020-02-24T13:14:05.000Z
|
2020-09-21T13:34:53.000Z
|
data_analysis/audiocommons_ffont/scripts/fsl4_ids.py
|
aframires/freesound-loop-annotator
|
a24e0c23bfc671e41e8627150e7b9fcae5c8cb13
|
[
"Apache-2.0"
] | 1
|
2020-01-22T14:55:36.000Z
|
2020-01-22T14:55:36.000Z
|
FSL4_IDS = [137054,214418,214419,214412,214413,214410,214411,233822,214417,214414,214415,182678,177795,170449,239048,182674,182677,173021,173020,43271,43270,319316,43274,131593,194819,194818,112468,241210,32307,32306,214523,70003,4416,181163,181162,319311,170447,43181,43180,43183,43182,43185,43184,43187,43186,43189,43188,5784,31736,235419,235418,277267,235412,235411,235410,235417,235416,235415,235414,5854,5855,5856,5857,5850,5851,5852,5853,5858,5785,31735,253959,233833,233832,233831,233830,233837,233836,233835,233834,43981,237950,43983,182295,182293,237951,270669,188408,220541,63931,220547,220546,200899,200898,200897,200896,200895,200894,200893,200892,200891,200890,5821,63026,47887,237958,237959,249472,249473,249470,249471,249476,249477,249474,249475,5825,249478,249479,177294,260674,242962,5824,74236,213381,248137,204085,43273,43272,58563,203964,249461,14333,160371,5880,152605,152606,152607,152608,211954,211955,198495,198494,22873,276670,329130,329131,160377,60641,211555,160376,211550,160379,243657,259297,48541,249463,169939,21238,132905,132907,83278,132909,219153,168643,179527,252451,264354,252453,37315,130491,261422,68050,102007,244524,275180,41568,63467,147277,208109,147275,147274,40962,147272,147271,177006,29764,231462,231463,6974,243415,231466,231467,231464,231465,231468,231469,6978,6979,67693,67692,67691,67690,67697,67696,67695,67694,160713,67699,67698,242961,242960,322315,160714,108139,108138,256632,103409,108131,108130,108133,108132,34374,238653,238651,238656,238657,238654,34373,169938,151814,319708,238659,19789,47673,110316,47672,132051,132050,216809,216808,216807,47677,47676,221376,318834,47675,4593,47674,4590,183156,183405,183406,183155,1375,1374,1376,4596,183408,4597,214409,214408,182665,182662,182660,214401,221556,214403,214402,214405,214404,214407,214406,43264,43265,43266,43267,43260,43261,43263,43268,43269,319238,319239,231608,231609,231603,231606,231607,231604,231605,22274,15551,277268,214535,214534,214537,214536,214531,214533,214532,104382,214539,214538,43192,43193,43190,167728,43196,43197,114688,43195,171602,43198,135767,167727,167726,48431,171353,200958,82237,200956,200957,200954,200955,200952,200953,200950,131275,5847,5846,5845,5844,5843,27146,5841,5840,5849,214556,104496,324944,104494,104495,98109,21117,60128,21118,222797,32060,104498,104499,4620,4621,4622,43999,4624,4625,4626,4627,4628,4629,178905,130109,57660,42023,152948,5812,320642,32061,152947,149212,152945,5859,64605,64607,64606,323516,64608,270128,270129,200174,246417,9538,270122,167182,270126,167180,102942,249460,328638,249462,249465,249464,102944,102945,249469,249468,237736,269550,269557,328637,269555,269554,4538,4539,4534,4535,4536,4537,4530,261202,4532,261200,98108,270728,203977,275620,32064,235830,214580,63470,220538,329127,52742,52744,72894,4655,53296,21732,278902,115529,102891,249868,2699,2698,2697,2696,2695,2694,2693,2692,2691,4650,219258,145379,243570,20469,20468,74870,177455,43980,20461,20460,20463,20462,20465,20464,20467,20466,237514,95767,237516,43982,95763,237512,237513,4552,72893,4553,198574,4550,198576,108925,4551,168672,89608,6007,232742,321768,40089,40088,256131,55463,40081,40080,175839,40082,40085,40084,40087,40086,253167,263748,263749,98106,263744,263745,263746,263747,263740,263741,263742,263743,56157,34895,231471,231470,231473,231472,231475,231474,231477,231476,231479,99968,23042,14345,23041,67688,67689,67687,145493,102019,270201,28358,145495,324985,238867,220540,242558,242559,242555,242556,242557,242551,242552,231480,276672,43199,4533,177806,177805,177802,177801,178904,220549,219252,220548,55067,44920,14502,198581,213524,183413,55069,183415,55068,162257,39841,160988,160989,114057,114056,249196,160982,160983,114059,160981,259280,160987,43211,43210,43213,43212,43215,43214,43217,43216,43219,43218,40090,231619,231618,40091,239126,231611,231610,231613,231612,231615,231614,113984,231616,28644,127651,127650,239123,276047,40095,214624,214500,214501,214502,214503,212924,113985,150114,150115,250571,250570,250573,250575,198972,250579,249681,102044,32485,200949,200948,200945,200944,200947,200946,200941,215048,200943,200942,213354,213355,213356,213357,5876,5877,5874,5875,269548,5878,5879,213358,213359,269549,116320,21126,21125,21124,24951,21122,21121,21120,4633,4632,4631,4630,4637,4636,4635,4634,4639,4638,260673,320632,40768,320630,269547,40000,163438,69997,104493,242561,906,5745,6008,190550,32105,40009,260897,80503,249458,249459,32103,32102,249454,249455,249456,249457,249450,249451,249452,249453,200912,261420,167068,214586,4529,4528,4527,4526,4525,4524,4523,11526,4521,183890,4422,200858,135768,135769,4423,270734,270736,270730,270732,235835,177458,235837,4421,235831,161257,235833,235832,4426,235839,235838,48546,4427,63468,4424,27978,46682,254594,294465,38999,63861,63862,6074,270131,102888,102887,102886,102885,102884,102883,72154,102027,48434,18549,18548,48432,48433,18545,18544,18547,18546,18541,18540,18543,18542,147276,20478,203123,20470,20471,161096,243655,202839,211684,18430,18432,18435,18434,18436,178903,178902,33527,178906,30189,30188,40098,40099,222376,222377,222375,40092,40093,222378,222379,40096,40097,40094,54353,7929,324339,263750,32157,33982,33983,33980,33981,175626,67303,67302,114995,151762,95360,72153,202054,254876,28438,28439,28436,28437,28434,28435,28432,28433,114843,31746,217993,31744,31745,31742,31743,151815,324722,145586,220568,207801,187651,171185,44911,44910,29633,29632,263531,115267,115266,151368,1398,1397,1396,1395,1394,1392,1391,214378,32484,200859,39992,262487,150361,150360,150362,43202,43203,43200,43201,43206,231621,43204,43205,43208,43209,39394,39391,39390,39393,39392,276070,213500,276072,276073,213504,35467,35466,35465,102028,244272,214518,214516,214515,214513,185365,259677,188019,69503,14317,163662,214423,214422,214421,214420,214427,214426,214425,214424,5865,5864,5867,19769,5861,241958,5863,5862,114710,69621,69622,32068,32069,117519,4609,4606,4607,4604,4605,4602,4603,4600,69625,149279,149278,262461,320628,98110,220598,220599,250498,250499,181605,220590,220591,220592,220593,220594,250497,220596,220597,163666,20719,163667,40069,249449,40068,102014,163663,25488,4518,4519,70039,70038,70037,70036,70035,70034,184702,70032,70031,70030,40083,40063,323406,260795,104109,234296,70040,124384,270707,40060,2723,2722,2721,2720,152670,40066,7944,7945,21244,7947,21242,215003,7942,21241,163669,7930,219269,219262,219260,219261,219264,219265,45525,45527,187650,18558,18559,18556,18557,18554,18555,18552,18553,18550,18551,102023,38614,29631,18422,18423,18420,18426,18427,18425,242577,18428,274466,265416,30191,30192,127879,30195,30196,30197,33883,33882,33881,33880,33886,33885,33884,113614,151366,87135,220912,32063,7934,115269,194516,29755,171339,171338,264750,171337,195991,188685,232162,4574,4575,254865,111159,4576,4577,6983,280229,6981,6980,14325,4578,14327,14326,14321,14320,14323,4579,69195,14329,14328,272010,201015,187668,66315,270130,66317,66316,66319,66318,102022,156518,238663,238662,238661,238660,238666,238665,238664,19064,233819,118377,270763,239130,239131,171603,217500,242590,242591,242848,242849,231624,86661,270764,231625,44907,151176,34182,185489,151371,47670,43207,233812,231622,214748,214749,214746,214747,214745,214742,214743,214740,214741,202384,231637,231636,43239,43238,43237,43236,43235,43234,43233,43232,43231,43230,32873,32874,276069,39387,259869,239953,266627,50040,39388,39389,214568,214569,35478,214560,214561,214566,214567,214565,85266,200965,200964,200963,200962,200961,200960,39453,85264,85265,115925,115926,115927,5818,5819,257910,5810,118385,27130,5813,5814,5815,5816,5817,32057,214366,214367,277286,168747,214368,214369,32059,215760,4619,4618,39451,4611,4610,4613,4612,4615,4614,4617,43541,43540,220585,43542,220583,220582,43547,220580,323529,323528,74874,74873,74872,74871,52784,113613,250808,250805,52781,250807,250806,152467,118372,118373,118376,52783,118374,118375,118378,52782,215165,214726,70028,70029,261094,206122,212925,70025,70026,43163,43162,43161,43160,43167,43166,43165,43164,43169,43168,85271,85270,85272,2712,2713,99553,2711,99555,99554,2714,99556,265575,265574,2718,2719,9363,265573,265572,7957,152482,237517,234816,16348,249545,63405,222390,261324,328288,328287,219248,231647,209348,209349,18569,18568,20454,20455,20456,20457,20458,18562,18561,18560,18567,18566,18565,18564,172237,172236,5860,4408,172238,40018,200871,113624,114034,231645,41305,18419,18417,4406,178176,4407,114033,6977,123293,123292,114032,123295,123294,53423,200879,2710,6975,53426,21123,22130,6972,200951,324609,6973,6970,216067,151865,6971,152475,128673,113993,113992,113991,113990,102469,40148,319015,15480,6009,170448,272009,272008,271020,14331,99601,231646,220607,80527,137223,147524,147523,147522,137224,70041,143640,143641,183596,132052,34044,34045,34042,34043,34040,34041,47679,47678,69605,107053,107052,107051,113622,73230,201018,213742,201019,102492,136979,222399,64609,276671,14332,41025,5869,174005,91732,239013,118387,239541,276674,38106,214755,214754,276675,214751,214750,214753,214752,43228,43229,201011,43220,43221,43222,43223,43224,43225,43226,43227,213523,231481,231482,231483,231484,231485,231486,231487,231488,231489,199907,5789,214621,214620,214623,214622,214625,239122,239121,136984,214587,39454,177456,177457,214579,214578,214571,214570,214573,214572,214575,214574,214577,214576,173124,200913,200910,200911,200916,200917,200914,200915,200918,200919,118384,238652,242560,5809,242562,48978,122701,5803,5802,5801,5800,5807,5806,5805,5804,214373,214372,214371,214370,214377,214376,214375,214374,214379,238655,5866,26182,26183,118382,238658,262440,262441,262442,262443,262445,262446,131346,25763,25765,25764,25769,98707,184674,124276,124277,124278,270367,294440,4570,4571,4572,4573,19818,85267,222428,222429,222426,222427,222424,222425,222422,222423,222420,222421,172654,90928,102493,172653,181387,270769,90927,90926,90925,43178,43179,85268,85269,43174,43175,43176,43177,43170,43171,43172,43173,2709,2708,2705,2704,2707,2706,2701,2700,2703,2702,68128,68129,68122,68123,68124,68125,68126,68127,102503,102500,102501,102506,4409,102504,102505,4404,4405,102508,102509,4400,4401,4402,4403,152477,190565,152474,152473,80522,80523,80520,80526,80524,152479,209350,33712,114260,172244,172245,48600,172249,210128,214595,274627,161252,249484,249483,249482,249481,249480,40049,40048,102030,230215,40045,40044,40047,40046,40041,40040,40043,40042,276934,59774,261869,784,98107,160352,29737,69606,31259,248202,237429,220595,18574,18575,18576,18577,18570,18571,18572,18573,5827,18578,18579,7931,219249,114256,277047,32101,156082,33972,33971,156081,33977,33976,33975,33974,58578,58579,33979,33978,48719,123889,20335,20334,20337,20336,322551,7937,20333,29614,31719,31718,7936,20339,20338,99619,234845,7938,505,18538,183587,47668,47669,242001,72205,325185,163631,163665,95081,234781,276071,188553,188551,131423,241209,261201,242719,145496,242482,159517,159516,159518,55070,160780,231498,21141,231493,231492,173287,231490,170451,137031,214618,214619,214400,214614,214615,214616,214617,214610,214611,214612,214613,170452,175168,167173,114064,123900,245257,200901,200900,200903,200902,200905,200904,200907,200906,200909,200908,319318,5836,4031,5834,5835,5832,5833,5830,4030,263872,263870,263871,261562,319234,185291,5839,4032,51313,51312,51311,75410,214388,261328,214386,214387,214384,214385,214382,214383,214380,214381,19793,19792,19791,19790,19795,19794,19798,114505,74789,74788,200920,114709,5999,5998,214544,214545,214546,214547,214540,214541,214542,214543,277355,214548,214549,264751,43581,63642,233824,163664,100270,4563,4562,4561,4560,4567,222438,4565,4564,222435,19065,4569,4568,222431,222430,222433,214497,270771,33973,270773,270775,19067,94280,214495,156080,147273,93636,33970,135524,93637,250227,173395,204196,214499,101899,101898,101895,101894,101897,58577,125110,328719,328718,219251,219250,219257,149014,219255,219254,278958,148006,328717,102510,102513,102512,102515,254589,102517,4418,254584,265152,265151,4414,254580,4412,4411,4410,6064,6065,6066,6067,6060,6061,6062,6063,6068,6069,251260,254566,270204,254564,254565,254562,254563,254560,254561,14826,256661,270195,270194,270197,270196,170821,270193,270199,270198,27129,120836,120837,163661,222656,31717,55207,48270,36917,7940,36918,39999,31740,21243,102025,102024,30149,102026,102021,21240,33360,40059,40056,40057,40054,7943,102029,40053,243616,40051,38132,31741,237431,181390,188414,38133,243058,101900,159515,205996,33968,14319,33964,33965,33966,33967,58581,6043,58583,58582,87071,155941,220584,43191,137979,37885,115040,37883,37882,118516,43194,238490,179772,238496,37867,37866,47671,131379,122304,250569,122302,102482,213898,122308,106858,222391,222392,222393,222394,149286,222396,222397,222398,4589,38137,106857,47667,179770,277270,131187,195917,206089,240157,102489,4586,273974,200959,4580,214609,214608,46593,212703,214603,214602,214601,214600,214607,214606,214605,174449,244235,130487,6045,189291,200938,200939,200934,200935,200936,200937,200930,200931,200932,200933,263869,5820,5823,5822,51300,51301,51302,5826,5829,5828,147270,137052,5842,261423,324066,261421,113983,214399,214398,261424,214395,214394,214397,214396,214391,214390,214393,214392,107956,276692,19788,320952,32257,19786,19787,4520,127880,6048,214553,214552,214551,214550,214557,213276,214555,214554,214559,214558,220536,233840,270698,220535,48528,56750,270692,270690,95620,270696,270694,220539,222408,222409,32158,32159,4558,4559,222400,222401,222402,222403,222404,222405,222406,222407,270748,270744,270746,107955,270740,270742,98105,321229,326479,193670,21568,43979,244099,244098,124454,21119,128253,16404,98103,221845,221844,221846,221841,221840,221843,221842,903,4428,4429,85024,907,904,905,102524,102525,102526,254590,254597,102521,102522,4425,6075,4623,6073,6072,6071,6070,254576,254571,242717,187855,254579,201004,137053,21053,21052,39993,167305,261561,39997,39996,39995,39994,260172,21057,218274,39998,21056,235840,4547,275736,21054,275737,102010,102011,102012,102013,33357,102015,102016,102017,102018,40062,40061,210824,40067,14920,40065,40064,53458,274461,204896,246385,157779,246386,246382,39665,176366,216821,4588,30190,232634,232635,232632,232633,232630,232631,34276,152946,274511,274512,28444,28443,28442,28441,28440,269556,31739,31738,31737,324721,322575,31734,31733,31732,31731,31730,30198,178604,178602,31287,31286,31285,31284,263455,126562,39298,39299,237515,69665,160429,169869,38107,151330,38105,38104,38103,213868,151336,136985,213867,213864,222890,39452,246066,136983,136982,157405,6849,114948,222389,222388,222387,222386,222385,222384,222383,222382,222381,222380,46375,6966,214596,245421,220913,5744,231491,5746,5747,5748,5749,244105,14330,6840,6846,6847,178771,6845,200929,200928,195630,200923,200922,200921,100269,200927,200926,200925,200924,214492,214493,214490,214491,214496,107957,214494,19066,19069,19068,107958,107959,102940,98089,82022,214702,214703,214700,214701,214706,214707,214704,214705,214708,214709,4430,32099,32098,249467,274985,93638,149288,149289,7958,269552,149280,149281,149282,149283,149284,149285,204802,149287,130488,130489,181656,253648,4049,39916,152478,40016,51201,222417,222416,222415,222414,222413,222412,222411,222410,6968,222419,222418,4549,4548,21059,21058,112458,4541,4540,4543,4542,4545,4544,21055,4546,270758,5868,270752,270750,270756,270754,27316,27317,27314,27315,24939,24938,24936,24934,24933,24932,24931,24930,21237,21236,21235,93634,21230,261203,319312,21239,4531,185572,257354,185571,4431,102535,185574,257355,221873,111158,93635,140835,102533,239079,102531,102530,173416,102534,6042,251249,6040,6041,6046,161262,6044,140833,184685,257353,140838,6047,5837,160369,40100,6982,68049,68048,68047,68046,68045,68044,68043,68042,68041,6049,146169,14324,5831,167379,118390,4557,163676,203522,102009,102008,5788,43242,102005,14322,275102,20544,5838,4554,203099,202784,202787,255308,4555,275619,275618,40102,40103,40104,40105,211822,211823,232625,232624,232627,232626,232621,232620,232623,232622,232629,232628,270220,68991,213917,197708,220866,31720,31721,31722,31723,31724,31725,31726,31727,40074,255234,40076,40077,40070,40071,40072,40073,40078,40079,171256,263119,67270,4594,231642,77996,231578,37845,272465,52743,28056,28057,4595,257497,214389,243491,111256,111257,111254,111255,111252,111253,111250,111251,200889,211549,111258,5753,5752,5751,5750,5757,5756,5755,5754,114376,114377,5759,5758,190895,160779,96463,102507,171105,188691,188692,234114,174867,55086,55085,217753,276564,276563,269553,189274,189273,189272,214481,214480,19070,214482,214485,214484,214487,214486,214489,214488,184371,184370,214711,214710,214713,207406,214715,214714,214717,214716,206132,214718,183668,183669,261199,261198,149291,149290,261197,261195,261194,200862,200863,200860,200861,200866,200867,200864,200865,200868,200869,131380,235409,23781,148105,220441,327522,182681,182680,130493,130492,130495,203532,161948,201025,201024,201027,201026,201021,201020,201023,201022,222466,222467,222465,152939,278103,241422,25772,320738,25773,162331,178617,220604,220605,220606,27320,220600,220601,220602,220603,220608,102004,21224,102528,270787,270789,178616,203661,71835,185562,185569,44909,27318,4601,102529,251251,251250,4566,6059,6058,6055,6054,6057,6056,6051,6050,6053,6052,41280,41281,160373,160372,160375,160374,254559,254558,254557,160378,101910,101911,101912,101913,101914,101915,101916,101917,124542,68051,68052,68053,68054,68055,68056,44706,237204,237205,237202,4592,102495,102496,4591,102490,102491,118389,118388,265056,118386,4598,4599,102498,102499,118381,118380,203241,40075,274444,217345,112521,202337,129277,95765,248244,34029,174722,256336,256331,237511,244404,19947,233826,210834,18539,243350,233827,210833,233820,54907,232434,18536,18537,232610,232611,232612,232613,232614,232615,232616,232617,232618,232619,19941,324747,222434,222437,213905,222436,239550,40001,182634,40003,40002,40005,40004,40007,40006,268110,40008,222432,268116,132550,233670,204746,126542,217366,72152,4648,72150,72151,211824,15508,6012,325500,243803,182633,6017,151313,4642,5808,6018,115999,26087,111245,217108,111247,111246,234293,111249,111248,102523,188711,5768,5769,5766,5767,5764,5765,5762,5763,5760,5761,220554,231638,200881,32248,235953,220556,34037,34036,34035,34034,34033,34032,34031,34030,220550,34039,34038,220552,234126,276574,220553,243703,115988,115989,115986,115987,115984,115985,115982,115983,115981,151260,107978,107979,19049,19048,19047,19046,19045,183671,214728,214729,214724,214725,206123,214727,214720,214721,214722,214723,33969,46986,19053,183923,55393,69590,69591,183927,248408,200870,200873,200872,200875,200874,200877,200876,151861,200878,151863,151862,201581,151864,104310,32409,130949,214588,214589,5786,5787,5780,5781,5782,5783,201010,214581,214582,214583,214584,214585,201016,201017,31728,31940,101896,222475,31729,139513,101893,139511,7935,73229,260566,231351,31941,219253,214604,233823,277226,27335,101121,31942,219256,221812,239127,7933,7932,221816,221817,270799,221815,7939,270796,221818,221819,270793,270791,16459,63469,185558,17696,17697,17698,17699,260703,185573,21140,1892,235233,235232,235231,235230,167176,167175,167178,167179,198873,198872,6028,6029,121536,6020,6021,6022,6023,6024,6025,6026,6027,36880,41279,102514,250880,101909,101908,101907,101906,101905,101904,101903,101902,101901,128741,54862,54863,54860,54861,4419,54864,173506,158441,184824,158444,120874,120875,102483,4417,102481,102480,102487,102486,102485,102484,4585,4584,4587,102488,4581,4415,4583,4582,41019,41018,254632,6960,4413,14916,102516,41017,6962,254582,248257,232190,72149,21569,72148,6967,248099,102519,6969,231478,201007,30218,201006,237518,102518,30217,231644,246064,246065,6848,246067,7956,246061,246062,246063,6842,6843,231639,6841,246068,246069,6844,201002,214591,270809,270807,270805,270804,270803,40012,40013,40010,40011,169880,40017,40014,40015,48529,269769,243656,40019,243650,66389,67701,67700,67702,205806,205805,237961,237960,237963,237962,209814,275301,270200,231626,270203,270202,5794,263739,263738,171348,171349,171346,171347,171344,171342,171343,171340,171341,47099,34118,194820,34114,34116,34117,34113,5779,5778,5811,5771,5770,5773,5772,5775,5774,5777,5776,245268,127338,254890,187649,31078,165085,34026,34027,34028,129276,161253,31077,73503,73507,73504,73505,165086,82010,115998,273203,115995,115994,115997,115996,115991,115990,115993,115992,165436,19050,19051,19052,107960,19054,102006,321757,145477,220572,214739,214738,234731,188785,214733,214732,214731,214730,214737,214736,214735,214734,107985,107984,107981,107980,107983,107982,40101,22128,22129,31899,161254,161249,22126,22127,214597,12051,201005,214594,201003,231643,231640,231641,201009,214598,5797,5796,5795,206063,5793,5792,5791,5790,5799,5798,220578,220579,260820,220573,220570,220571,220576,220577,220575,94279,94278,31824,231342,94277,244104,244106,244299,235420,244291,149366,205162,43397,25492,25491,25490,277269,220587,161865,240288,240289,40055,21062,201008,1889,1888,1887,1886,21154,21155,21152,21153,7946,244584,233808,233809,31825,233802,233803,323520,233806,233807,233804,233805,52451,6039,6038,104500,104502,104503,6033,6032,6031,6030,6037,6036,6035,6034,42287,36879,36878,147269,36875,36874,36877,36876,36871,36870,36873,36872,231620,220589,33362,220588,102020,40050,185943,185942,54859,167384,33361,167381,167380,265078,102478,102479,102476,102477,102474,102475,102472,102473,102470,102471,198029,40052,321221,40028,44000,21571,21572,53658,21575,19943,151369,20510,20512,125364,84335,14503,218346,218345,231623,276329,113743,265677,113745,176321,176323,176322,6855,6854,21060,6851,6850,6853,6852,235836,246070,20421,143639,143638,202537,21144,40029,176924,40027,40026,40025,40024,40023,40022,40021,40020,237954,237955,237956,237957,132578,132579,237952,237953,47884,132575,132576,132577,132570,132571,156867,4522,250802,37837,29534,104984,29533,58584,47422,47423,217572,175671,83318,83319,171351,171350,148825,171352,21158,223664,275206,275204,322327,21061,244143,108140,321756,118379,108144,108145,108146,108147,108148,108149,269551,39300,39301,115526,115527,115522,170176,41024,7941,28317,262940,659,214694,214695,214696,214697,236003,214698,214699,244586,253048,245270,253044,253045,253046,253047,253043,192345,192346,58580,160436,192349,192348,231727,231726,242770,245271,239084,239080,239081,151841,233801,214474,214475,214476,214477,214478,214479,161251,161250,239064,11527,161255,218058,182658,161259,161258,145221,200857,200856,182651,161093,104504,43259,43258,161095,43255,43254,43257,43256,43251,43250,43253,43252,266081,220569,19072,222458,277681,19073,220561,220560,220563,220562,220565,214483,220566,19071,189350,69620,104426,104425,69623,69624,19074,69626,69627,69628,69629,150088,25489,27352,14318,25485,25486,25487,221838,221839,221834,221835,221836,221837,221830,221831,221832,221833,19950,14315,2716,102943,14316,2717,6006,233818,6004,6005,6002,6003,6000,6001,233811,233810,233813,2715,233815,233814,233817,233816,113625,214712,128493,270313,270312,193753,193752,193754,193757,183661,170343,324750,80525,36860,201920,214719,269560,269561,113623,150302,102941,152483,152480,152481,152484,53396,220586,70284,128671,128672,199219,128674,102468,102465,102464,102467,102466,102461,102460,102463,102462,176792,254617,179540,179541,179542,179543,179544,179545,179547,46809,274961,4033,113754,118383,68130,274782,274783,170453,264286,6827,6828,6829,20340,20341,324779,136980,99685,99684,99686,122296,122297,185941,252213,40038,40039,41030,40030,40031,40032,40033,40034,40035,40036,40037,80528,237949,237948,111072,33878,33879,213834,33877,31658,220564,6961,114936,114937,4556,31655,31656,31657,175841,71026,248297,220555,65186,248299,248298,233534,23526,318564,192508,6958,6959,5553,15390,6954,6955,6956,6957,85898,6963,86760,86761,108156,108155,108154,108153,108152,108151,108150,38086,115532,115531,220557,124279,265076,324793,130490,269545,104308,32411,101918,104309,189234,201012,20452,200940,5883,5882,5881,20453,5887,5886,5885,5884,253053,6965,5872,132581,160428,5873,201013,48977,5870,220551,18563,5871,20459,6964,221352,318636,244342,102532,201014,51219,239077,239076,182645,182644,161260,239078,182643,182642,43719,92062,115826,214867,214866,43248,43249,43246,43247,43244,43245,115829,43243,43240,43241,151547,151545,151543,266093,4420,170549,204748,266094,32062,214498,4516,120110,189349,20511,261008,233839,189347,189346,173417,235408,86208,250500,250501,235403,56156,38139,233838,249466,56158,56159,222395,221829,221828,221823,221822,221821,221820,221827,221826,221825,221824,19946,233825,19944,19945,19942,233821,116318,116319,233828,233829,19948,19949,6011,6010,6013,4649,6015,6014,4608,6016,6019,4643,4640,4641,4646,4647,4644,4645,200880,25771,200882,200883,200884,200885,200886,200887,200888,270671,115801,270673,220558,270675,270677,36859,36858,214593,36857,36856,20753,260660,84338,260666,20755,20754,210769,214592,220537,138142,130581,70079,210569,70073,70072,199204,70075,70074,254609,254606,254600,71373,5848,270127,214590,211564,315668,114259,195320,315664,6833,6832,6831,6830,6837,6836,6835,6834,6839,6838,176874,6856,32058,113781,329322,246093,32256,132910,132911,172959,41020,41021,321754,321755,169879,275179,41026,41027,169871,169870,321758,169872,264749,264748,275422,275423,37819,264745,264744,264747,264746,54360,41752,41753,39432,41756,41757,41754,41755,276669,207509,70033,170446,233709,38771,4517,231617,15479,6976,21225,108129,86757,86759,86758,252040,40058,214599,126059,126057,126055,182641,114499,163668,216810,216811,216812,216813,216814,216815,272362,213654,114255,114257,203662,4398,4399,32104,4392,4393,4394,4395,4396,4397,32106,25938,25939,221360,25935,25936,25937,32100]
| 25,413
| 25,413
| 0.844607
| 3,947
| 25,413
| 5.437801
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.844398
| 0.000079
| 25,413
| 1
| 25,413
| 25,413
| 0.000236
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2ee967dc65c6b9d1c94d6ba58fb20a135132870d
| 214
|
py
|
Python
|
textX-LS/core/textx_ls_core/languages/textxfile/__init__.py
|
goto40/textX-LS
|
a6b357186f7adaf7c30aed4d543ae8d149c80a25
|
[
"MIT"
] | null | null | null |
textX-LS/core/textx_ls_core/languages/textxfile/__init__.py
|
goto40/textX-LS
|
a6b357186f7adaf7c30aed4d543ae8d149c80a25
|
[
"MIT"
] | null | null | null |
textX-LS/core/textx_ls_core/languages/textxfile/__init__.py
|
goto40/textX-LS
|
a6b357186f7adaf7c30aed4d543ae8d149c80a25
|
[
"MIT"
] | null | null | null |
from .. import LanguageTemplate
class TextxfileLang(LanguageTemplate):
@property
def extensions(self):
return ['textxfile']
@property
def language_name(self):
return 'Textxfile'
| 16.461538
| 38
| 0.668224
| 19
| 214
| 7.473684
| 0.684211
| 0.15493
| 0.267606
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.242991
| 214
| 12
| 39
| 17.833333
| 0.876543
| 0
| 0
| 0.25
| 0
| 0
| 0.084112
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.125
| 0.25
| 0.75
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
25b09f8ada36214f8a6c5477f86ea0feb5577183
| 104
|
py
|
Python
|
setup.py
|
kartik-hegde/fate
|
0ad0acd5ab9b8dc7f7786c233629c69a061ecbdb
|
[
"MIT"
] | null | null | null |
setup.py
|
kartik-hegde/fate
|
0ad0acd5ab9b8dc7f7786c233629c69a061ecbdb
|
[
"MIT"
] | null | null | null |
setup.py
|
kartik-hegde/fate
|
0ad0acd5ab9b8dc7f7786c233629c69a061ecbdb
|
[
"MIT"
] | null | null | null |
from setuptools import setup, find_packages
setup(name='fate', version='1.0', packages=find_packages())
| 34.666667
| 59
| 0.778846
| 15
| 104
| 5.266667
| 0.733333
| 0.303797
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020833
| 0.076923
| 104
| 3
| 59
| 34.666667
| 0.802083
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 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
|
25ba8b6e1a1e6bdeedcb16416658c647f6510495
| 60
|
py
|
Python
|
ethereum/experimental/__init__.py
|
IIIIllllIIIIllllIIIIllllIIIIllllIIIIll/pyethereum
|
d962694be03686a8e5c1d7459ae272b70a5c9f77
|
[
"MIT"
] | 11
|
2017-06-16T13:19:02.000Z
|
2021-06-16T02:33:00.000Z
|
ethereum/experimental/__init__.py
|
IIIIllllIIIIllllIIIIllllIIIIllllIIIIll/pyethereum
|
d962694be03686a8e5c1d7459ae272b70a5c9f77
|
[
"MIT"
] | 8
|
2017-11-20T15:09:43.000Z
|
2018-04-01T09:36:29.000Z
|
ethereum/experimental/__init__.py
|
IIIIllllIIIIllllIIIIllllIIIIllllIIIIll/pyethereum
|
d962694be03686a8e5c1d7459ae272b70a5c9f77
|
[
"MIT"
] | 12
|
2017-06-12T15:54:27.000Z
|
2018-04-19T03:31:26.000Z
|
from ethereum.experimental import pruning_trie, refcount_db
| 30
| 59
| 0.883333
| 8
| 60
| 6.375
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 60
| 1
| 60
| 60
| 0.927273
| 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
|
25dd7dbcae9dac9c76e98f5b7f67511d447484fb
| 2,808
|
py
|
Python
|
tools/check-license-header.py
|
Just-maple/go2sky
|
38c3b84741dd6c0609965e9df0fcc633915d3ea5
|
[
"Apache-2.0"
] | 1
|
2021-03-08T12:35:20.000Z
|
2021-03-08T12:35:20.000Z
|
tools/check-license-header.py
|
Just-maple/go2sky
|
38c3b84741dd6c0609965e9df0fcc633915d3ea5
|
[
"Apache-2.0"
] | 1
|
2022-01-23T07:32:25.000Z
|
2022-01-23T07:32:25.000Z
|
tools/check-license-header.py
|
Just-maple/go2sky
|
38c3b84741dd6c0609965e9df0fcc633915d3ea5
|
[
"Apache-2.0"
] | null | null | null |
# Licensed to SkyAPM org under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. SkyAPM org licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import os
import sys
ignored_chars = '//\n \t'
ignored_paths = [
"reporter/grpc"
]
license_header = ' '.join(
[
line.strip(ignored_chars) for line in """
// Licensed to SkyAPM org under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. SkyAPM org licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
""".splitlines()
]
).strip(ignored_chars)
def walk_through_dir(d) -> bool:
checked = True
for root, sub_dirs, files in os.walk(d):
ignored = False
for ignored_path in ignored_paths:
if root.__contains__(ignored_path):
ignored = True
break
if ignored:
continue
for filename in files:
if not filename.endswith(".go"):
continue
file_path = os.path.join(root, filename)
with open(file_path, 'r') as f:
header = ' '.join([line.strip(ignored_chars) for line in f.readlines() if line.startswith('//')]).strip()
print('%s license header in file: %s' % ('✅' if header.startswith(license_header) else '❌', file_path))
checked &= header.startswith(license_header)
return checked
if __name__ == "__main__":
if not walk_through_dir("./"):
sys.exit(1)
| 36.467532
| 121
| 0.64886
| 370
| 2,808
| 4.845946
| 0.32973
| 0.066927
| 0.029002
| 0.035694
| 0.701617
| 0.701617
| 0.701617
| 0.701617
| 0.701617
| 0.656999
| 0
| 0.004365
| 0.26567
| 2,808
| 76
| 122
| 36.947368
| 0.86421
| 0.259259
| 0
| 0.08
| 0
| 0
| 0.476491
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.02
| false
| 0
| 0.04
| 0
| 0.08
| 0.02
| 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
|
25e7d1be5b16b37bb0fdb63be918d90eb2c69ce9
| 51
|
py
|
Python
|
enthought/pyface/i_about_dialog.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 3
|
2016-12-09T06:05:18.000Z
|
2018-03-01T13:00:29.000Z
|
enthought/pyface/i_about_dialog.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 1
|
2020-12-02T00:51:32.000Z
|
2020-12-02T08:48:55.000Z
|
enthought/pyface/i_about_dialog.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | null | null | null |
# proxy module
from pyface.i_about_dialog import *
| 17
| 35
| 0.803922
| 8
| 51
| 4.875
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 51
| 2
| 36
| 25.5
| 0.886364
| 0.235294
| 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
|
d3092f0220e0e4827256e3e59e769cce3e89730a
| 154
|
py
|
Python
|
src/Utils/__init__.py
|
bakkiaraj/WallPaperChanger
|
0503e60810241882ccb2b7962ebbe0d9a7294677
|
[
"MIT"
] | 1
|
2021-05-21T05:34:48.000Z
|
2021-05-21T05:34:48.000Z
|
src/Utils/__init__.py
|
bakkiaraj/WallPaperChanger
|
0503e60810241882ccb2b7962ebbe0d9a7294677
|
[
"MIT"
] | null | null | null |
src/Utils/__init__.py
|
bakkiaraj/WallPaperChanger
|
0503e60810241882ccb2b7962ebbe0d9a7294677
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# @Author : Bakkiaraj Murugesan (nxp33721)
# @EMail : bakkiaraj.murugesan@nxp.com
# @Software : Radar SoC GUI
| 30.8
| 49
| 0.584416
| 16
| 154
| 5.625
| 0.875
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.053097
| 0.266234
| 154
| 4
| 50
| 38.5
| 0.743363
| 0.941558
| 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
|
d325c1676583e349b95d31ac562652a75c22ca18
| 189
|
py
|
Python
|
pytropos/ast_transformer/__init__.py
|
helq/pytropos
|
497ed5902e6e4912249ca0a46b477f9bfa6ae80a
|
[
"MIT"
] | 4
|
2019-10-06T18:01:24.000Z
|
2020-07-03T05:27:35.000Z
|
pytropos/ast_transformer/__init__.py
|
helq/pytropos
|
497ed5902e6e4912249ca0a46b477f9bfa6ae80a
|
[
"MIT"
] | 5
|
2021-06-07T15:50:04.000Z
|
2021-06-07T15:50:06.000Z
|
pytropos/ast_transformer/__init__.py
|
helq/pytropos
|
497ed5902e6e4912249ca0a46b477f9bfa6ae80a
|
[
"MIT"
] | null | null | null |
from .miscelaneous import typed_ast3_to_ast
from .transformer import PytroposTransformer, AstTransformerError
__all__ = ["typed_ast3_to_ast", "PytroposTransformer", 'AstTransformerError']
| 37.8
| 77
| 0.846561
| 19
| 189
| 7.894737
| 0.578947
| 0.12
| 0.146667
| 0.186667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011494
| 0.079365
| 189
| 4
| 78
| 47.25
| 0.850575
| 0
| 0
| 0
| 0
| 0
| 0.291005
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 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
| 1
| 0
| 1
| 0
|
0
| 5
|
d3504933ed48b0bc52abbb2b3df510b85401289d
| 123
|
py
|
Python
|
report_builder_demo/demo_second_app/admin.py
|
nazmizorlu/django-report-builder
|
0b37cd0c94af15531e487554c774a01dad3b5500
|
[
"BSD-3-Clause"
] | 560
|
2015-01-05T07:14:50.000Z
|
2022-03-11T13:27:42.000Z
|
report_builder_demo/demo_second_app/admin.py
|
nazmizorlu/django-report-builder
|
0b37cd0c94af15531e487554c774a01dad3b5500
|
[
"BSD-3-Clause"
] | 189
|
2015-01-15T16:55:55.000Z
|
2020-10-29T07:36:51.000Z
|
report_builder_demo/demo_second_app/admin.py
|
nazmizorlu/django-report-builder
|
0b37cd0c94af15531e487554c774a01dad3b5500
|
[
"BSD-3-Clause"
] | 235
|
2015-01-10T16:56:17.000Z
|
2022-03-29T15:57:03.000Z
|
from django.contrib import admin
from .models import Bar
@admin.register(Bar)
class BarAdmin(admin.ModelAdmin):
pass
| 15.375
| 33
| 0.772358
| 17
| 123
| 5.588235
| 0.705882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146341
| 123
| 7
| 34
| 17.571429
| 0.904762
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.2
| 0.4
| 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
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
d35c4ca686448be42fa5c557ed66a8f0d558e18a
| 98
|
py
|
Python
|
name/__main__.py
|
nettle/python-template
|
9c78cc22d309042ce6559b5f4cfae37fc903c962
|
[
"RSA-MD"
] | null | null | null |
name/__main__.py
|
nettle/python-template
|
9c78cc22d309042ce6559b5f4cfae37fc903c962
|
[
"RSA-MD"
] | null | null | null |
name/__main__.py
|
nettle/python-template
|
9c78cc22d309042ce6559b5f4cfae37fc903c962
|
[
"RSA-MD"
] | null | null | null |
"""
Name main
"""
import launcher
if __name__ == "__main__":
launcher.NameLauncher().run()
| 9.8
| 33
| 0.642857
| 10
| 98
| 5.5
| 0.7
| 0.290909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.183673
| 98
| 9
| 34
| 10.888889
| 0.6875
| 0.091837
| 0
| 0
| 0
| 0
| 0.098765
| 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
|
d367b84de7f3d50a287fa77023701bb60418c23c
| 78
|
py
|
Python
|
Python/tests/test_support_vector_machine.py
|
RyanShahidi/easyml
|
fe0ecab6de02c0d91ef7de937cfb72ce7fcf3a51
|
[
"MIT"
] | 37
|
2016-11-16T20:11:34.000Z
|
2022-03-28T19:18:35.000Z
|
Python/tests/test_support_vector_machine.py
|
RyanShahidi/easyml
|
fe0ecab6de02c0d91ef7de937cfb72ce7fcf3a51
|
[
"MIT"
] | 76
|
2016-11-06T18:04:41.000Z
|
2021-04-30T20:34:51.000Z
|
Python/tests/test_support_vector_machine.py
|
CCS-Lab/easyML
|
664076b4aba733751905ed351e5a320f20f1e520
|
[
"MIT"
] | 18
|
2016-12-21T17:41:29.000Z
|
2021-05-10T20:43:49.000Z
|
"""TO BE EDITED.
"""
# from easyml import
def test_foo():
assert 1 == 1
| 9.75
| 20
| 0.576923
| 12
| 78
| 3.666667
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034483
| 0.25641
| 78
| 7
| 21
| 11.142857
| 0.724138
| 0.423077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.5
| true
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d39cd78789c01e711f4a651a86d393e65cc32d2e
| 2,535
|
py
|
Python
|
test/test.py
|
zephyrzoom/douyu
|
d5266dbd07cc82bf7f4baef1188ca158c7058fd2
|
[
"MIT"
] | 28
|
2015-10-07T01:46:03.000Z
|
2021-01-05T06:38:05.000Z
|
test/test.py
|
zephyrzoom/douyu
|
d5266dbd07cc82bf7f4baef1188ca158c7058fd2
|
[
"MIT"
] | 2
|
2017-08-12T10:47:27.000Z
|
2017-11-19T03:22:05.000Z
|
test/test.py
|
zephyrzoom/douyu
|
d5266dbd07cc82bf7f4baef1188ca158c7058fd2
|
[
"MIT"
] | 13
|
2016-06-20T06:09:07.000Z
|
2018-12-18T09:01:12.000Z
|
import socket
import time
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('119.90.49.103', 8011))
#s.sendall(b'type@=loginreq/username@=auto_qZ1JCRPZC6/password@=596a96cc7bf9108cd896f33c44aedc8a/roompass@=/roomid@=265352/devid@=5DCE2FFCE0E61AB11F77D935D10E6E0B/rt@=1437381860/vk@=f78f45ff359eceeafbf1a0d2e2b9874b/ver@=20150714/')
time.sleep(4)
s.sendall(b'e1000000e1000000b102000074797065403d6c6f67696e7265712f757365726e616d65403d6175746f5f715a314a4352505a43362f70617373776f7264403d35393661393663633762663931303863643839366633336334346165646338612f726f6f6d70617373403d2f726f6f6d6964403d3232393435372f6465766964403d35444345324646434530453631414231314637374439333544313045364530422f7274403d313433373635333132332f766b403d33653732353038666430373562643464666133666535373233336666613337322f766572403d32303135303732312f00')
time.sleep(1)
s.sendall(b'3100000031000000b102000074797065403d6f6e6c696e655f676966745f696e666f5f7265712f756964403d323233363431372f00')
s.sendall(b'4200000042000000b102000074797065403d6d656d626572696e666f7265712f6c696e6b403d687474703a405340537777772e646f75797574762e636f6d40537a65656b2f00')
while True:
time.sleep(1)
s.sendall(b'5b0000005b000000b102000074797065403d6b6565706c6976652f7469636b403d313433373635333132332f766277403d302f63646e403d302f6b403d35393664653332353533373164636133653338653639306538643839356135312f00')
time.sleep(2)
data = s.recv(5)
print('Received', repr(data))
s.close()
# public static byte[] loginReq(string username,string password,string roomid,string uuid)
# {
# long time=Scholar.Framework.Utils.Util.UNIX_TIMESTAMP();
# string salt="7oE9nPEG9xXV69phU31FYCLUagKeYtsF";
# string vk=Scholar.Framework.Utils.Util.Md5(string.Format("{0}{1}{2}",time,salt,uuid));
# string p = string.Format("type@=loginreq/username@={0}/password@={1}/roomid@=
# {2}/ct@=2/devid@={3}/ver@={4}/rt@={5}/vk@={6}/",
# username, password, roomid, uuid, 20150515,time,vk);
# byte[] bin = Encoding.UTF8.GetBytes(p);
# ByteBuffer buf = new ByteBuffer();
# buf.Put("dc000000 dc000000 b1020000 ");
# buf.Put(bin);
# buf.Put(0);
# return buf.ToByteArray();
# }
#urlgreq is [type@=loginreq/username@=auto_qZ1JCRPZC6/
# password@=596a96cc7bf9108cd896f33c44aedc8a/roompass@=/
# roomid@=265352/devid@=5DCE2FFCE0E61AB11F77D935D10E6E0B/
# rt@=1437381860/vk@=f78f45ff359eceeafbf1a0d2e2b9874b/ver@=20150714/]
| 60.357143
| 472
| 0.773176
| 192
| 2,535
| 10.182292
| 0.453125
| 0.02046
| 0.023018
| 0.024552
| 0.211765
| 0.211765
| 0.192327
| 0.192327
| 0.192327
| 0.192327
| 0
| 0.45658
| 0.118738
| 2,535
| 42
| 473
| 60.357143
| 0.418532
| 0.503353
| 0
| 0.125
| 0
| 0
| 0.737903
| 0.720968
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.125
| 0
| 0.125
| 0.0625
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d3aec86168f1b9438931cd8b91cbefcde8872190
| 589
|
py
|
Python
|
Django/permission_demo/rbac/models.py
|
taoyan/python
|
3fbb1e534ec91b33cd2ac690966d7253c2f5d757
|
[
"MIT"
] | 1
|
2019-05-04T09:21:52.000Z
|
2019-05-04T09:21:52.000Z
|
Django/permission_demo/rbac/models.py
|
taoyan/python
|
3fbb1e534ec91b33cd2ac690966d7253c2f5d757
|
[
"MIT"
] | 26
|
2020-07-18T02:02:54.000Z
|
2022-02-26T10:49:58.000Z
|
Django/permission_demo/rbac/models.py
|
taoyan/python
|
3fbb1e534ec91b33cd2ac690966d7253c2f5d757
|
[
"MIT"
] | null | null | null |
from django.db import models
# Create your models here.
class User(models.Model):
name = models.CharField(max_length=32)
pwd = models.CharField(max_length=32)
roles = models.ManyToManyField(to="Role")
def __str__(self): return self.name
class Role(models.Model):
title = models.CharField(max_length=32)
permissions = models.ManyToManyField(to="Permission")
def __str__(self): return self.title
class Permission(models.Model):
title = models.CharField(max_length=32)
url = models.CharField(max_length=32)
def __str__(self): return self.title
| 24.541667
| 57
| 0.724958
| 79
| 589
| 5.189873
| 0.367089
| 0.182927
| 0.219512
| 0.292683
| 0.565854
| 0.326829
| 0.204878
| 0.204878
| 0
| 0
| 0
| 0.020284
| 0.162988
| 589
| 24
| 58
| 24.541667
| 0.811359
| 0.040747
| 0
| 0.285714
| 0
| 0
| 0.024823
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.214286
| false
| 0
| 0.071429
| 0.214286
| 1
| 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
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
6c9880f51451496c44fbe9ff78a8ff80aec2e126
| 16
|
py
|
Python
|
trace-engine/__main__.py
|
ameli/trace
|
3654f15baf9588beaa683ff14e5f5b1b11979042
|
[
"MIT"
] | null | null | null |
trace-engine/__main__.py
|
ameli/trace
|
3654f15baf9588beaa683ff14e5f5b1b11979042
|
[
"MIT"
] | null | null | null |
trace-engine/__main__.py
|
ameli/trace
|
3654f15baf9588beaa683ff14e5f5b1b11979042
|
[
"MIT"
] | null | null | null |
print('trace!')
| 8
| 15
| 0.625
| 2
| 16
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 16
| 1
| 16
| 16
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0.375
| 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
|
9f1c0322179627ea414ff89c4f92015cf4ef6c09
| 168
|
py
|
Python
|
events/admin.py
|
MufasaTheMusician/livelobby
|
65f89fe7ed61a7a168bff774340202bd6b62ca60
|
[
"MIT"
] | null | null | null |
events/admin.py
|
MufasaTheMusician/livelobby
|
65f89fe7ed61a7a168bff774340202bd6b62ca60
|
[
"MIT"
] | null | null | null |
events/admin.py
|
MufasaTheMusician/livelobby
|
65f89fe7ed61a7a168bff774340202bd6b62ca60
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from events.models import Event, Participant
# Register your models here.
admin.site.register(Event)
admin.site.register(Participant)
| 24
| 44
| 0.821429
| 23
| 168
| 6
| 0.565217
| 0.130435
| 0.246377
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10119
| 168
| 6
| 45
| 28
| 0.913907
| 0.154762
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
9f471c8b4b8a19a3e43662e88e068d3092166065
| 639
|
py
|
Python
|
python_smaclient/smapi_response.py
|
jloehel/python_smaclient
|
ed18efb4e19728f3644eb1e510262def57a1767b
|
[
"0BSD"
] | null | null | null |
python_smaclient/smapi_response.py
|
jloehel/python_smaclient
|
ed18efb4e19728f3644eb1e510262def57a1767b
|
[
"0BSD"
] | null | null | null |
python_smaclient/smapi_response.py
|
jloehel/python_smaclient
|
ed18efb4e19728f3644eb1e510262def57a1767b
|
[
"0BSD"
] | null | null | null |
#!/usr/bin/env python
import uuid
class SMAPI_Response(object):
'''
Implentation of a ICUV Request
'''
def __init__(self, output_parameters):
self._uuid = uuid.uuid1()
self._date = None
self._output_parameters = output_parameters
def get_output_parameters(self):
return self._output_parameters
def get_date(self):
return self._date
def set_date(self, date):
self._date = date
def __repr__(self):
"<{} (name={}, input parameters={})>".format(
self.__class__.__name__,
self.name,
self._output_parameters)
| 21.3
| 53
| 0.605634
| 71
| 639
| 4.985915
| 0.422535
| 0.271186
| 0.225989
| 0.124294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002198
| 0.28795
| 639
| 29
| 54
| 22.034483
| 0.775824
| 0.079812
| 0
| 0
| 0
| 0
| 0.06162
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.294118
| false
| 0
| 0.058824
| 0.117647
| 0.529412
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
9f57e95aff1f7c13bb95610fc281df2e56cf074b
| 148
|
py
|
Python
|
past_archive/swexpert/2027(makeDiagonal).py
|
DongHyunByun/algorithm_practice
|
c726c69d35306d23467f4af6e10f2db6fdc68234
|
[
"MIT"
] | null | null | null |
past_archive/swexpert/2027(makeDiagonal).py
|
DongHyunByun/algorithm_practice
|
c726c69d35306d23467f4af6e10f2db6fdc68234
|
[
"MIT"
] | null | null | null |
past_archive/swexpert/2027(makeDiagonal).py
|
DongHyunByun/algorithm_practice
|
c726c69d35306d23467f4af6e10f2db6fdc68234
|
[
"MIT"
] | null | null | null |
for i in range(5):
for j in range(5):
if i==j:
print('#',end='')
else:
print("+",end='')
print("")
| 16.444444
| 29
| 0.358108
| 19
| 148
| 2.789474
| 0.526316
| 0.264151
| 0.301887
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023529
| 0.425676
| 148
| 8
| 30
| 18.5
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0.013605
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.428571
| 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
| 0
| 0
| 0
| 1
|
0
| 5
|
9f6f9fa74582933667dcfefd9acac71c9228c8b6
| 133
|
py
|
Python
|
dfman/__init__.py
|
jniedrauer/dfman
|
ce1e7324d5646b0e59a45211aaf67589ad0dd9ad
|
[
"MIT"
] | null | null | null |
dfman/__init__.py
|
jniedrauer/dfman
|
ce1e7324d5646b0e59a45211aaf67589ad0dd9ad
|
[
"MIT"
] | null | null | null |
dfman/__init__.py
|
jniedrauer/dfman
|
ce1e7324d5646b0e59a45211aaf67589ad0dd9ad
|
[
"MIT"
] | null | null | null |
"""Initial imports"""
import logging
from dfman.config import Config
logging.getLogger(__name__).addHandler(logging.NullHandler())
| 19
| 61
| 0.796992
| 15
| 133
| 6.8
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.082707
| 133
| 6
| 62
| 22.166667
| 0.836066
| 0.112782
| 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
|
9f88d3c59052d1e399731586d4e27242ad0b492a
| 120
|
py
|
Python
|
examples/_gen_playback.py
|
JacobKosowski/mpl-point-clicker
|
ddb7c883e895d5baadd7bc75889129e34cb86c55
|
[
"BSD-3-Clause"
] | 3
|
2021-07-01T07:37:43.000Z
|
2021-07-22T20:26:56.000Z
|
examples/_gen_playback.py
|
JacobKosowski/mpl-point-clicker
|
ddb7c883e895d5baadd7bc75889129e34cb86c55
|
[
"BSD-3-Clause"
] | 2
|
2021-06-30T21:48:47.000Z
|
2022-03-04T04:07:12.000Z
|
examples/_gen_playback.py
|
JacobKosowski/mpl-point-clicker
|
ddb7c883e895d5baadd7bc75889129e34cb86c55
|
[
"BSD-3-Clause"
] | 2
|
2022-02-25T12:03:01.000Z
|
2022-03-04T00:03:05.000Z
|
from mpl_playback.record import record_file
# record_file("heatmap_slicer.py", "fig")
record_file("example.py", "fig")
| 24
| 43
| 0.766667
| 18
| 120
| 4.833333
| 0.611111
| 0.344828
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 120
| 4
| 44
| 30
| 0.790909
| 0.325
| 0
| 0
| 0
| 0
| 0.164557
| 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
|
9fa44e20381bf66261dbc060f8d01b14a663c470
| 66
|
py
|
Python
|
gblda/__init__.py
|
ChengjieWU/LatentDirichletAllocation
|
d56c5116b4b4ac1464ba2e25127d494727d64b78
|
[
"MIT"
] | 2
|
2021-11-15T07:39:59.000Z
|
2021-11-19T06:55:18.000Z
|
gblda/__init__.py
|
ChengjieWU/LatentDirichletAllocation
|
d56c5116b4b4ac1464ba2e25127d494727d64b78
|
[
"MIT"
] | null | null | null |
gblda/__init__.py
|
ChengjieWU/LatentDirichletAllocation
|
d56c5116b4b4ac1464ba2e25127d494727d64b78
|
[
"MIT"
] | null | null | null |
"""Copyright (c) 2020 Chengjie Wu"""
from .gblda import GibbsLDA
| 16.5
| 36
| 0.712121
| 9
| 66
| 5.222222
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 0.151515
| 66
| 3
| 37
| 22
| 0.767857
| 0.454545
| 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
|
980e90ee516594036af5f5807c70b2c580876c8f
| 175
|
py
|
Python
|
resume_builder/__init__.py
|
nilesh1168/Resume_Builder
|
88d0ab4efd1ac71de47170f86dd86c8bd20dc5d6
|
[
"MIT"
] | null | null | null |
resume_builder/__init__.py
|
nilesh1168/Resume_Builder
|
88d0ab4efd1ac71de47170f86dd86c8bd20dc5d6
|
[
"MIT"
] | 1
|
2020-10-07T18:30:02.000Z
|
2020-10-08T06:26:53.000Z
|
resume_builder/__init__.py
|
nilesh1168/resume_builder
|
88d0ab4efd1ac71de47170f86dd86c8bd20dc5d6
|
[
"MIT"
] | null | null | null |
from flask import Flask
from resume_builder.config import Configuration
app = Flask(__name__)
app.config.from_object(Configuration)
from resume_builder import routes,models
| 21.875
| 47
| 0.845714
| 24
| 175
| 5.875
| 0.5
| 0.141844
| 0.241135
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102857
| 175
| 7
| 48
| 25
| 0.898089
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 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
|
e2401f8b0aa14ed72d2354582b0ed43580633056
| 5,636
|
py
|
Python
|
callers.py
|
Mars-tin/fast-stripe-calling
|
761b3933a7241792bbdb1026e951c3656c3293b7
|
[
"MIT"
] | null | null | null |
callers.py
|
Mars-tin/fast-stripe-calling
|
761b3933a7241792bbdb1026e951c3656c3293b7
|
[
"MIT"
] | null | null | null |
callers.py
|
Mars-tin/fast-stripe-calling
|
761b3933a7241792bbdb1026e951c3656c3293b7
|
[
"MIT"
] | null | null | null |
import pandas as pd
from scipy.signal import find_peaks_cwt
from utils import *
def _stripe_caller(mat, orientation='h',
max_range=3000000, resolution=25000,
interval=200000, filter_rate=0.95,
min_length=500000, closeness=1000000,
stripe_width=1, merge=1, window_size=5,
chrome='chr1', cell_type='hspc'):
# Step 1: for different distance ranges pick the "local maximum" positions
print(' Step 1: Finding local maximum for different contact distances...')
positions = {}
for dis in range(0, max_range - min_length + 1, interval // 2):
print(f' {dis}-{dis + interval}')
distance_range = (dis, dis + interval)
pos_h = pick_max_positions(mat, interval=interval,
distance_range=distance_range,
resolution=resolution, line_width=stripe_width,
window_size=window_size)
for p in pos_h:
if p not in positions:
positions[p] = []
positions[p].append(distance_range)
print(' A total of {} positions are located'.format(len(positions)))
# Step 2: find the accurate range of stripe
print(' Step 2: Finding the spanning range for each stripe...')
all_positions = []
lst = sorted(positions.keys())
for i, idx in enumerate(lst):
if idx <= window_size or idx >= mat.shape[0] - window_size:
continue
arr = line_neighbor_score(mat, idx, line_width=stripe_width,
distance_range=(0, max_range // resolution),
window_size=window_size,
neighbor_trick='mean', line_trick='med',
metric='ratio')
head, tail, max_val = find_max_slice(arr)
if max_val > 0:
all_positions.append((idx, head, tail, max_val))
print(" Succeed sliced {} locations".format(len(all_positions)))
# Step 3: Merging and filtering
print(' Step 3: Merging neighboring stripes...')
all_positions = merge_positions(all_positions, merge_range=merge)
new_positions = []
for elm in all_positions:
[_, _, head, tail, _] = elm
if (tail - head) * resolution >= min_length \
and head * resolution <= closeness:
new_positions.append(elm)
else:
pass
print('A total of {} positions are located after merging'.format(len(new_positions)))
# Step 4: Statistical test on symmetric stripe region
df_tad = pd.read_csv("data/tad/{}_{}kb.csv".format(cell_type, 25))
df_tad = df_tad.loc[df_tad['type'] == "domain"]
df_tad = df_tad.loc[df_tad['chrom'] == chrome]
list_tad = np.asarray([df_tad['start']//resolution, df_tad['end']//resolution]).T
results = []
print(' Step 4: Statistical Tests...')
for elm in new_positions:
[st, ed, head, tail, score] = elm
p = stat_test(mat, orientation, st, ed, head, tail, stripe_width, window_size, list_tad)
if p < 0.2:
results.append([st, ed, head, tail, score, 1-p/2])
return results
def _deletion_caller(mat, orientation='h',
max_range=3000000, resolution=25000,
interval=200000, filter_rate=0.95,
min_length=500000, closeness=1000000,
stripe_width=1, merge=1, window_size=5,
chrome='chr1', cell_type='hspc'):
# Step 1: for different distance ranges pick the "local maximum" positions
print(' Step 1: Finding local minimum for different contact distances...')
anchor_strength = np.sum(mat, axis=1)
anchor_strength = np.max(anchor_strength) - anchor_strength
peaks = find_peaks_cwt(anchor_strength, np.arange(1, window_size))
print(' A total of {} positions are located'.format(len(peaks)))
# Step 2: find the accurate range of stripe
print(' Step 2: Finding the spanning range for each stripe...')
all_positions = []
for i, idx in enumerate(peaks):
if idx <= window_size or idx >= mat.shape[0] - window_size:
continue
arr = line_neighbor_score(mat, idx, line_width=stripe_width,
distance_range=(0, max_range // resolution),
window_size=window_size,
neighbor_trick='mean', line_trick='med',
metric='ratio')
head, tail, max_val = find_max_slice(-1 * arr)
if max_val > 0:
all_positions.append((idx, head, tail, max_val))
print(" Succeed sliced {} locations".format(len(all_positions)))
# Step 3: Merging and filtering
print(' Step 3: Merging neighboring stripes...')
all_positions = merge_positions(all_positions, merge_range=merge)
new_positions = []
for elm in all_positions:
[_, _, head, tail, _] = elm
if (tail - head) * resolution >= min_length \
and head * resolution <= closeness:
new_positions.append(elm)
else:
pass
print('A total of {} positions are located after merging'.format(len(new_positions)))
# Step 4: Statistical test
results = []
print(' Step 4: Statistical Tests...')
for elm in new_positions:
[st, ed, head, tail, score] = elm
p = stat_test(mat, orientation, st, ed, head, tail, stripe_width, window_size)
if p < 0.001:
results.append([st, ed, head, tail, score, 1-p/2])
return results
| 43.353846
| 96
| 0.589957
| 695
| 5,636
| 4.602878
| 0.215827
| 0.04689
| 0.015005
| 0.022507
| 0.758987
| 0.747734
| 0.747734
| 0.73648
| 0.73648
| 0.710847
| 0
| 0.029487
| 0.301987
| 5,636
| 129
| 97
| 43.689922
| 0.783681
| 0.06494
| 0
| 0.647619
| 0
| 0
| 0.134765
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.019048
| false
| 0.019048
| 0.028571
| 0
| 0.066667
| 0.142857
| 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
|
e29649835d9fab3d1212abc8691bf7b016fd5b07
| 146
|
py
|
Python
|
qc/__init__.py
|
awohns/stdpopsim
|
c6e75f3b0f058d95f59946f664b80e3efc7a6333
|
[
"MIT"
] | null | null | null |
qc/__init__.py
|
awohns/stdpopsim
|
c6e75f3b0f058d95f59946f664b80e3efc7a6333
|
[
"MIT"
] | null | null | null |
qc/__init__.py
|
awohns/stdpopsim
|
c6e75f3b0f058d95f59946f664b80e3efc7a6333
|
[
"MIT"
] | null | null | null |
# Main entry point for stdpopsim_qc
# Species definitions.
from . import homo_sapiens_qc # NOQA
from . import drosophlia_melanogaster_qc # NOQA
| 24.333333
| 47
| 0.794521
| 20
| 146
| 5.55
| 0.75
| 0.18018
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157534
| 146
| 5
| 48
| 29.2
| 0.902439
| 0.438356
| 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
|
2cca73f1da0388da24603175afbff6d3030ec1c2
| 552
|
py
|
Python
|
core/recc/algorithm/search.py
|
bogonets/answer
|
57f892a9841980bcbc35fa1e27521b34cd94bc25
|
[
"MIT"
] | 3
|
2021-06-20T02:24:10.000Z
|
2022-01-26T23:55:33.000Z
|
core/recc/algorithm/search.py
|
bogonets/answer
|
57f892a9841980bcbc35fa1e27521b34cd94bc25
|
[
"MIT"
] | null | null | null |
core/recc/algorithm/search.py
|
bogonets/answer
|
57f892a9841980bcbc35fa1e27521b34cd94bc25
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from typing import Any
def any_none(*args: Any) -> bool:
for arg in args:
if arg is None:
return True
return False
def any_not_none(*args: Any) -> bool:
for arg in args:
if arg is not None:
return True
return False
def all_none(*args: Any) -> bool:
for arg in args:
if arg is not None:
return False
return True
def all_not_none(*args: Any) -> bool:
for arg in args:
if arg is None:
return False
return True
| 17.25
| 37
| 0.556159
| 83
| 552
| 3.626506
| 0.253012
| 0.106312
| 0.146179
| 0.199336
| 0.843854
| 0.744186
| 0.624585
| 0.624585
| 0.624585
| 0.624585
| 0
| 0.002841
| 0.362319
| 552
| 31
| 38
| 17.806452
| 0.852273
| 0.038043
| 0
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.190476
| false
| 0
| 0.047619
| 0
| 0.619048
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 0
| 0
| 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
|
390947974da13e0b020f35fd19e59fb60ce5f7ea
| 2,338
|
py
|
Python
|
ImageTracker/ImageTrackerTest.py
|
Engin-Boot/transfer-images-s1b13
|
22e62c72669dc40d47854e7c6a01f2922fb1dc44
|
[
"MIT"
] | null | null | null |
ImageTracker/ImageTrackerTest.py
|
Engin-Boot/transfer-images-s1b13
|
22e62c72669dc40d47854e7c6a01f2922fb1dc44
|
[
"MIT"
] | null | null | null |
ImageTracker/ImageTrackerTest.py
|
Engin-Boot/transfer-images-s1b13
|
22e62c72669dc40d47854e7c6a01f2922fb1dc44
|
[
"MIT"
] | null | null | null |
import unittest
import ImageTracker
class TestImageTracker(unittest.TestCase):
def test_when_client_calls_with_valid_csv_then_print_CSV_data(self):
testsamplefilename = 'temp-samples-test.csv'
with open(testsamplefilename, 'w') as samplefile:
samplefile.write(
"""ImageFileName,Status
0.img,Diagnosis Pending
1.img,Diagnosis Complete
2.img,Diagnosis Pending""")
x=ImageTracker.showCSVData(testsamplefilename)
self.assertEqual(x,"CSV data printed successfully")
def test_when_client_updates_Diagnosis_status_Pending_then_DiagnosisPending_is_set(self):
testsamplefilename = 'temp-samples-test.csv'
with open(testsamplefilename, 'w') as samplefile:
samplefile.write(
"""ImageFileName,Status
0.img,Diagnosis Pending
1.img,Diagnosis Pending
2.img,Diagnosis Pending""")
imageName="0.img"
updated_status="Pending" # Pending for Diagnosis Pending
self.assertTrue(ImageTracker.update_ImageStatus(testsamplefilename,imageName,updated_status)=="Status updated successfully")
def test_when_client_updates_Diagnosis_status_Pending_then_DiagnosisCompleted_is_set(self):
testsamplefilename = 'temp-samples-test.csv'
with open(testsamplefilename, 'w') as samplefile:
samplefile.write(
"""ImageFileName,Status
0.img,Diagnosis Pending
1.img,Diagnosis Pending
2.img,Diagnosis Pending""")
imageName="1.img"
updated_status="Completed" # Complete for Diagnosis Complete
self.assertTrue(ImageTracker.update_ImageStatus(testsamplefilename,imageName,updated_status)=="Status updated successfully")
def test_when_new_file_is_updated_then_it_gets_added_to_csv_with_Pending_Status(self):
testsamplefilename = 'temp-samples-test.csv'
with open(testsamplefilename, 'w') as samplefile:
samplefile.write(
"""ImageFileName,Status
0.img,Diagnosis Pending
1.img,Diagnosis Complete
2.img,Diagnosis Pending""")
new_file="3.img"
ImageTracker.addNewFileNameToCsv(testsamplefilename,new_file)
print("File Added successfully")
x=ImageTracker.showCSVData(testsamplefilename)
self.assertEqual(x,"CSV data printed successfully")
if __name__ == '__main__':
unittest.main()
| 38.966667
| 132
| 0.727973
| 256
| 2,338
| 6.414063
| 0.246094
| 0.087698
| 0.115713
| 0.08039
| 0.741169
| 0.741169
| 0.741169
| 0.741169
| 0.741169
| 0.741169
| 0
| 0.007853
| 0.183062
| 2,338
| 59
| 133
| 39.627119
| 0.851832
| 0.026091
| 0
| 0.473684
| 0
| 0
| 0.139362
| 0.044681
| 0
| 0
| 0
| 0
| 0.105263
| 1
| 0.105263
| false
| 0
| 0.052632
| 0
| 0.184211
| 0.105263
| 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
|
3932c8efc3fa207ac693c15719b34245b51a20a8
| 33
|
py
|
Python
|
t01primeshcflcm_primekth.py
|
CherryNoddles/y1math
|
877b87ee60e7569b4fed4abdcb53a03df3d02ac3
|
[
"MIT"
] | 1
|
2020-10-01T04:03:44.000Z
|
2020-10-01T04:03:44.000Z
|
t01primeshcflcm_primekth.py
|
CherryNoddles/y1math
|
877b87ee60e7569b4fed4abdcb53a03df3d02ac3
|
[
"MIT"
] | 4
|
2019-10-20T03:52:11.000Z
|
2019-10-24T07:13:58.000Z
|
t01primeshcflcm_primekth.py
|
CherryNoddles/y1math
|
877b87ee60e7569b4fed4abdcb53a03df3d02ac3
|
[
"MIT"
] | 403
|
2019-10-17T05:30:21.000Z
|
2020-10-28T10:33:07.000Z
|
# What is the kth prime number?
| 11
| 31
| 0.69697
| 6
| 33
| 3.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.242424
| 33
| 2
| 32
| 16.5
| 0.92
| 0.878788
| 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
|
394b6bfdb3b37dcfe4af3fbe72deb91ad3d93762
| 45
|
py
|
Python
|
akebono/exceptions.py
|
OTA2000/akebono
|
11f88f3605a66989ac5cf11cb6af7b93987bcf59
|
[
"MIT"
] | 3
|
2018-09-28T01:35:41.000Z
|
2020-06-22T07:09:14.000Z
|
akebono/exceptions.py
|
OTA2000/akebono
|
11f88f3605a66989ac5cf11cb6af7b93987bcf59
|
[
"MIT"
] | 1
|
2020-01-06T08:15:10.000Z
|
2020-01-06T08:15:10.000Z
|
akebono/exceptions.py
|
OTA2000/akebono
|
11f88f3605a66989ac5cf11cb6af7b93987bcf59
|
[
"MIT"
] | 6
|
2018-08-10T03:04:28.000Z
|
2020-02-03T02:28:08.000Z
|
class EmptyDatasetError(Exception):
pass
| 15
| 35
| 0.777778
| 4
| 45
| 8.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155556
| 45
| 2
| 36
| 22.5
| 0.921053
| 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
|
1a387242693a78b2b3479ed3496c6ab7c078dfa5
| 26
|
py
|
Python
|
tests/sibling_classes.py
|
mnicolas94/pyrulo
|
1a537369407b760182bd40f188fd82be637310e2
|
[
"MIT"
] | null | null | null |
tests/sibling_classes.py
|
mnicolas94/pyrulo
|
1a537369407b760182bd40f188fd82be637310e2
|
[
"MIT"
] | null | null | null |
tests/sibling_classes.py
|
mnicolas94/pyrulo
|
1a537369407b760182bd40f188fd82be637310e2
|
[
"MIT"
] | null | null | null |
class Sibling:
pass
| 5.2
| 14
| 0.615385
| 3
| 26
| 5.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.346154
| 26
| 4
| 15
| 6.5
| 0.941176
| 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
|
1a5d56fca3c1ee72df79ecdacc18f252253691d3
| 168
|
py
|
Python
|
minv/mongo_4_0.py
|
kevinadi/invoke-mongodb
|
f84bd1705396a5cd5a2900435f58dde362bdffbf
|
[
"Apache-2.0"
] | null | null | null |
minv/mongo_4_0.py
|
kevinadi/invoke-mongodb
|
f84bd1705396a5cd5a2900435f58dde362bdffbf
|
[
"Apache-2.0"
] | null | null | null |
minv/mongo_4_0.py
|
kevinadi/invoke-mongodb
|
f84bd1705396a5cd5a2900435f58dde362bdffbf
|
[
"Apache-2.0"
] | null | null | null |
# MongoDB 4.0
import os
from mongo_basic import BasicMongo
class Mongo(BasicMongo):
def __init__(self):
pass
def version(self):
return '4.0'
| 14
| 34
| 0.64881
| 23
| 168
| 4.521739
| 0.695652
| 0.038462
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03252
| 0.267857
| 168
| 11
| 35
| 15.272727
| 0.813008
| 0.065476
| 0
| 0
| 0
| 0
| 0.019355
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.142857
| 0.285714
| 0.142857
| 0.857143
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
1a94375eafda5c9567bc44b1d6535ab52c273ec8
| 16,855
|
py
|
Python
|
steam/ext/dota2/protobufs/dota_match_metadata.py
|
Gobot1234/steam-ext-dota2
|
4b8960658b80209eb48e5e28b5852763b0e39c86
|
[
"MIT"
] | null | null | null |
steam/ext/dota2/protobufs/dota_match_metadata.py
|
Gobot1234/steam-ext-dota2
|
4b8960658b80209eb48e5e28b5852763b0e39c86
|
[
"MIT"
] | 1
|
2021-01-30T20:46:29.000Z
|
2021-01-30T20:46:29.000Z
|
steam/ext/dota2/protobufs/dota_match_metadata.py
|
Gobot1234/steam-ext-dota2
|
4b8960658b80209eb48e5e28b5852763b0e39c86
|
[
"MIT"
] | null | null | null |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: dota_match_metadata.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import List
import betterproto
from .base_gcmessages import CsoEconItem
from .dota_gcmessages_common import CMsgDotaMatch, CMsgMatchTips
from .dota_gcmessages_common_match_management import CLobbyTimedRewardDetails, CMsgMatchMatchmakingStats, CMvpData
from .dota_shared_enums import EdotammrBoostType, EEvent
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataFile(betterproto.Message):
version: int = betterproto.int32_field(1)
match_id: int = betterproto.uint64_field(2)
metadata: "CdotaMatchMetadata" = betterproto.message_field(3)
private_metadata: bytes = betterproto.bytes_field(5)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadata(betterproto.Message):
teams: List["CdotaMatchMetadataTeam"] = betterproto.message_field(1)
item_rewards: List["CLobbyTimedRewardDetails"] = betterproto.message_field(2)
lobby_id: int = betterproto.fixed64_field(3)
report_until_time: int = betterproto.fixed64_field(4)
event_game_custom_table: bytes = betterproto.bytes_field(5)
primary_event_id: int = betterproto.uint32_field(6)
match_tips: List["CMsgMatchTips"] = betterproto.message_field(7)
matchmaking_stats: "CMsgMatchMatchmakingStats" = betterproto.message_field(8)
mvp_data: "CMvpData" = betterproto.message_field(9)
guild_challenge_progress: List["CdotaMatchMetadataGuildChallengeProgress"] = betterproto.message_field(10)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeam(betterproto.Message):
dota_team: int = betterproto.uint32_field(1)
players: List["CdotaMatchMetadataTeamPlayer"] = betterproto.message_field(2)
graph_experience: List[float] = betterproto.float_field(3)
graph_gold_earned: List[float] = betterproto.float_field(4)
graph_net_worth: List[float] = betterproto.float_field(5)
cm_first_pick: bool = betterproto.bool_field(6)
cm_captain_player_id: int = betterproto.uint32_field(7)
cm_bans: List[int] = betterproto.uint32_field(8)
cm_picks: List[int] = betterproto.uint32_field(9)
cm_penalty: int = betterproto.uint32_field(10)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamPlayerKill(betterproto.Message):
victim_slot: int = betterproto.uint32_field(1)
count: int = betterproto.uint32_field(2)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamItemPurchase(betterproto.Message):
item_id: int = betterproto.uint32_field(1)
purchase_time: int = betterproto.int32_field(2)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamInventorySnapshot(betterproto.Message):
item_id: List[int] = betterproto.uint32_field(1)
game_time: int = betterproto.int32_field(2)
kills: int = betterproto.uint32_field(3)
deaths: int = betterproto.uint32_field(4)
assists: int = betterproto.uint32_field(5)
level: int = betterproto.uint32_field(6)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamAutoStyleCriteria(betterproto.Message):
name_token: int = betterproto.uint32_field(1)
value: float = betterproto.float_field(2)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamStrangeGemProgress(betterproto.Message):
kill_eater_type: int = betterproto.uint32_field(1)
gem_item_def_index: int = betterproto.uint32_field(2)
required_hero_id: int = betterproto.uint32_field(3)
starting_value: int = betterproto.uint32_field(4)
ending_value: int = betterproto.uint32_field(5)
owner_item_def_index: int = betterproto.uint32_field(6)
owner_item_id: int = betterproto.uint64_field(7)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamVictoryPrediction(betterproto.Message):
item_id: int = betterproto.uint64_field(1)
item_def_index: int = betterproto.uint32_field(2)
starting_value: int = betterproto.uint32_field(3)
is_victory: bool = betterproto.bool_field(4)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamSubChallenge(betterproto.Message):
slot_id: int = betterproto.uint32_field(1)
start_value: int = betterproto.uint32_field(2)
end_value: int = betterproto.uint32_field(3)
completed: bool = betterproto.bool_field(4)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamCavernChallengeResult(betterproto.Message):
completed_path_id: int = betterproto.uint32_field(1)
claimed_room_id: int = betterproto.uint32_field(2)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamActionGrant(betterproto.Message):
action_id: int = betterproto.uint32_field(1)
quantity: int = betterproto.uint32_field(2)
audit: int = betterproto.uint32_field(3)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamCandyGrant(betterproto.Message):
points: int = betterproto.uint32_field(1)
reason: int = betterproto.uint32_field(2)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamEventData(betterproto.Message):
event_id: int = betterproto.uint32_field(1)
event_points: int = betterproto.uint32_field(2)
challenge_instance_id: int = betterproto.uint32_field(3)
challenge_quest_id: int = betterproto.uint32_field(4)
challenge_quest_challenge_id: int = betterproto.uint32_field(5)
challenge_completed: bool = betterproto.bool_field(6)
challenge_rank_completed: int = betterproto.uint32_field(7)
challenge_rank_previously_completed: int = betterproto.uint32_field(8)
event_owned: bool = betterproto.bool_field(9)
sub_challenges_with_progress: List["CdotaMatchMetadataTeamSubChallenge"] = betterproto.message_field(10)
wager_winnings: int = betterproto.uint32_field(11)
cavern_challenge_active: bool = betterproto.bool_field(12)
cavern_challenge_winnings: int = betterproto.uint32_field(13)
amount_wagered: int = betterproto.uint32_field(14)
periodic_point_adjustments: int = betterproto.uint32_field(16)
cavern_challenge_map_results: List["CdotaMatchMetadataTeamCavernChallengeResult"] = betterproto.message_field(17)
cavern_challenge_plus_shard_winnings: int = betterproto.uint32_field(18)
actions_granted: List["CdotaMatchMetadataTeamActionGrant"] = betterproto.message_field(19)
cavern_crawl_map_variant: int = betterproto.uint32_field(20)
team_wager_bonus_pct: int = betterproto.uint32_field(21)
wager_streak_pct: int = betterproto.uint32_field(22)
candy_points_granted: List["CdotaMatchMetadataTeamCandyGrant"] = betterproto.message_field(23)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamGauntletProgress(betterproto.Message):
gauntlet_tier: int = betterproto.uint32_field(2)
gauntlet_wins: int = betterproto.uint32_field(3)
gauntlet_losses: int = betterproto.uint32_field(4)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamPlayer(betterproto.Message):
account_id: int = betterproto.uint32_field(1)
ability_upgrades: List[int] = betterproto.uint32_field(2)
player_slot: int = betterproto.uint32_field(3)
equipped_econ_items: List["CsoEconItem"] = betterproto.message_field(4)
kills: List["CdotaMatchMetadataTeamPlayerKill"] = betterproto.message_field(5)
items: List["CdotaMatchMetadataTeamItemPurchase"] = betterproto.message_field(6)
avg_kills_x16: int = betterproto.uint32_field(7)
avg_deaths_x16: int = betterproto.uint32_field(8)
avg_assists_x16: int = betterproto.uint32_field(9)
avg_gpm_x16: int = betterproto.uint32_field(10)
avg_xpm_x16: int = betterproto.uint32_field(11)
best_kills_x16: int = betterproto.uint32_field(12)
best_assists_x16: int = betterproto.uint32_field(13)
best_gpm_x16: int = betterproto.uint32_field(14)
best_xpm_x16: int = betterproto.uint32_field(15)
win_streak: int = betterproto.uint32_field(16)
best_win_streak: int = betterproto.uint32_field(17)
fight_score: float = betterproto.float_field(18)
farm_score: float = betterproto.float_field(19)
support_score: float = betterproto.float_field(20)
push_score: float = betterproto.float_field(21)
level_up_times: List[int] = betterproto.uint32_field(22)
graph_net_worth: List[float] = betterproto.float_field(23)
inventory_snapshot: List["CdotaMatchMetadataTeamInventorySnapshot"] = betterproto.message_field(24)
avg_stats_calibrated: bool = betterproto.bool_field(25)
auto_style_criteria: List["CdotaMatchMetadataTeamAutoStyleCriteria"] = betterproto.message_field(26)
event_data: List["CdotaMatchMetadataTeamEventData"] = betterproto.message_field(29)
strange_gem_progress: List["CdotaMatchMetadataTeamStrangeGemProgress"] = betterproto.message_field(30)
hero_xp: int = betterproto.uint32_field(31)
camps_stacked: int = betterproto.uint32_field(32)
victory_prediction: List["CdotaMatchMetadataTeamVictoryPrediction"] = betterproto.message_field(33)
lane_selection_flags: int = betterproto.uint32_field(34)
rampages: int = betterproto.uint32_field(35)
triple_kills: int = betterproto.uint32_field(36)
aegis_snatched: int = betterproto.uint32_field(37)
rapiers_purchased: int = betterproto.uint32_field(38)
couriers_killed: int = betterproto.uint32_field(39)
net_worth_rank: int = betterproto.uint32_field(40)
support_gold_spent: int = betterproto.uint32_field(41)
observer_wards_placed: int = betterproto.uint32_field(42)
sentry_wards_placed: int = betterproto.uint32_field(43)
wards_dewarded: int = betterproto.uint32_field(44)
stun_duration: float = betterproto.float_field(45)
rank_mmr_boost_type: "EdotammrBoostType" = betterproto.enum_field(46)
gauntlet_progress: "CdotaMatchMetadataTeamGauntletProgress" = betterproto.message_field(47)
contract_progress: List["CdotaMatchMetadataTeamPlayerContractProgress"] = betterproto.message_field(48)
guild_ids: List[int] = betterproto.uint32_field(49)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataTeamPlayerContractProgress(betterproto.Message):
guild_id: int = betterproto.uint32_field(1)
event_id: int = betterproto.uint32_field(2)
challenge_instance_id: int = betterproto.uint32_field(3)
challenge_parameter: int = betterproto.uint32_field(4)
contract_stars: int = betterproto.uint32_field(5)
contract_slot: int = betterproto.uint32_field(6)
completed: bool = betterproto.bool_field(7)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataGuildChallengeProgress(betterproto.Message):
guild_id: int = betterproto.uint32_field(1)
event_id: "EEvent" = betterproto.enum_field(2)
challenge_instance_id: int = betterproto.uint32_field(3)
challenge_parameter: int = betterproto.uint32_field(4)
challenge_timestamp: int = betterproto.uint32_field(5)
challenge_progress_at_start: int = betterproto.uint32_field(6)
challenge_progress_accumulated: int = betterproto.uint32_field(7)
individual_progress: List["CdotaMatchMetadataGuildChallengeProgressIndividualProgress"] = betterproto.message_field(
8
)
@dataclass(eq=False, repr=False)
class CdotaMatchMetadataGuildChallengeProgressIndividualProgress(betterproto.Message):
account_id: int = betterproto.uint32_field(1)
progress: int = betterproto.uint32_field(2)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadata(betterproto.Message):
teams: List["CdotaMatchPrivateMetadataTeam"] = betterproto.message_field(1)
graph_win_probability: List[float] = betterproto.float_field(2)
string_names: List["CdotaMatchPrivateMetadataStringName"] = betterproto.message_field(3)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataStringName(betterproto.Message):
id: int = betterproto.uint32_field(1)
name: str = betterproto.string_field(2)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataTeam(betterproto.Message):
dota_team: int = betterproto.uint32_field(1)
players: List["CdotaMatchPrivateMetadataTeamPlayer"] = betterproto.message_field(2)
buildings: List["CdotaMatchPrivateMetadataTeamBuilding"] = betterproto.message_field(3)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataTeamPlayer(betterproto.Message):
account_id: int = betterproto.uint32_field(1)
player_slot: int = betterproto.uint32_field(2)
position_stream: bytes = betterproto.bytes_field(3)
combat_segments: List["CdotaMatchPrivateMetadataTeamPlayerCombatSegment"] = betterproto.message_field(4)
damage_unit_names: List[str] = betterproto.string_field(5)
buff_records: List["CdotaMatchPrivateMetadataTeamPlayerBuffRecord"] = betterproto.message_field(6)
graph_kills: List[float] = betterproto.float_field(7)
graph_deaths: List[float] = betterproto.float_field(8)
graph_assists: List[float] = betterproto.float_field(9)
graph_lasthits: List[float] = betterproto.float_field(10)
graph_denies: List[float] = betterproto.float_field(11)
gold_received: "CdotaMatchPrivateMetadataTeamPlayerGoldReceived" = betterproto.message_field(12)
xp_received: "CdotaMatchPrivateMetadataTeamPlayerXpReceived" = betterproto.message_field(13)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataTeamPlayerCombatSegment(betterproto.Message):
game_time: int = betterproto.int32_field(1)
damage_by_ability: List[
"CdotaMatchPrivateMetadataTeamPlayerCombatSegmentDamageByAbility"
] = betterproto.message_field(2)
healing_by_ability: List[
"CdotaMatchPrivateMetadataTeamPlayerCombatSegmentHealingByAbility"
] = betterproto.message_field(3)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataTeamPlayerCombatSegmentDamageByAbility(betterproto.Message):
source_unit_index: int = betterproto.uint32_field(3)
ability_id: int = betterproto.uint32_field(1)
by_hero_targets: List[
"CdotaMatchPrivateMetadataTeamPlayerCombatSegmentDamageByAbilityByHeroTarget"
] = betterproto.message_field(2)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataTeamPlayerCombatSegmentDamageByAbilityByHeroTarget(betterproto.Message):
hero_id: int = betterproto.uint32_field(1)
damage: int = betterproto.uint32_field(2)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataTeamPlayerCombatSegmentHealingByAbility(betterproto.Message):
source_unit_index: int = betterproto.uint32_field(3)
ability_id: int = betterproto.uint32_field(1)
by_hero_targets: List[
"CdotaMatchPrivateMetadataTeamPlayerCombatSegmentHealingByAbilityByHeroTarget"
] = betterproto.message_field(2)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataTeamPlayerCombatSegmentHealingByAbilityByHeroTarget(betterproto.Message):
hero_id: int = betterproto.uint32_field(1)
healing: int = betterproto.uint32_field(2)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataTeamPlayerBuffRecord(betterproto.Message):
buff_ability_id: int = betterproto.uint32_field(1)
buff_modifier_name: str = betterproto.string_field(3)
by_hero_targets: List["CdotaMatchPrivateMetadataTeamPlayerBuffRecordByHeroTarget"] = betterproto.message_field(2)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataTeamPlayerBuffRecordByHeroTarget(betterproto.Message):
hero_id: int = betterproto.uint32_field(1)
elapsed_duration: float = betterproto.float_field(2)
is_hidden: bool = betterproto.bool_field(3)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataTeamPlayerGoldReceived(betterproto.Message):
creep: int = betterproto.uint32_field(1)
heroes: int = betterproto.uint32_field(2)
bounty_runes: int = betterproto.uint32_field(3)
passive: int = betterproto.uint32_field(4)
buildings: int = betterproto.uint32_field(5)
abilities: int = betterproto.uint32_field(6)
wards: int = betterproto.uint32_field(7)
other: int = betterproto.uint32_field(8)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataTeamPlayerXpReceived(betterproto.Message):
creep: int = betterproto.uint32_field(1)
heroes: int = betterproto.uint32_field(2)
roshan: int = betterproto.uint32_field(3)
tome_of_knowledge: int = betterproto.uint32_field(4)
outpost: int = betterproto.uint32_field(5)
other: int = betterproto.uint32_field(6)
@dataclass(eq=False, repr=False)
class CdotaMatchPrivateMetadataTeamBuilding(betterproto.Message):
unit_name: str = betterproto.string_field(1)
position_quant_x: int = betterproto.uint32_field(2)
position_quant_y: int = betterproto.uint32_field(3)
death_time: float = betterproto.float_field(4)
@dataclass(eq=False, repr=False)
class CMsgDotadpcMatch(betterproto.Message):
match: "CMsgDotaMatch" = betterproto.message_field(1)
metadata: "CdotaMatchMetadata" = betterproto.message_field(2)
| 45.926431
| 120
| 0.789617
| 1,902
| 16,855
| 6.750789
| 0.177182
| 0.145016
| 0.193146
| 0.241433
| 0.493146
| 0.321262
| 0.221495
| 0.213318
| 0.164097
| 0.140031
| 0
| 0.03684
| 0.117473
| 16,855
| 366
| 121
| 46.051913
| 0.826353
| 0.007001
| 0
| 0.212329
| 1
| 0
| 0.085759
| 0.079543
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.003425
| 0.023973
| 0
| 0.849315
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
1aa2db17d2d42a8045a91f1e2868ba6ea26a7902
| 7,979
|
py
|
Python
|
pycozmo/tests/test_image_encoder.py
|
gimait/pycozmo
|
601d9c09903b9300e8990723cae95974212afb09
|
[
"MIT"
] | 123
|
2019-08-25T21:28:23.000Z
|
2022-03-12T13:54:59.000Z
|
pycozmo/tests/test_image_encoder.py
|
solosito/pycozmo
|
5d28118eb8f7a625ae4a66054dabf19b4fe27483
|
[
"MIT"
] | 41
|
2019-08-25T21:21:37.000Z
|
2022-02-09T14:20:54.000Z
|
pycozmo/tests/test_image_encoder.py
|
solosito/pycozmo
|
5d28118eb8f7a625ae4a66054dabf19b4fe27483
|
[
"MIT"
] | 51
|
2019-09-04T13:30:02.000Z
|
2022-01-09T01:20:24.000Z
|
import unittest
from pycozmo.image_encoder import ImageEncoder, str_to_image, ImageDecoder, image_to_str
from pycozmo.util import hex_dump, hex_load
from pycozmo.tests.image_encoder_fixtures import FIXTURES
class TestImageEncoder(unittest.TestCase):
@staticmethod
def _encode(sim: str) -> str:
im = str_to_image(sim)
encoder = ImageEncoder(im)
buf = encoder.encode()
res = hex_dump(buf)
return res
def assertSameImage(self, sim: str, seq: str) -> None:
buffer = hex_load(seq)
decoder = ImageDecoder(buffer)
decoder.decode()
actual = image_to_str(decoder.image)
self.assertEqual(sim.strip(), actual.strip())
def test_blank(self):
fixture = FIXTURES["blank"]
sim = fixture["image"]
expected = fixture["seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_fill_screen(self):
fixture = FIXTURES["fill_screen"]
sim = fixture["image"]
expected = fixture["seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_fill_screen2(self):
fixture = FIXTURES["fill_screen2"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_top_left(self):
fixture = FIXTURES["top_left"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_top_left_5(self):
fixture = FIXTURES["top_left_5"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_top_left_1_8(self):
fixture = FIXTURES["top_left_1_8"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_top_left_line(self):
fixture = FIXTURES["top_left_line"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_top_line(self):
fixture = FIXTURES["top_line"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_bottom_line(self):
fixture = FIXTURES["bottom_line"]
sim = fixture["image"]
expected = fixture["seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_left_line(self):
fixture = FIXTURES["left_line"]
sim = fixture["image"]
expected = fixture["seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_right_line(self):
fixture = FIXTURES["right_line"]
sim = fixture["image"]
expected = fixture["seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_columns(self):
fixture = FIXTURES["columns"]
sim = fixture["image"]
expected = fixture["seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_rect(self):
fixture = FIXTURES["rect"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_rect2(self):
fixture = FIXTURES["rect2"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_rect3(self):
fixture = FIXTURES["rect3"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_rect4(self):
fixture = FIXTURES["rect4"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_diagonal(self):
fixture = FIXTURES["diagonal"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_diagonal2(self):
fixture = FIXTURES["diagonal2"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_blocks(self):
fixture = FIXTURES["blocks"]
sim = fixture["image"]
expected = fixture["seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_pycozmo(self):
fixture = FIXTURES["pycozmo"]
sim = fixture["image"]
expected = fixture["seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_chessboard_tl(self):
fixture = FIXTURES["chessboard_tl"]
sim = fixture["image"]
expected = fixture["seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_chessboard_bl(self):
fixture = FIXTURES["chessboard_bl"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_chessboard_tr(self):
fixture = FIXTURES["chessboard_tr"]
sim = fixture["image"]
expected = fixture["seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_chessboard_br(self):
fixture = FIXTURES["chessboard_br"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_chessboard2_tl(self):
fixture = FIXTURES["chessboard2_tl"]
sim = fixture["image"]
expected = fixture["seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_chessboard2_bl(self):
fixture = FIXTURES["chessboard2_bl"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_chessboard2_tr(self):
fixture = FIXTURES["chessboard2_tr"]
sim = fixture["image"]
expected = fixture["seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
def test_chessboard2_br(self):
fixture = FIXTURES["chessboard2_br"]
sim = fixture["image"]
expected = fixture["alt_seq"]
actual = self._encode(sim)
self.assertEqual(expected, actual)
self.assertSameImage(sim, actual)
| 32.044177
| 88
| 0.617747
| 847
| 7,979
| 5.663518
| 0.079103
| 0.11674
| 0.110903
| 0.134251
| 0.753179
| 0.72045
| 0.72045
| 0.718783
| 0.718783
| 0.718783
| 0
| 0.004115
| 0.268956
| 7,979
| 248
| 89
| 32.173387
| 0.818275
| 0
| 0
| 0.654206
| 0
| 0
| 0.070318
| 0
| 0
| 0
| 0
| 0
| 0.271028
| 1
| 0.140187
| false
| 0
| 0.018692
| 0
| 0.168224
| 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
|
1ab62fc96bc151411995c4852e60163a65401b8b
| 147
|
py
|
Python
|
web/web/constants.py
|
pbvarga1/docker_opportunity
|
d2d1bfeed148dded0f85b4ed5085f5186f9b6056
|
[
"MIT"
] | 1
|
2021-04-21T11:04:46.000Z
|
2021-04-21T11:04:46.000Z
|
web/web/constants.py
|
pbvarga1/docker_opportunity
|
d2d1bfeed148dded0f85b4ed5085f5186f9b6056
|
[
"MIT"
] | 21
|
2019-02-24T16:42:50.000Z
|
2019-02-26T21:21:49.000Z
|
web/web/constants.py
|
pbvarga1/opportunity
|
d2d1bfeed148dded0f85b4ed5085f5186f9b6056
|
[
"MIT"
] | null | null | null |
import os
DOCKER_HOST = os.environ.get('DOCKER_IP', '192.168.99.100')
DSN = f'http://9929242db8104494b679b60c94b0f96d@{DOCKER_HOST}:9000/2'
| 24.5
| 70
| 0.727891
| 21
| 147
| 4.952381
| 0.809524
| 0.192308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.305344
| 0.108844
| 147
| 5
| 71
| 29.4
| 0.48855
| 0
| 0
| 0
| 0
| 0
| 0.584507
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
46ccd71d072062ab12f1916340f7aacab11d67ad
| 160
|
py
|
Python
|
bin/hexes/polyhexes-34-hexagram.py
|
tiwo/puzzler
|
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
|
[
"Intel"
] | null | null | null |
bin/hexes/polyhexes-34-hexagram.py
|
tiwo/puzzler
|
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
|
[
"Intel"
] | null | null | null |
bin/hexes/polyhexes-34-hexagram.py
|
tiwo/puzzler
|
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
|
[
"Intel"
] | 1
|
2022-01-02T16:54:14.000Z
|
2022-01-02T16:54:14.000Z
|
#!/usr/bin/env python
# $Id$
"""167 solutions"""
import puzzler
from puzzler.puzzles.polyhexes34 import Polyhexes34Hexagram
puzzler.run(Polyhexes34Hexagram)
| 16
| 59
| 0.78125
| 18
| 160
| 6.944444
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 0.1
| 160
| 9
| 60
| 17.777778
| 0.805556
| 0.24375
| 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
|
2040474f9c6044803006c52d166bfab66ebdfea4
| 160
|
py
|
Python
|
gradle-conda-plugin/examples/multi-project-example/example-lib/src/main/python/lib.py
|
logbee/gradle-plugins
|
477f238253fd75b55c34d1d0b62f9b8ea2a8da7b
|
[
"Apache-2.0"
] | 3
|
2020-01-30T04:13:39.000Z
|
2022-01-12T14:28:39.000Z
|
gradle-conda-plugin/examples/multi-project-example/example-lib/src/main/python/lib.py
|
logbee/gradle-plugins
|
477f238253fd75b55c34d1d0b62f9b8ea2a8da7b
|
[
"Apache-2.0"
] | 1
|
2020-02-18T11:37:35.000Z
|
2020-02-18T12:20:58.000Z
|
examples/multi-project-example/example-lib/src/main/python/lib.py
|
logbee/gradle-conda-plugin
|
08e3ee604d5cf896cae4b6610364361ef7eac7da
|
[
"Apache-2.0"
] | null | null | null |
class Example:
def __init__(self):
self.name = ""
pass
def greet(self, name):
self.name = name
print("hello " + name)
| 16
| 30
| 0.50625
| 18
| 160
| 4.277778
| 0.555556
| 0.311688
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.375
| 160
| 9
| 31
| 17.777778
| 0.77
| 0
| 0
| 0
| 0
| 0
| 0.0375
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.142857
| 0
| 0
| 0.428571
| 0.142857
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
20464be2c184e33a66b6ccb9ef9a6effcf44709b
| 44
|
py
|
Python
|
config.py
|
Zegers/fernwehTrips
|
42a2030bf7dd2d64d016f9daad00d6e22a2b7766
|
[
"Apache-2.0"
] | null | null | null |
config.py
|
Zegers/fernwehTrips
|
42a2030bf7dd2d64d016f9daad00d6e22a2b7766
|
[
"Apache-2.0"
] | null | null | null |
config.py
|
Zegers/fernwehTrips
|
42a2030bf7dd2d64d016f9daad00d6e22a2b7766
|
[
"Apache-2.0"
] | null | null | null |
DEBUG = True
HOST = '127.0.0.1'
PORT = 8000
| 11
| 18
| 0.613636
| 9
| 44
| 3
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 0.204545
| 44
| 3
| 19
| 14.666667
| 0.485714
| 0
| 0
| 0
| 0
| 0
| 0.204545
| 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
|
64980ada37def7d06b9a7759e6c9aee628d3a1e7
| 92
|
py
|
Python
|
Sea/adapter/materials/ViewProviderMaterial.py
|
FRidh/Sea
|
b474e93a449570a9ba3b915c4d80f814feee2545
|
[
"BSD-3-Clause"
] | 2
|
2015-07-02T13:34:09.000Z
|
2015-09-28T09:07:52.000Z
|
Sea/adapter/materials/ViewProviderMaterial.py
|
FRidh/Sea
|
b474e93a449570a9ba3b915c4d80f814feee2545
|
[
"BSD-3-Clause"
] | null | null | null |
Sea/adapter/materials/ViewProviderMaterial.py
|
FRidh/Sea
|
b474e93a449570a9ba3b915c4d80f814feee2545
|
[
"BSD-3-Clause"
] | 1
|
2022-01-22T03:01:54.000Z
|
2022-01-22T03:01:54.000Z
|
from ..base import ViewProviderBase
class ViewProviderMaterial(ViewProviderBase):
pass
| 18.4
| 45
| 0.815217
| 8
| 92
| 9.375
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 92
| 5
| 46
| 18.4
| 0.9375
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
64a3c5ec3cc76f142cc27c0f276d1241d43f0f00
| 2,982
|
py
|
Python
|
PythonLearn/opencv/synthesis.py
|
OKKyu/PythonLearn
|
48dc4cc2a1a34d99b09f8d37a5566d448dcf987c
|
[
"MIT"
] | null | null | null |
PythonLearn/opencv/synthesis.py
|
OKKyu/PythonLearn
|
48dc4cc2a1a34d99b09f8d37a5566d448dcf987c
|
[
"MIT"
] | null | null | null |
PythonLearn/opencv/synthesis.py
|
OKKyu/PythonLearn
|
48dc4cc2a1a34d99b09f8d37a5566d448dcf987c
|
[
"MIT"
] | null | null | null |
#!python3
# -*- coding:utf-8 -*-
# 『Pythonで始めるOpenCV4プログラミング』
# 北山尚洋
import cv2
import sys, traceback
import numpy as np
def add(imgName1, imgName2):
try:
img1 = cv2.imread(imgName1)
img2 = cv2.imread(imgName2)
if img1 is None or img2 is None:
print("no file reading...")
sys.exit(1)
#caution!
#src file size have to same size each img1 and img2. and same type.
img1 = cv2.resize(img1, (500,500))
img2 = cv2.resize(img2, (500,500))
cv2.imshow('image1', img1)
cv2.imshow('image2', img2)
dst = cv2.add(img1, img2)
cv2.imshow('synthesize', dst)
cv2.waitKey(0)
cv2.destroyAllWindows()
except Exception as ex:
print("Error:", sys.exc_info()[0])
print(sys.exc_info()[1])
print(traceback.format_tb(sys.exc_info()[2]))
finally:
pass
def addScolor(imgName1):
try:
img1 = cv2.imread(imgName1)
if img1 is None:
print("no file reading...")
sys.exit(1)
cv2.imshow("img1",img1)
height = img1.shape[0]
width = img1.shape[1]
blue = np.zeros((height, width, 3), np.uint8)
blue[:,:] = [128, 0, 0]
dst = cv2.add(img1, blue)
cv2.imshow("after", dst)
cv2.waitKey(0)
cv2.destroyAllWindows()
except Exception as ex:
print("Error:", sys.exc_info()[0])
print(sys.exc_info()[1])
print(traceback.format_tb(sys.exc_info()[2]))
finally:
pass
def addMask(imgName1, imgName2):
try:
img1 = cv2.imread(imgName1)
img2 = cv2.imread(imgName2)
if img1 is None or img2 is None:
print("no file reading...")
sys.exit(1)
#caution!
#src file size have to same size each img1 and img2. and same type.
img1 = cv2.resize(img1, (500,500))
img2 = cv2.resize(img2, (500,500))
cv2.imshow('image1', img1)
cv2.imshow('image2', img2)
#create mask
height = img1.shape[0]
width = img1.shape[1]
img_mask = np.zeros((height, width), np.uint8)
img_mask[ height//4:height*3//4, width//4:width*3//4 ] = [255]
#add two image with mask.
dst = cv2.add(img1, img2, mask = img_mask)
cv2.imshow('dst1', dst)
#add two image with mask.
dst = cv2.add(img1, img2, mask = img_mask)
cv2.imshow('dst1', dst)
cv2.waitKey(0)
cv2.destroyAllWindows()
except Exception as ex:
print("Error:", sys.exc_info()[0])
print(sys.exc_info()[1])
print(traceback.format_tb(sys.exc_info()[2]))
finally:
pass
#add(sys.argv[1], sys.argv[2])
#addScolor(sys.argv[1])
addMask(sys.argv[1], sys.argv[2])
| 26.625
| 75
| 0.521797
| 377
| 2,982
| 4.090186
| 0.222812
| 0.052529
| 0.058366
| 0.033722
| 0.780804
| 0.754215
| 0.733463
| 0.733463
| 0.693256
| 0.672503
| 0
| 0.077551
| 0.342723
| 2,982
| 112
| 76
| 26.625
| 0.708163
| 0.107311
| 0
| 0.767123
| 0
| 0
| 0.046415
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.041096
| false
| 0.041096
| 0.041096
| 0
| 0.082192
| 0.164384
| 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
|
b379a33448ec094a1c03a754dde20e03abe2278d
| 55
|
py
|
Python
|
pyhsmm/basic/__init__.py
|
garyfeng/pyhsmm
|
70572fa76f26ddabdf326529df41d1394321a2cb
|
[
"MIT"
] | 1
|
2015-11-08T05:20:39.000Z
|
2015-11-08T05:20:39.000Z
|
pyhsmm/basic/__init__.py
|
garyfeng/pyhsmm
|
70572fa76f26ddabdf326529df41d1394321a2cb
|
[
"MIT"
] | null | null | null |
pyhsmm/basic/__init__.py
|
garyfeng/pyhsmm
|
70572fa76f26ddabdf326529df41d1394321a2cb
|
[
"MIT"
] | null | null | null |
import models
import distributions
import abstractions
| 13.75
| 20
| 0.890909
| 6
| 55
| 8.166667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109091
| 55
| 3
| 21
| 18.333333
| 1
| 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
|
b395d0fdd3e1c2bd4ec7f88cdbf3e359c9a9a45c
| 165
|
py
|
Python
|
canopen/sdo/__init__.py
|
mlederhi/canopen
|
dd2d1a73f75844b66b5fa4a26b01cb8cebe72beb
|
[
"MIT"
] | 301
|
2016-10-19T03:21:10.000Z
|
2022-03-31T11:00:26.000Z
|
canopen/sdo/__init__.py
|
mlederhi/canopen
|
dd2d1a73f75844b66b5fa4a26b01cb8cebe72beb
|
[
"MIT"
] | 236
|
2016-10-27T15:33:51.000Z
|
2022-03-22T19:57:58.000Z
|
canopen/sdo/__init__.py
|
mlederhi/canopen
|
dd2d1a73f75844b66b5fa4a26b01cb8cebe72beb
|
[
"MIT"
] | 143
|
2016-10-22T06:48:33.000Z
|
2022-03-22T09:49:20.000Z
|
from .base import Variable, Record, Array
from .client import SdoClient
from .server import SdoServer
from .exceptions import SdoAbortedError, SdoCommunicationError
| 33
| 62
| 0.842424
| 19
| 165
| 7.315789
| 0.684211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115152
| 165
| 4
| 63
| 41.25
| 0.952055
| 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
|
b3ac43565eb2b4ec629d7aeeafa3675fccae9f63
| 98
|
py
|
Python
|
petstagram/common/admin.py
|
lion963/petstagram_workshop
|
31a366c8aa539a5e641f6241a785f13bb8a6dbbb
|
[
"MIT"
] | null | null | null |
petstagram/common/admin.py
|
lion963/petstagram_workshop
|
31a366c8aa539a5e641f6241a785f13bb8a6dbbb
|
[
"MIT"
] | null | null | null |
petstagram/common/admin.py
|
lion963/petstagram_workshop
|
31a366c8aa539a5e641f6241a785f13bb8a6dbbb
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from common.models import Comment
admin.site.register(Comment)
| 16.333333
| 33
| 0.826531
| 14
| 98
| 5.785714
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112245
| 98
| 5
| 34
| 19.6
| 0.931034
| 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
|
b3c8985caafd34e4798b11c67518d93ee70eab66
| 40
|
py
|
Python
|
tests/components/opnsense/__init__.py
|
domwillcode/home-assistant
|
f170c80bea70c939c098b5c88320a1c789858958
|
[
"Apache-2.0"
] | 30,023
|
2016-04-13T10:17:53.000Z
|
2020-03-02T12:56:31.000Z
|
tests/components/opnsense/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 31,101
|
2020-03-02T13:00:16.000Z
|
2022-03-31T23:57:36.000Z
|
tests/components/opnsense/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 11,956
|
2016-04-13T18:42:31.000Z
|
2020-03-02T09:32:12.000Z
|
"""Tests for the opnsense component."""
| 20
| 39
| 0.7
| 5
| 40
| 5.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 40
| 1
| 40
| 40
| 0.8
| 0.825
| 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
|
b3e6fddc22dfef329483d436a3422a33e0ca15cc
| 109
|
py
|
Python
|
bridge/handler/__init__.py
|
Paula-Kli/IOT
|
c215a748667265c8da4c00d0473ea17f7da9d21a
|
[
"Apache-2.0"
] | null | null | null |
bridge/handler/__init__.py
|
Paula-Kli/IOT
|
c215a748667265c8da4c00d0473ea17f7da9d21a
|
[
"Apache-2.0"
] | 1
|
2022-02-08T08:55:56.000Z
|
2022-02-08T08:55:56.000Z
|
bridge/handler/__init__.py
|
Paula-Kli/IOT
|
c215a748667265c8da4c00d0473ea17f7da9d21a
|
[
"Apache-2.0"
] | 1
|
2022-02-07T20:26:40.000Z
|
2022-02-07T20:26:40.000Z
|
from .message_management import createDeviceInitializationMessage
from .message_handler import SerialHandler
| 36.333333
| 65
| 0.908257
| 10
| 109
| 9.7
| 0.7
| 0.226804
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073395
| 109
| 2
| 66
| 54.5
| 0.960396
| 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
|
373846a4bea485cb424bcf462323e45ac2c9e5ff
| 266
|
py
|
Python
|
examples/tests/embed/embed_division.py
|
chebee7i/ipython
|
85b169fa3afc3d374973295c7f1409ededddbaca
|
[
"BSD-3-Clause-Clear"
] | 2
|
2020-11-30T14:04:30.000Z
|
2021-11-08T11:29:05.000Z
|
examples/tests/embed/embed_division.py
|
chebee7i/ipython
|
85b169fa3afc3d374973295c7f1409ededddbaca
|
[
"BSD-3-Clause-Clear"
] | null | null | null |
examples/tests/embed/embed_division.py
|
chebee7i/ipython
|
85b169fa3afc3d374973295c7f1409ededddbaca
|
[
"BSD-3-Clause-Clear"
] | 1
|
2020-05-03T10:25:12.000Z
|
2020-05-03T10:25:12.000Z
|
"""This tests that future compiler flags are passed to the embedded IPython."""
from __future__ import division
from IPython import embed
embed(banner1='', header='check 1/2 == 0.5 in Python 2')
embed(banner1='', header='check 1/2 = 0 in Python 2', compile_flags=0)
| 44.333333
| 79
| 0.736842
| 44
| 266
| 4.340909
| 0.590909
| 0.125654
| 0.188482
| 0.240838
| 0.272251
| 0.272251
| 0.272251
| 0
| 0
| 0
| 0
| 0.052402
| 0.139098
| 266
| 5
| 80
| 53.2
| 0.781659
| 0.274436
| 0
| 0
| 0
| 0
| 0.283422
| 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
|
375542be3fe7a8ba4b50e00e7c6f6ca4c4f92231
| 266
|
py
|
Python
|
fantasyProjectHome/fantasyApp/urls.py
|
jaredtewodros/cfbFantasyApp
|
3f950f45e1c690717dc9b0e9db5229140a212889
|
[
"MIT"
] | null | null | null |
fantasyProjectHome/fantasyApp/urls.py
|
jaredtewodros/cfbFantasyApp
|
3f950f45e1c690717dc9b0e9db5229140a212889
|
[
"MIT"
] | null | null | null |
fantasyProjectHome/fantasyApp/urls.py
|
jaredtewodros/cfbFantasyApp
|
3f950f45e1c690717dc9b0e9db5229140a212889
|
[
"MIT"
] | null | null | null |
from django.conf.urls import url
from django.urls import path
from . import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('', views.index, name='index'),
path('login/', views.login, name='login'),
]
| 22.166667
| 46
| 0.721805
| 38
| 266
| 5.052632
| 0.368421
| 0.208333
| 0.21875
| 0.1875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150376
| 266
| 12
| 47
| 22.166667
| 0.849558
| 0
| 0
| 0
| 0
| 0
| 0.059925
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.555556
| 0
| 0.555556
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
3760dfed61486a16ce684f56166cb65fc5a2950a
| 3,682
|
py
|
Python
|
ztag/annotations/FtpKebi.py
|
justinbastress/ztag
|
137b754dfe22b7d6e0945ae33def372ec67d092b
|
[
"Apache-2.0"
] | 107
|
2015-10-13T16:03:21.000Z
|
2021-11-08T10:53:07.000Z
|
ztag/annotations/FtpKebi.py
|
justinbastress/ztag
|
137b754dfe22b7d6e0945ae33def372ec67d092b
|
[
"Apache-2.0"
] | 73
|
2015-10-14T17:27:10.000Z
|
2018-10-01T14:32:44.000Z
|
ztag/annotations/FtpKebi.py
|
justinbastress/ztag
|
137b754dfe22b7d6e0945ae33def372ec67d092b
|
[
"Apache-2.0"
] | 36
|
2015-10-14T17:13:20.000Z
|
2021-10-05T19:41:10.000Z
|
import re
from ztag.annotation import Annotation
from ztag.annotation import OperatingSystem
from ztag import protocols
import ztag.test
class FtpKebi(Annotation):
protocol = protocols.FTP
subprotocol = protocols.FTP.BANNER
port = None
impl_re = re.compile("^220- Kebi FTP Server", re.IGNORECASE)
version_re = re.compile("\(Version (\d+(?:\.\d+)*)\)", re.IGNORECASE)
def process(self, obj, meta):
banner = obj["banner"]
if self.impl_re.search(banner):
meta.local_metadata.product = "Kebi Ftpd"
match = self.version_re.search(banner)
if match:
meta.local_metadata.version = match.group(1)
return meta
""" Tests
"220- Kebi FTP Server ( \\xb1\\xfa\\xba\\xf1 FTP \\xbc\\xad\\xb9\\xf6 )\r\n220- Written by Cho Manik - http://www.webkebi.com\r\n220 Kebi FTP \\xbc\\xad\\xb9\\xf6 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"220- Kebi FTP Server (Version 2.0.0)\r\n220 Kebi FTP \\xbc\\xad\\xb9\\xf6\\xbf\\xa1 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"220- Kebi FTP Server (Version 2.0.0)\r\n220 Kebi FTP \\xbc\\xad\\xb9\\xf6\\xbf\\xa1 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"220- Kebi FTP Server (Version 2.0.0)\r\n220 Kebi FTP \\xbc\\xad\\xb9\\xf6\\xbf\\xa1 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"220- Kebi FTP Server (Version 2.0.0)\r\n220 SINN \\xbc\\xad\\xb9\\xf6\\xbf\\xa1 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"220- Kebi FTP Server ( \\xb1\\xfa\\xba\\xf1 FTP \\xbc\\xad\\xb9\\xf6 )\r\n220- Written by Cho Manik - http://www.webkebi.com\r\n220 Easy FTP\r\n"
"220- Kebi FTP Server ( \\xb1\\xfa\\xba\\xf1 FTP \\xbc\\xad\\xb9\\xf6 )\r\n220- Written by Cho Manik - http://www.webkebi.com\r\n220 Kebi FTP \\xbc\\xad\\xb9\\xf6 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"220- Kebi FTP Server ( \\xb1\\xfa\\xba\\xf1 FTP \\xbc\\xad\\xb9\\xf6 )\r\n220- Written by Cho Manik - http://www.webkebi.com\r\n220 Kebi FTP \\xbc\\xad\\xb9\\xf6\\xbf\\xa1 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"220- Kebi FTP Server ( \\xb1\\xfa\\xba\\xf1 FTP \\xbc\\xad\\xb9\\xf6 )\r\n220- Written by Cho Manik - http://www.webkebi.com\r\n220 Kebi FTP \\xbc\\xad\\xb9\\xf6 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"220- Kebi FTP Server (Version 2.0.0)\r\n220 Kebi FTP \\xbc\\xad\\xb9\\xf6\\xbf\\xa1 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"220- Kebi FTP Server (Version 2.0.0)\r\n220 Kebi FTP \\xbc\\xad\\xb9\\xf6\\xbf\\xa1 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"220- Kebi FTP Server (Version 2.0.0)\r\n220 Kebi FTP \\xbc\\xad\\xb9\\xf6\\xbf\\xa1 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"220- Kebi FTP Server ( \\xb1\\xfa\\xba\\xf1 FTP \\xbc\\xad\\xb9\\xf6 )\r\n220- Written by Cho Manik - http://www.webkebi.com\r\n220 Kebi FTP \\xbc\\xad\\xb9\\xf6\\xbf\\xa1 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"220- Kebi FTP Server ( \\xb1\\xfa\\xba\\xf1 FTP \\xbc\\xad\\xb9\\xf6 )\r\n220- Written by Cho Manik - http://www.webkebi.com\r\n220 Kebi FTP \\xbc\\xad\\xb9\\xf6 \\xc1\\xa2\\xbc\\xd3\\xc0\\xbb \\xc8\\xaf\\xbf\\xb5\\xc7\\xd5\\xb4\\xcf\\xb4\\xd9. !\r\n"
"""
| 80.043478
| 266
| 0.610266
| 666
| 3,682
| 3.364865
| 0.117117
| 0.084337
| 0.080321
| 0.107095
| 0.790718
| 0.790718
| 0.790718
| 0.790718
| 0.790718
| 0.790718
| 0
| 0.104057
| 0.123031
| 3,682
| 45
| 267
| 81.822222
| 0.589966
| 0
| 0
| 0
| 0
| 0
| 0.089616
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.052632
| false
| 0
| 0.263158
| 0
| 0.684211
| 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
|
379b43531071f8eb9b369ff0db3b80cab3f6777b
| 7,325
|
py
|
Python
|
BookClub/tests/views/forum_views/test_edit_post_view.py
|
amir-rahim/BookClubSocialNetwork
|
b69a07cd33592f700214252a64c7c1c53845625d
|
[
"MIT"
] | 4
|
2022-02-04T02:11:48.000Z
|
2022-03-12T21:38:01.000Z
|
BookClub/tests/views/forum_views/test_edit_post_view.py
|
amir-rahim/BookClubSocialNetwork
|
b69a07cd33592f700214252a64c7c1c53845625d
|
[
"MIT"
] | 51
|
2022-02-01T18:56:23.000Z
|
2022-03-31T15:35:37.000Z
|
BookClub/tests/views/forum_views/test_edit_post_view.py
|
amir-rahim/BookClubSocialNetwork
|
b69a07cd33592f700214252a64c7c1c53845625d
|
[
"MIT"
] | null | null | null |
"""Unit testing of the Edit Post view"""
from django.test import TestCase, tag
from django.urls import reverse
from BookClub.models import User, ForumPost, Club
from BookClub.tests.helpers import reverse_with_next
@tag('views', 'forum', 'edit_post')
class EditPostViewTestCase(TestCase):
"""Tests of the Edit Posts view."""
fixtures = [
'BookClub/tests/fixtures/default_users.json',
'BookClub/tests/fixtures/default_clubs.json',
'BookClub/tests/fixtures/default_memberships.json',
'BookClub/tests/fixtures/default_forum.json',
'BookClub/tests/fixtures/default_posts.json',
]
def setUp(self):
self.user = User.objects.get(username="johndoe")
self.non_user = User.objects.get(pk=7)
self.club = Club.objects.get(pk=1)
self.my_post = ForumPost.objects.get(pk=1)
self.other_post = ForumPost.objects.get(pk=2)
self.club_post = ForumPost.objects.get(pk=4)
self.my_url = reverse('edit_forum_post', kwargs={'post_id': self.my_post.id})
self.other_url = reverse('edit_forum_post', kwargs={'post_id': self.other_post.id})
self.club_url = reverse('edit_forum_post', kwargs={'club_url_name': self.club.club_url_name, 'post_id': self.club_post.id})
self.edit = {
"content": "HELLO, HOW DO YOU DO!",
}
def test_edit_post_url(self):
self.assertEqual(self.my_url, '/forum/'+str(self.my_post.pk)+'/edit/')
def test_edit_other_post_url(self):
self.assertEqual(self.other_url, '/forum/'+str(self.other_post.pk)+'/edit/')
def test_edit_club_post_url(self):
self.assertEqual(self.club_url, '/club/'+str(self.club.club_url_name)+'/forum/'+str(self.club_post.id)+'/edit/')
def test_redirect_when_not_logged_in(self):
redirect_url = reverse_with_next('login', self.my_url)
response = self.client.post(self.my_url, self.edit, follow=True)
self.assertRedirects(response, redirect_url,
status_code=302, target_status_code=200, fetch_redirect_response=True
)
self.assertTemplateUsed(response, 'authentication/login.html')
def test_redirect_club_when_not_logged_in(self):
redirect_url = reverse_with_next('login', self.club_url)
response = self.client.post(self.club_url, self.edit, follow=True)
self.assertRedirects(response, redirect_url,
status_code=302, target_status_code=200, fetch_redirect_response=True
)
self.assertTemplateUsed(response, 'authentication/login.html')
def test_redirect_when_not_creator(self):
self.client.login(username=self.user.username, password="Password123")
redirect_url = reverse('global_forum')
response = self.client.post(self.other_url, self.edit, follow=True)
self.assertRedirects(response, redirect_url,
status_code=302, target_status_code=200, fetch_redirect_response=True
)
def test_redirect_non_existing_id(self):
self.client.login(username=self.user.username, password="Password123")
url = reverse('edit_forum_post', kwargs={'post_id': 555})
redirect_url = reverse('global_forum')
response = self.client.post(url, self.edit, follow=True)
self.assertRedirects(response, redirect_url,
status_code=302, target_status_code=200, fetch_redirect_response=True
)
def test_redirect_club_non_existing_id(self):
self.client.login(username=self.user.username, password="Password123")
url = reverse('edit_forum_post', kwargs={'club_url_name': self.club.club_url_name, 'post_id': 555})
redirect_url = reverse('club_forum', kwargs={'club_url_name': self.club.club_url_name})
response = self.client.post(url, self.edit, follow=True)
self.assertRedirects(response, redirect_url,
status_code=302, target_status_code=200, fetch_redirect_response=True
)
def test_edit_post_when_not_logged_in(self):
redirect_url = reverse_with_next('login', self.my_url)
response = self.client.post(self.my_url, self.edit, follow=True)
post = ForumPost.objects.get(pk=1)
self.assertEqual(post.content, "Lorem Ipsum is simply dummy text of the printing and typesetting industry. "
"Lorem Ipsum has been the industrial standard dummy text ever since the 1500s, "
"when an unknown printer took a galley of type and scrambled it to make a type "
"specimen book.")
def test_edit_post_when_not_creator(self):
self.client.login(username=self.user.username, password="Password123")
response = self.client.post(self.other_url, self.edit, follow=True)
post = ForumPost.objects.get(pk=2)
self.assertEqual(post.content, "Contrary to popular belief, Lorem Ipsum is not simply random text. It has "
"roots in a piece of classical Latin literature from 45 BC, making it over "
"2000 years old.")
def test_edit_club_post_when_non_member(self):
self.client.login(username=self.non_user.username, password="Password123")
response = self.client.post(self.club_url, self.edit, follow=True)
post = ForumPost.objects.get(pk=4)
self.assertEqual(post.content, "... qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...")
def test_edit_post_when_creator(self):
self.client.login(username=self.user.username, password="Password123")
response = self.client.post(self.my_url, self.edit, follow=True)
post = ForumPost.objects.get(pk=1)
self.assertEqual(post.content, "HELLO, HOW DO YOU DO!")
def test_post_details_show(self):
self.client.login(username=self.user.username, password="Password123")
response = self.client.get(self.my_url)
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, 'forum/edit_forum_post.html')
self.assertContains(response, "Lorem Ipsum")
self.assertContains(response, "Lorem Ipsum is simply dummy text of the printing and typesetting industry. "
"Lorem Ipsum has been the industrial standard dummy text ever since the "
"1500s, when an unknown printer took a galley of type and scrambled it to make "
"a type specimen book.")
self.assertContains(response, "Posted by: johndoe")
def test_club_post_details_show(self):
self.client.login(username=self.user.username, password="Password123")
response = self.client.get(self.club_url)
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, 'forum/edit_forum_post.html')
self.assertContains(response, "Latin Quota")
self.assertContains(response, "... qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...")
self.assertContains(response, "Posted by: johndoe")
| 54.259259
| 131
| 0.65802
| 921
| 7,325
| 5.038002
| 0.161781
| 0.040948
| 0.042672
| 0.042672
| 0.819612
| 0.764224
| 0.700647
| 0.679095
| 0.66681
| 0.62306
| 0
| 0.01589
| 0.235358
| 7,325
| 134
| 132
| 54.664179
| 0.812533
| 0.008737
| 0
| 0.353982
| 0
| 0
| 0.218069
| 0.043862
| 0
| 0
| 0
| 0
| 0.212389
| 1
| 0.132743
| false
| 0.070796
| 0.035398
| 0
| 0.185841
| 0.035398
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
37b47318fbe517df7e994b43de9bcd867ff19782
| 186
|
py
|
Python
|
python/gilded_rose/processors/base.py
|
guilhermesimas/GildedRose-Refactoring-Kata
|
c1d5075eece01f4eb8b05e9346640f2161321874
|
[
"MIT"
] | null | null | null |
python/gilded_rose/processors/base.py
|
guilhermesimas/GildedRose-Refactoring-Kata
|
c1d5075eece01f4eb8b05e9346640f2161321874
|
[
"MIT"
] | null | null | null |
python/gilded_rose/processors/base.py
|
guilhermesimas/GildedRose-Refactoring-Kata
|
c1d5075eece01f4eb8b05e9346640f2161321874
|
[
"MIT"
] | 1
|
2020-05-25T22:45:03.000Z
|
2020-05-25T22:45:03.000Z
|
from abc import ABC, abstractmethod
from gilded_rose.entities import Item
class BaseProcessor(ABC):
@abstractmethod
def process_item(self, item: Item, **kwargs):
pass
| 18.6
| 49
| 0.725806
| 23
| 186
| 5.782609
| 0.652174
| 0.255639
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.198925
| 186
| 9
| 50
| 20.666667
| 0.892617
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0.166667
| 0.333333
| 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
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.