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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fd19d19fb30c8bee34d9587ce08fb83f675579f9
| 116
|
py
|
Python
|
location/blueprints/__init__.py
|
iandees/loco
|
5369decfc1c12a46a1b5011cff52225f90138761
|
[
"MIT"
] | 2
|
2018-07-04T23:35:24.000Z
|
2019-01-22T01:54:57.000Z
|
location/blueprints/__init__.py
|
nnja/loco
|
d5ba10a426a2c864048545fe200b711ed7d5ae44
|
[
"MIT"
] | 5
|
2018-06-30T21:51:48.000Z
|
2018-06-30T22:12:18.000Z
|
location/blueprints/__init__.py
|
nnja/loco
|
d5ba10a426a2c864048545fe200b711ed7d5ae44
|
[
"MIT"
] | null | null | null |
from .auth import auth_bp
from .locations import locations_bp
from .root import root_bp
from .teams import teams_bp
| 23.2
| 35
| 0.827586
| 20
| 116
| 4.6
| 0.35
| 0.195652
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 116
| 4
| 36
| 29
| 0.92
| 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
| 0
| 0
|
0
| 4
|
fd1d9007ea809aa174164c095b043f401758c080
| 849
|
py
|
Python
|
problem0035/test_35.py
|
SimonZoo/LeetCode
|
98c51ef4312f530d1d5a71b10b4d55307ca58e6d
|
[
"Unlicense"
] | null | null | null |
problem0035/test_35.py
|
SimonZoo/LeetCode
|
98c51ef4312f530d1d5a71b10b4d55307ca58e6d
|
[
"Unlicense"
] | 2
|
2019-01-08T11:00:45.000Z
|
2019-01-10T11:45:35.000Z
|
problem0035/test_35.py
|
SimonZoo/LeetCode
|
98c51ef4312f530d1d5a71b10b4d55307ca58e6d
|
[
"Unlicense"
] | null | null | null |
import unittest
from .search_insert_position import Solution
class TestSearchInsertPosition(unittest.TestCase):
def test_1(self):
s = Solution()
input_list = [1,3,5,6]
target = 5
output = 2
self.assertEqual(s.searchInsert(input_list, target), output)
def test_2(self):
s = Solution()
input_list = [1,3,5,6]
target = 2
output = 1
self.assertEqual(s.searchInsert(input_list, target), output)
def test_3(self):
s = Solution()
input_list = [1,3,5,6]
target = 7
output = 4
self.assertEqual(s.searchInsert(input_list, target), output)
def test_4(self):
s = Solution()
input_list = [1,3,5,6]
target = 0
output = 0
self.assertEqual(s.searchInsert(input_list, target), output)
| 25.727273
| 68
| 0.58775
| 108
| 849
| 4.490741
| 0.259259
| 0.148454
| 0.107216
| 0.148454
| 0.71134
| 0.71134
| 0.71134
| 0.71134
| 0.610309
| 0.610309
| 0
| 0.047297
| 0.302709
| 849
| 32
| 69
| 26.53125
| 0.771959
| 0
| 0
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 1
| 0.148148
| false
| 0
| 0.074074
| 0
| 0.259259
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 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
| 4
|
fd4d32e9c1dd6ae043facb27bc7c88dd31bb6a6f
| 182
|
py
|
Python
|
steppy/server/__init__.py
|
ygravrand/steppy
|
f1663da562243912afa7c016cf2aa517c20ed937
|
[
"BSD-3-Clause"
] | 34
|
2016-12-13T14:46:53.000Z
|
2021-05-03T17:24:35.000Z
|
steppy/server/__init__.py
|
ygravrand/steppy
|
f1663da562243912afa7c016cf2aa517c20ed937
|
[
"BSD-3-Clause"
] | 3
|
2016-12-15T11:07:08.000Z
|
2022-01-23T10:09:04.000Z
|
steppy/server/__init__.py
|
ygravrand/steppy
|
f1663da562243912afa7c016cf2aa517c20ed937
|
[
"BSD-3-Clause"
] | 4
|
2017-02-11T14:02:45.000Z
|
2018-11-11T16:42:18.000Z
|
# -*- coding: utf-8 -*-
"""
StepPy
:copyright: (c) 2016-2017 by Yann Gravrand.
:license: BSD, see LICENSE for more details.
"""
from .server import Server # noqa: F401
| 20.222222
| 48
| 0.615385
| 24
| 182
| 4.666667
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085714
| 0.230769
| 182
| 8
| 49
| 22.75
| 0.714286
| 0.708791
| 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
| 0
| 0
|
0
| 4
|
b5c2259b5d9324265c8a64ddefd41b6fa90b875d
| 3,979
|
py
|
Python
|
zerver/migrations/0332_realmuserdefault.py
|
Pulkit007/zulip
|
8a5f6f8d95baa55c4b28972cfc5a498f5f388e0f
|
[
"Apache-2.0"
] | 17,004
|
2015-09-25T18:27:24.000Z
|
2022-03-31T22:02:32.000Z
|
zerver/migrations/0332_realmuserdefault.py
|
Pulkit007/zulip
|
8a5f6f8d95baa55c4b28972cfc5a498f5f388e0f
|
[
"Apache-2.0"
] | 20,344
|
2015-09-25T19:02:42.000Z
|
2022-03-31T23:54:40.000Z
|
zerver/migrations/0332_realmuserdefault.py
|
Pulkit007/zulip
|
8a5f6f8d95baa55c4b28972cfc5a498f5f388e0f
|
[
"Apache-2.0"
] | 7,271
|
2015-09-25T18:48:39.000Z
|
2022-03-31T21:06:11.000Z
|
# Generated by Django 3.2.2 on 2021-05-31 16:49
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("zerver", "0331_scheduledmessagenotificationemail"),
]
operations = [
migrations.CreateModel(
name="RealmUserDefault",
fields=[
(
"id",
models.AutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
("enter_sends", models.BooleanField(null=True, default=False)),
("left_side_userlist", models.BooleanField(default=False)),
("default_language", models.CharField(default="en", max_length=50)),
("default_view", models.TextField(default="recent_topics")),
("dense_mode", models.BooleanField(default=True)),
("fluid_layout_width", models.BooleanField(default=False)),
("high_contrast_mode", models.BooleanField(default=False)),
("translate_emoticons", models.BooleanField(default=False)),
("twenty_four_hour_time", models.BooleanField(default=False)),
("starred_message_counts", models.BooleanField(default=True)),
("color_scheme", models.PositiveSmallIntegerField(default=1)),
("demote_inactive_streams", models.PositiveSmallIntegerField(default=1)),
(
"emojiset",
models.CharField(
choices=[
("google", "Google modern"),
("google-blob", "Google classic"),
("twitter", "Twitter"),
("text", "Plain text"),
],
default="google-blob",
max_length=20,
),
),
("enable_stream_desktop_notifications", models.BooleanField(default=False)),
("enable_stream_email_notifications", models.BooleanField(default=False)),
("enable_stream_push_notifications", models.BooleanField(default=False)),
("enable_stream_audible_notifications", models.BooleanField(default=False)),
("notification_sound", models.CharField(default="zulip", max_length=20)),
("wildcard_mentions_notify", models.BooleanField(default=True)),
("enable_desktop_notifications", models.BooleanField(default=True)),
("pm_content_in_desktop_notifications", models.BooleanField(default=True)),
("enable_sounds", models.BooleanField(default=True)),
("enable_offline_email_notifications", models.BooleanField(default=True)),
("message_content_in_email_notifications", models.BooleanField(default=True)),
("enable_offline_push_notifications", models.BooleanField(default=True)),
("enable_online_push_notifications", models.BooleanField(default=True)),
("desktop_icon_count_display", models.PositiveSmallIntegerField(default=1)),
("enable_digest_emails", models.BooleanField(default=True)),
("enable_login_emails", models.BooleanField(default=True)),
("enable_marketing_emails", models.BooleanField(default=True)),
("realm_name_in_notifications", models.BooleanField(default=False)),
("presence_enabled", models.BooleanField(default=True)),
(
"realm",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="zerver.realm"
),
),
],
options={
"abstract": False,
},
),
]
| 50.367089
| 95
| 0.560191
| 320
| 3,979
| 6.728125
| 0.3875
| 0.209011
| 0.278681
| 0.188574
| 0.375755
| 0.277752
| 0.076637
| 0
| 0
| 0
| 0
| 0.010397
| 0.323197
| 3,979
| 78
| 96
| 51.012821
| 0.789083
| 0.011309
| 0
| 0.125
| 1
| 0
| 0.234232
| 0.13708
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.027778
| 0
| 0.069444
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b5cb18a99ed65ba61764ff433e7d02ebbc2a9e9c
| 111
|
py
|
Python
|
partials.py
|
po5i/python-and-types
|
bffb85ac7c9c7abee1ba7becacc36c633b795fba
|
[
"MIT"
] | null | null | null |
partials.py
|
po5i/python-and-types
|
bffb85ac7c9c7abee1ba7becacc36c633b795fba
|
[
"MIT"
] | null | null | null |
partials.py
|
po5i/python-and-types
|
bffb85ac7c9c7abee1ba7becacc36c633b795fba
|
[
"MIT"
] | null | null | null |
from functools import partial
def add(a, b):
return a + b
add_two = partial(add, 2)
print(add_two(10))
| 11.1
| 29
| 0.666667
| 20
| 111
| 3.6
| 0.65
| 0.055556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034483
| 0.216216
| 111
| 9
| 30
| 12.333333
| 0.793103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 0.2
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
b5d51ea78996ec0b55d0a1bb16e98046e368cd39
| 62
|
py
|
Python
|
code/009.py
|
i4leader/Python-Basic-Pratice-100question
|
53ed7958a7966bd2336fdf089f2b718e68accd92
|
[
"MIT"
] | null | null | null |
code/009.py
|
i4leader/Python-Basic-Pratice-100question
|
53ed7958a7966bd2336fdf089f2b718e68accd92
|
[
"MIT"
] | null | null | null |
code/009.py
|
i4leader/Python-Basic-Pratice-100question
|
53ed7958a7966bd2336fdf089f2b718e68accd92
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python3
import time
time.sleep(1)
print("暂停一秒输出")
| 10.333333
| 18
| 0.709677
| 10
| 62
| 4.4
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035714
| 0.096774
| 62
| 6
| 19
| 10.333333
| 0.75
| 0.274194
| 0
| 0
| 0
| 0
| 0.133333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b5d947b83f0bdf17c7d1d3b797d9c752f0ed3f36
| 294
|
py
|
Python
|
custom_print.py
|
bbhunter/Airopy
|
b83f11d876cfbfd42ba0f71f21c9d8ceea3719b0
|
[
"Unlicense"
] | 42
|
2019-07-22T10:13:13.000Z
|
2022-02-27T05:47:54.000Z
|
custom_print.py
|
bbhunter/Airopy
|
b83f11d876cfbfd42ba0f71f21c9d8ceea3719b0
|
[
"Unlicense"
] | 2
|
2019-07-30T12:35:13.000Z
|
2019-08-28T15:11:19.000Z
|
custom_print.py
|
bbhunter/Airopy
|
b83f11d876cfbfd42ba0f71f21c9d8ceea3719b0
|
[
"Unlicense"
] | 18
|
2019-07-24T18:44:43.000Z
|
2022-01-17T17:21:21.000Z
|
from termcolor import colored, cprint
def print_err(msg):
cprint("[!] ", color="red", end="")
cprint(msg, color="yellow")
def print_i(msg):
cprint(msg, color="yellow")
def print_ok(msg, start="", end=""):
cprint("[+] ", color="green", end="")
cprint(msg, color="yellow")
| 22.615385
| 41
| 0.605442
| 39
| 294
| 4.487179
| 0.435897
| 0.137143
| 0.24
| 0.342857
| 0.468571
| 0.32
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170068
| 294
| 13
| 42
| 22.615385
| 0.717213
| 0
| 0
| 0.333333
| 0
| 0
| 0.115254
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.111111
| 0
| 0.444444
| 1
| 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
| 0
| 0
| 1
|
0
| 4
|
b5e6f712c5d26a4df8c07e30672e1b5c3e6747b7
| 231
|
py
|
Python
|
tests/db/test_models.py
|
ruberVulpes/a-discord-bot
|
0996a39b01917bf4f1a9b2a33ca46033ca2c9eb5
|
[
"MIT"
] | null | null | null |
tests/db/test_models.py
|
ruberVulpes/a-discord-bot
|
0996a39b01917bf4f1a9b2a33ca46033ca2c9eb5
|
[
"MIT"
] | 2
|
2021-02-22T05:08:30.000Z
|
2021-04-06T20:29:39.000Z
|
tests/db/test_models.py
|
ruberVulpes/a-discord-bot
|
0996a39b01917bf4f1a9b2a33ca46033ca2c9eb5
|
[
"MIT"
] | null | null | null |
from unittest import TestCase
from db.models import MessageHistory
class TestMessageHistory(TestCase):
def test_repr(self):
self.assertTrue(isinstance(MessageHistory(guild_id=1234, channel_id=1234).__repr__(), str))
| 25.666667
| 99
| 0.779221
| 28
| 231
| 6.178571
| 0.714286
| 0.069364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.039801
| 0.12987
| 231
| 8
| 100
| 28.875
| 0.820896
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
bd24998a6079ebee6b22f87c52a252684ffa666e
| 130
|
py
|
Python
|
brain_games/__init__.py
|
okeangel/python-project-lvl1
|
0b3213e89327540c61d23e4769f162e37fd552c5
|
[
"MIT"
] | null | null | null |
brain_games/__init__.py
|
okeangel/python-project-lvl1
|
0b3213e89327540c61d23e4769f162e37fd552c5
|
[
"MIT"
] | null | null | null |
brain_games/__init__.py
|
okeangel/python-project-lvl1
|
0b3213e89327540c61d23e4769f162e37fd552c5
|
[
"MIT"
] | null | null | null |
"""Brain Games.
This is my Python course level 1 project. Nothing special, it's just
a bundle of mini-games with common CLI.
"""
| 21.666667
| 68
| 0.730769
| 23
| 130
| 4.130435
| 0.956522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009346
| 0.176923
| 130
| 5
| 69
| 26
| 0.878505
| 0.938462
| 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
| 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
| 4
|
bd30d83d53b17f576a74780786262b26f366ceee
| 120
|
py
|
Python
|
tests/asp/weakConstraints/optimization.example3.nonground.gringo.test.py
|
bernardocuteri/wasp
|
05c8f961776dbdbf7afbf905ee00fc262eba51ad
|
[
"Apache-2.0"
] | 19
|
2015-12-03T08:53:45.000Z
|
2022-03-31T02:09:43.000Z
|
tests/asp/weakConstraints/optimization.example3.nonground.gringo.test.py
|
bernardocuteri/wasp
|
05c8f961776dbdbf7afbf905ee00fc262eba51ad
|
[
"Apache-2.0"
] | 80
|
2017-11-25T07:57:32.000Z
|
2018-06-10T19:03:30.000Z
|
tests/asp/weakConstraints/optimization.example3.nonground.gringo.test.py
|
bernardocuteri/wasp
|
05c8f961776dbdbf7afbf905ee00fc262eba51ad
|
[
"Apache-2.0"
] | 6
|
2015-01-15T07:51:48.000Z
|
2020-06-18T14:47:48.000Z
|
input = """
8 2 2 3 0 0
1 4 2 1 3 2
1 4 2 2 2 3
6 0 1 0 4 3
0
4 c
3 b
2 a
0
B+
0
B-
1
0
1
"""
output = """
COST 0@1
"""
| 5.714286
| 12
| 0.458333
| 43
| 120
| 1.27907
| 0.302326
| 0.145455
| 0.109091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.486111
| 0.4
| 120
| 20
| 13
| 6
| 0.277778
| 0
| 0
| 0.1
| 0
| 0
| 0.741667
| 0
| 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
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bd3156e16be406dd8cd490c7e71eadf04ee63f34
| 1,872
|
py
|
Python
|
tests/test_forman_ricci.py
|
heitorbaldo/pyqpath
|
f07b9ac20318356b19399fba181143c910707bb0
|
[
"MIT"
] | 1
|
2021-12-09T23:43:03.000Z
|
2021-12-09T23:43:03.000Z
|
tests/test_forman_ricci.py
|
heitorbaldo/pyqpath
|
f07b9ac20318356b19399fba181143c910707bb0
|
[
"MIT"
] | null | null | null |
tests/test_forman_ricci.py
|
heitorbaldo/pyqpath
|
f07b9ac20318356b19399fba181143c910707bb0
|
[
"MIT"
] | null | null | null |
'''
Unit Test
'''
import unittest
import numpy as np
import math as m
from pyqpath.forman_ricci import *
M1 = np.matrix([[0,0.01,0.01], [0,0,0.01], [0,0,0]]) #directed 2-clique
M2 = np.matrix([[0,0.01,0.01,0.01], [0,0,0.01,0], [0,0,0,0], [0,0.01,0.01,0]]) #directed 3-clique
M3 = np.matrix([[0,0.01,0.01,0.01,0.01], [0,0,0.01,0.01,0], [0,0,0,0,0], [0,0,0.01,0,0], [0,0.01,0.01,0.01,0]]) #directed 4-clique
frc012 = 5 - ( (4/m.sqrt(2*2) + 4/m.sqrt(2*1)) + (4/m.sqrt(4*2) + 4/m.sqrt(4*2)) + (4/m.sqrt(2*2) + 4/m.sqrt(2*1)) )
frc01 = 3 - ( (2/1 + 2/m.sqrt(2)) + (2/2 + 2/2) )
frc0 = 2 - ( 2/1 + 2/m.sqrt(2))
frc1 = 1 - ( 2/m.sqrt(2))
frc0123 = 8 - ( (9/m.sqrt(3*1) + 9/m.sqrt(3*1) + 9/m.sqrt(3*3)) + (9/m.sqrt(9*3) + 9/m.sqrt(9*1) + 9/m.sqrt(9*3))
+ (9/m.sqrt(3*1) + 9/m.sqrt(3*1) + 9/m.sqrt(3*3)) + (9/m.sqrt(9*3) + 9/m.sqrt(9*1) + 9/m.sqrt(9*3)))
frc01234 = 13 - ( (64/m.sqrt(16*1) + 64/m.sqrt(16*4) + 64/m.sqrt(16*2) + 64/m.sqrt(16*2)) +
(64/m.sqrt(64*4) + 64/m.sqrt(64*4) + 64/m.sqrt(64*2) + 64/m.sqrt(64*2)) +
(64/m.sqrt(16*1) + 64/m.sqrt(16*4) + 64/m.sqrt(16*2) + 64/m.sqrt(16*2)) +
(64/m.sqrt(32*4) + 64/m.sqrt(32*1) + 64/m.sqrt(32*4) + 64/m.sqrt(32*2)) +
(64/m.sqrt(32*4) + 64/m.sqrt(32*1) + 64/m.sqrt(32*4) + 64/m.sqrt(32*2))
)
class frcTest(unittest.TestCase):
def test_frc(self):
self.assertEqual(frc_path(M1, [0,1,2]), frc012)
def test_frc(self):
self.assertEqual(frc_path(M1, [0,1]), frc01)
def test_frc(self):
self.assertEqual(frc_path(M1, [0]), frc0)
def test_frc(self):
self.assertEqual(frc_path(M2, [0,1,2,3]), frc0123)
def test_frc(self):
self.assertEqual(frc_path(M3, [0,1,2,3,4]), frc01234)
if __name__ == '__main__':
unittest.main()
| 36.705882
| 130
| 0.512286
| 400
| 1,872
| 2.35
| 0.125
| 0.218085
| 0.148936
| 0.046809
| 0.732979
| 0.724468
| 0.688298
| 0.688298
| 0.557447
| 0.511702
| 0
| 0.219178
| 0.220085
| 1,872
| 51
| 131
| 36.705882
| 0.424658
| 0.032585
| 0
| 0.15625
| 0
| 0
| 0.00444
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 1
| 0.15625
| false
| 0
| 0.125
| 0
| 0.3125
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1fb5f5ef57636514a3d4d059650d597ac6f4e888
| 29
|
py
|
Python
|
tests/test_display/test_widgets/__init__.py
|
MartinHowarth/shimmer
|
541247482748300bbebf9bdec5ecdc19339fe665
|
[
"MIT"
] | 3
|
2019-12-15T12:51:58.000Z
|
2022-01-11T01:35:31.000Z
|
tests/test_display/test_widgets/__init__.py
|
MartinHowarth/shimmer
|
541247482748300bbebf9bdec5ecdc19339fe665
|
[
"MIT"
] | 101
|
2019-12-13T12:21:54.000Z
|
2020-04-28T08:21:35.000Z
|
tests/test_display/test_widgets/__init__.py
|
MartinHowarth/shimmer
|
541247482748300bbebf9bdec5ecdc19339fe665
|
[
"MIT"
] | null | null | null |
"""Tests for GUI widgets."""
| 14.5
| 28
| 0.62069
| 4
| 29
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 29
| 1
| 29
| 29
| 0.72
| 0.758621
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1fcbaab41048310d5e090e163a250eb2730b3c23
| 112
|
py
|
Python
|
posts/apps.py
|
barbaramootian/insta-clone
|
c34384735ffe544cea140db165464716ce920f2c
|
[
"Unlicense",
"MIT"
] | null | null | null |
posts/apps.py
|
barbaramootian/insta-clone
|
c34384735ffe544cea140db165464716ce920f2c
|
[
"Unlicense",
"MIT"
] | null | null | null |
posts/apps.py
|
barbaramootian/insta-clone
|
c34384735ffe544cea140db165464716ce920f2c
|
[
"Unlicense",
"MIT"
] | null | null | null |
from django.apps import AppConfig
class PostsConfig(AppConfig):
name = 'posts'
verbose_name = 'Posts'
| 16
| 33
| 0.714286
| 13
| 112
| 6.076923
| 0.769231
| 0.227848
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.196429
| 112
| 6
| 34
| 18.666667
| 0.877778
| 0
| 0
| 0
| 0
| 0
| 0.09009
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
1fce3e6dc5debe0080aaa3f193f2a363f6d04946
| 126
|
py
|
Python
|
ktrain/__init__.py
|
sathishksankarpandi/ktrain
|
bc9169661592ee14b95d9e56622dbb20e66b3568
|
[
"MIT"
] | null | null | null |
ktrain/__init__.py
|
sathishksankarpandi/ktrain
|
bc9169661592ee14b95d9e56622dbb20e66b3568
|
[
"MIT"
] | null | null | null |
ktrain/__init__.py
|
sathishksankarpandi/ktrain
|
bc9169661592ee14b95d9e56622dbb20e66b3568
|
[
"MIT"
] | null | null | null |
from .version import __version__
from .core import *
__all__ = ['get_learner', 'ArrayTrainer', 'GenTrainer', 'get_predictor']
| 31.5
| 72
| 0.753968
| 14
| 126
| 6.071429
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 126
| 3
| 73
| 42
| 0.758929
| 0
| 0
| 0
| 0
| 0
| 0.365079
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
951518c44c0830035c53945f123d46502c5e1e00
| 2,478
|
py
|
Python
|
chessocr/_nbdev.py
|
idrisr/chessocrnb
|
aa544f246489040630236b135cce54f3cf8e3e51
|
[
"Apache-2.0"
] | null | null | null |
chessocr/_nbdev.py
|
idrisr/chessocrnb
|
aa544f246489040630236b135cce54f3cf8e3e51
|
[
"Apache-2.0"
] | null | null | null |
chessocr/_nbdev.py
|
idrisr/chessocrnb
|
aa544f246489040630236b135cce54f3cf8e3e51
|
[
"Apache-2.0"
] | null | null | null |
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"websites_url": "01-training-data.ipynb",
"m": "01-training-data.ipynb",
"piece_dirs": "01-training-data.ipynb",
"assert_coord": "01-training-data.ipynb",
"Board": "01-training-data.ipynb",
"Boards": "01-training-data.ipynb",
"boards": "01-training-data.ipynb",
"PieceSet": "01-training-data.ipynb",
"PieceSets": "01-training-data.ipynb",
"pieces": "01-training-data.ipynb",
"FEN": "01-training-data.ipynb",
"FENs": "01-training-data.ipynb",
"fens": "01-training-data.ipynb",
"pgn_url": "01-training-data.ipynb",
"pgn": "01-training-data.ipynb",
"small": "01-training-data.ipynb",
"GameBoard": "01-training-data.ipynb",
"sites": "01-training-data.ipynb",
"FileNamer": "01-training-data.ipynb",
"Render": "01-training-data.ipynb",
"NoLabelBBoxLabeler": "03-learner.ipynb",
"BBoxTruth": "03-learner.ipynb",
"iou": "03-learner.ipynb",
"NoLabelBBoxBlock": "03-learner.ipynb",
"Coord": "95-piece-classifier.ipynb",
"CropBox": "95-piece-classifier.ipynb",
"Color": "95-piece-classifier.ipynb",
"Piece": "95-piece-classifier.ipynb",
"BoardImage": "95-piece-classifier.ipynb",
"get_coord": "95-piece-classifier.ipynb",
"Hough": "96_hough.py.ipynb",
"URLs.chess_small": "99_preprocess.ipynb",
"URLs.website": "99_preprocess.ipynb",
"toPIL": "99_preprocess.ipynb",
"color_to_gray": "99_preprocess.ipynb",
"gray_to_bw": "99_preprocess.ipynb",
"is_bw": "99_preprocess.ipynb",
"contourFilter": "99_preprocess.ipynb",
"drawContour": "99_preprocess.ipynb",
"bw_to_contours": "99_preprocess.ipynb",
"draw_hough_lines": "99_preprocess.ipynb",
"draw_hough_linesp": "99_preprocess.ipynb",
"contour_to_hough": "99_preprocess.ipynb",
"color_to_contours": "99_preprocess.ipynb",
"Lines": "99_preprocess.ipynb"}
modules = ["training.py",
"learner.py",
"classifier.py",
"hough.py",
"preprocess.py"]
doc_url = "https://idrisr.github.io/chessocr/"
git_url = "https://github.com/idrisr/chessocr/tree/master/"
def custom_doc_links(name): return None
| 39.967742
| 61
| 0.59322
| 279
| 2,478
| 5.100358
| 0.290323
| 0.140548
| 0.196767
| 0.267041
| 0.262122
| 0.094167
| 0.094167
| 0.094167
| 0.094167
| 0
| 0
| 0.04712
| 0.229217
| 2,478
| 61
| 62
| 40.622951
| 0.697906
| 0.014528
| 0
| 0
| 1
| 0
| 0.614754
| 0.241803
| 0
| 0
| 0
| 0
| 0.018519
| 1
| 0.018519
| false
| 0
| 0
| 0.018519
| 0.018519
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
952371cde252961261a93a98e27a2c6790766c60
| 20
|
py
|
Python
|
data/studio21_generated/interview/1794/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/interview/1794/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/interview/1794/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
def statement1(s):
| 10
| 18
| 0.7
| 3
| 20
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0.15
| 20
| 2
| 19
| 10
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
95276f053c03fad0a58e4f8ba520214b28c65428
| 158
|
py
|
Python
|
ch03/ex3-1.py
|
knuu/Introduction_to_Computing_and_Programming_Using_Python
|
9f211e66f8711b6c35405a1f40f14fcf9637294a
|
[
"MIT"
] | 4
|
2017-12-29T23:06:28.000Z
|
2020-11-08T07:28:25.000Z
|
ch03/ex3-1.py
|
knuu/Introduction_to_Computing_and_Programming_Using_Python
|
9f211e66f8711b6c35405a1f40f14fcf9637294a
|
[
"MIT"
] | null | null | null |
ch03/ex3-1.py
|
knuu/Introduction_to_Computing_and_Programming_Using_Python
|
9f211e66f8711b6c35405a1f40f14fcf9637294a
|
[
"MIT"
] | 1
|
2020-07-01T14:18:37.000Z
|
2020-07-01T14:18:37.000Z
|
n = int(input())
i = 5
while i > 0:
root = 1
while root ** i < n:
root = root + 1
if root ** i == n:
print(root, i)
i = i - 1
| 15.8
| 24
| 0.405063
| 27
| 158
| 2.37037
| 0.407407
| 0.234375
| 0.1875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.05618
| 0.436709
| 158
| 9
| 25
| 17.555556
| 0.662921
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.111111
| 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
| 0
|
0
| 4
|
952d572382375eeea3bce60d8c58656e36459c54
| 161
|
py
|
Python
|
DeepAlignmentNetwork/menpofit/visualize/__init__.py
|
chiawei-liu/DeepAlignmentNetwork
|
52621cd2f697abe372b88c9ea0ee08f0d93b43d8
|
[
"MIT"
] | 220
|
2019-09-01T01:52:04.000Z
|
2022-03-28T12:52:07.000Z
|
DeepAlignmentNetwork/menpofit/visualize/__init__.py
|
chiawei-liu/DeepAlignmentNetwork
|
52621cd2f697abe372b88c9ea0ee08f0d93b43d8
|
[
"MIT"
] | 80
|
2015-01-05T16:17:39.000Z
|
2020-11-22T13:42:00.000Z
|
DeepAlignmentNetwork/menpofit/visualize/__init__.py
|
chiawei-liu/DeepAlignmentNetwork
|
52621cd2f697abe372b88c9ea0ee08f0d93b43d8
|
[
"MIT"
] | 64
|
2015-02-02T15:11:38.000Z
|
2022-02-28T06:19:31.000Z
|
from .textutils import print_progress, statistics_table
from .base import (view_image_multiple_landmarks,
plot_cumulative_error_distribution)
| 40.25
| 55
| 0.782609
| 18
| 161
| 6.555556
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180124
| 161
| 3
| 56
| 53.666667
| 0.893939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
952f22509b26eaf3b895d0a8405f04245d0e465e
| 2,199
|
py
|
Python
|
app/resources/sc.py
|
openstreetmap-polska/gugik2osm
|
60ebd0660ed55e3b3db0f034486a607975c5eb45
|
[
"MIT"
] | 18
|
2020-01-31T11:19:28.000Z
|
2022-01-05T08:58:51.000Z
|
app/resources/sc.py
|
openstreetmap-polska/gugik2osm
|
60ebd0660ed55e3b3db0f034486a607975c5eb45
|
[
"MIT"
] | 103
|
2019-12-11T11:35:01.000Z
|
2022-03-01T21:10:50.000Z
|
app/resources/sc.py
|
openstreetmap-polska/gugik2osm
|
60ebd0660ed55e3b3db0f034486a607975c5eb45
|
[
"MIT"
] | 6
|
2020-12-06T14:53:43.000Z
|
2021-04-18T18:09:29.000Z
|
import json
from flask import request, Response
from flask_restful import Resource, abort
from common.objects import addresses, buildings
class ProposedAddresses(Resource):
def get(self):
min_lon = request.args.get('xmin')
min_lat = request.args.get('ymin')
max_lon = request.args.get('xmax')
max_lat = request.args.get('ymax')
if not all([min_lon, min_lat, max_lon, max_lat]):
abort(400)
min_lon = float(min_lon)
min_lat = float(min_lat)
max_lon = float(max_lon)
max_lat = float(max_lat)
geojson_dict = addresses.proposed_addresses_geojson_dict((min_lon, min_lat, max_lon, max_lat))
return Response(
json.dumps(geojson_dict),
mimetype='application/geo+json',
headers={'Access-Control-Allow-Origin': '*'}
)
class ReportProposedAddress(Resource):
def post(self):
"""Expects body with a list of addresses ids."""
parsed_request = request.get_json()
if parsed_request:
addresses.report_addresses(parsed_request)
else:
abort(400)
return 'OK'
class ProposedBuildings(Resource):
def get(self):
min_lon = request.args.get('xmin')
min_lat = request.args.get('ymin')
max_lon = request.args.get('xmax')
max_lat = request.args.get('ymax')
if not all([min_lon, min_lat, max_lon, max_lat]):
abort(400)
min_lon = float(min_lon)
min_lat = float(min_lat)
max_lon = float(max_lon)
max_lat = float(max_lat)
geojson_dict = buildings.proposed_buildings_geojson_dict((min_lon, min_lat, max_lon, max_lat))
return Response(
json.dumps(geojson_dict),
mimetype='application/geo+json',
headers={'Access-Control-Allow-Origin': '*'}
)
class ReportProposedBuilding(Resource):
def post(self):
"""Expects body with a list of buildings ids."""
parsed_request = request.get_json()
if parsed_request:
buildings.report_buildings(parsed_request)
else:
abort(400)
return 'OK'
| 25.275862
| 102
| 0.613006
| 269
| 2,199
| 4.784387
| 0.223048
| 0.04662
| 0.087024
| 0.055944
| 0.750583
| 0.750583
| 0.750583
| 0.699301
| 0.699301
| 0.629371
| 0
| 0.007585
| 0.280582
| 2,199
| 86
| 103
| 25.569767
| 0.805942
| 0.038654
| 0
| 0.75
| 0
| 0
| 0.062767
| 0.025678
| 0
| 0
| 0
| 0
| 0
| 1
| 0.071429
| false
| 0
| 0.071429
| 0
| 0.285714
| 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
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1f050700680d9e748807e52a652ae5cae2aa2445
| 235
|
py
|
Python
|
aio.api.github/aio/api/github/abstract/label.py
|
Nordix/pytooling
|
b48e70e9098c283d0f17db8016d2f32a2b103a57
|
[
"Apache-2.0"
] | 1
|
2021-12-09T19:24:48.000Z
|
2021-12-09T19:24:48.000Z
|
aio.api.github/aio/api/github/abstract/label.py
|
Nordix/pytooling
|
b48e70e9098c283d0f17db8016d2f32a2b103a57
|
[
"Apache-2.0"
] | 392
|
2021-08-24T15:55:32.000Z
|
2022-03-28T14:26:22.000Z
|
aio.api.github/aio/api/github/abstract/label.py
|
Nordix/pytooling
|
b48e70e9098c283d0f17db8016d2f32a2b103a57
|
[
"Apache-2.0"
] | 3
|
2021-10-06T13:43:11.000Z
|
2021-11-29T13:48:56.000Z
|
import abstracts
from .base import GithubRepoEntity
class AGithubLabel(GithubRepoEntity, metaclass=abstracts.Abstraction):
"""A Github label."""
def __str__(self):
return f"<{self.__class__.__name__} {self.name}>"
| 19.583333
| 70
| 0.719149
| 25
| 235
| 6.28
| 0.72
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161702
| 235
| 11
| 71
| 21.363636
| 0.796954
| 0.06383
| 0
| 0
| 0
| 0
| 0.183099
| 0.122066
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0.2
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
1f1498cf3b8824c0c02cfb04599b082d33cab1c3
| 192
|
py
|
Python
|
scripts/userSetup.py
|
timlehr/hyperdrive
|
f542dd4c2c76ad6a6550fae8f277fd33d0316bdd
|
[
"MIT"
] | 55
|
2019-04-30T06:47:21.000Z
|
2022-02-28T15:42:22.000Z
|
scripts/userSetup.py
|
timlehr/hyperdrive
|
f542dd4c2c76ad6a6550fae8f277fd33d0316bdd
|
[
"MIT"
] | null | null | null |
scripts/userSetup.py
|
timlehr/hyperdrive
|
f542dd4c2c76ad6a6550fae8f277fd33d0316bdd
|
[
"MIT"
] | 10
|
2019-05-07T04:48:51.000Z
|
2022-02-05T02:39:57.000Z
|
_setup_complete = False
if not _setup_complete:
import pymel.core as pm
import hyperdrive
pm.evalDeferred(hyperdrive.utils.mayautil.add_hyperdrive_menu)
_setup_complete = True
| 27.428571
| 66
| 0.78125
| 25
| 192
| 5.68
| 0.68
| 0.274648
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 192
| 7
| 67
| 27.428571
| 0.8875
| 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
| 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
| 4
|
1f297af1feb9e6929527768ca7d35710e47b62df
| 45
|
py
|
Python
|
app/blog/domain/registries.py
|
psychesworld/ddd-blog
|
51c6169f8f2a27a93291f8f6249c0bd1486cad17
|
[
"MIT"
] | null | null | null |
app/blog/domain/registries.py
|
psychesworld/ddd-blog
|
51c6169f8f2a27a93291f8f6249c0bd1486cad17
|
[
"MIT"
] | null | null | null |
app/blog/domain/registries.py
|
psychesworld/ddd-blog
|
51c6169f8f2a27a93291f8f6249c0bd1486cad17
|
[
"MIT"
] | null | null | null |
from ddd import Registry
repos = Registry()
| 11.25
| 24
| 0.755556
| 6
| 45
| 5.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177778
| 45
| 3
| 25
| 15
| 0.918919
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
1f32d0484dc2f8d6cb7e6012cc6bf6aeccbeb364
| 47
|
py
|
Python
|
hello.py
|
Jinjongsoo/jongsoo
|
acb9f88f317e6915833389e8f351f6a7ea77d711
|
[
"MIT"
] | null | null | null |
hello.py
|
Jinjongsoo/jongsoo
|
acb9f88f317e6915833389e8f351f6a7ea77d711
|
[
"MIT"
] | null | null | null |
hello.py
|
Jinjongsoo/jongsoo
|
acb9f88f317e6915833389e8f351f6a7ea77d711
|
[
"MIT"
] | null | null | null |
for i in range(1, 5+1):
print('hello git')
| 15.666667
| 23
| 0.574468
| 10
| 47
| 2.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 0.234043
| 47
| 2
| 24
| 23.5
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0.191489
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 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
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
1f58d6971f939244b6eb7a63f9b386990a416ae9
| 4,211
|
py
|
Python
|
margaret/experiments/topology/generate_plots.py
|
kpandey008/Margaret
|
402da11c9c9c6730553916cbcd5293c040556a08
|
[
"MIT"
] | 2
|
2021-12-01T15:45:27.000Z
|
2021-12-07T17:17:37.000Z
|
margaret/experiments/topology/generate_plots.py
|
kpandey008/Margaret
|
402da11c9c9c6730553916cbcd5293c040556a08
|
[
"MIT"
] | null | null | null |
margaret/experiments/topology/generate_plots.py
|
kpandey008/Margaret
|
402da11c9c9c6730553916cbcd5293c040556a08
|
[
"MIT"
] | 2
|
2021-12-16T06:25:51.000Z
|
2022-03-10T23:55:53.000Z
|
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
def generate_im_box_plots(
metric_file,
paga_file,
colors=None,
show_labels=False,
save_path=None,
save_kwargs={},
figsize=None,
**kwargs,
):
# This code expects the results generated from `compare_global_topology` and is used
# for comparing IM scores between PAGA and our approach
metric_results = pd.read_csv(metric_file, index_col=0)
paga_results = pd.read_csv(paga_file, index_col=0)
assert metric_results.shape == paga_results.shape
datasets = metric_results.index
x_metric = []
x_paga = []
y = []
for dataset in datasets:
metric_res = metric_results.loc[
dataset, ["IM@0.4", "IM@0.6", "IM@0.8", "IM@1.0"]
]
paga_res = paga_results.loc[dataset, ["IM@0.4", "IM@0.6", "IM@0.8", "IM@1.0"]]
# Store average results for a final plot
x_metric.append(metric_res)
x_paga.append(paga_res)
y.append(dataset)
# Generate boxplots
plt.figure(figsize=figsize)
metric_bp = plt.boxplot(
x_metric,
# labels=y,
# labels=["Metric"] * len(x_metric),
patch_artist=True,
positions=np.arange(1, 3 * len(x_metric) + 1, step=3),
**kwargs,
)
paga_bp = plt.boxplot(
x_paga,
# labels=y,
# labels=["PAGA"] * len(x_paga),
patch_artist=True,
positions=np.arange(2, 3 * len(x_paga) + 2, step=3),
**kwargs,
)
if colors is not None:
assert len(colors) == 2
for mp, bp in zip(metric_bp["boxes"], paga_bp["boxes"]):
mp.set(facecolor=colors[0])
bp.set(facecolor=colors[1])
if show_labels:
plt.gca().set_ylabel("IM Score")
plt.gca().set_xlabel("Datasets")
# Remove the right and top axes
plt.gca().spines["right"].set_visible(False)
plt.gca().spines["top"].set_visible(False)
# Dataset names can be big so rotate!
plt.setp(plt.gca().get_xticklabels(), rotation=30, horizontalalignment="right")
# Legend
plt.gca().legend(
[metric_bp["boxes"][0], paga_bp["boxes"][0]],
["Metric", "PAGA"],
# loc="upper right",
)
# Save
if save_path is not None:
plt.savefig(save_path, **save_kwargs)
plt.show()
def generate_im_line_plots(
metric_file,
paga_file,
colors=None,
show_labels=False,
save_path=None,
save_kwargs={},
figsize=None,
**kwargs,
):
# This code expects the results generated from `compare_global_topology` and is used
# for comparing IM scores between PAGA and our approach
metric_results = pd.read_csv(metric_file, index_col=0)
paga_results = pd.read_csv(paga_file, index_col=0)
assert metric_results.shape == paga_results.shape
datasets = metric_results.index
x_metric = []
x_paga = []
y = []
for dataset in datasets:
metric_res = metric_results.loc[
dataset, ["IM@0.4", "IM@0.6", "IM@0.8", "IM@1.0"]
]
paga_res = paga_results.loc[dataset, ["IM@0.4", "IM@0.6", "IM@0.8", "IM@1.0"]]
# Store average results for a final plot
x_metric.append(metric_res.mean())
x_paga.append(paga_res.mean())
y.append(dataset)
# Generate line plots
plt.figure(figsize=figsize)
plt.plot(
y,
x_metric,
color=colors[0] if colors is not None else None,
marker="+",
label="Metric",
**kwargs,
)
plt.plot(
y,
x_paga,
color=colors[1] if colors is not None else None,
marker="o",
label="PAGA",
**kwargs,
)
if show_labels:
plt.gca().set_ylabel("Average IM Score")
plt.gca().set_xlabel("Datasets")
# Remove the right and top axes
plt.gca().spines["right"].set_visible(False)
plt.gca().spines["top"].set_visible(False)
# Dataset names can be big so rotate!
plt.setp(plt.gca().get_xticklabels(), rotation=30, horizontalalignment="right")
# Legend
plt.gca().legend()
# Save
if save_path is not None:
plt.savefig(save_path, **save_kwargs)
plt.show()
| 26.651899
| 88
| 0.599383
| 587
| 4,211
| 4.136286
| 0.206133
| 0.014827
| 0.018534
| 0.026359
| 0.758237
| 0.736409
| 0.710049
| 0.687809
| 0.662273
| 0.662273
| 0
| 0.017805
| 0.266445
| 4,211
| 157
| 89
| 26.821656
| 0.76821
| 0.154358
| 0
| 0.666667
| 1
| 0
| 0.057643
| 0
| 0
| 0
| 0
| 0
| 0.027027
| 1
| 0.018018
| false
| 0
| 0.027027
| 0
| 0.045045
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
2f230d51fd4f76ac4a3f5d241cfc3bb1835c82aa
| 98
|
py
|
Python
|
CarSalon_Project/CarSalon_App/apps.py
|
KSD9/Car-Salon-Web-App
|
e9d28053a5688176709850d406bebdead4f8631f
|
[
"MIT"
] | null | null | null |
CarSalon_Project/CarSalon_App/apps.py
|
KSD9/Car-Salon-Web-App
|
e9d28053a5688176709850d406bebdead4f8631f
|
[
"MIT"
] | null | null | null |
CarSalon_Project/CarSalon_App/apps.py
|
KSD9/Car-Salon-Web-App
|
e9d28053a5688176709850d406bebdead4f8631f
|
[
"MIT"
] | 1
|
2019-01-29T09:47:28.000Z
|
2019-01-29T09:47:28.000Z
|
from django.apps import AppConfig
class CarsalonAppConfig(AppConfig):
name = 'CarSalon_App'
| 16.333333
| 35
| 0.77551
| 11
| 98
| 6.818182
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153061
| 98
| 5
| 36
| 19.6
| 0.903614
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 4
|
2f3c197ef46defd408fe13cb8f494d5e9cf16e3c
| 200
|
py
|
Python
|
src/routes/__init__.py
|
spaezsuarez/view-data-app
|
6482b73eb39048e5dbdf133d4ccf29cc357dcb6f
|
[
"MIT"
] | 1
|
2021-05-28T17:01:17.000Z
|
2021-05-28T17:01:17.000Z
|
src/routes/__init__.py
|
spaezsuarez/view-data-app
|
6482b73eb39048e5dbdf133d4ccf29cc357dcb6f
|
[
"MIT"
] | null | null | null |
src/routes/__init__.py
|
spaezsuarez/view-data-app
|
6482b73eb39048e5dbdf133d4ccf29cc357dcb6f
|
[
"MIT"
] | null | null | null |
from flask import Blueprint
dataRoute = Blueprint('data',__name__,url_prefix = '/data')
formRoute = Blueprint('forms',__name__,url_prefix='/form')
from . import dataNetwork
from . import formNetwork
| 28.571429
| 59
| 0.775
| 24
| 200
| 6.041667
| 0.583333
| 0.096552
| 0.17931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105
| 200
| 7
| 60
| 28.571429
| 0.810056
| 0
| 0
| 0
| 0
| 0
| 0.094527
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0.6
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
2f4e60bcdcc0e0290ebba4fa95679b9add90341b
| 612
|
py
|
Python
|
helpers/uris.py
|
arfrank/Fake-Twilio-Api
|
3ed180d8ea81747f8afaba92af8f47e4397de480
|
[
"Unlicense"
] | 6
|
2015-06-22T19:32:08.000Z
|
2021-03-19T05:14:14.000Z
|
helpers/uris.py
|
arfrank/Fake-Twilio-Api
|
3ed180d8ea81747f8afaba92af8f47e4397de480
|
[
"Unlicense"
] | null | null | null |
helpers/uris.py
|
arfrank/Fake-Twilio-Api
|
3ed180d8ea81747f8afaba92af8f47e4397de480
|
[
"Unlicense"
] | 2
|
2016-04-13T14:44:32.000Z
|
2021-04-12T14:41:24.000Z
|
import math
def FirstUri(Page,PageSize,Count,Path):
return Path+'?PageSize='+str(PageSize)+'&Page=0'
def LastUri(Page,PageSize,Count,Path):
LastPage = math.ceil(float(Count)/PageSize)-1
return Path+'?PageSize='+str(PageSize)+'&Page='+str(LastPage)
def NextUri(Page,PageSize,Count,Path):
if ((Page*PageSize)+PageSize) < Count:
return Path+'?PageSize='+str(PageSize)+'&Page='+str(Page+1)
else:
return ""
def PrevUri(Page,PageSize,Count,Path):
if Page == 0:
return ""
else:
return Path+'?PageSize='+str(PageSize)+'&Page='+str(Page-1)
def CurUri(Path,QueryString):
return Path+'?'+QueryString
| 26.608696
| 62
| 0.70098
| 85
| 612
| 5.047059
| 0.258824
| 0.13986
| 0.158508
| 0.195804
| 0.477855
| 0.477855
| 0.275058
| 0.191142
| 0.191142
| 0
| 0
| 0.009091
| 0.101307
| 612
| 23
| 63
| 26.608696
| 0.770909
| 0
| 0
| 0.222222
| 0
| 0
| 0.107667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.277778
| false
| 0
| 0.055556
| 0.111111
| 0.722222
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
85e26f223f1cc5e733da75198b363980d3e47a0e
| 64
|
py
|
Python
|
24p.py
|
lingjf/24p
|
9fdd0a14944ea9b382face368a0a1d3d355ba146
|
[
"Apache-2.0"
] | null | null | null |
24p.py
|
lingjf/24p
|
9fdd0a14944ea9b382face368a0a1d3d355ba146
|
[
"Apache-2.0"
] | null | null | null |
24p.py
|
lingjf/24p
|
9fdd0a14944ea9b382face368a0a1d3d355ba146
|
[
"Apache-2.0"
] | null | null | null |
from p24 import p24
if __name__ == '__main__':
p24.main()
| 10.666667
| 26
| 0.640625
| 9
| 64
| 3.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 0.234375
| 64
| 5
| 27
| 12.8
| 0.55102
| 0
| 0
| 0
| 0
| 0
| 0.126984
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 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
| 0
| 0
|
0
| 4
|
c80d5a71b2b61db3c4036c93bb2d1817a57d3b55
| 1,343
|
py
|
Python
|
jhu_primitives/__init__.py
|
jagterberg/primitives-interfaces
|
b5d31999593baa926a4fbd5d3bdd752d8c468e6a
|
[
"Apache-2.0"
] | null | null | null |
jhu_primitives/__init__.py
|
jagterberg/primitives-interfaces
|
b5d31999593baa926a4fbd5d3bdd752d8c468e6a
|
[
"Apache-2.0"
] | null | null | null |
jhu_primitives/__init__.py
|
jagterberg/primitives-interfaces
|
b5d31999593baa926a4fbd5d3bdd752d8c468e6a
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import
__all__ = ["AdjacencySpectralEmbedding",
"LaplacianSpectralEmbedding", "DimensionSelection",
"GaussianClustering", "LargestConnectedComponent","NonParametricClustering",
"NumberOfClusters", "OutOfCoreAdjacencySpectralEmbedding", "PassToRanks",
"SpectralGraphClustering", "SeededGraphMatching",
"VertexNominationSeededGraphMatching"]
from .ase import AdjacencySpectralEmbedding
from .lse import LaplacianSpectralEmbedding
from .dimselect import DimensionSelection
from .gclust import GaussianClustering
from .lcc import LargestConnectedComponent
from .nonpar import NonParametricClustering
from .numclust import NumberOfClusters
from .oocase import OutOfCoreAdjacencySpectralEmbedding
from .ptr import PassToRanks
from .sgc import SpectralGraphClustering
from .sgm import SeededGraphMatching
from .vnsgm import VertexNominationSeededGraphMatching
"""
__all__ = ['AdjacencySpectralEmbedding', 'LaplacianSpectralEmbedding',
'DimensionSelection', 'GaussianClustering', 'NonParametricClustering',
,'LargestConnectedComponent',
'NumberOfClusters', 'OutOfCoreAdjacencySpectralEmbedding', 'PassToRanks',
'SpectralGraphClustering', 'SeededGraphMatching',
'VertexNominationSeededGraphMatching']
"""
| 41.96875
| 87
| 0.783321
| 79
| 1,343
| 13.151899
| 0.367089
| 0.055823
| 0.105871
| 0.14052
| 0.442733
| 0.267565
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145942
| 1,343
| 31
| 88
| 43.322581
| 0.905841
| 0
| 0
| 0
| 0
| 0
| 0.291005
| 0.204233
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.105263
| 0.684211
| 0
| 0.684211
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
c80e8e6f906beb6b375117aca960706f148230af
| 130
|
py
|
Python
|
RaspberryPi/micro_controller/__init__.py
|
Ernstsen/RC-car
|
eda8ec6ae28686380c06f442c889ea89a077315b
|
[
"MIT"
] | null | null | null |
RaspberryPi/micro_controller/__init__.py
|
Ernstsen/RC-car
|
eda8ec6ae28686380c06f442c889ea89a077315b
|
[
"MIT"
] | 3
|
2021-03-23T15:13:14.000Z
|
2021-03-23T16:15:20.000Z
|
RaspberryPi/micro_controller/__init__.py
|
Ernstsen/RC-car
|
eda8ec6ae28686380c06f442c889ea89a077315b
|
[
"MIT"
] | null | null | null |
from .controller import Controller
from .micro_controller import VehicleController
__all__ = ["Controller", "VehicleController"]
| 26
| 47
| 0.823077
| 12
| 130
| 8.5
| 0.5
| 0.313725
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 130
| 4
| 48
| 32.5
| 0.871795
| 0
| 0
| 0
| 0
| 0
| 0.207692
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c81cd92bc494b1a52aa3351506da14104b4e4f36
| 85
|
py
|
Python
|
setup/apps.py
|
SlapBass/nx-portal
|
ee262079db1e5230a24ebbc205e44926f11f8da9
|
[
"Apache-2.0"
] | 115
|
2020-09-05T21:21:50.000Z
|
2022-03-28T18:04:52.000Z
|
setup/apps.py
|
SlapBass/nx-portal
|
ee262079db1e5230a24ebbc205e44926f11f8da9
|
[
"Apache-2.0"
] | 101
|
2020-06-26T19:51:24.000Z
|
2021-03-28T09:35:55.000Z
|
setup/apps.py
|
SlapBass/nx-portal
|
ee262079db1e5230a24ebbc205e44926f11f8da9
|
[
"Apache-2.0"
] | 23
|
2020-10-13T09:41:57.000Z
|
2022-03-28T14:05:28.000Z
|
from django.apps import AppConfig
class SetupConfig(AppConfig):
name = 'setup'
| 14.166667
| 33
| 0.741176
| 10
| 85
| 6.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 85
| 5
| 34
| 17
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 4
|
c837557c749cdf381883de5ed72c489da737938c
| 512
|
py
|
Python
|
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/healpy/test/test_doctest_cython.py
|
MobileAnalytics/iPython-Framework
|
da0e598308c067cd5c5290a6364b3ffaf2d2418f
|
[
"MIT"
] | 4
|
2018-07-04T17:20:12.000Z
|
2019-07-14T18:07:25.000Z
|
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/healpy/test/test_doctest_cython.py
|
MobileAnalytics/iPython-Framework
|
da0e598308c067cd5c5290a6364b3ffaf2d2418f
|
[
"MIT"
] | null | null | null |
SprityBird/spritybird/python3.5/lib/python3.5/site-packages/healpy/test/test_doctest_cython.py
|
MobileAnalytics/iPython-Framework
|
da0e598308c067cd5c5290a6364b3ffaf2d2418f
|
[
"MIT"
] | 1
|
2018-09-03T03:02:06.000Z
|
2018-09-03T03:02:06.000Z
|
import unittest
import doctest
from .. import _query_disc
from .. import _pixelfunc
# FIXME: I can't get py.test to recognize test suites returned with
# doctest.DocTestSuite.
class TestDoctestCython(unittest.TestCase):
def test_query_disc(self):
failed, passed = doctest.testmod(_query_disc)
self.assertEqual(failed, 0)
def test_pixelfunc(self):
failed, passed = doctest.testmod(_pixelfunc)
self.assertEqual(failed, 0)
if __name__ == '__main__':
unittest.main()
| 24.380952
| 67
| 0.716797
| 63
| 512
| 5.555556
| 0.52381
| 0.077143
| 0.074286
| 0.131429
| 0.171429
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004831
| 0.191406
| 512
| 20
| 68
| 25.6
| 0.84058
| 0.169922
| 0
| 0.153846
| 0
| 0
| 0.018957
| 0
| 0
| 0
| 0
| 0.05
| 0.153846
| 1
| 0.153846
| false
| 0.153846
| 0.307692
| 0
| 0.538462
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
c8679cb9a7bbe57ba3abc2840b862ca406a059e8
| 38
|
py
|
Python
|
ch6/run.py
|
PacktPublishing/Mastering-Microservices-with-Python
|
cc7d3292b3fa7be9c845a0b5538073322dec68f1
|
[
"MIT"
] | 4
|
2019-03-26T15:26:19.000Z
|
2021-10-16T16:37:57.000Z
|
ch6/run.py
|
PacktPublishing/Mastering-Microservices-with-Python
|
cc7d3292b3fa7be9c845a0b5538073322dec68f1
|
[
"MIT"
] | null | null | null |
ch6/run.py
|
PacktPublishing/Mastering-Microservices-with-Python
|
cc7d3292b3fa7be9c845a0b5538073322dec68f1
|
[
"MIT"
] | 3
|
2019-10-20T15:35:15.000Z
|
2021-09-02T11:17:46.000Z
|
from app import core
app = core.run()
| 12.666667
| 20
| 0.710526
| 7
| 38
| 3.857143
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.184211
| 38
| 3
| 21
| 12.666667
| 0.870968
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c07bdbf8218c5cbcc76976e32c0cc7fbfe9bbc45
| 327
|
py
|
Python
|
src/rules/spotify.py
|
bazingaterry/JigsawRules
|
34d62198b8f08cca2f7f915268262ef1bf4a57b3
|
[
"MIT"
] | 4
|
2017-09-23T17:18:32.000Z
|
2018-04-01T03:49:42.000Z
|
src/rules/spotify.py
|
bazingaterry/JigsawRules
|
34d62198b8f08cca2f7f915268262ef1bf4a57b3
|
[
"MIT"
] | null | null | null |
src/rules/spotify.py
|
bazingaterry/JigsawRules
|
34d62198b8f08cca2f7f915268262ef1bf4a57b3
|
[
"MIT"
] | null | null | null |
from rules.rules import Rules
class Spotify(Rules):
def __str__(self):
return '''# Rule for Spotify
USER-AGENT,Spotify/*,{proxy_group}
DOMAIN-SUFFIX,spotify.com,{proxy_group}
DOMAIN-SUFFIX,adjust.com,{proxy_group}
DOMAIN-SUFFIX,scdn.co,{proxy_group}
'''.format(
proxy_group=self.proxy_group
)
| 23.357143
| 40
| 0.700306
| 44
| 327
| 4.977273
| 0.5
| 0.273973
| 0.219178
| 0.30137
| 0.228311
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.165138
| 327
| 13
| 41
| 25.153846
| 0.802198
| 0
| 0
| 0
| 0
| 0
| 0.51682
| 0.446483
| 0
| 0
| 0
| 0
| 0
| 1
| 0.090909
| false
| 0
| 0.090909
| 0.090909
| 0.363636
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c081d14f8361181059b4d07d5efd9abfd8f6c965
| 26
|
py
|
Python
|
uwsgi_it_api/config.py
|
mikamai/uwsgi.it
|
d2f11ae850efda43532454ab70aa50540df0011b
|
[
"MIT"
] | null | null | null |
uwsgi_it_api/config.py
|
mikamai/uwsgi.it
|
d2f11ae850efda43532454ab70aa50540df0011b
|
[
"MIT"
] | null | null | null |
uwsgi_it_api/config.py
|
mikamai/uwsgi.it
|
d2f11ae850efda43532454ab70aa50540df0011b
|
[
"MIT"
] | null | null | null |
UWSGI_IT_BASE_UID = 30000
| 13
| 25
| 0.846154
| 5
| 26
| 3.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.217391
| 0.115385
| 26
| 1
| 26
| 26
| 0.608696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c0851bc8c493a53d41b04dc21d3c268cac401581
| 83
|
py
|
Python
|
algorithm/codility.com/20160403/binary.py
|
leonard-sxy/algorithm-practice
|
4efde003a085b57201f364e7590e454d6b066e6d
|
[
"MIT"
] | 1
|
2016-03-29T06:16:40.000Z
|
2016-03-29T06:16:40.000Z
|
algorithm/codility.com/20160403/binary.py
|
leonard-sxy/algorithm-practice
|
4efde003a085b57201f364e7590e454d6b066e6d
|
[
"MIT"
] | null | null | null |
algorithm/codility.com/20160403/binary.py
|
leonard-sxy/algorithm-practice
|
4efde003a085b57201f364e7590e454d6b066e6d
|
[
"MIT"
] | null | null | null |
def solution(A, B):
tmp = '{0:b}'.format(A * B)
return list(tmp).count('1')
| 11.857143
| 29
| 0.542169
| 15
| 83
| 3
| 0.733333
| 0.088889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030303
| 0.204819
| 83
| 6
| 30
| 13.833333
| 0.651515
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
c0946a8da2a0ae5b5d02a64966a60d84109b332e
| 230
|
py
|
Python
|
src/factiva/news/snapshot/__init__.py
|
wizeline/factiva-news-python
|
8f0eb680850752b78776fcbaa979c30329700d80
|
[
"MIT"
] | 1
|
2021-06-01T17:21:49.000Z
|
2021-06-01T17:21:49.000Z
|
src/factiva/news/snapshot/__init__.py
|
wizeline/factiva-news-python
|
8f0eb680850752b78776fcbaa979c30329700d80
|
[
"MIT"
] | 1
|
2021-07-01T04:51:31.000Z
|
2021-07-01T04:51:31.000Z
|
src/factiva/news/snapshot/__init__.py
|
wizeline/factiva-news-python
|
8f0eb680850752b78776fcbaa979c30329700d80
|
[
"MIT"
] | 2
|
2021-06-04T04:04:54.000Z
|
2021-06-08T06:05:47.000Z
|
"""Define methods and properties for Snapshot class."""
__all__ = ['query', 'jobs', 'snapshot']
from .query import SnapshotQuery
from .jobs import AnalyticsJob, ExplainJob, ExtractionJob, UpdateJob
from .snapshot import Snapshot
| 32.857143
| 68
| 0.773913
| 26
| 230
| 6.692308
| 0.653846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121739
| 230
| 6
| 69
| 38.333333
| 0.861386
| 0.213043
| 0
| 0
| 0
| 0
| 0.097143
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c0a657de4b6ed1912e57cba7ad269ab5f9d186da
| 397
|
py
|
Python
|
util/tuple_util.py
|
shyammarjit/missionaries-and-cannibals
|
2a9563b292b9e3db009dbc495d464597b7f4b00d
|
[
"MIT"
] | 17
|
2019-01-30T16:24:00.000Z
|
2022-02-28T09:50:05.000Z
|
util/tuple_util.py
|
shyammarjit/missionaries-and-cannibals
|
2a9563b292b9e3db009dbc495d464597b7f4b00d
|
[
"MIT"
] | null | null | null |
util/tuple_util.py
|
shyammarjit/missionaries-and-cannibals
|
2a9563b292b9e3db009dbc495d464597b7f4b00d
|
[
"MIT"
] | 8
|
2018-04-28T17:17:24.000Z
|
2022-03-16T16:40:07.000Z
|
import operator
def add_tuples(a, b):
return operate_on_tuples(a, b, operator.add)
def subtract_tuples(a, b):
return operate_on_tuples(a, b, operator.sub)
def operate_on_tuples(a, b, operation):
return tuple(map(operation, a, b))
def contains_negative(collection):
"""Return True if any negative value exists in the collection."""
return any(n < 0 for n in collection)
| 20.894737
| 69
| 0.712846
| 63
| 397
| 4.349206
| 0.444444
| 0.043796
| 0.145985
| 0.175182
| 0.346715
| 0.284672
| 0.284672
| 0.284672
| 0.284672
| 0.284672
| 0
| 0.003077
| 0.18136
| 397
| 18
| 70
| 22.055556
| 0.84
| 0.148615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.444444
| false
| 0
| 0.111111
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
c0aa6d22a53794e14dca7d74ef2df077c2a3f19d
| 35
|
py
|
Python
|
app/services/nomics/rest_api_to_db/abstract/sources/__init__.py
|
Tinitto/crypto-exchange
|
cb61664ff0119d8120315b8c6feb77aeba0ec050
|
[
"MIT"
] | null | null | null |
app/services/nomics/rest_api_to_db/abstract/sources/__init__.py
|
Tinitto/crypto-exchange
|
cb61664ff0119d8120315b8c6feb77aeba0ec050
|
[
"MIT"
] | null | null | null |
app/services/nomics/rest_api_to_db/abstract/sources/__init__.py
|
Tinitto/crypto-exchange
|
cb61664ff0119d8120315b8c6feb77aeba0ec050
|
[
"MIT"
] | null | null | null |
"""Entry point for the package"""
| 11.666667
| 33
| 0.657143
| 5
| 35
| 4.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171429
| 35
| 2
| 34
| 17.5
| 0.793103
| 0.771429
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c0bf62c64b1ec79f5a7e564eeccc3418bdd831e4
| 165
|
py
|
Python
|
Chapter04/diff_sort.py
|
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
|
805d00c7a54927ba94c9077e9a580508ee3c5e56
|
[
"MIT"
] | 13
|
2018-06-21T01:44:49.000Z
|
2021-12-01T10:49:53.000Z
|
Chapter04/diff_sort.py
|
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
|
805d00c7a54927ba94c9077e9a580508ee3c5e56
|
[
"MIT"
] | null | null | null |
Chapter04/diff_sort.py
|
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
|
805d00c7a54927ba94c9077e9a580508ee3c5e56
|
[
"MIT"
] | 6
|
2018-10-05T08:29:24.000Z
|
2022-01-11T14:49:50.000Z
|
>>> l = [[3, 56], [2, 34], [6, 98], [1, 43]]
>>> def diffSort(item):
... return item[1]
...
>>> l.sort(key=diffSort)
>>> l
[[2, 34], [1, 43], [3, 56], [6, 98]]
| 20.625
| 44
| 0.412121
| 28
| 165
| 2.428571
| 0.535714
| 0.088235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.192308
| 0.212121
| 165
| 7
| 45
| 23.571429
| 0.330769
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c0eefc907956d96eb17850904422b01e72419604
| 378
|
py
|
Python
|
package/tests/database/test_settings.py
|
R-fred/awesome-streamlit
|
10f2b132bc8e61a82edfacb4b3bb36d0da6c63d3
|
[
"CC0-1.0"
] | 1,194
|
2019-10-09T06:15:27.000Z
|
2022-03-31T14:53:00.000Z
|
package/tests/database/test_settings.py
|
R-fred/awesome-streamlit
|
10f2b132bc8e61a82edfacb4b3bb36d0da6c63d3
|
[
"CC0-1.0"
] | 55
|
2019-10-09T12:08:39.000Z
|
2022-02-10T00:48:53.000Z
|
package/tests/database/test_settings.py
|
R-fred/awesome-streamlit
|
10f2b132bc8e61a82edfacb4b3bb36d0da6c63d3
|
[
"CC0-1.0"
] | 272
|
2019-10-09T12:04:31.000Z
|
2022-03-29T02:43:30.000Z
|
"""In this module we test that there is a module settings and is has the required
attributes and functionality"""
from awesome_streamlit.database import settings
def test_github():
"""Test that there is a GITHUB_URL Setting"""
assert settings.GITHUB_URL
def test_github_raw():
"""Test that there is a GITHUB_RAW_URL Setting"""
assert settings.GITHUB_RAW_URL
| 27
| 81
| 0.756614
| 58
| 378
| 4.758621
| 0.465517
| 0.086957
| 0.141304
| 0.163043
| 0.434783
| 0.15942
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171958
| 378
| 13
| 82
| 29.076923
| 0.881789
| 0.505291
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.4
| 1
| 0.4
| true
| 0
| 0.2
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
23857b2a02d5406d86353a8a102e8521dbfaf4ba
| 312
|
py
|
Python
|
public/neumeeditor/helpers/importers/abstract_importer.py
|
jacobsanz97/cantus
|
37d139ae20972c36d4abb96a2a5ac5106b0c1b47
|
[
"MIT"
] | null | null | null |
public/neumeeditor/helpers/importers/abstract_importer.py
|
jacobsanz97/cantus
|
37d139ae20972c36d4abb96a2a5ac5106b0c1b47
|
[
"MIT"
] | null | null | null |
public/neumeeditor/helpers/importers/abstract_importer.py
|
jacobsanz97/cantus
|
37d139ae20972c36d4abb96a2a5ac5106b0c1b47
|
[
"MIT"
] | null | null | null |
class AbstractImporter():
"""
Abstract class describing a file importer
"""
def __init__(self, file_string, file_name=None):
self.file_string = file_string
self.file_name = file_name
def import_data(self):
raise NotImplementedError("AbstractImporter is abstract.")
| 24
| 66
| 0.679487
| 35
| 312
| 5.742857
| 0.514286
| 0.119403
| 0.139303
| 0.179104
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.233974
| 312
| 12
| 67
| 26
| 0.841004
| 0.13141
| 0
| 0
| 0
| 0
| 0.114625
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.5
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
23adefcd54bcabbaa25021b4f6e66a8f7b608325
| 185
|
py
|
Python
|
app.py
|
baturin/montage
|
9d1bb640d0d4f78359000d18de2206be84c12be0
|
[
"BSD-3-Clause"
] | null | null | null |
app.py
|
baturin/montage
|
9d1bb640d0d4f78359000d18de2206be84c12be0
|
[
"BSD-3-Clause"
] | null | null | null |
app.py
|
baturin/montage
|
9d1bb640d0d4f78359000d18de2206be84c12be0
|
[
"BSD-3-Clause"
] | null | null | null |
# this file is only used by wmflabs for hosting
from montage.app import create_app
from montage.utils import get_env_name
env_name = get_env_name()
app = create_app(env_name=env_name)
| 26.428571
| 47
| 0.810811
| 34
| 185
| 4.147059
| 0.529412
| 0.248227
| 0.141844
| 0.198582
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135135
| 185
| 6
| 48
| 30.833333
| 0.88125
| 0.243243
| 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
| 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
| 0
| 0
|
0
| 4
|
9b19d4a0f2e4db0a63648a626965a5728b2d4853
| 59
|
py
|
Python
|
test.py
|
DSAIL-SKKU/WaveNet-Vocoder
|
e1e7f86dab85149162b7f8011a2a2c8424ac4036
|
[
"MIT"
] | 61
|
2018-04-11T11:42:51.000Z
|
2021-12-28T04:21:56.000Z
|
test.py
|
DSAIL-SKKU/WaveNet-Vocoder
|
e1e7f86dab85149162b7f8011a2a2c8424ac4036
|
[
"MIT"
] | 11
|
2018-04-11T09:50:07.000Z
|
2020-10-05T06:39:22.000Z
|
test.py
|
DSAIL-SKKU/WaveNet-Vocoder
|
e1e7f86dab85149162b7f8011a2a2c8424ac4036
|
[
"MIT"
] | 13
|
2018-04-11T11:42:52.000Z
|
2020-05-07T07:06:36.000Z
|
"""
Test cases for evaluation of codes will be located.
"""
| 19.666667
| 51
| 0.711864
| 9
| 59
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.169492
| 59
| 3
| 52
| 19.666667
| 0.857143
| 0.864407
| 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
| 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
| 4
|
f1922210cf7f10eaaf3abd8a54fc88827374432a
| 219
|
py
|
Python
|
funciones.py
|
Gambl3r08/ejercicios-Python
|
ddf13b40c611f892112ebbe7bc907f5765998ea0
|
[
"MIT"
] | null | null | null |
funciones.py
|
Gambl3r08/ejercicios-Python
|
ddf13b40c611f892112ebbe7bc907f5765998ea0
|
[
"MIT"
] | null | null | null |
funciones.py
|
Gambl3r08/ejercicios-Python
|
ddf13b40c611f892112ebbe7bc907f5765998ea0
|
[
"MIT"
] | null | null | null |
def saludar():
return "Hola mundo"
saludar()
print(saludar())
print('----------')
m = saludar()
print(m)
print('------------')
def saludo(nombre, mensaje='hola '):
print(mensaje, nombre)
saludo('roberto')
| 12.166667
| 36
| 0.570776
| 24
| 219
| 5.208333
| 0.458333
| 0.288
| 0.208
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155251
| 219
| 17
| 37
| 12.882353
| 0.675676
| 0
| 0
| 0
| 0
| 0
| 0.202765
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.181818
| false
| 0
| 0
| 0.090909
| 0.272727
| 0.454545
| 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
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
f1d720d43b5264d84b6b176f070e1f5cca464c6c
| 718
|
py
|
Python
|
python-lib/dkulib/io_utils/__init__.py
|
dataiku/dss-plugin-nlp-deepl-translation
|
20289c7f99f65be475f265b26aae147c1b4b4f96
|
[
"Apache-2.0"
] | 91
|
2022-02-11T07:48:42.000Z
|
2022-03-25T10:07:18.000Z
|
python-lib/dkulib/io_utils/__init__.py
|
dataiku/dss-plugin-nlp-deepl-translation
|
20289c7f99f65be475f265b26aae147c1b4b4f96
|
[
"Apache-2.0"
] | 12
|
2021-01-11T14:28:28.000Z
|
2021-08-24T19:21:59.000Z
|
python-lib/dkulib/io_utils/__init__.py
|
dataiku/dss-plugin-nlp-deepl-translation
|
20289c7f99f65be475f265b26aae147c1b4b4f96
|
[
"Apache-2.0"
] | 9
|
2022-02-14T09:53:21.000Z
|
2022-03-16T13:35:41.000Z
|
########################################################
# ------------- io_utils: 0.1.0 ----------------
# For more information, see https://github.com/dataiku/dss-plugin-dkulib/tree/main/core/io_utils
# Library version: 0.1.0
# Last update: 2021-01-11
# Author: Dataiku (Alex Combessie)
#########################################################
from .plugin_io_utils import clean_empty_list # noqa
from .plugin_io_utils import clean_text_df # noqa
from .plugin_io_utils import generate_unique # noqa
from .plugin_io_utils import move_columns_after # noqa
from .plugin_io_utils import time_logging # noqa
from .plugin_io_utils import truncate_text_list # noqa
from .plugin_io_utils import unique_list # noqa
| 42.235294
| 96
| 0.633705
| 95
| 718
| 4.505263
| 0.463158
| 0.147196
| 0.196262
| 0.278037
| 0.474299
| 0.474299
| 0.14486
| 0
| 0
| 0
| 0
| 0.021841
| 0.107242
| 718
| 16
| 97
| 44.875
| 0.645866
| 0.356546
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
7b0ebbc15e2eb41292230fa170263f95d075f230
| 310
|
py
|
Python
|
baselines/problems/__init__.py
|
serizba/multi-obj-baselines
|
b5c97b8009ed32f0eb9a08454cf0d4c6620a2286
|
[
"Apache-2.0"
] | null | null | null |
baselines/problems/__init__.py
|
serizba/multi-obj-baselines
|
b5c97b8009ed32f0eb9a08454cf0d4c6620a2286
|
[
"Apache-2.0"
] | null | null | null |
baselines/problems/__init__.py
|
serizba/multi-obj-baselines
|
b5c97b8009ed32f0eb9a08454cf0d4c6620a2286
|
[
"Apache-2.0"
] | null | null | null |
from .simple_problems import get_branin_currin, BraninCurrinEvalFunction
from .nas_bench_201 import get_nasbench201, NasBench201NPY, get_nasbench201_cs
from .hw_nas_bench import get_fbnasbench
from .fashion import get_fashion
from .flowers import get_flowers
from .nas_bench_search_space import NASSearchSpace
| 44.285714
| 78
| 0.883871
| 43
| 310
| 6
| 0.488372
| 0.174419
| 0.093023
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042403
| 0.087097
| 310
| 6
| 79
| 51.666667
| 0.869258
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 4
|
7b2245404c52ebb5272241d5478933af66968733
| 124
|
py
|
Python
|
Python/7kyu/Credit Card Mask/solution.py
|
DanielSouzaBertoldi/codewars-solutions
|
b7d8643750208c5fc20bed2fd7809e5751efd5c1
|
[
"MIT"
] | null | null | null |
Python/7kyu/Credit Card Mask/solution.py
|
DanielSouzaBertoldi/codewars-solutions
|
b7d8643750208c5fc20bed2fd7809e5751efd5c1
|
[
"MIT"
] | null | null | null |
Python/7kyu/Credit Card Mask/solution.py
|
DanielSouzaBertoldi/codewars-solutions
|
b7d8643750208c5fc20bed2fd7809e5751efd5c1
|
[
"MIT"
] | null | null | null |
# return masked string
def maskify(cc):
if len(cc) < 5:
return cc
return '#' * int(len(cc)-4) + cc[-4:]
| 20.666667
| 41
| 0.516129
| 19
| 124
| 3.368421
| 0.578947
| 0.15625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034884
| 0.306452
| 124
| 6
| 41
| 20.666667
| 0.709302
| 0.16129
| 0
| 0
| 0
| 0
| 0.009709
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
9e38d8f0d7b1bf9ece3c68cbb214e5ab7a011eeb
| 244
|
py
|
Python
|
async_signalr_client/__init__.py
|
jvillacorta/async-signalr-client
|
5cdb9d8f89c37a0ad5ba6e85df541b1346cbf50d
|
[
"MIT"
] | 2
|
2020-04-21T09:09:33.000Z
|
2021-02-06T21:26:27.000Z
|
async_signalr_client/__init__.py
|
jvillacorta/async-signalr-client
|
5cdb9d8f89c37a0ad5ba6e85df541b1346cbf50d
|
[
"MIT"
] | 1
|
2020-07-09T09:22:52.000Z
|
2020-07-09T09:22:52.000Z
|
async_signalr_client/__init__.py
|
jvillacorta/async-signalr-client
|
5cdb9d8f89c37a0ad5ba6e85df541b1346cbf50d
|
[
"MIT"
] | null | null | null |
from .connection import Connection, SignalRConnectionState
from . import models, transports, protocols, exceptions
__all__ = [
"Connection",
"SignalRConnectionState",
"models",
"transports",
"protocols",
"exceptions"
]
| 20.333333
| 58
| 0.70082
| 18
| 244
| 9.277778
| 0.5
| 0.383234
| 0.299401
| 0.419162
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.192623
| 244
| 11
| 59
| 22.181818
| 0.847716
| 0
| 0
| 0
| 0
| 0
| 0.27459
| 0.090164
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0
| 1
| 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
| 0
| 0
| 0
| 0
|
0
| 4
|
9e95b158017ecdc2e470dedd9dfc335ce10bae52
| 91
|
py
|
Python
|
django/enterprise/user_token/apps.py
|
Pu-Yongjun/enterprise
|
386f4f05948e17589e84263b5451b0f3b958135f
|
[
"Apache-2.0"
] | 1
|
2020-12-11T05:46:38.000Z
|
2020-12-11T05:46:38.000Z
|
django/enterprise/user_token/apps.py
|
Pu-Yongjun/enterprise
|
386f4f05948e17589e84263b5451b0f3b958135f
|
[
"Apache-2.0"
] | 11
|
2020-06-05T19:49:42.000Z
|
2022-03-02T15:12:51.000Z
|
django/enterprise/user_token/apps.py
|
parker-pu/enterprise
|
386f4f05948e17589e84263b5451b0f3b958135f
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class ManageConfig(AppConfig):
name = 'user_token'
| 15.166667
| 33
| 0.758242
| 11
| 91
| 6.181818
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164835
| 91
| 5
| 34
| 18.2
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0.10989
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 4
|
9eaa5756848cdaaaa6f4d882eeba506b5302c5e9
| 287
|
py
|
Python
|
measures.py
|
cdyk/toynet
|
55e7e395719937b2c78a598628c7a0d3bdb2ff18
|
[
"MIT"
] | null | null | null |
measures.py
|
cdyk/toynet
|
55e7e395719937b2c78a598628c7a0d3bdb2ff18
|
[
"MIT"
] | null | null | null |
measures.py
|
cdyk/toynet
|
55e7e395719937b2c78a598628c7a0d3bdb2ff18
|
[
"MIT"
] | null | null | null |
import numpy as np
class SquaredL2ErrorMeasure:
def __init__(self, inputs: int):
self._inputs = inputs
def forward(self, input, target):
r = input - target
return np.sum(r*r)
def backward(self, input, target):
return 2*(input - target)
| 22.076923
| 38
| 0.61324
| 36
| 287
| 4.75
| 0.527778
| 0.25731
| 0.175439
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009804
| 0.289199
| 287
| 12
| 39
| 23.916667
| 0.828431
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.111111
| 0.111111
| 0.777778
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
9ebf4fe92b57470ef034b13f14966bb2de8657e8
| 262
|
py
|
Python
|
python/ray/util/sgd/v2/callbacks/__init__.py
|
linyiyue/ray
|
90d2456ec70270a1f894ec3ef6f3004533859e03
|
[
"Apache-2.0"
] | 3
|
2021-07-22T17:03:33.000Z
|
2021-09-20T15:46:25.000Z
|
python/ray/util/sgd/v2/callbacks/__init__.py
|
linyiyue/ray
|
90d2456ec70270a1f894ec3ef6f3004533859e03
|
[
"Apache-2.0"
] | 77
|
2021-06-05T07:04:56.000Z
|
2022-03-26T07:04:33.000Z
|
python/ray/util/sgd/v2/callbacks/__init__.py
|
linyiyue/ray
|
90d2456ec70270a1f894ec3ef6f3004533859e03
|
[
"Apache-2.0"
] | 2
|
2021-12-12T14:51:29.000Z
|
2022-01-23T00:14:00.000Z
|
from ray.util.sgd.v2.callbacks.callback import SGDCallback
from ray.util.sgd.v2.callbacks.logging import (JsonLoggerCallback,
TBXLoggerCallback)
__all__ = ["SGDCallback", "JsonLoggerCallback", "TBXLoggerCallback"]
| 43.666667
| 68
| 0.671756
| 23
| 262
| 7.478261
| 0.565217
| 0.081395
| 0.127907
| 0.162791
| 0.290698
| 0.290698
| 0
| 0
| 0
| 0
| 0
| 0.01
| 0.236641
| 262
| 5
| 69
| 52.4
| 0.85
| 0
| 0
| 0
| 0
| 0
| 0.175573
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 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
| 0
| 0
|
0
| 4
|
7b3a63bad15c03990e96a04086012c72067f098a
| 190
|
py
|
Python
|
des052.py
|
LeonardoPereirajr/Curso_em_video_Python
|
9d8a97ba3389c8e86b37dfd089fab5d04adc146d
|
[
"MIT"
] | null | null | null |
des052.py
|
LeonardoPereirajr/Curso_em_video_Python
|
9d8a97ba3389c8e86b37dfd089fab5d04adc146d
|
[
"MIT"
] | null | null | null |
des052.py
|
LeonardoPereirajr/Curso_em_video_Python
|
9d8a97ba3389c8e86b37dfd089fab5d04adc146d
|
[
"MIT"
] | null | null | null |
num = int(input('Digite um numero : '))
tot=0
for c in range(1,num + 1):
if num % c == 0 :
print(' {} '.format(c))
tot +=1
else:
print('{} '.format(c))
| 23.75
| 40
| 0.442105
| 28
| 190
| 3
| 0.607143
| 0.261905
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04065
| 0.352632
| 190
| 8
| 41
| 23.75
| 0.642276
| 0
| 0
| 0.25
| 0
| 0
| 0.141304
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 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
| 0
|
0
| 4
|
7b42491b382aeb93534bcfcb59d30599a9f11bc9
| 22,516
|
py
|
Python
|
sdk/python/pulumi_aws_native/apigateway/method.py
|
AaronFriel/pulumi-aws-native
|
5621690373ac44accdbd20b11bae3be1baf022d1
|
[
"Apache-2.0"
] | 29
|
2021-09-30T19:32:07.000Z
|
2022-03-22T21:06:08.000Z
|
sdk/python/pulumi_aws_native/apigateway/method.py
|
AaronFriel/pulumi-aws-native
|
5621690373ac44accdbd20b11bae3be1baf022d1
|
[
"Apache-2.0"
] | 232
|
2021-09-30T19:26:26.000Z
|
2022-03-31T23:22:06.000Z
|
sdk/python/pulumi_aws_native/apigateway/method.py
|
AaronFriel/pulumi-aws-native
|
5621690373ac44accdbd20b11bae3be1baf022d1
|
[
"Apache-2.0"
] | 4
|
2021-11-10T19:42:01.000Z
|
2022-02-05T10:15:49.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** 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
from . import outputs
from ._enums import *
from ._inputs import *
__all__ = ['MethodArgs', 'Method']
@pulumi.input_type
class MethodArgs:
def __init__(__self__, *,
http_method: pulumi.Input[str],
resource_id: pulumi.Input[str],
rest_api_id: pulumi.Input[str],
api_key_required: Optional[pulumi.Input[bool]] = None,
authorization_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
authorization_type: Optional[pulumi.Input['MethodAuthorizationType']] = None,
authorizer_id: Optional[pulumi.Input[str]] = None,
integration: Optional[pulumi.Input['MethodIntegrationArgs']] = None,
method_responses: Optional[pulumi.Input[Sequence[pulumi.Input['MethodResponseArgs']]]] = None,
operation_name: Optional[pulumi.Input[str]] = None,
request_models: Optional[Any] = None,
request_parameters: Optional[Any] = None,
request_validator_id: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a Method resource.
:param pulumi.Input[str] http_method: The backend system that the method calls when it receives a request.
:param pulumi.Input[str] resource_id: The ID of an API Gateway resource.
:param pulumi.Input[str] rest_api_id: The ID of the RestApi resource in which API Gateway creates the method.
:param pulumi.Input[bool] api_key_required: Indicates whether the method requires clients to submit a valid API key.
:param pulumi.Input[Sequence[pulumi.Input[str]]] authorization_scopes: A list of authorization scopes configured on the method.
:param pulumi.Input['MethodAuthorizationType'] authorization_type: The method's authorization type.
:param pulumi.Input[str] authorizer_id: The identifier of the authorizer to use on this method.
:param pulumi.Input['MethodIntegrationArgs'] integration: The backend system that the method calls when it receives a request.
:param pulumi.Input[Sequence[pulumi.Input['MethodResponseArgs']]] method_responses: The responses that can be sent to the client who calls the method.
:param pulumi.Input[str] operation_name: A friendly operation name for the method.
:param Any request_models: The resources that are used for the request's content type. Specify request models as key-value pairs (string-to-string mapping), with a content type as the key and a Model resource name as the value.
:param Any request_parameters: The request parameters that API Gateway accepts. Specify request parameters as key-value pairs (string-to-Boolean mapping), with a source as the key and a Boolean as the value.
:param pulumi.Input[str] request_validator_id: The ID of the associated request validator.
"""
pulumi.set(__self__, "http_method", http_method)
pulumi.set(__self__, "resource_id", resource_id)
pulumi.set(__self__, "rest_api_id", rest_api_id)
if api_key_required is not None:
pulumi.set(__self__, "api_key_required", api_key_required)
if authorization_scopes is not None:
pulumi.set(__self__, "authorization_scopes", authorization_scopes)
if authorization_type is not None:
pulumi.set(__self__, "authorization_type", authorization_type)
if authorizer_id is not None:
pulumi.set(__self__, "authorizer_id", authorizer_id)
if integration is not None:
pulumi.set(__self__, "integration", integration)
if method_responses is not None:
pulumi.set(__self__, "method_responses", method_responses)
if operation_name is not None:
pulumi.set(__self__, "operation_name", operation_name)
if request_models is not None:
pulumi.set(__self__, "request_models", request_models)
if request_parameters is not None:
pulumi.set(__self__, "request_parameters", request_parameters)
if request_validator_id is not None:
pulumi.set(__self__, "request_validator_id", request_validator_id)
@property
@pulumi.getter(name="httpMethod")
def http_method(self) -> pulumi.Input[str]:
"""
The backend system that the method calls when it receives a request.
"""
return pulumi.get(self, "http_method")
@http_method.setter
def http_method(self, value: pulumi.Input[str]):
pulumi.set(self, "http_method", value)
@property
@pulumi.getter(name="resourceId")
def resource_id(self) -> pulumi.Input[str]:
"""
The ID of an API Gateway resource.
"""
return pulumi.get(self, "resource_id")
@resource_id.setter
def resource_id(self, value: pulumi.Input[str]):
pulumi.set(self, "resource_id", value)
@property
@pulumi.getter(name="restApiId")
def rest_api_id(self) -> pulumi.Input[str]:
"""
The ID of the RestApi resource in which API Gateway creates the method.
"""
return pulumi.get(self, "rest_api_id")
@rest_api_id.setter
def rest_api_id(self, value: pulumi.Input[str]):
pulumi.set(self, "rest_api_id", value)
@property
@pulumi.getter(name="apiKeyRequired")
def api_key_required(self) -> Optional[pulumi.Input[bool]]:
"""
Indicates whether the method requires clients to submit a valid API key.
"""
return pulumi.get(self, "api_key_required")
@api_key_required.setter
def api_key_required(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "api_key_required", value)
@property
@pulumi.getter(name="authorizationScopes")
def authorization_scopes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
A list of authorization scopes configured on the method.
"""
return pulumi.get(self, "authorization_scopes")
@authorization_scopes.setter
def authorization_scopes(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "authorization_scopes", value)
@property
@pulumi.getter(name="authorizationType")
def authorization_type(self) -> Optional[pulumi.Input['MethodAuthorizationType']]:
"""
The method's authorization type.
"""
return pulumi.get(self, "authorization_type")
@authorization_type.setter
def authorization_type(self, value: Optional[pulumi.Input['MethodAuthorizationType']]):
pulumi.set(self, "authorization_type", value)
@property
@pulumi.getter(name="authorizerId")
def authorizer_id(self) -> Optional[pulumi.Input[str]]:
"""
The identifier of the authorizer to use on this method.
"""
return pulumi.get(self, "authorizer_id")
@authorizer_id.setter
def authorizer_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "authorizer_id", value)
@property
@pulumi.getter
def integration(self) -> Optional[pulumi.Input['MethodIntegrationArgs']]:
"""
The backend system that the method calls when it receives a request.
"""
return pulumi.get(self, "integration")
@integration.setter
def integration(self, value: Optional[pulumi.Input['MethodIntegrationArgs']]):
pulumi.set(self, "integration", value)
@property
@pulumi.getter(name="methodResponses")
def method_responses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MethodResponseArgs']]]]:
"""
The responses that can be sent to the client who calls the method.
"""
return pulumi.get(self, "method_responses")
@method_responses.setter
def method_responses(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MethodResponseArgs']]]]):
pulumi.set(self, "method_responses", value)
@property
@pulumi.getter(name="operationName")
def operation_name(self) -> Optional[pulumi.Input[str]]:
"""
A friendly operation name for the method.
"""
return pulumi.get(self, "operation_name")
@operation_name.setter
def operation_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "operation_name", value)
@property
@pulumi.getter(name="requestModels")
def request_models(self) -> Optional[Any]:
"""
The resources that are used for the request's content type. Specify request models as key-value pairs (string-to-string mapping), with a content type as the key and a Model resource name as the value.
"""
return pulumi.get(self, "request_models")
@request_models.setter
def request_models(self, value: Optional[Any]):
pulumi.set(self, "request_models", value)
@property
@pulumi.getter(name="requestParameters")
def request_parameters(self) -> Optional[Any]:
"""
The request parameters that API Gateway accepts. Specify request parameters as key-value pairs (string-to-Boolean mapping), with a source as the key and a Boolean as the value.
"""
return pulumi.get(self, "request_parameters")
@request_parameters.setter
def request_parameters(self, value: Optional[Any]):
pulumi.set(self, "request_parameters", value)
@property
@pulumi.getter(name="requestValidatorId")
def request_validator_id(self) -> Optional[pulumi.Input[str]]:
"""
The ID of the associated request validator.
"""
return pulumi.get(self, "request_validator_id")
@request_validator_id.setter
def request_validator_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "request_validator_id", value)
class Method(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
api_key_required: Optional[pulumi.Input[bool]] = None,
authorization_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
authorization_type: Optional[pulumi.Input['MethodAuthorizationType']] = None,
authorizer_id: Optional[pulumi.Input[str]] = None,
http_method: Optional[pulumi.Input[str]] = None,
integration: Optional[pulumi.Input[pulumi.InputType['MethodIntegrationArgs']]] = None,
method_responses: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MethodResponseArgs']]]]] = None,
operation_name: Optional[pulumi.Input[str]] = None,
request_models: Optional[Any] = None,
request_parameters: Optional[Any] = None,
request_validator_id: Optional[pulumi.Input[str]] = None,
resource_id: Optional[pulumi.Input[str]] = None,
rest_api_id: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Resource Type definition for AWS::ApiGateway::Method
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[bool] api_key_required: Indicates whether the method requires clients to submit a valid API key.
:param pulumi.Input[Sequence[pulumi.Input[str]]] authorization_scopes: A list of authorization scopes configured on the method.
:param pulumi.Input['MethodAuthorizationType'] authorization_type: The method's authorization type.
:param pulumi.Input[str] authorizer_id: The identifier of the authorizer to use on this method.
:param pulumi.Input[str] http_method: The backend system that the method calls when it receives a request.
:param pulumi.Input[pulumi.InputType['MethodIntegrationArgs']] integration: The backend system that the method calls when it receives a request.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MethodResponseArgs']]]] method_responses: The responses that can be sent to the client who calls the method.
:param pulumi.Input[str] operation_name: A friendly operation name for the method.
:param Any request_models: The resources that are used for the request's content type. Specify request models as key-value pairs (string-to-string mapping), with a content type as the key and a Model resource name as the value.
:param Any request_parameters: The request parameters that API Gateway accepts. Specify request parameters as key-value pairs (string-to-Boolean mapping), with a source as the key and a Boolean as the value.
:param pulumi.Input[str] request_validator_id: The ID of the associated request validator.
:param pulumi.Input[str] resource_id: The ID of an API Gateway resource.
:param pulumi.Input[str] rest_api_id: The ID of the RestApi resource in which API Gateway creates the method.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: MethodArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Resource Type definition for AWS::ApiGateway::Method
:param str resource_name: The name of the resource.
:param MethodArgs 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(MethodArgs, 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,
api_key_required: Optional[pulumi.Input[bool]] = None,
authorization_scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
authorization_type: Optional[pulumi.Input['MethodAuthorizationType']] = None,
authorizer_id: Optional[pulumi.Input[str]] = None,
http_method: Optional[pulumi.Input[str]] = None,
integration: Optional[pulumi.Input[pulumi.InputType['MethodIntegrationArgs']]] = None,
method_responses: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MethodResponseArgs']]]]] = None,
operation_name: Optional[pulumi.Input[str]] = None,
request_models: Optional[Any] = None,
request_parameters: Optional[Any] = None,
request_validator_id: Optional[pulumi.Input[str]] = None,
resource_id: Optional[pulumi.Input[str]] = None,
rest_api_id: 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__ = MethodArgs.__new__(MethodArgs)
__props__.__dict__["api_key_required"] = api_key_required
__props__.__dict__["authorization_scopes"] = authorization_scopes
__props__.__dict__["authorization_type"] = authorization_type
__props__.__dict__["authorizer_id"] = authorizer_id
if http_method is None and not opts.urn:
raise TypeError("Missing required property 'http_method'")
__props__.__dict__["http_method"] = http_method
__props__.__dict__["integration"] = integration
__props__.__dict__["method_responses"] = method_responses
__props__.__dict__["operation_name"] = operation_name
__props__.__dict__["request_models"] = request_models
__props__.__dict__["request_parameters"] = request_parameters
__props__.__dict__["request_validator_id"] = request_validator_id
if resource_id is None and not opts.urn:
raise TypeError("Missing required property 'resource_id'")
__props__.__dict__["resource_id"] = resource_id
if rest_api_id is None and not opts.urn:
raise TypeError("Missing required property 'rest_api_id'")
__props__.__dict__["rest_api_id"] = rest_api_id
super(Method, __self__).__init__(
'aws-native:apigateway:Method',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None) -> 'Method':
"""
Get an existing Method resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = MethodArgs.__new__(MethodArgs)
__props__.__dict__["api_key_required"] = None
__props__.__dict__["authorization_scopes"] = None
__props__.__dict__["authorization_type"] = None
__props__.__dict__["authorizer_id"] = None
__props__.__dict__["http_method"] = None
__props__.__dict__["integration"] = None
__props__.__dict__["method_responses"] = None
__props__.__dict__["operation_name"] = None
__props__.__dict__["request_models"] = None
__props__.__dict__["request_parameters"] = None
__props__.__dict__["request_validator_id"] = None
__props__.__dict__["resource_id"] = None
__props__.__dict__["rest_api_id"] = None
return Method(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="apiKeyRequired")
def api_key_required(self) -> pulumi.Output[Optional[bool]]:
"""
Indicates whether the method requires clients to submit a valid API key.
"""
return pulumi.get(self, "api_key_required")
@property
@pulumi.getter(name="authorizationScopes")
def authorization_scopes(self) -> pulumi.Output[Optional[Sequence[str]]]:
"""
A list of authorization scopes configured on the method.
"""
return pulumi.get(self, "authorization_scopes")
@property
@pulumi.getter(name="authorizationType")
def authorization_type(self) -> pulumi.Output[Optional['MethodAuthorizationType']]:
"""
The method's authorization type.
"""
return pulumi.get(self, "authorization_type")
@property
@pulumi.getter(name="authorizerId")
def authorizer_id(self) -> pulumi.Output[Optional[str]]:
"""
The identifier of the authorizer to use on this method.
"""
return pulumi.get(self, "authorizer_id")
@property
@pulumi.getter(name="httpMethod")
def http_method(self) -> pulumi.Output[str]:
"""
The backend system that the method calls when it receives a request.
"""
return pulumi.get(self, "http_method")
@property
@pulumi.getter
def integration(self) -> pulumi.Output[Optional['outputs.MethodIntegration']]:
"""
The backend system that the method calls when it receives a request.
"""
return pulumi.get(self, "integration")
@property
@pulumi.getter(name="methodResponses")
def method_responses(self) -> pulumi.Output[Optional[Sequence['outputs.MethodResponse']]]:
"""
The responses that can be sent to the client who calls the method.
"""
return pulumi.get(self, "method_responses")
@property
@pulumi.getter(name="operationName")
def operation_name(self) -> pulumi.Output[Optional[str]]:
"""
A friendly operation name for the method.
"""
return pulumi.get(self, "operation_name")
@property
@pulumi.getter(name="requestModels")
def request_models(self) -> pulumi.Output[Optional[Any]]:
"""
The resources that are used for the request's content type. Specify request models as key-value pairs (string-to-string mapping), with a content type as the key and a Model resource name as the value.
"""
return pulumi.get(self, "request_models")
@property
@pulumi.getter(name="requestParameters")
def request_parameters(self) -> pulumi.Output[Optional[Any]]:
"""
The request parameters that API Gateway accepts. Specify request parameters as key-value pairs (string-to-Boolean mapping), with a source as the key and a Boolean as the value.
"""
return pulumi.get(self, "request_parameters")
@property
@pulumi.getter(name="requestValidatorId")
def request_validator_id(self) -> pulumi.Output[Optional[str]]:
"""
The ID of the associated request validator.
"""
return pulumi.get(self, "request_validator_id")
@property
@pulumi.getter(name="resourceId")
def resource_id(self) -> pulumi.Output[str]:
"""
The ID of an API Gateway resource.
"""
return pulumi.get(self, "resource_id")
@property
@pulumi.getter(name="restApiId")
def rest_api_id(self) -> pulumi.Output[str]:
"""
The ID of the RestApi resource in which API Gateway creates the method.
"""
return pulumi.get(self, "rest_api_id")
| 47.302521
| 235
| 0.665882
| 2,640
| 22,516
| 5.425758
| 0.07197
| 0.072187
| 0.049846
| 0.034488
| 0.808782
| 0.734571
| 0.706437
| 0.666155
| 0.638579
| 0.561086
| 0
| 0.000058
| 0.235299
| 22,516
| 475
| 236
| 47.402105
| 0.831862
| 0.277047
| 0
| 0.428571
| 1
| 0
| 0.143492
| 0.020779
| 0
| 0
| 0
| 0
| 0
| 1
| 0.153061
| false
| 0.003401
| 0.027211
| 0
| 0.278912
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7b54f1baceaa793509feee9038ed1f0e4ba62adf
| 1,494
|
py
|
Python
|
GetAgencyDetail.py
|
ducnhannguyen017/RPA-It-Dashboard-Robot
|
8d7a5c1bad08abe01c7fd86cd4492e6c7895e507
|
[
"Apache-2.0"
] | null | null | null |
GetAgencyDetail.py
|
ducnhannguyen017/RPA-It-Dashboard-Robot
|
8d7a5c1bad08abe01c7fd86cd4492e6c7895e507
|
[
"Apache-2.0"
] | null | null | null |
GetAgencyDetail.py
|
ducnhannguyen017/RPA-It-Dashboard-Robot
|
8d7a5c1bad08abe01c7fd86cd4492e6c7895e507
|
[
"Apache-2.0"
] | null | null | null |
import datetime
from RPA.Browser.Selenium import Selenium
class GetAgencyDetail:
BASE_URL = "https://itdashboard.gov/drupal/summary/005"
def __init__(self):
self.browser = Selenium()
self.browser.open_available_browser(self.BASE_URL)
self.run()
def run(self):
# self.browser.wait_until_element_is_visible(
# locator=[self.browser.find_element(
# 'name:investments-table-object_length'), 'option:last-of-type'], timeout=datetime.timedelta(minutes=1))
# self.browser.click_element(
# locator=[self.browser.find_element(
# 'name:investments-table-object_length'), 'option:last-of-type'], timeout=datetime.timedelta(minutes=1))
self.browser.wait_until_element_is_visible(
locator='css:div#investments-table-widget div.pageSelect select option:last-of-type',
timeout=datetime.timedelta(minutes=1)
)
self.browser.click_element(
locator='css:div#investments-table-widget div.pageSelect select option:last-of-type'
)
self.browser.wait_until_element_is_visible(
locator='css:div#investments-table-widget table#investments-table-object tbody tr:nth-of-type(11) td',
timeout=datetime.timedelta(minutes=1)
)
agencies = self.browser.get_webelement(
locator='css:div#investments-table-widget table#investments-table-object tbody tr'
)
print(agencies)
| 41.5
| 121
| 0.669344
| 176
| 1,494
| 5.528409
| 0.323864
| 0.113052
| 0.090442
| 0.065776
| 0.733813
| 0.700925
| 0.700925
| 0.700925
| 0.663926
| 0.663926
| 0
| 0.007686
| 0.216198
| 1,494
| 35
| 122
| 42.685714
| 0.823228
| 0.251004
| 0
| 0.166667
| 0
| 0.041667
| 0.317446
| 0.169065
| 0
| 0
| 0
| 0
| 0
| 1
| 0.083333
| false
| 0
| 0.083333
| 0
| 0.25
| 0.041667
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 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
| 4
|
7ba8dea092aeca39e931d30befb29887dad2ef65
| 232
|
py
|
Python
|
pyRevealjs/presentation_settings.py
|
20centcroak/pyRevealjs
|
517fb47676e2a47ac2b5274f107a5b61efd38516
|
[
"MIT"
] | null | null | null |
pyRevealjs/presentation_settings.py
|
20centcroak/pyRevealjs
|
517fb47676e2a47ac2b5274f107a5b61efd38516
|
[
"MIT"
] | null | null | null |
pyRevealjs/presentation_settings.py
|
20centcroak/pyRevealjs
|
517fb47676e2a47ac2b5274f107a5b61efd38516
|
[
"MIT"
] | null | null | null |
class PresentationSettings():
def __init__(self, settings:dict = {}):
self.title = settings['title'] if 'title' in settings else 'Presentation'
self.theme = settings['theme'] if 'theme' in settings else 'black'
| 38.666667
| 81
| 0.668103
| 27
| 232
| 5.592593
| 0.518519
| 0.13245
| 0.18543
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.198276
| 232
| 5
| 82
| 46.4
| 0.811828
| 0
| 0
| 0
| 0
| 0
| 0.159483
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7bafcd65c7665a9d71d4b055f028dccdae2a124a
| 5,610
|
py
|
Python
|
Dragon/python/dragon/operators/control_flow.py
|
awesome-archive/Dragon
|
b35f9320909d07d138c2f6b345a4c24911f7c521
|
[
"BSD-2-Clause"
] | null | null | null |
Dragon/python/dragon/operators/control_flow.py
|
awesome-archive/Dragon
|
b35f9320909d07d138c2f6b345a4c24911f7c521
|
[
"BSD-2-Clause"
] | null | null | null |
Dragon/python/dragon/operators/control_flow.py
|
awesome-archive/Dragon
|
b35f9320909d07d138c2f6b345a4c24911f7c521
|
[
"BSD-2-Clause"
] | null | null | null |
# ------------------------------------------------------------
# Copyright (c) 2017-present, SeetaTech, Co.,Ltd.
#
# Licensed under the BSD 2-Clause License.
# You should have received a copy of the BSD 2-Clause License
# along with the software. If not, See,
#
# <https://opensource.org/licenses/BSD-2-Clause>
#
# ------------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from . import *
@OpSchema.Inputs(2)
def Copy(inputs, **kwargs):
"""Copy the ``value`` to ``ref``.
The size of ``value`` and ``ref`` should be same.
**Type Constraints**: (*bool*, *int8*, *uint8*, *int32*, *int64*, *float16*, *float32*, *float64*)
Parameters
----------
inputs : sequence of Tensor
The ``ref`` and ``value`` respectively.
Returns
-------
Tensor
The ``ref``.
"""
arguments = ParseArgs(locals())
arguments['existing_outputs'] = [arguments['inputs'][0]]
arguments['inputs'] = [arguments['inputs'][1]]
return Tensor.CreateOperator('Copy', **arguments)
@OpSchema.ConvertConstantInputs()
@OpSchema.Inputs(2)
@ArgumentHelper.RepeatedDesc('starts')
@ArgumentHelper.RepeatedDesc('sizes')
def Assign(inputs, starts=None, sizes=None, **kwargs):
"""Assign the ``value`` to ``ref``.
The value of ``sizes`` could be set to *-1* (to end) or *0* (squeeze).
**Type Constraints**: (*bool*, *int8*, *uint8*, *int32*, *int64*, *float16*, *float32*, *float64*)
Parameters
----------
inputs : sequence of Tensor
The ``ref`` and ``value`` respectively.
starts : sequence of (int, Tensor), optional
The start pos of each dimension.
sizes : sequence of (int, Tensor), optional
The size of each dimension.
Returns
-------
Tensor
The ``ref``.
"""
arguments = ParseArgs(locals())
arguments['existing_outputs'] = [arguments['inputs'][0]]
arguments['inputs'] = [arguments['inputs'][1]]
return Tensor.CreateOperator('Assign', **arguments)
@OpSchema.ConvertConstantInputs()
@OpSchema.Inputs(2)
def Equal(inputs, to_uint8=False, **kwargs):
"""``Equal`` comparing between A and B.
Set ``to_uint8`` if you expect the ``uint8`` results instead of ``bool``.
**Type Constraints**: (*bool*, *int8*, *uint8*, *int32*, *int64*, *float16*, *float32*, *float64*)
Parameters
----------
inputs : sequence of Tensor
The inputs, represent A and B respectively.
to_uint8 : bool
``True`` to convert to ``uint8`` results.
Returns
-------
Tensor
The comparing results.
"""
arguments = ParseArgs(locals())
return Tensor.CreateOperator('Compare', operation='EQ', **arguments)
@OpSchema.ConvertConstantInputs()
@OpSchema.Inputs(2)
def Less(inputs, to_uint8=False, **kwargs):
"""``Less`` comparing between A and B.
Set ``to_uint8`` if you expect the ``uint8`` results instead of ``bool``.
**Type Constraints**: (*bool*, *int8*, *uint8*, *int32*, *int64*, *float16*, *float32*, *float64*)
Parameters
----------
inputs : sequence of Tensor
The inputs, represent A and B respectively.
to_uint8 : bool
``True`` to convert to ``uint8`` results.
Returns
-------
Tensor
The comparing results.
"""
arguments = ParseArgs(locals())
return Tensor.CreateOperator('Compare', operation='LT', **arguments)
@OpSchema.ConvertConstantInputs()
@OpSchema.Inputs(2)
def LessEqual(inputs, to_uint8=False, **kwargs):
"""``LessEqual`` comparing between A and B.
Set ``to_uint8`` if you expect the ``uint8`` results instead of ``bool``.
**Type Constraints**: (*bool*, *int8*, *uint8*, *int32*, *int64*, *float16*, *float32*, *float64*)
Parameters
----------
inputs : sequence of Tensor
The inputs, represent A and B respectively.
to_uint8 : bool
``True`` to convert to ``uint8`` results.
Returns
-------
Tensor
The comparing results.
"""
arguments = ParseArgs(locals())
return Tensor.CreateOperator('Compare', operation='LE', **arguments)
@OpSchema.ConvertConstantInputs()
@OpSchema.Inputs(2)
def Greater(inputs, to_uint8=False, **kwargs):
"""``Greater`` comparing between A and B.
Set ``to_uint8`` if you expect the ``uint8`` results instead of ``bool``.
**Type Constraints**: (*bool*, *int8*, *uint8*, *int32*, *int64*, *float16*, *float32*, *float64*)
Parameters
----------
inputs : sequence of Tensor
The inputs, represent A and B respectively.
to_uint8 : bool
``True`` to convert to ``uint8`` results.
Returns
-------
Tensor
The comparing results.
"""
arguments = ParseArgs(locals())
return Tensor.CreateOperator('Compare', operation='GT', **arguments)
@OpSchema.ConvertConstantInputs()
@OpSchema.Inputs(2)
def GreaterEqual(inputs, to_uint8=False, **kwargs):
"""``GreaterEqual`` comparing between A and B.
Set ``to_uint8`` if you expect the ``uint8`` results instead of ``bool``.
**Type Constraints**: (*bool*, *int8*, *uint8*, *int32*, *int64*, *float16*, *float32*, *float64*)
Parameters
----------
inputs : sequence of Tensor
The inputs, represent A and B respectively.
to_uint8 : bool
``True`` to convert to ``uint8`` results.
Returns
-------
Tensor
The comparing results.
"""
arguments = ParseArgs(locals())
return Tensor.CreateOperator('Compare', operation='GE', **arguments)
| 27.635468
| 102
| 0.605169
| 604
| 5,610
| 5.569536
| 0.187086
| 0.041617
| 0.014863
| 0.04786
| 0.820155
| 0.76308
| 0.729489
| 0.646254
| 0.646254
| 0.646254
| 0
| 0.029002
| 0.20713
| 5,610
| 203
| 103
| 27.635468
| 0.727293
| 0.590018
| 0
| 0.545455
| 0
| 0
| 0.071353
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.159091
| false
| 0
| 0.090909
| 0
| 0.409091
| 0.022727
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7bb130a00ae186d1fb7f39ee8be425d509d84589
| 75
|
py
|
Python
|
demo/shortdemo.py
|
thesynman/pybricksdev
|
6f34cfb7a5f26628fe3cedae1ce51ee6024f57b9
|
[
"MIT"
] | 25
|
2020-06-15T07:24:33.000Z
|
2022-03-12T16:10:02.000Z
|
demo/shortdemo.py
|
thesynman/pybricksdev
|
6f34cfb7a5f26628fe3cedae1ce51ee6024f57b9
|
[
"MIT"
] | 29
|
2020-06-18T19:55:51.000Z
|
2022-03-01T21:50:38.000Z
|
demo/shortdemo.py
|
thesynman/pybricksdev
|
6f34cfb7a5f26628fe3cedae1ce51ee6024f57b9
|
[
"MIT"
] | 12
|
2020-06-16T04:38:16.000Z
|
2022-02-23T09:15:36.000Z
|
from pybricks.tools import wait
print("Hello")
wait(1000)
print("World!")
| 12.5
| 31
| 0.733333
| 11
| 75
| 5
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.059701
| 0.106667
| 75
| 5
| 32
| 15
| 0.761194
| 0
| 0
| 0
| 0
| 0
| 0.146667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
7bb1fcdc618e2595222f29bb0e82d5ab0aaf07a1
| 155
|
py
|
Python
|
AI_agent/utils.py
|
GabrielePisciotta/AmongAIs
|
72881ff01327666b04946792922524451fc3a749
|
[
"MIT"
] | 5
|
2021-06-16T12:34:38.000Z
|
2021-06-17T12:34:33.000Z
|
AI_agent/utils.py
|
GabrielePisciotta/AmongAIs
|
72881ff01327666b04946792922524451fc3a749
|
[
"MIT"
] | null | null | null |
AI_agent/utils.py
|
GabrielePisciotta/AmongAIs
|
72881ff01327666b04946792922524451fc3a749
|
[
"MIT"
] | null | null | null |
import threading
def run_in_thread(fn):
def run(*k, **kw):
t = threading.Thread(target=fn, args=k, kwargs=kw)
t.start()
return run
| 22.142857
| 58
| 0.606452
| 24
| 155
| 3.833333
| 0.625
| 0.130435
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.251613
| 155
| 7
| 59
| 22.142857
| 0.793103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
7bbf22184ee47ec53560565dcce2324e50a98171
| 80
|
py
|
Python
|
draft9/variable.py
|
martin31242/rccar
|
56d3bbc40400c38e62bfa5adcdac9f196883a8e6
|
[
"MIT"
] | null | null | null |
draft9/variable.py
|
martin31242/rccar
|
56d3bbc40400c38e62bfa5adcdac9f196883a8e6
|
[
"MIT"
] | null | null | null |
draft9/variable.py
|
martin31242/rccar
|
56d3bbc40400c38e62bfa5adcdac9f196883a8e6
|
[
"MIT"
] | null | null | null |
Camera_on = True
sensor_status_ultrasonic = True
sensor_status_infrared = True
| 26.666667
| 32
| 0.8375
| 11
| 80
| 5.636364
| 0.636364
| 0.322581
| 0.516129
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 80
| 3
| 33
| 26.666667
| 0.885714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c877272dc8815626a50e14204bcece50c8c983c1
| 238
|
py
|
Python
|
2_intro_to_python/lectures/5_iterating_over_dictionaries/code.py
|
gdia/The-Complete-Python-Course
|
ed375b65242249bc749c3e292a6149f8528b9dcf
|
[
"MIT"
] | 29
|
2019-09-02T21:15:59.000Z
|
2022-01-14T02:20:05.000Z
|
2_intro_to_python/lectures/5_iterating_over_dictionaries/code.py
|
gdia/The-Complete-Python-Course
|
ed375b65242249bc749c3e292a6149f8528b9dcf
|
[
"MIT"
] | 2
|
2020-08-20T05:48:36.000Z
|
2021-06-02T03:16:31.000Z
|
2_intro_to_python/lectures/5_iterating_over_dictionaries/code.py
|
gdia/The-Complete-Python-Course
|
ed375b65242249bc749c3e292a6149f8528b9dcf
|
[
"MIT"
] | 38
|
2019-10-20T14:29:12.000Z
|
2022-03-27T19:50:05.000Z
|
friend_ages = {"Rolf": 25, "Anne": 37, "Charlie": 31, "Bob": 22}
for name in friend_ages:
print(name)
for age in friend_ages.values():
print(age)
for name, age in friend_ages.items():
print(f"{name} is {age} years old.")
| 18.307692
| 64
| 0.630252
| 39
| 238
| 3.74359
| 0.538462
| 0.273973
| 0.246575
| 0.205479
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041885
| 0.197479
| 238
| 12
| 65
| 19.833333
| 0.722513
| 0
| 0
| 0
| 0
| 0
| 0.184874
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.428571
| 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
| 0
| 0
| 0
| 1
|
0
| 4
|
c89e0e69a6366e792baca176d69eb7125458986f
| 471
|
py
|
Python
|
src/Geom8ry/segment.py
|
rajeev-kr/Geom8ry
|
8e479ef38aa74b1ef0c13809df79e81c6a669d60
|
[
"MIT"
] | null | null | null |
src/Geom8ry/segment.py
|
rajeev-kr/Geom8ry
|
8e479ef38aa74b1ef0c13809df79e81c6a669d60
|
[
"MIT"
] | null | null | null |
src/Geom8ry/segment.py
|
rajeev-kr/Geom8ry
|
8e479ef38aa74b1ef0c13809df79e81c6a669d60
|
[
"MIT"
] | null | null | null |
# import math
# from fractions import *
# from exceptions import *
# from point import *
# from line import *
# from ellipse import *
# from polygon import *
# from hyperbola import *
# from triangle import *
# from rectangle import *
# from graph import *
# from delaunay import *
class Segment:
def __init__(self, p, q):
self.p = p
self.q = q
@classmethod
def findIntersection(cls, segment):
return None
| 22.428571
| 39
| 0.619958
| 55
| 471
| 5.236364
| 0.472727
| 0.347222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.299363
| 471
| 21
| 40
| 22.428571
| 0.872727
| 0.602972
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0.142857
| 0.571429
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
c8b43cb9aaada8c5ef3bdd122fc4728ef0498c72
| 164
|
py
|
Python
|
aula2/aula2.py
|
gabizinha12/Python-basico-ao-avancado
|
97ed29316f36eb6f5cc75c0b1db3bc5759827315
|
[
"MIT"
] | null | null | null |
aula2/aula2.py
|
gabizinha12/Python-basico-ao-avancado
|
97ed29316f36eb6f5cc75c0b1db3bc5759827315
|
[
"MIT"
] | null | null | null |
aula2/aula2.py
|
gabizinha12/Python-basico-ao-avancado
|
97ed29316f36eb6f5cc75c0b1db3bc5759827315
|
[
"MIT"
] | null | null | null |
print("gabizinha", "lima", "teste")
# por padrão o espaço é adicionado
print("abcde", "aaaaaaaa", sep="-")
print("Joao e Maria", "teste", sep="####", end="######")
| 32.8
| 56
| 0.591463
| 21
| 164
| 4.619048
| 0.809524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115854
| 164
| 4
| 57
| 41
| 0.668966
| 0.195122
| 0
| 0
| 0
| 0
| 0.453846
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
c8bc415ca4ba68f0a608b587024cd9bb4a5f8f23
| 430
|
py
|
Python
|
app/infra/in_memory/storage.py
|
temojudo/BitcoinWallet
|
5a7fda9d5051d0e448e385856ed6a23cf60324c0
|
[
"MIT"
] | null | null | null |
app/infra/in_memory/storage.py
|
temojudo/BitcoinWallet
|
5a7fda9d5051d0e448e385856ed6a23cf60324c0
|
[
"MIT"
] | null | null | null |
app/infra/in_memory/storage.py
|
temojudo/BitcoinWallet
|
5a7fda9d5051d0e448e385856ed6a23cf60324c0
|
[
"MIT"
] | null | null | null |
from dataclasses import dataclass, field
from typing import Dict, List
from app.core.transaction.transaction import Transaction
from app.core.user.user import User
from app.core.wallet.wallet import Wallet
@dataclass
class Storage:
users: Dict[str, User] = field(default_factory=dict)
wallets: Dict[str, List[Wallet]] = field(default_factory=dict)
transactions: Dict[int, Transaction] = field(default_factory=dict)
| 30.714286
| 70
| 0.781395
| 59
| 430
| 5.644068
| 0.372881
| 0.063063
| 0.099099
| 0.207207
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127907
| 430
| 13
| 71
| 33.076923
| 0.888
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.9
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c8c2aeda6bfc18909f91bd91d095cf56f1e6b9b6
| 31
|
py
|
Python
|
tilebench/resources/__init__.py
|
developmentseed/tilebench
|
eeee20706777caacb8a860cbed98b3f0c98424ad
|
[
"MIT"
] | 14
|
2020-05-23T02:43:17.000Z
|
2022-02-28T20:21:52.000Z
|
tilebench/resources/__init__.py
|
developmentseed/tilebench
|
eeee20706777caacb8a860cbed98b3f0c98424ad
|
[
"MIT"
] | 12
|
2020-05-22T19:47:53.000Z
|
2021-12-13T09:41:43.000Z
|
tilebench/resources/__init__.py
|
developmentseed/tilebench
|
eeee20706777caacb8a860cbed98b3f0c98424ad
|
[
"MIT"
] | 1
|
2021-03-05T16:40:58.000Z
|
2021-03-05T16:40:58.000Z
|
"""tilebench viz resources."""
| 15.5
| 30
| 0.677419
| 3
| 31
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096774
| 31
| 1
| 31
| 31
| 0.75
| 0.774194
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c8d18822f0ae059e47dbab8fec6ef1b8b792e2a3
| 219
|
py
|
Python
|
moringa_core/yt/website/views.py
|
Gomax-07/quote2
|
7996d379c92853d88018f08659aa6f2de0f1b268
|
[
"Unlicense"
] | null | null | null |
moringa_core/yt/website/views.py
|
Gomax-07/quote2
|
7996d379c92853d88018f08659aa6f2de0f1b268
|
[
"Unlicense"
] | null | null | null |
moringa_core/yt/website/views.py
|
Gomax-07/quote2
|
7996d379c92853d88018f08659aa6f2de0f1b268
|
[
"Unlicense"
] | null | null | null |
from flask import Blueprint,render_template
from flask_login import login_required,current_user
views = Blueprint('views',__name__)
@views.route('/')
@login_required
def home():
return render_template("home.html")
| 24.333333
| 53
| 0.789954
| 29
| 219
| 5.62069
| 0.586207
| 0.110429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.100457
| 219
| 9
| 54
| 24.333333
| 0.827411
| 0
| 0
| 0
| 0
| 0
| 0.068182
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.285714
| 0.142857
| 0.571429
| 0.285714
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
c8f862824da9f8986e3637a7d1635e9114f68cb8
| 93,821
|
py
|
Python
|
Lib/site-packages/OCC/IntSurf.py
|
JWerbrouck/RWTH_M1_Projekt
|
7ae63a2277361fa3273cf0677b297379482b8240
|
[
"bzip2-1.0.6"
] | null | null | null |
Lib/site-packages/OCC/IntSurf.py
|
JWerbrouck/RWTH_M1_Projekt
|
7ae63a2277361fa3273cf0677b297379482b8240
|
[
"bzip2-1.0.6"
] | 1
|
2022-03-17T16:46:04.000Z
|
2022-03-17T16:46:04.000Z
|
Lib/site-packages/OCC/IntSurf.py
|
JWerbrouck/RWTH_M1_Projekt
|
7ae63a2277361fa3273cf0677b297379482b8240
|
[
"bzip2-1.0.6"
] | null | null | null |
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.1
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (3,0,0):
new_instancemethod = lambda func, inst, cls: _IntSurf.SWIG_PyInstanceMethod_New(func)
else:
from new import instancemethod as new_instancemethod
if version_info >= (2,6,0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_IntSurf', [dirname(__file__)])
except ImportError:
import _IntSurf
return _IntSurf
if fp is not None:
try:
_mod = imp.load_module('_IntSurf', fp, pathname, description)
finally:
fp.close()
return _mod
_IntSurf = swig_import_helper()
del swig_import_helper
else:
import _IntSurf
del version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "thisown"): return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
if (name == "thisown"): return self.this.own()
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError(name)
def _swig_repr(self):
try: strthis = "proxy of " + self.this.__repr__()
except: strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
def _swig_setattr_nondynamic_method(set):
def set_attr(self,name,value):
if (name == "thisown"): return self.this.own(value)
if hasattr(self,name) or (name == "this"):
set(self,name,value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
return set_attr
class SwigPyIterator(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_destroy__ = _IntSurf.delete_SwigPyIterator
def __iter__(self): return self
SwigPyIterator.value = new_instancemethod(_IntSurf.SwigPyIterator_value,None,SwigPyIterator)
SwigPyIterator.incr = new_instancemethod(_IntSurf.SwigPyIterator_incr,None,SwigPyIterator)
SwigPyIterator.decr = new_instancemethod(_IntSurf.SwigPyIterator_decr,None,SwigPyIterator)
SwigPyIterator.distance = new_instancemethod(_IntSurf.SwigPyIterator_distance,None,SwigPyIterator)
SwigPyIterator.equal = new_instancemethod(_IntSurf.SwigPyIterator_equal,None,SwigPyIterator)
SwigPyIterator.copy = new_instancemethod(_IntSurf.SwigPyIterator_copy,None,SwigPyIterator)
SwigPyIterator.next = new_instancemethod(_IntSurf.SwigPyIterator_next,None,SwigPyIterator)
SwigPyIterator.__next__ = new_instancemethod(_IntSurf.SwigPyIterator___next__,None,SwigPyIterator)
SwigPyIterator.previous = new_instancemethod(_IntSurf.SwigPyIterator_previous,None,SwigPyIterator)
SwigPyIterator.advance = new_instancemethod(_IntSurf.SwigPyIterator_advance,None,SwigPyIterator)
SwigPyIterator.__eq__ = new_instancemethod(_IntSurf.SwigPyIterator___eq__,None,SwigPyIterator)
SwigPyIterator.__ne__ = new_instancemethod(_IntSurf.SwigPyIterator___ne__,None,SwigPyIterator)
SwigPyIterator.__iadd__ = new_instancemethod(_IntSurf.SwigPyIterator___iadd__,None,SwigPyIterator)
SwigPyIterator.__isub__ = new_instancemethod(_IntSurf.SwigPyIterator___isub__,None,SwigPyIterator)
SwigPyIterator.__add__ = new_instancemethod(_IntSurf.SwigPyIterator___add__,None,SwigPyIterator)
SwigPyIterator.__sub__ = new_instancemethod(_IntSurf.SwigPyIterator___sub__,None,SwigPyIterator)
SwigPyIterator_swigregister = _IntSurf.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)
import OCC.gp
import OCC.Standard
import OCC.MMgt
import OCC.TCollection
import OCC.GeomAbs
IntSurf_Inside = _IntSurf.IntSurf_Inside
IntSurf_Outside = _IntSurf.IntSurf_Outside
IntSurf_Unknown = _IntSurf.IntSurf_Unknown
IntSurf_In = _IntSurf.IntSurf_In
IntSurf_Out = _IntSurf.IntSurf_Out
IntSurf_Touch = _IntSurf.IntSurf_Touch
IntSurf_Undecided = _IntSurf.IntSurf_Undecided
class intsurf(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def MakeTransition(*args):
"""
* Computes the transition of the intersection point between the two lines. TgFirst is the tangent vector of the first line. TgSecond is the tangent vector of the second line. Normal is the direction used to orientate the cross product TgFirst^TgSecond. TFirst is the transition of the point on the first line. TSecond is the transition of the point on the second line.
:param TgFirst:
:type TgFirst: gp_Vec
:param TgSecond:
:type TgSecond: gp_Vec
:param Normal:
:type Normal: gp_Dir
:param TFirst:
:type TFirst: IntSurf_Transition &
:param TSecond:
:type TSecond: IntSurf_Transition &
:rtype: void
"""
return _IntSurf.intsurf_MakeTransition(*args)
MakeTransition = staticmethod(MakeTransition)
def __init__(self):
_IntSurf.intsurf_swiginit(self,_IntSurf.new_intsurf())
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
intsurf._kill_pointed = new_instancemethod(_IntSurf.intsurf__kill_pointed,None,intsurf)
intsurf_swigregister = _IntSurf.intsurf_swigregister
intsurf_swigregister(intsurf)
def intsurf_MakeTransition(*args):
"""
* Computes the transition of the intersection point between the two lines. TgFirst is the tangent vector of the first line. TgSecond is the tangent vector of the second line. Normal is the direction used to orientate the cross product TgFirst^TgSecond. TFirst is the transition of the point on the first line. TSecond is the transition of the point on the second line.
:param TgFirst:
:type TgFirst: gp_Vec
:param TgSecond:
:type TgSecond: gp_Vec
:param Normal:
:type Normal: gp_Dir
:param TFirst:
:type TFirst: IntSurf_Transition &
:param TSecond:
:type TSecond: IntSurf_Transition &
:rtype: void
"""
return _IntSurf.intsurf_MakeTransition(*args)
class IntSurf_Couple(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:rtype: None
:param Index1:
:type Index1: int
:param Index2:
:type Index2: int
:rtype: None
"""
_IntSurf.IntSurf_Couple_swiginit(self,_IntSurf.new_IntSurf_Couple(*args))
def First(self, *args):
"""
* returns the first element
:rtype: int
"""
return _IntSurf.IntSurf_Couple_First(self, *args)
def Second(self, *args):
"""
* returns the Second element
:rtype: int
"""
return _IntSurf.IntSurf_Couple_Second(self, *args)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_Couple.First = new_instancemethod(_IntSurf.IntSurf_Couple_First,None,IntSurf_Couple)
IntSurf_Couple.Second = new_instancemethod(_IntSurf.IntSurf_Couple_Second,None,IntSurf_Couple)
IntSurf_Couple._kill_pointed = new_instancemethod(_IntSurf.IntSurf_Couple__kill_pointed,None,IntSurf_Couple)
IntSurf_Couple_swigregister = _IntSurf.IntSurf_Couple_swigregister
IntSurf_Couple_swigregister(IntSurf_Couple)
class IntSurf_InteriorPoint(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:rtype: None
:param P:
:type P: gp_Pnt
:param U:
:type U: float
:param V:
:type V: float
:param Direc:
:type Direc: gp_Vec
:param Direc2d:
:type Direc2d: gp_Vec2d
:rtype: None
"""
_IntSurf.IntSurf_InteriorPoint_swiginit(self,_IntSurf.new_IntSurf_InteriorPoint(*args))
def SetValue(self, *args):
"""
:param P:
:type P: gp_Pnt
:param U:
:type U: float
:param V:
:type V: float
:param Direc:
:type Direc: gp_Vec
:param Direc2d:
:type Direc2d: gp_Vec2d
:rtype: None
"""
return _IntSurf.IntSurf_InteriorPoint_SetValue(self, *args)
def Value(self, *args):
"""
* Returns the 3d coordinates of the interior point.
:rtype: gp_Pnt
"""
return _IntSurf.IntSurf_InteriorPoint_Value(self, *args)
def Parameters(self, *args):
"""
* Returns the parameters of the interior point on the parametric surface.
:param U:
:type U: float &
:param V:
:type V: float &
:rtype: None
"""
return _IntSurf.IntSurf_InteriorPoint_Parameters(self, *args)
def UParameter(self, *args):
"""
* Returns the first parameter of the interior point on the parametric surface.
:rtype: float
"""
return _IntSurf.IntSurf_InteriorPoint_UParameter(self, *args)
def VParameter(self, *args):
"""
* Returns the second parameter of the interior point on the parametric surface.
:rtype: float
"""
return _IntSurf.IntSurf_InteriorPoint_VParameter(self, *args)
def Direction(self, *args):
"""
* Returns the tangent at the intersection in 3d space associated to the interior point.
:rtype: gp_Vec
"""
return _IntSurf.IntSurf_InteriorPoint_Direction(self, *args)
def Direction2d(self, *args):
"""
* Returns the tangent at the intersection in the parametric space of the parametric surface.
:rtype: gp_Vec2d
"""
return _IntSurf.IntSurf_InteriorPoint_Direction2d(self, *args)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_InteriorPoint.SetValue = new_instancemethod(_IntSurf.IntSurf_InteriorPoint_SetValue,None,IntSurf_InteriorPoint)
IntSurf_InteriorPoint.Value = new_instancemethod(_IntSurf.IntSurf_InteriorPoint_Value,None,IntSurf_InteriorPoint)
IntSurf_InteriorPoint.Parameters = new_instancemethod(_IntSurf.IntSurf_InteriorPoint_Parameters,None,IntSurf_InteriorPoint)
IntSurf_InteriorPoint.UParameter = new_instancemethod(_IntSurf.IntSurf_InteriorPoint_UParameter,None,IntSurf_InteriorPoint)
IntSurf_InteriorPoint.VParameter = new_instancemethod(_IntSurf.IntSurf_InteriorPoint_VParameter,None,IntSurf_InteriorPoint)
IntSurf_InteriorPoint.Direction = new_instancemethod(_IntSurf.IntSurf_InteriorPoint_Direction,None,IntSurf_InteriorPoint)
IntSurf_InteriorPoint.Direction2d = new_instancemethod(_IntSurf.IntSurf_InteriorPoint_Direction2d,None,IntSurf_InteriorPoint)
IntSurf_InteriorPoint._kill_pointed = new_instancemethod(_IntSurf.IntSurf_InteriorPoint__kill_pointed,None,IntSurf_InteriorPoint)
IntSurf_InteriorPoint_swigregister = _IntSurf.IntSurf_InteriorPoint_swigregister
IntSurf_InteriorPoint_swigregister(IntSurf_InteriorPoint)
class IntSurf_InteriorPointTool(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def Value3d(*args):
"""
* Returns the 3d coordinates of the starting point.
:param PStart:
:type PStart: IntSurf_InteriorPoint &
:rtype: gp_Pnt
"""
return _IntSurf.IntSurf_InteriorPointTool_Value3d(*args)
Value3d = staticmethod(Value3d)
def Value2d(*args):
"""
* Returns the <U,V> parameters which are associated with <P> it's the parameters which start the marching algorithm
:param PStart:
:type PStart: IntSurf_InteriorPoint &
:param U:
:type U: float &
:param V:
:type V: float &
:rtype: void
"""
return _IntSurf.IntSurf_InteriorPointTool_Value2d(*args)
Value2d = staticmethod(Value2d)
def Direction3d(*args):
"""
* returns the tangent at the intersectin in 3d space associated to <P>
:param PStart:
:type PStart: IntSurf_InteriorPoint &
:rtype: gp_Vec
"""
return _IntSurf.IntSurf_InteriorPointTool_Direction3d(*args)
Direction3d = staticmethod(Direction3d)
def Direction2d(*args):
"""
* returns the tangent at the intersectin in the parametric space of the parametrized surface.This tangent is associated to the value2d
:param PStart:
:type PStart: IntSurf_InteriorPoint &
:rtype: gp_Dir2d
"""
return _IntSurf.IntSurf_InteriorPointTool_Direction2d(*args)
Direction2d = staticmethod(Direction2d)
def __init__(self):
_IntSurf.IntSurf_InteriorPointTool_swiginit(self,_IntSurf.new_IntSurf_InteriorPointTool())
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_InteriorPointTool._kill_pointed = new_instancemethod(_IntSurf.IntSurf_InteriorPointTool__kill_pointed,None,IntSurf_InteriorPointTool)
IntSurf_InteriorPointTool_swigregister = _IntSurf.IntSurf_InteriorPointTool_swigregister
IntSurf_InteriorPointTool_swigregister(IntSurf_InteriorPointTool)
def IntSurf_InteriorPointTool_Value3d(*args):
"""
* Returns the 3d coordinates of the starting point.
:param PStart:
:type PStart: IntSurf_InteriorPoint &
:rtype: gp_Pnt
"""
return _IntSurf.IntSurf_InteriorPointTool_Value3d(*args)
def IntSurf_InteriorPointTool_Value2d(*args):
"""
* Returns the <U,V> parameters which are associated with <P> it's the parameters which start the marching algorithm
:param PStart:
:type PStart: IntSurf_InteriorPoint &
:param U:
:type U: float &
:param V:
:type V: float &
:rtype: void
"""
return _IntSurf.IntSurf_InteriorPointTool_Value2d(*args)
def IntSurf_InteriorPointTool_Direction3d(*args):
"""
* returns the tangent at the intersectin in 3d space associated to <P>
:param PStart:
:type PStart: IntSurf_InteriorPoint &
:rtype: gp_Vec
"""
return _IntSurf.IntSurf_InteriorPointTool_Direction3d(*args)
def IntSurf_InteriorPointTool_Direction2d(*args):
"""
* returns the tangent at the intersectin in the parametric space of the parametrized surface.This tangent is associated to the value2d
:param PStart:
:type PStart: IntSurf_InteriorPoint &
:rtype: gp_Dir2d
"""
return _IntSurf.IntSurf_InteriorPointTool_Direction2d(*args)
class IntSurf_LineOn2S(OCC.MMgt.MMgt_TShared):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:param theAllocator: default value is 0
:type theAllocator: IntSurf_Allocator &
:rtype: None
"""
_IntSurf.IntSurf_LineOn2S_swiginit(self,_IntSurf.new_IntSurf_LineOn2S(*args))
def Add(self, *args):
"""
* Adds a point in the line.
:param P:
:type P: IntSurf_PntOn2S &
:rtype: None
"""
return _IntSurf.IntSurf_LineOn2S_Add(self, *args)
def NbPoints(self, *args):
"""
* Returns the number of points in the line.
:rtype: int
"""
return _IntSurf.IntSurf_LineOn2S_NbPoints(self, *args)
def Reverse(self, *args):
"""
* Reverses the order of points of the line.
:rtype: None
"""
return _IntSurf.IntSurf_LineOn2S_Reverse(self, *args)
def Split(self, *args):
"""
* Keeps in <self> the points 1 to Index-1, and returns the items Index to the end.
:param Index:
:type Index: int
:rtype: Handle_IntSurf_LineOn2S
"""
return _IntSurf.IntSurf_LineOn2S_Split(self, *args)
def Value(self, *args):
"""
* Returns the point of range Index in the line.
:param Index:
:type Index: int
:rtype: IntSurf_PntOn2S
* Replaces the point of range Index in the line.
:param Index:
:type Index: int
:param P:
:type P: IntSurf_PntOn2S &
:rtype: None
"""
return _IntSurf.IntSurf_LineOn2S_Value(self, *args)
def SetUV(self, *args):
"""
* Sets the parametric coordinates on one of the surfaces of the point of range Index in the line.
:param Index:
:type Index: int
:param OnFirst:
:type OnFirst: bool
:param U:
:type U: float
:param V:
:type V: float
:rtype: None
"""
return _IntSurf.IntSurf_LineOn2S_SetUV(self, *args)
def Clear(self, *args):
"""
:rtype: None
"""
return _IntSurf.IntSurf_LineOn2S_Clear(self, *args)
def InsertBefore(self, *args):
"""
:param I:
:type I: int
:param P:
:type P: IntSurf_PntOn2S &
:rtype: None
"""
return _IntSurf.IntSurf_LineOn2S_InsertBefore(self, *args)
def RemovePoint(self, *args):
"""
:param I:
:type I: int
:rtype: None
"""
return _IntSurf.IntSurf_LineOn2S_RemovePoint(self, *args)
def _kill_pointed(self):
"""_kill_pointed(IntSurf_LineOn2S self)"""
return _IntSurf.IntSurf_LineOn2S__kill_pointed(self)
def GetHandle(self):
"""GetHandle(IntSurf_LineOn2S self) -> Handle_IntSurf_LineOn2S"""
return _IntSurf.IntSurf_LineOn2S_GetHandle(self)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_LineOn2S.Add = new_instancemethod(_IntSurf.IntSurf_LineOn2S_Add,None,IntSurf_LineOn2S)
IntSurf_LineOn2S.NbPoints = new_instancemethod(_IntSurf.IntSurf_LineOn2S_NbPoints,None,IntSurf_LineOn2S)
IntSurf_LineOn2S.Reverse = new_instancemethod(_IntSurf.IntSurf_LineOn2S_Reverse,None,IntSurf_LineOn2S)
IntSurf_LineOn2S.Split = new_instancemethod(_IntSurf.IntSurf_LineOn2S_Split,None,IntSurf_LineOn2S)
IntSurf_LineOn2S.Value = new_instancemethod(_IntSurf.IntSurf_LineOn2S_Value,None,IntSurf_LineOn2S)
IntSurf_LineOn2S.SetUV = new_instancemethod(_IntSurf.IntSurf_LineOn2S_SetUV,None,IntSurf_LineOn2S)
IntSurf_LineOn2S.Clear = new_instancemethod(_IntSurf.IntSurf_LineOn2S_Clear,None,IntSurf_LineOn2S)
IntSurf_LineOn2S.InsertBefore = new_instancemethod(_IntSurf.IntSurf_LineOn2S_InsertBefore,None,IntSurf_LineOn2S)
IntSurf_LineOn2S.RemovePoint = new_instancemethod(_IntSurf.IntSurf_LineOn2S_RemovePoint,None,IntSurf_LineOn2S)
IntSurf_LineOn2S._kill_pointed = new_instancemethod(_IntSurf.IntSurf_LineOn2S__kill_pointed,None,IntSurf_LineOn2S)
IntSurf_LineOn2S.GetHandle = new_instancemethod(_IntSurf.IntSurf_LineOn2S_GetHandle,None,IntSurf_LineOn2S)
IntSurf_LineOn2S_swigregister = _IntSurf.IntSurf_LineOn2S_swigregister
IntSurf_LineOn2S_swigregister(IntSurf_LineOn2S)
class Handle_IntSurf_LineOn2S(OCC.MMgt.Handle_MMgt_TShared):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_IntSurf.Handle_IntSurf_LineOn2S_swiginit(self,_IntSurf.new_Handle_IntSurf_LineOn2S(*args))
DownCast = staticmethod(_IntSurf.Handle_IntSurf_LineOn2S_DownCast)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
Handle_IntSurf_LineOn2S.Nullify = new_instancemethod(_IntSurf.Handle_IntSurf_LineOn2S_Nullify,None,Handle_IntSurf_LineOn2S)
Handle_IntSurf_LineOn2S.IsNull = new_instancemethod(_IntSurf.Handle_IntSurf_LineOn2S_IsNull,None,Handle_IntSurf_LineOn2S)
Handle_IntSurf_LineOn2S.GetObject = new_instancemethod(_IntSurf.Handle_IntSurf_LineOn2S_GetObject,None,Handle_IntSurf_LineOn2S)
Handle_IntSurf_LineOn2S._kill_pointed = new_instancemethod(_IntSurf.Handle_IntSurf_LineOn2S__kill_pointed,None,Handle_IntSurf_LineOn2S)
Handle_IntSurf_LineOn2S_swigregister = _IntSurf.Handle_IntSurf_LineOn2S_swigregister
Handle_IntSurf_LineOn2S_swigregister(Handle_IntSurf_LineOn2S)
def Handle_IntSurf_LineOn2S_DownCast(*args):
return _IntSurf.Handle_IntSurf_LineOn2S_DownCast(*args)
Handle_IntSurf_LineOn2S_DownCast = _IntSurf.Handle_IntSurf_LineOn2S_DownCast
class IntSurf_ListIteratorOfListOfPntOn2S(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:rtype: None
:param L:
:type L: IntSurf_ListOfPntOn2S &
:rtype: None
"""
_IntSurf.IntSurf_ListIteratorOfListOfPntOn2S_swiginit(self,_IntSurf.new_IntSurf_ListIteratorOfListOfPntOn2S(*args))
def Initialize(self, *args):
"""
:param L:
:type L: IntSurf_ListOfPntOn2S &
:rtype: None
"""
return _IntSurf.IntSurf_ListIteratorOfListOfPntOn2S_Initialize(self, *args)
def More(self, *args):
"""
:rtype: bool
"""
return _IntSurf.IntSurf_ListIteratorOfListOfPntOn2S_More(self, *args)
def Next(self, *args):
"""
:rtype: None
"""
return _IntSurf.IntSurf_ListIteratorOfListOfPntOn2S_Next(self, *args)
def Value(self, *args):
"""
:rtype: IntSurf_PntOn2S
"""
return _IntSurf.IntSurf_ListIteratorOfListOfPntOn2S_Value(self, *args)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_ListIteratorOfListOfPntOn2S.Initialize = new_instancemethod(_IntSurf.IntSurf_ListIteratorOfListOfPntOn2S_Initialize,None,IntSurf_ListIteratorOfListOfPntOn2S)
IntSurf_ListIteratorOfListOfPntOn2S.More = new_instancemethod(_IntSurf.IntSurf_ListIteratorOfListOfPntOn2S_More,None,IntSurf_ListIteratorOfListOfPntOn2S)
IntSurf_ListIteratorOfListOfPntOn2S.Next = new_instancemethod(_IntSurf.IntSurf_ListIteratorOfListOfPntOn2S_Next,None,IntSurf_ListIteratorOfListOfPntOn2S)
IntSurf_ListIteratorOfListOfPntOn2S.Value = new_instancemethod(_IntSurf.IntSurf_ListIteratorOfListOfPntOn2S_Value,None,IntSurf_ListIteratorOfListOfPntOn2S)
IntSurf_ListIteratorOfListOfPntOn2S._kill_pointed = new_instancemethod(_IntSurf.IntSurf_ListIteratorOfListOfPntOn2S__kill_pointed,None,IntSurf_ListIteratorOfListOfPntOn2S)
IntSurf_ListIteratorOfListOfPntOn2S_swigregister = _IntSurf.IntSurf_ListIteratorOfListOfPntOn2S_swigregister
IntSurf_ListIteratorOfListOfPntOn2S_swigregister(IntSurf_ListIteratorOfListOfPntOn2S)
class IntSurf_ListNodeOfListOfPntOn2S(OCC.TCollection.TCollection_MapNode):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:param I:
:type I: IntSurf_PntOn2S &
:param n:
:type n: TCollection_MapNodePtr &
:rtype: None
"""
_IntSurf.IntSurf_ListNodeOfListOfPntOn2S_swiginit(self,_IntSurf.new_IntSurf_ListNodeOfListOfPntOn2S(*args))
def Value(self, *args):
"""
:rtype: IntSurf_PntOn2S
"""
return _IntSurf.IntSurf_ListNodeOfListOfPntOn2S_Value(self, *args)
def _kill_pointed(self):
"""_kill_pointed(IntSurf_ListNodeOfListOfPntOn2S self)"""
return _IntSurf.IntSurf_ListNodeOfListOfPntOn2S__kill_pointed(self)
def GetHandle(self):
"""GetHandle(IntSurf_ListNodeOfListOfPntOn2S self) -> Handle_IntSurf_ListNodeOfListOfPntOn2S"""
return _IntSurf.IntSurf_ListNodeOfListOfPntOn2S_GetHandle(self)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_ListNodeOfListOfPntOn2S.Value = new_instancemethod(_IntSurf.IntSurf_ListNodeOfListOfPntOn2S_Value,None,IntSurf_ListNodeOfListOfPntOn2S)
IntSurf_ListNodeOfListOfPntOn2S._kill_pointed = new_instancemethod(_IntSurf.IntSurf_ListNodeOfListOfPntOn2S__kill_pointed,None,IntSurf_ListNodeOfListOfPntOn2S)
IntSurf_ListNodeOfListOfPntOn2S.GetHandle = new_instancemethod(_IntSurf.IntSurf_ListNodeOfListOfPntOn2S_GetHandle,None,IntSurf_ListNodeOfListOfPntOn2S)
IntSurf_ListNodeOfListOfPntOn2S_swigregister = _IntSurf.IntSurf_ListNodeOfListOfPntOn2S_swigregister
IntSurf_ListNodeOfListOfPntOn2S_swigregister(IntSurf_ListNodeOfListOfPntOn2S)
class Handle_IntSurf_ListNodeOfListOfPntOn2S(OCC.TCollection.Handle_TCollection_MapNode):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_IntSurf.Handle_IntSurf_ListNodeOfListOfPntOn2S_swiginit(self,_IntSurf.new_Handle_IntSurf_ListNodeOfListOfPntOn2S(*args))
DownCast = staticmethod(_IntSurf.Handle_IntSurf_ListNodeOfListOfPntOn2S_DownCast)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
Handle_IntSurf_ListNodeOfListOfPntOn2S.Nullify = new_instancemethod(_IntSurf.Handle_IntSurf_ListNodeOfListOfPntOn2S_Nullify,None,Handle_IntSurf_ListNodeOfListOfPntOn2S)
Handle_IntSurf_ListNodeOfListOfPntOn2S.IsNull = new_instancemethod(_IntSurf.Handle_IntSurf_ListNodeOfListOfPntOn2S_IsNull,None,Handle_IntSurf_ListNodeOfListOfPntOn2S)
Handle_IntSurf_ListNodeOfListOfPntOn2S.GetObject = new_instancemethod(_IntSurf.Handle_IntSurf_ListNodeOfListOfPntOn2S_GetObject,None,Handle_IntSurf_ListNodeOfListOfPntOn2S)
Handle_IntSurf_ListNodeOfListOfPntOn2S._kill_pointed = new_instancemethod(_IntSurf.Handle_IntSurf_ListNodeOfListOfPntOn2S__kill_pointed,None,Handle_IntSurf_ListNodeOfListOfPntOn2S)
Handle_IntSurf_ListNodeOfListOfPntOn2S_swigregister = _IntSurf.Handle_IntSurf_ListNodeOfListOfPntOn2S_swigregister
Handle_IntSurf_ListNodeOfListOfPntOn2S_swigregister(Handle_IntSurf_ListNodeOfListOfPntOn2S)
def Handle_IntSurf_ListNodeOfListOfPntOn2S_DownCast(*args):
return _IntSurf.Handle_IntSurf_ListNodeOfListOfPntOn2S_DownCast(*args)
Handle_IntSurf_ListNodeOfListOfPntOn2S_DownCast = _IntSurf.Handle_IntSurf_ListNodeOfListOfPntOn2S_DownCast
class IntSurf_ListOfPntOn2S(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:rtype: None
"""
_IntSurf.IntSurf_ListOfPntOn2S_swiginit(self,_IntSurf.new_IntSurf_ListOfPntOn2S(*args))
def Assign(self, *args):
"""
:param Other:
:type Other: IntSurf_ListOfPntOn2S &
:rtype: None
"""
return _IntSurf.IntSurf_ListOfPntOn2S_Assign(self, *args)
def Set(self, *args):
"""
:param Other:
:type Other: IntSurf_ListOfPntOn2S &
:rtype: None
"""
return _IntSurf.IntSurf_ListOfPntOn2S_Set(self, *args)
def Extent(self, *args):
"""
:rtype: int
"""
return _IntSurf.IntSurf_ListOfPntOn2S_Extent(self, *args)
def Clear(self, *args):
"""
:rtype: None
"""
return _IntSurf.IntSurf_ListOfPntOn2S_Clear(self, *args)
def IsEmpty(self, *args):
"""
:rtype: bool
"""
return _IntSurf.IntSurf_ListOfPntOn2S_IsEmpty(self, *args)
def Prepend(self, *args):
"""
:param I:
:type I: IntSurf_PntOn2S &
:rtype: None
:param I:
:type I: IntSurf_PntOn2S &
:param theIt:
:type theIt: IntSurf_ListIteratorOfListOfPntOn2S &
:rtype: None
:param Other:
:type Other: IntSurf_ListOfPntOn2S &
:rtype: None
"""
return _IntSurf.IntSurf_ListOfPntOn2S_Prepend(self, *args)
def Append(self, *args):
"""
:param I:
:type I: IntSurf_PntOn2S &
:rtype: None
:param I:
:type I: IntSurf_PntOn2S &
:param theIt:
:type theIt: IntSurf_ListIteratorOfListOfPntOn2S &
:rtype: None
:param Other:
:type Other: IntSurf_ListOfPntOn2S &
:rtype: None
"""
return _IntSurf.IntSurf_ListOfPntOn2S_Append(self, *args)
def First(self, *args):
"""
:rtype: IntSurf_PntOn2S
"""
return _IntSurf.IntSurf_ListOfPntOn2S_First(self, *args)
def Last(self, *args):
"""
:rtype: IntSurf_PntOn2S
"""
return _IntSurf.IntSurf_ListOfPntOn2S_Last(self, *args)
def RemoveFirst(self, *args):
"""
:rtype: None
"""
return _IntSurf.IntSurf_ListOfPntOn2S_RemoveFirst(self, *args)
def Remove(self, *args):
"""
:param It:
:type It: IntSurf_ListIteratorOfListOfPntOn2S &
:rtype: None
"""
return _IntSurf.IntSurf_ListOfPntOn2S_Remove(self, *args)
def InsertBefore(self, *args):
"""
:param I:
:type I: IntSurf_PntOn2S &
:param It:
:type It: IntSurf_ListIteratorOfListOfPntOn2S &
:rtype: None
:param Other:
:type Other: IntSurf_ListOfPntOn2S &
:param It:
:type It: IntSurf_ListIteratorOfListOfPntOn2S &
:rtype: None
"""
return _IntSurf.IntSurf_ListOfPntOn2S_InsertBefore(self, *args)
def InsertAfter(self, *args):
"""
:param I:
:type I: IntSurf_PntOn2S &
:param It:
:type It: IntSurf_ListIteratorOfListOfPntOn2S &
:rtype: None
:param Other:
:type Other: IntSurf_ListOfPntOn2S &
:param It:
:type It: IntSurf_ListIteratorOfListOfPntOn2S &
:rtype: None
"""
return _IntSurf.IntSurf_ListOfPntOn2S_InsertAfter(self, *args)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_ListOfPntOn2S.Assign = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_Assign,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S.Set = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_Set,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S.Extent = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_Extent,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S.Clear = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_Clear,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S.IsEmpty = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_IsEmpty,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S.Prepend = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_Prepend,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S.Append = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_Append,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S.First = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_First,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S.Last = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_Last,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S.RemoveFirst = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_RemoveFirst,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S.Remove = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_Remove,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S.InsertBefore = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_InsertBefore,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S.InsertAfter = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S_InsertAfter,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S._kill_pointed = new_instancemethod(_IntSurf.IntSurf_ListOfPntOn2S__kill_pointed,None,IntSurf_ListOfPntOn2S)
IntSurf_ListOfPntOn2S_swigregister = _IntSurf.IntSurf_ListOfPntOn2S_swigregister
IntSurf_ListOfPntOn2S_swigregister(IntSurf_ListOfPntOn2S)
class IntSurf_PathPoint(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:rtype: None
:param P:
:type P: gp_Pnt
:param U:
:type U: float
:param V:
:type V: float
:rtype: None
"""
_IntSurf.IntSurf_PathPoint_swiginit(self,_IntSurf.new_IntSurf_PathPoint(*args))
def SetValue(self, *args):
"""
:param P:
:type P: gp_Pnt
:param U:
:type U: float
:param V:
:type V: float
:rtype: None
"""
return _IntSurf.IntSurf_PathPoint_SetValue(self, *args)
def AddUV(self, *args):
"""
:param U:
:type U: float
:param V:
:type V: float
:rtype: None
"""
return _IntSurf.IntSurf_PathPoint_AddUV(self, *args)
def SetDirections(self, *args):
"""
:param V:
:type V: gp_Vec
:param D:
:type D: gp_Dir2d
:rtype: None
"""
return _IntSurf.IntSurf_PathPoint_SetDirections(self, *args)
def SetTangency(self, *args):
"""
:param Tang:
:type Tang: bool
:rtype: None
"""
return _IntSurf.IntSurf_PathPoint_SetTangency(self, *args)
def SetPassing(self, *args):
"""
:param Pass:
:type Pass: bool
:rtype: None
"""
return _IntSurf.IntSurf_PathPoint_SetPassing(self, *args)
def Value(self, *args):
"""
:rtype: gp_Pnt
"""
return _IntSurf.IntSurf_PathPoint_Value(self, *args)
def Value2d(self, *args):
"""
:param U:
:type U: float &
:param V:
:type V: float &
:rtype: None
"""
return _IntSurf.IntSurf_PathPoint_Value2d(self, *args)
def IsPassingPnt(self, *args):
"""
:rtype: bool
"""
return _IntSurf.IntSurf_PathPoint_IsPassingPnt(self, *args)
def IsTangent(self, *args):
"""
:rtype: bool
"""
return _IntSurf.IntSurf_PathPoint_IsTangent(self, *args)
def Direction3d(self, *args):
"""
:rtype: gp_Vec
"""
return _IntSurf.IntSurf_PathPoint_Direction3d(self, *args)
def Direction2d(self, *args):
"""
:rtype: gp_Dir2d
"""
return _IntSurf.IntSurf_PathPoint_Direction2d(self, *args)
def Multiplicity(self, *args):
"""
:rtype: int
"""
return _IntSurf.IntSurf_PathPoint_Multiplicity(self, *args)
def Parameters(self, *args):
"""
:param Index:
:type Index: int
:param U:
:type U: float &
:param V:
:type V: float &
:rtype: None
"""
return _IntSurf.IntSurf_PathPoint_Parameters(self, *args)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_PathPoint.SetValue = new_instancemethod(_IntSurf.IntSurf_PathPoint_SetValue,None,IntSurf_PathPoint)
IntSurf_PathPoint.AddUV = new_instancemethod(_IntSurf.IntSurf_PathPoint_AddUV,None,IntSurf_PathPoint)
IntSurf_PathPoint.SetDirections = new_instancemethod(_IntSurf.IntSurf_PathPoint_SetDirections,None,IntSurf_PathPoint)
IntSurf_PathPoint.SetTangency = new_instancemethod(_IntSurf.IntSurf_PathPoint_SetTangency,None,IntSurf_PathPoint)
IntSurf_PathPoint.SetPassing = new_instancemethod(_IntSurf.IntSurf_PathPoint_SetPassing,None,IntSurf_PathPoint)
IntSurf_PathPoint.Value = new_instancemethod(_IntSurf.IntSurf_PathPoint_Value,None,IntSurf_PathPoint)
IntSurf_PathPoint.Value2d = new_instancemethod(_IntSurf.IntSurf_PathPoint_Value2d,None,IntSurf_PathPoint)
IntSurf_PathPoint.IsPassingPnt = new_instancemethod(_IntSurf.IntSurf_PathPoint_IsPassingPnt,None,IntSurf_PathPoint)
IntSurf_PathPoint.IsTangent = new_instancemethod(_IntSurf.IntSurf_PathPoint_IsTangent,None,IntSurf_PathPoint)
IntSurf_PathPoint.Direction3d = new_instancemethod(_IntSurf.IntSurf_PathPoint_Direction3d,None,IntSurf_PathPoint)
IntSurf_PathPoint.Direction2d = new_instancemethod(_IntSurf.IntSurf_PathPoint_Direction2d,None,IntSurf_PathPoint)
IntSurf_PathPoint.Multiplicity = new_instancemethod(_IntSurf.IntSurf_PathPoint_Multiplicity,None,IntSurf_PathPoint)
IntSurf_PathPoint.Parameters = new_instancemethod(_IntSurf.IntSurf_PathPoint_Parameters,None,IntSurf_PathPoint)
IntSurf_PathPoint._kill_pointed = new_instancemethod(_IntSurf.IntSurf_PathPoint__kill_pointed,None,IntSurf_PathPoint)
IntSurf_PathPoint_swigregister = _IntSurf.IntSurf_PathPoint_swigregister
IntSurf_PathPoint_swigregister(IntSurf_PathPoint)
class IntSurf_PathPointTool(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def Value3d(*args):
"""
* Returns the 3d coordinates of the starting point.
:param PStart:
:type PStart: IntSurf_PathPoint &
:rtype: gp_Pnt
"""
return _IntSurf.IntSurf_PathPointTool_Value3d(*args)
Value3d = staticmethod(Value3d)
def Value2d(*args):
"""
* Returns the <U, V> parameters which are associated with <P> it's the parameters which start the marching algorithm
:param PStart:
:type PStart: IntSurf_PathPoint &
:param U:
:type U: float &
:param V:
:type V: float &
:rtype: void
"""
return _IntSurf.IntSurf_PathPointTool_Value2d(*args)
Value2d = staticmethod(Value2d)
def IsPassingPnt(*args):
"""
* Returns True if the point is a point on a non-oriented arc, which means that the intersection line does not stop at such a point but just go through such a point. IsPassingPnt is True when IsOnArc is True
:param PStart:
:type PStart: IntSurf_PathPoint &
:rtype: bool
"""
return _IntSurf.IntSurf_PathPointTool_IsPassingPnt(*args)
IsPassingPnt = staticmethod(IsPassingPnt)
def IsTangent(*args):
"""
* Returns True if the surfaces are tangent at this point. IsTangent can be True when IsOnArc is True if IsPassingPnt is True and IsTangent is True,this point is a stopped point.
:param PStart:
:type PStart: IntSurf_PathPoint &
:rtype: bool
"""
return _IntSurf.IntSurf_PathPointTool_IsTangent(*args)
IsTangent = staticmethod(IsTangent)
def Direction3d(*args):
"""
* returns the tangent at the intersection in 3d space associated to <P> an exception is raised if IsTangent is true.
:param PStart:
:type PStart: IntSurf_PathPoint &
:rtype: gp_Vec
"""
return _IntSurf.IntSurf_PathPointTool_Direction3d(*args)
Direction3d = staticmethod(Direction3d)
def Direction2d(*args):
"""
* returns the tangent at the intersection in the parametric space of the parametrized surface.This tangent is associated to the value2d la tangente a un sens signifiant (indique le sens de chemin ement) an exception is raised if IsTangent is true.
:param PStart:
:type PStart: IntSurf_PathPoint &
:rtype: gp_Dir2d
"""
return _IntSurf.IntSurf_PathPointTool_Direction2d(*args)
Direction2d = staticmethod(Direction2d)
def Multiplicity(*args):
"""
* Returns the multiplicity of the point i-e the number of auxillar parameters associated to the point which the principal parameters are given by Value2d
:param PStart:
:type PStart: IntSurf_PathPoint &
:rtype: int
"""
return _IntSurf.IntSurf_PathPointTool_Multiplicity(*args)
Multiplicity = staticmethod(Multiplicity)
def Parameters(*args):
"""
* Parametric coordinates associated to the multiplicity. An exception is raised if Mult<=0 or Mult>multiplicity.
:param PStart:
:type PStart: IntSurf_PathPoint &
:param Mult:
:type Mult: int
:param U:
:type U: float &
:param V:
:type V: float &
:rtype: void
"""
return _IntSurf.IntSurf_PathPointTool_Parameters(*args)
Parameters = staticmethod(Parameters)
def __init__(self):
_IntSurf.IntSurf_PathPointTool_swiginit(self,_IntSurf.new_IntSurf_PathPointTool())
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_PathPointTool._kill_pointed = new_instancemethod(_IntSurf.IntSurf_PathPointTool__kill_pointed,None,IntSurf_PathPointTool)
IntSurf_PathPointTool_swigregister = _IntSurf.IntSurf_PathPointTool_swigregister
IntSurf_PathPointTool_swigregister(IntSurf_PathPointTool)
def IntSurf_PathPointTool_Value3d(*args):
"""
* Returns the 3d coordinates of the starting point.
:param PStart:
:type PStart: IntSurf_PathPoint &
:rtype: gp_Pnt
"""
return _IntSurf.IntSurf_PathPointTool_Value3d(*args)
def IntSurf_PathPointTool_Value2d(*args):
"""
* Returns the <U, V> parameters which are associated with <P> it's the parameters which start the marching algorithm
:param PStart:
:type PStart: IntSurf_PathPoint &
:param U:
:type U: float &
:param V:
:type V: float &
:rtype: void
"""
return _IntSurf.IntSurf_PathPointTool_Value2d(*args)
def IntSurf_PathPointTool_IsPassingPnt(*args):
"""
* Returns True if the point is a point on a non-oriented arc, which means that the intersection line does not stop at such a point but just go through such a point. IsPassingPnt is True when IsOnArc is True
:param PStart:
:type PStart: IntSurf_PathPoint &
:rtype: bool
"""
return _IntSurf.IntSurf_PathPointTool_IsPassingPnt(*args)
def IntSurf_PathPointTool_IsTangent(*args):
"""
* Returns True if the surfaces are tangent at this point. IsTangent can be True when IsOnArc is True if IsPassingPnt is True and IsTangent is True,this point is a stopped point.
:param PStart:
:type PStart: IntSurf_PathPoint &
:rtype: bool
"""
return _IntSurf.IntSurf_PathPointTool_IsTangent(*args)
def IntSurf_PathPointTool_Direction3d(*args):
"""
* returns the tangent at the intersection in 3d space associated to <P> an exception is raised if IsTangent is true.
:param PStart:
:type PStart: IntSurf_PathPoint &
:rtype: gp_Vec
"""
return _IntSurf.IntSurf_PathPointTool_Direction3d(*args)
def IntSurf_PathPointTool_Direction2d(*args):
"""
* returns the tangent at the intersection in the parametric space of the parametrized surface.This tangent is associated to the value2d la tangente a un sens signifiant (indique le sens de chemin ement) an exception is raised if IsTangent is true.
:param PStart:
:type PStart: IntSurf_PathPoint &
:rtype: gp_Dir2d
"""
return _IntSurf.IntSurf_PathPointTool_Direction2d(*args)
def IntSurf_PathPointTool_Multiplicity(*args):
"""
* Returns the multiplicity of the point i-e the number of auxillar parameters associated to the point which the principal parameters are given by Value2d
:param PStart:
:type PStart: IntSurf_PathPoint &
:rtype: int
"""
return _IntSurf.IntSurf_PathPointTool_Multiplicity(*args)
def IntSurf_PathPointTool_Parameters(*args):
"""
* Parametric coordinates associated to the multiplicity. An exception is raised if Mult<=0 or Mult>multiplicity.
:param PStart:
:type PStart: IntSurf_PathPoint &
:param Mult:
:type Mult: int
:param U:
:type U: float &
:param V:
:type V: float &
:rtype: void
"""
return _IntSurf.IntSurf_PathPointTool_Parameters(*args)
class IntSurf_PntOn2S(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
* Empty constructor.
:rtype: None
"""
_IntSurf.IntSurf_PntOn2S_swiginit(self,_IntSurf.new_IntSurf_PntOn2S(*args))
def SetValue(self, *args):
"""
* Sets the value of the point in 3d space.
:param Pt:
:type Pt: gp_Pnt
:rtype: None
* Sets the values of the point in 3d space, and in the parametric space of one of the surface.
:param Pt:
:type Pt: gp_Pnt
:param OnFirst:
:type OnFirst: bool
:param U:
:type U: float
:param V:
:type V: float
:rtype: None
* Sets the values of the point in 3d space, and in the parametric space of each surface.
:param Pt:
:type Pt: gp_Pnt
:param U1:
:type U1: float
:param V1:
:type V1: float
:param U2:
:type U2: float
:param V2:
:type V2: float
:rtype: None
* Set the values of the point in the parametric space of one of the surface.
:param OnFirst:
:type OnFirst: bool
:param U:
:type U: float
:param V:
:type V: float
:rtype: None
* Set the values of the point in the parametric space of one of the surface.
:param U1:
:type U1: float
:param V1:
:type V1: float
:param U2:
:type U2: float
:param V2:
:type V2: float
:rtype: None
"""
return _IntSurf.IntSurf_PntOn2S_SetValue(self, *args)
def Value(self, *args):
"""
* Returns the point in 3d space.
:rtype: gp_Pnt
"""
return _IntSurf.IntSurf_PntOn2S_Value(self, *args)
def ParametersOnS1(self, *args):
"""
* Returns the parameters of the point on the first surface.
:param U1:
:type U1: float &
:param V1:
:type V1: float &
:rtype: None
"""
return _IntSurf.IntSurf_PntOn2S_ParametersOnS1(self, *args)
def ParametersOnS2(self, *args):
"""
* Returns the parameters of the point on the second surface.
:param U2:
:type U2: float &
:param V2:
:type V2: float &
:rtype: None
"""
return _IntSurf.IntSurf_PntOn2S_ParametersOnS2(self, *args)
def Parameters(self, *args):
"""
* Returns the parameters of the point on both surfaces.
:param U1:
:type U1: float &
:param V1:
:type V1: float &
:param U2:
:type U2: float &
:param V2:
:type V2: float &
:rtype: None
"""
return _IntSurf.IntSurf_PntOn2S_Parameters(self, *args)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_PntOn2S.SetValue = new_instancemethod(_IntSurf.IntSurf_PntOn2S_SetValue,None,IntSurf_PntOn2S)
IntSurf_PntOn2S.Value = new_instancemethod(_IntSurf.IntSurf_PntOn2S_Value,None,IntSurf_PntOn2S)
IntSurf_PntOn2S.ParametersOnS1 = new_instancemethod(_IntSurf.IntSurf_PntOn2S_ParametersOnS1,None,IntSurf_PntOn2S)
IntSurf_PntOn2S.ParametersOnS2 = new_instancemethod(_IntSurf.IntSurf_PntOn2S_ParametersOnS2,None,IntSurf_PntOn2S)
IntSurf_PntOn2S.Parameters = new_instancemethod(_IntSurf.IntSurf_PntOn2S_Parameters,None,IntSurf_PntOn2S)
IntSurf_PntOn2S._kill_pointed = new_instancemethod(_IntSurf.IntSurf_PntOn2S__kill_pointed,None,IntSurf_PntOn2S)
IntSurf_PntOn2S_swigregister = _IntSurf.IntSurf_PntOn2S_swigregister
IntSurf_PntOn2S_swigregister(IntSurf_PntOn2S)
class IntSurf_Quadric(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:rtype: None
:param P:
:type P: gp_Pln
:rtype: None
:param C:
:type C: gp_Cylinder
:rtype: None
:param S:
:type S: gp_Sphere
:rtype: None
:param C:
:type C: gp_Cone
:rtype: None
:param T:
:type T: gp_Torus
:rtype: None
"""
_IntSurf.IntSurf_Quadric_swiginit(self,_IntSurf.new_IntSurf_Quadric(*args))
def SetValue(self, *args):
"""
:param P:
:type P: gp_Pln
:rtype: None
:param C:
:type C: gp_Cylinder
:rtype: None
:param S:
:type S: gp_Sphere
:rtype: None
:param C:
:type C: gp_Cone
:rtype: None
:param T:
:type T: gp_Torus
:rtype: None
"""
return _IntSurf.IntSurf_Quadric_SetValue(self, *args)
def Distance(self, *args):
"""
:param P:
:type P: gp_Pnt
:rtype: float
"""
return _IntSurf.IntSurf_Quadric_Distance(self, *args)
def Gradient(self, *args):
"""
:param P:
:type P: gp_Pnt
:rtype: gp_Vec
"""
return _IntSurf.IntSurf_Quadric_Gradient(self, *args)
def ValAndGrad(self, *args):
"""
:param P:
:type P: gp_Pnt
:param Dist:
:type Dist: float &
:param Grad:
:type Grad: gp_Vec
:rtype: None
"""
return _IntSurf.IntSurf_Quadric_ValAndGrad(self, *args)
def TypeQuadric(self, *args):
"""
:rtype: GeomAbs_SurfaceType
"""
return _IntSurf.IntSurf_Quadric_TypeQuadric(self, *args)
def Plane(self, *args):
"""
:rtype: gp_Pln
"""
return _IntSurf.IntSurf_Quadric_Plane(self, *args)
def Sphere(self, *args):
"""
:rtype: gp_Sphere
"""
return _IntSurf.IntSurf_Quadric_Sphere(self, *args)
def Cylinder(self, *args):
"""
:rtype: gp_Cylinder
"""
return _IntSurf.IntSurf_Quadric_Cylinder(self, *args)
def Cone(self, *args):
"""
:rtype: gp_Cone
"""
return _IntSurf.IntSurf_Quadric_Cone(self, *args)
def Torus(self, *args):
"""
:rtype: gp_Torus
"""
return _IntSurf.IntSurf_Quadric_Torus(self, *args)
def Value(self, *args):
"""
:param U:
:type U: float
:param V:
:type V: float
:rtype: gp_Pnt
"""
return _IntSurf.IntSurf_Quadric_Value(self, *args)
def D1(self, *args):
"""
:param U:
:type U: float
:param V:
:type V: float
:param P:
:type P: gp_Pnt
:param D1U:
:type D1U: gp_Vec
:param D1V:
:type D1V: gp_Vec
:rtype: None
"""
return _IntSurf.IntSurf_Quadric_D1(self, *args)
def DN(self, *args):
"""
:param U:
:type U: float
:param V:
:type V: float
:param Nu:
:type Nu: int
:param Nv:
:type Nv: int
:rtype: gp_Vec
"""
return _IntSurf.IntSurf_Quadric_DN(self, *args)
def Parameters(self, *args):
"""
:param P:
:type P: gp_Pnt
:param U:
:type U: float &
:param V:
:type V: float &
:rtype: None
"""
return _IntSurf.IntSurf_Quadric_Parameters(self, *args)
def Normale(self, *args):
"""
:param U:
:type U: float
:param V:
:type V: float
:rtype: gp_Vec
:param P:
:type P: gp_Pnt
:rtype: gp_Vec
"""
return _IntSurf.IntSurf_Quadric_Normale(self, *args)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_Quadric.SetValue = new_instancemethod(_IntSurf.IntSurf_Quadric_SetValue,None,IntSurf_Quadric)
IntSurf_Quadric.Distance = new_instancemethod(_IntSurf.IntSurf_Quadric_Distance,None,IntSurf_Quadric)
IntSurf_Quadric.Gradient = new_instancemethod(_IntSurf.IntSurf_Quadric_Gradient,None,IntSurf_Quadric)
IntSurf_Quadric.ValAndGrad = new_instancemethod(_IntSurf.IntSurf_Quadric_ValAndGrad,None,IntSurf_Quadric)
IntSurf_Quadric.TypeQuadric = new_instancemethod(_IntSurf.IntSurf_Quadric_TypeQuadric,None,IntSurf_Quadric)
IntSurf_Quadric.Plane = new_instancemethod(_IntSurf.IntSurf_Quadric_Plane,None,IntSurf_Quadric)
IntSurf_Quadric.Sphere = new_instancemethod(_IntSurf.IntSurf_Quadric_Sphere,None,IntSurf_Quadric)
IntSurf_Quadric.Cylinder = new_instancemethod(_IntSurf.IntSurf_Quadric_Cylinder,None,IntSurf_Quadric)
IntSurf_Quadric.Cone = new_instancemethod(_IntSurf.IntSurf_Quadric_Cone,None,IntSurf_Quadric)
IntSurf_Quadric.Torus = new_instancemethod(_IntSurf.IntSurf_Quadric_Torus,None,IntSurf_Quadric)
IntSurf_Quadric.Value = new_instancemethod(_IntSurf.IntSurf_Quadric_Value,None,IntSurf_Quadric)
IntSurf_Quadric.D1 = new_instancemethod(_IntSurf.IntSurf_Quadric_D1,None,IntSurf_Quadric)
IntSurf_Quadric.DN = new_instancemethod(_IntSurf.IntSurf_Quadric_DN,None,IntSurf_Quadric)
IntSurf_Quadric.Parameters = new_instancemethod(_IntSurf.IntSurf_Quadric_Parameters,None,IntSurf_Quadric)
IntSurf_Quadric.Normale = new_instancemethod(_IntSurf.IntSurf_Quadric_Normale,None,IntSurf_Quadric)
IntSurf_Quadric._kill_pointed = new_instancemethod(_IntSurf.IntSurf_Quadric__kill_pointed,None,IntSurf_Quadric)
IntSurf_Quadric_swigregister = _IntSurf.IntSurf_Quadric_swigregister
IntSurf_Quadric_swigregister(IntSurf_Quadric)
class IntSurf_QuadricTool(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def Value(*args):
"""
* Returns the value of the function.
:param Quad:
:type Quad: IntSurf_Quadric &
:param X:
:type X: float
:param Y:
:type Y: float
:param Z:
:type Z: float
:rtype: float
"""
return _IntSurf.IntSurf_QuadricTool_Value(*args)
Value = staticmethod(Value)
def Gradient(*args):
"""
* Returns the gradient of the function.
:param Quad:
:type Quad: IntSurf_Quadric &
:param X:
:type X: float
:param Y:
:type Y: float
:param Z:
:type Z: float
:param V:
:type V: gp_Vec
:rtype: void
"""
return _IntSurf.IntSurf_QuadricTool_Gradient(*args)
Gradient = staticmethod(Gradient)
def ValueAndGradient(*args):
"""
* Returns the value and the gradient.
:param Quad:
:type Quad: IntSurf_Quadric &
:param X:
:type X: float
:param Y:
:type Y: float
:param Z:
:type Z: float
:param Val:
:type Val: float &
:param Grad:
:type Grad: gp_Vec
:rtype: void
"""
return _IntSurf.IntSurf_QuadricTool_ValueAndGradient(*args)
ValueAndGradient = staticmethod(ValueAndGradient)
def Tolerance(*args):
"""
* returns the tolerance of the zero of the implicit function
:param Quad:
:type Quad: IntSurf_Quadric &
:rtype: float
"""
return _IntSurf.IntSurf_QuadricTool_Tolerance(*args)
Tolerance = staticmethod(Tolerance)
def __init__(self):
_IntSurf.IntSurf_QuadricTool_swiginit(self,_IntSurf.new_IntSurf_QuadricTool())
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_QuadricTool._kill_pointed = new_instancemethod(_IntSurf.IntSurf_QuadricTool__kill_pointed,None,IntSurf_QuadricTool)
IntSurf_QuadricTool_swigregister = _IntSurf.IntSurf_QuadricTool_swigregister
IntSurf_QuadricTool_swigregister(IntSurf_QuadricTool)
def IntSurf_QuadricTool_Value(*args):
"""
* Returns the value of the function.
:param Quad:
:type Quad: IntSurf_Quadric &
:param X:
:type X: float
:param Y:
:type Y: float
:param Z:
:type Z: float
:rtype: float
"""
return _IntSurf.IntSurf_QuadricTool_Value(*args)
def IntSurf_QuadricTool_Gradient(*args):
"""
* Returns the gradient of the function.
:param Quad:
:type Quad: IntSurf_Quadric &
:param X:
:type X: float
:param Y:
:type Y: float
:param Z:
:type Z: float
:param V:
:type V: gp_Vec
:rtype: void
"""
return _IntSurf.IntSurf_QuadricTool_Gradient(*args)
def IntSurf_QuadricTool_ValueAndGradient(*args):
"""
* Returns the value and the gradient.
:param Quad:
:type Quad: IntSurf_Quadric &
:param X:
:type X: float
:param Y:
:type Y: float
:param Z:
:type Z: float
:param Val:
:type Val: float &
:param Grad:
:type Grad: gp_Vec
:rtype: void
"""
return _IntSurf.IntSurf_QuadricTool_ValueAndGradient(*args)
def IntSurf_QuadricTool_Tolerance(*args):
"""
* returns the tolerance of the zero of the implicit function
:param Quad:
:type Quad: IntSurf_Quadric &
:rtype: float
"""
return _IntSurf.IntSurf_QuadricTool_Tolerance(*args)
class IntSurf_SequenceNodeOfSequenceOfCouple(OCC.TCollection.TCollection_SeqNode):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:param I:
:type I: IntSurf_Couple &
:param n:
:type n: TCollection_SeqNodePtr &
:param p:
:type p: TCollection_SeqNodePtr &
:rtype: None
"""
_IntSurf.IntSurf_SequenceNodeOfSequenceOfCouple_swiginit(self,_IntSurf.new_IntSurf_SequenceNodeOfSequenceOfCouple(*args))
def Value(self, *args):
"""
:rtype: IntSurf_Couple
"""
return _IntSurf.IntSurf_SequenceNodeOfSequenceOfCouple_Value(self, *args)
def _kill_pointed(self):
"""_kill_pointed(IntSurf_SequenceNodeOfSequenceOfCouple self)"""
return _IntSurf.IntSurf_SequenceNodeOfSequenceOfCouple__kill_pointed(self)
def GetHandle(self):
"""GetHandle(IntSurf_SequenceNodeOfSequenceOfCouple self) -> Handle_IntSurf_SequenceNodeOfSequenceOfCouple"""
return _IntSurf.IntSurf_SequenceNodeOfSequenceOfCouple_GetHandle(self)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_SequenceNodeOfSequenceOfCouple.Value = new_instancemethod(_IntSurf.IntSurf_SequenceNodeOfSequenceOfCouple_Value,None,IntSurf_SequenceNodeOfSequenceOfCouple)
IntSurf_SequenceNodeOfSequenceOfCouple._kill_pointed = new_instancemethod(_IntSurf.IntSurf_SequenceNodeOfSequenceOfCouple__kill_pointed,None,IntSurf_SequenceNodeOfSequenceOfCouple)
IntSurf_SequenceNodeOfSequenceOfCouple.GetHandle = new_instancemethod(_IntSurf.IntSurf_SequenceNodeOfSequenceOfCouple_GetHandle,None,IntSurf_SequenceNodeOfSequenceOfCouple)
IntSurf_SequenceNodeOfSequenceOfCouple_swigregister = _IntSurf.IntSurf_SequenceNodeOfSequenceOfCouple_swigregister
IntSurf_SequenceNodeOfSequenceOfCouple_swigregister(IntSurf_SequenceNodeOfSequenceOfCouple)
class Handle_IntSurf_SequenceNodeOfSequenceOfCouple(OCC.TCollection.Handle_TCollection_SeqNode):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfCouple_swiginit(self,_IntSurf.new_Handle_IntSurf_SequenceNodeOfSequenceOfCouple(*args))
DownCast = staticmethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfCouple_DownCast)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
Handle_IntSurf_SequenceNodeOfSequenceOfCouple.Nullify = new_instancemethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfCouple_Nullify,None,Handle_IntSurf_SequenceNodeOfSequenceOfCouple)
Handle_IntSurf_SequenceNodeOfSequenceOfCouple.IsNull = new_instancemethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfCouple_IsNull,None,Handle_IntSurf_SequenceNodeOfSequenceOfCouple)
Handle_IntSurf_SequenceNodeOfSequenceOfCouple.GetObject = new_instancemethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfCouple_GetObject,None,Handle_IntSurf_SequenceNodeOfSequenceOfCouple)
Handle_IntSurf_SequenceNodeOfSequenceOfCouple._kill_pointed = new_instancemethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfCouple__kill_pointed,None,Handle_IntSurf_SequenceNodeOfSequenceOfCouple)
Handle_IntSurf_SequenceNodeOfSequenceOfCouple_swigregister = _IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfCouple_swigregister
Handle_IntSurf_SequenceNodeOfSequenceOfCouple_swigregister(Handle_IntSurf_SequenceNodeOfSequenceOfCouple)
def Handle_IntSurf_SequenceNodeOfSequenceOfCouple_DownCast(*args):
return _IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfCouple_DownCast(*args)
Handle_IntSurf_SequenceNodeOfSequenceOfCouple_DownCast = _IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfCouple_DownCast
class IntSurf_SequenceNodeOfSequenceOfInteriorPoint(OCC.TCollection.TCollection_SeqNode):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:param I:
:type I: IntSurf_InteriorPoint &
:param n:
:type n: TCollection_SeqNodePtr &
:param p:
:type p: TCollection_SeqNodePtr &
:rtype: None
"""
_IntSurf.IntSurf_SequenceNodeOfSequenceOfInteriorPoint_swiginit(self,_IntSurf.new_IntSurf_SequenceNodeOfSequenceOfInteriorPoint(*args))
def Value(self, *args):
"""
:rtype: IntSurf_InteriorPoint
"""
return _IntSurf.IntSurf_SequenceNodeOfSequenceOfInteriorPoint_Value(self, *args)
def _kill_pointed(self):
"""_kill_pointed(IntSurf_SequenceNodeOfSequenceOfInteriorPoint self)"""
return _IntSurf.IntSurf_SequenceNodeOfSequenceOfInteriorPoint__kill_pointed(self)
def GetHandle(self):
"""GetHandle(IntSurf_SequenceNodeOfSequenceOfInteriorPoint self) -> Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint"""
return _IntSurf.IntSurf_SequenceNodeOfSequenceOfInteriorPoint_GetHandle(self)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_SequenceNodeOfSequenceOfInteriorPoint.Value = new_instancemethod(_IntSurf.IntSurf_SequenceNodeOfSequenceOfInteriorPoint_Value,None,IntSurf_SequenceNodeOfSequenceOfInteriorPoint)
IntSurf_SequenceNodeOfSequenceOfInteriorPoint._kill_pointed = new_instancemethod(_IntSurf.IntSurf_SequenceNodeOfSequenceOfInteriorPoint__kill_pointed,None,IntSurf_SequenceNodeOfSequenceOfInteriorPoint)
IntSurf_SequenceNodeOfSequenceOfInteriorPoint.GetHandle = new_instancemethod(_IntSurf.IntSurf_SequenceNodeOfSequenceOfInteriorPoint_GetHandle,None,IntSurf_SequenceNodeOfSequenceOfInteriorPoint)
IntSurf_SequenceNodeOfSequenceOfInteriorPoint_swigregister = _IntSurf.IntSurf_SequenceNodeOfSequenceOfInteriorPoint_swigregister
IntSurf_SequenceNodeOfSequenceOfInteriorPoint_swigregister(IntSurf_SequenceNodeOfSequenceOfInteriorPoint)
class Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint(OCC.TCollection.Handle_TCollection_SeqNode):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint_swiginit(self,_IntSurf.new_Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint(*args))
DownCast = staticmethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint_DownCast)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint.Nullify = new_instancemethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint_Nullify,None,Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint)
Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint.IsNull = new_instancemethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint_IsNull,None,Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint)
Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint.GetObject = new_instancemethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint_GetObject,None,Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint)
Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint._kill_pointed = new_instancemethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint__kill_pointed,None,Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint)
Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint_swigregister = _IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint_swigregister
Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint_swigregister(Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint)
def Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint_DownCast(*args):
return _IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint_DownCast(*args)
Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint_DownCast = _IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfInteriorPoint_DownCast
class IntSurf_SequenceNodeOfSequenceOfPathPoint(OCC.TCollection.TCollection_SeqNode):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:param I:
:type I: IntSurf_PathPoint &
:param n:
:type n: TCollection_SeqNodePtr &
:param p:
:type p: TCollection_SeqNodePtr &
:rtype: None
"""
_IntSurf.IntSurf_SequenceNodeOfSequenceOfPathPoint_swiginit(self,_IntSurf.new_IntSurf_SequenceNodeOfSequenceOfPathPoint(*args))
def Value(self, *args):
"""
:rtype: IntSurf_PathPoint
"""
return _IntSurf.IntSurf_SequenceNodeOfSequenceOfPathPoint_Value(self, *args)
def _kill_pointed(self):
"""_kill_pointed(IntSurf_SequenceNodeOfSequenceOfPathPoint self)"""
return _IntSurf.IntSurf_SequenceNodeOfSequenceOfPathPoint__kill_pointed(self)
def GetHandle(self):
"""GetHandle(IntSurf_SequenceNodeOfSequenceOfPathPoint self) -> Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint"""
return _IntSurf.IntSurf_SequenceNodeOfSequenceOfPathPoint_GetHandle(self)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_SequenceNodeOfSequenceOfPathPoint.Value = new_instancemethod(_IntSurf.IntSurf_SequenceNodeOfSequenceOfPathPoint_Value,None,IntSurf_SequenceNodeOfSequenceOfPathPoint)
IntSurf_SequenceNodeOfSequenceOfPathPoint._kill_pointed = new_instancemethod(_IntSurf.IntSurf_SequenceNodeOfSequenceOfPathPoint__kill_pointed,None,IntSurf_SequenceNodeOfSequenceOfPathPoint)
IntSurf_SequenceNodeOfSequenceOfPathPoint.GetHandle = new_instancemethod(_IntSurf.IntSurf_SequenceNodeOfSequenceOfPathPoint_GetHandle,None,IntSurf_SequenceNodeOfSequenceOfPathPoint)
IntSurf_SequenceNodeOfSequenceOfPathPoint_swigregister = _IntSurf.IntSurf_SequenceNodeOfSequenceOfPathPoint_swigregister
IntSurf_SequenceNodeOfSequenceOfPathPoint_swigregister(IntSurf_SequenceNodeOfSequenceOfPathPoint)
class Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint(OCC.TCollection.Handle_TCollection_SeqNode):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint_swiginit(self,_IntSurf.new_Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint(*args))
DownCast = staticmethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint_DownCast)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint.Nullify = new_instancemethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint_Nullify,None,Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint)
Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint.IsNull = new_instancemethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint_IsNull,None,Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint)
Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint.GetObject = new_instancemethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint_GetObject,None,Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint)
Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint._kill_pointed = new_instancemethod(_IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint__kill_pointed,None,Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint)
Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint_swigregister = _IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint_swigregister
Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint_swigregister(Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint)
def Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint_DownCast(*args):
return _IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint_DownCast(*args)
Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint_DownCast = _IntSurf.Handle_IntSurf_SequenceNodeOfSequenceOfPathPoint_DownCast
class IntSurf_SequenceOfCouple(OCC.TCollection.TCollection_BaseSequence):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:rtype: None
"""
_IntSurf.IntSurf_SequenceOfCouple_swiginit(self,_IntSurf.new_IntSurf_SequenceOfCouple(*args))
def Clear(self, *args):
"""
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfCouple_Clear(self, *args)
def Assign(self, *args):
"""
:param Other:
:type Other: IntSurf_SequenceOfCouple &
:rtype: IntSurf_SequenceOfCouple
"""
return _IntSurf.IntSurf_SequenceOfCouple_Assign(self, *args)
def Set(self, *args):
"""
:param Other:
:type Other: IntSurf_SequenceOfCouple &
:rtype: IntSurf_SequenceOfCouple
"""
return _IntSurf.IntSurf_SequenceOfCouple_Set(self, *args)
def Append(self, *args):
"""
:param T:
:type T: IntSurf_Couple &
:rtype: None
:param S:
:type S: IntSurf_SequenceOfCouple &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfCouple_Append(self, *args)
def Prepend(self, *args):
"""
:param T:
:type T: IntSurf_Couple &
:rtype: None
:param S:
:type S: IntSurf_SequenceOfCouple &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfCouple_Prepend(self, *args)
def InsertBefore(self, *args):
"""
:param Index:
:type Index: int
:param T:
:type T: IntSurf_Couple &
:rtype: None
:param Index:
:type Index: int
:param S:
:type S: IntSurf_SequenceOfCouple &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfCouple_InsertBefore(self, *args)
def InsertAfter(self, *args):
"""
:param Index:
:type Index: int
:param T:
:type T: IntSurf_Couple &
:rtype: None
:param Index:
:type Index: int
:param S:
:type S: IntSurf_SequenceOfCouple &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfCouple_InsertAfter(self, *args)
def First(self, *args):
"""
:rtype: IntSurf_Couple
"""
return _IntSurf.IntSurf_SequenceOfCouple_First(self, *args)
def Last(self, *args):
"""
:rtype: IntSurf_Couple
"""
return _IntSurf.IntSurf_SequenceOfCouple_Last(self, *args)
def Split(self, *args):
"""
:param Index:
:type Index: int
:param Sub:
:type Sub: IntSurf_SequenceOfCouple &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfCouple_Split(self, *args)
def Value(self, *args):
"""
:param Index:
:type Index: int
:rtype: IntSurf_Couple
"""
return _IntSurf.IntSurf_SequenceOfCouple_Value(self, *args)
def SetValue(self, *args):
"""
:param Index:
:type Index: int
:param I:
:type I: IntSurf_Couple &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfCouple_SetValue(self, *args)
def ChangeValue(self, *args):
"""
:param Index:
:type Index: int
:rtype: IntSurf_Couple
"""
return _IntSurf.IntSurf_SequenceOfCouple_ChangeValue(self, *args)
def Remove(self, *args):
"""
:param Index:
:type Index: int
:rtype: None
:param FromIndex:
:type FromIndex: int
:param ToIndex:
:type ToIndex: int
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfCouple_Remove(self, *args)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_SequenceOfCouple.Clear = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_Clear,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.Assign = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_Assign,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.Set = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_Set,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.Append = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_Append,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.Prepend = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_Prepend,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.InsertBefore = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_InsertBefore,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.InsertAfter = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_InsertAfter,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.First = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_First,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.Last = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_Last,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.Split = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_Split,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.Value = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_Value,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.SetValue = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_SetValue,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.ChangeValue = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_ChangeValue,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple.Remove = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple_Remove,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple._kill_pointed = new_instancemethod(_IntSurf.IntSurf_SequenceOfCouple__kill_pointed,None,IntSurf_SequenceOfCouple)
IntSurf_SequenceOfCouple_swigregister = _IntSurf.IntSurf_SequenceOfCouple_swigregister
IntSurf_SequenceOfCouple_swigregister(IntSurf_SequenceOfCouple)
class IntSurf_SequenceOfInteriorPoint(OCC.TCollection.TCollection_BaseSequence):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:rtype: None
"""
_IntSurf.IntSurf_SequenceOfInteriorPoint_swiginit(self,_IntSurf.new_IntSurf_SequenceOfInteriorPoint(*args))
def Clear(self, *args):
"""
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_Clear(self, *args)
def Assign(self, *args):
"""
:param Other:
:type Other: IntSurf_SequenceOfInteriorPoint &
:rtype: IntSurf_SequenceOfInteriorPoint
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_Assign(self, *args)
def Set(self, *args):
"""
:param Other:
:type Other: IntSurf_SequenceOfInteriorPoint &
:rtype: IntSurf_SequenceOfInteriorPoint
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_Set(self, *args)
def Append(self, *args):
"""
:param T:
:type T: IntSurf_InteriorPoint &
:rtype: None
:param S:
:type S: IntSurf_SequenceOfInteriorPoint &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_Append(self, *args)
def Prepend(self, *args):
"""
:param T:
:type T: IntSurf_InteriorPoint &
:rtype: None
:param S:
:type S: IntSurf_SequenceOfInteriorPoint &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_Prepend(self, *args)
def InsertBefore(self, *args):
"""
:param Index:
:type Index: int
:param T:
:type T: IntSurf_InteriorPoint &
:rtype: None
:param Index:
:type Index: int
:param S:
:type S: IntSurf_SequenceOfInteriorPoint &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_InsertBefore(self, *args)
def InsertAfter(self, *args):
"""
:param Index:
:type Index: int
:param T:
:type T: IntSurf_InteriorPoint &
:rtype: None
:param Index:
:type Index: int
:param S:
:type S: IntSurf_SequenceOfInteriorPoint &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_InsertAfter(self, *args)
def First(self, *args):
"""
:rtype: IntSurf_InteriorPoint
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_First(self, *args)
def Last(self, *args):
"""
:rtype: IntSurf_InteriorPoint
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_Last(self, *args)
def Split(self, *args):
"""
:param Index:
:type Index: int
:param Sub:
:type Sub: IntSurf_SequenceOfInteriorPoint &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_Split(self, *args)
def Value(self, *args):
"""
:param Index:
:type Index: int
:rtype: IntSurf_InteriorPoint
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_Value(self, *args)
def SetValue(self, *args):
"""
:param Index:
:type Index: int
:param I:
:type I: IntSurf_InteriorPoint &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_SetValue(self, *args)
def ChangeValue(self, *args):
"""
:param Index:
:type Index: int
:rtype: IntSurf_InteriorPoint
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_ChangeValue(self, *args)
def Remove(self, *args):
"""
:param Index:
:type Index: int
:rtype: None
:param FromIndex:
:type FromIndex: int
:param ToIndex:
:type ToIndex: int
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfInteriorPoint_Remove(self, *args)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_SequenceOfInteriorPoint.Clear = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_Clear,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.Assign = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_Assign,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.Set = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_Set,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.Append = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_Append,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.Prepend = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_Prepend,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.InsertBefore = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_InsertBefore,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.InsertAfter = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_InsertAfter,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.First = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_First,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.Last = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_Last,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.Split = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_Split,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.Value = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_Value,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.SetValue = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_SetValue,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.ChangeValue = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_ChangeValue,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint.Remove = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint_Remove,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint._kill_pointed = new_instancemethod(_IntSurf.IntSurf_SequenceOfInteriorPoint__kill_pointed,None,IntSurf_SequenceOfInteriorPoint)
IntSurf_SequenceOfInteriorPoint_swigregister = _IntSurf.IntSurf_SequenceOfInteriorPoint_swigregister
IntSurf_SequenceOfInteriorPoint_swigregister(IntSurf_SequenceOfInteriorPoint)
class IntSurf_SequenceOfPathPoint(OCC.TCollection.TCollection_BaseSequence):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
:rtype: None
"""
_IntSurf.IntSurf_SequenceOfPathPoint_swiginit(self,_IntSurf.new_IntSurf_SequenceOfPathPoint(*args))
def Clear(self, *args):
"""
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_Clear(self, *args)
def Assign(self, *args):
"""
:param Other:
:type Other: IntSurf_SequenceOfPathPoint &
:rtype: IntSurf_SequenceOfPathPoint
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_Assign(self, *args)
def Set(self, *args):
"""
:param Other:
:type Other: IntSurf_SequenceOfPathPoint &
:rtype: IntSurf_SequenceOfPathPoint
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_Set(self, *args)
def Append(self, *args):
"""
:param T:
:type T: IntSurf_PathPoint &
:rtype: None
:param S:
:type S: IntSurf_SequenceOfPathPoint &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_Append(self, *args)
def Prepend(self, *args):
"""
:param T:
:type T: IntSurf_PathPoint &
:rtype: None
:param S:
:type S: IntSurf_SequenceOfPathPoint &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_Prepend(self, *args)
def InsertBefore(self, *args):
"""
:param Index:
:type Index: int
:param T:
:type T: IntSurf_PathPoint &
:rtype: None
:param Index:
:type Index: int
:param S:
:type S: IntSurf_SequenceOfPathPoint &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_InsertBefore(self, *args)
def InsertAfter(self, *args):
"""
:param Index:
:type Index: int
:param T:
:type T: IntSurf_PathPoint &
:rtype: None
:param Index:
:type Index: int
:param S:
:type S: IntSurf_SequenceOfPathPoint &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_InsertAfter(self, *args)
def First(self, *args):
"""
:rtype: IntSurf_PathPoint
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_First(self, *args)
def Last(self, *args):
"""
:rtype: IntSurf_PathPoint
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_Last(self, *args)
def Split(self, *args):
"""
:param Index:
:type Index: int
:param Sub:
:type Sub: IntSurf_SequenceOfPathPoint &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_Split(self, *args)
def Value(self, *args):
"""
:param Index:
:type Index: int
:rtype: IntSurf_PathPoint
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_Value(self, *args)
def SetValue(self, *args):
"""
:param Index:
:type Index: int
:param I:
:type I: IntSurf_PathPoint &
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_SetValue(self, *args)
def ChangeValue(self, *args):
"""
:param Index:
:type Index: int
:rtype: IntSurf_PathPoint
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_ChangeValue(self, *args)
def Remove(self, *args):
"""
:param Index:
:type Index: int
:rtype: None
:param FromIndex:
:type FromIndex: int
:param ToIndex:
:type ToIndex: int
:rtype: None
"""
return _IntSurf.IntSurf_SequenceOfPathPoint_Remove(self, *args)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_SequenceOfPathPoint.Clear = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_Clear,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.Assign = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_Assign,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.Set = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_Set,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.Append = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_Append,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.Prepend = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_Prepend,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.InsertBefore = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_InsertBefore,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.InsertAfter = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_InsertAfter,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.First = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_First,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.Last = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_Last,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.Split = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_Split,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.Value = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_Value,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.SetValue = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_SetValue,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.ChangeValue = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_ChangeValue,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint.Remove = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint_Remove,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint._kill_pointed = new_instancemethod(_IntSurf.IntSurf_SequenceOfPathPoint__kill_pointed,None,IntSurf_SequenceOfPathPoint)
IntSurf_SequenceOfPathPoint_swigregister = _IntSurf.IntSurf_SequenceOfPathPoint_swigregister
IntSurf_SequenceOfPathPoint_swigregister(IntSurf_SequenceOfPathPoint)
class IntSurf_Transition(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
* Empty constructor. Creates an UNDECIDED transition.
:rtype: None
* Create a IN or OUT transition
:param Tangent:
:type Tangent: bool
:param Type:
:type Type: IntSurf_TypeTrans
:rtype: None
* Create a TOUCH transition.
:param Tangent:
:type Tangent: bool
:param Situ:
:type Situ: IntSurf_Situation
:param Oppos:
:type Oppos: bool
:rtype: None
"""
_IntSurf.IntSurf_Transition_swiginit(self,_IntSurf.new_IntSurf_Transition(*args))
def SetValue(self, *args):
"""
* Set the values of an IN or OUT transition.
:param Tangent:
:type Tangent: bool
:param Type:
:type Type: IntSurf_TypeTrans
:rtype: None
* Set the values of a TOUCH transition.
:param Tangent:
:type Tangent: bool
:param Situ:
:type Situ: IntSurf_Situation
:param Oppos:
:type Oppos: bool
:rtype: None
* Set the values of an UNDECIDED transition.
:rtype: None
"""
return _IntSurf.IntSurf_Transition_SetValue(self, *args)
def TransitionType(self, *args):
"""
* Returns the type of Transition (in/out/touch/undecided) for the arc given by value. This the transition of the intersection line compared to the Arc of restriction, i-e when the function returns INSIDE for example, it means that the intersection line goes inside the part of plane limited by the arc of restriction.
:rtype: IntSurf_TypeTrans
"""
return _IntSurf.IntSurf_Transition_TransitionType(self, *args)
def IsTangent(self, *args):
"""
* Returns True if the point is tangent to the arc given by Value. An exception is raised if TransitionType returns UNDECIDED.
:rtype: bool
"""
return _IntSurf.IntSurf_Transition_IsTangent(self, *args)
def Situation(self, *args):
"""
* Returns a significant value if TransitionType returns TOUCH. In this case, the function returns : INSIDE when the intersection line remains inside the Arc, OUTSIDE when it remains outside the Arc, UNKNOWN when the calsulus cannot give results. If TransitionType returns IN, or OUT, or UNDECIDED, a exception is raised.
:rtype: IntSurf_Situation
"""
return _IntSurf.IntSurf_Transition_Situation(self, *args)
def IsOpposite(self, *args):
"""
* returns a significant value if TransitionType returns TOUCH. In this case, the function returns true when the 2 curves locally define two different parts of the space. If TransitionType returns IN or OUT or UNDECIDED, an exception is raised.
:rtype: bool
"""
return _IntSurf.IntSurf_Transition_IsOpposite(self, *args)
def __del__(self):
try:
self.thisown = False
GarbageCollector.garbage.collect_object(self)
except:
pass
IntSurf_Transition.SetValue = new_instancemethod(_IntSurf.IntSurf_Transition_SetValue,None,IntSurf_Transition)
IntSurf_Transition.TransitionType = new_instancemethod(_IntSurf.IntSurf_Transition_TransitionType,None,IntSurf_Transition)
IntSurf_Transition.IsTangent = new_instancemethod(_IntSurf.IntSurf_Transition_IsTangent,None,IntSurf_Transition)
IntSurf_Transition.Situation = new_instancemethod(_IntSurf.IntSurf_Transition_Situation,None,IntSurf_Transition)
IntSurf_Transition.IsOpposite = new_instancemethod(_IntSurf.IntSurf_Transition_IsOpposite,None,IntSurf_Transition)
IntSurf_Transition._kill_pointed = new_instancemethod(_IntSurf.IntSurf_Transition__kill_pointed,None,IntSurf_Transition)
IntSurf_Transition_swigregister = _IntSurf.IntSurf_Transition_swigregister
IntSurf_Transition_swigregister(IntSurf_Transition)
| 34.543814
| 376
| 0.709649
| 9,656
| 93,821
| 6.572701
| 0.043082
| 0.07831
| 0.068068
| 0.070337
| 0.813144
| 0.543929
| 0.480115
| 0.420335
| 0.399631
| 0.383497
| 0
| 0.005973
| 0.209484
| 93,821
| 2,715
| 377
| 34.556538
| 0.849745
| 0.233583
| 0
| 0.401047
| 1
| 0
| 0.010775
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.237696
| false
| 0.039791
| 0.015707
| 0.00733
| 0.542408
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
c8fa5ba18556fc2e88f0dbf571f05fffc833b4b8
| 204
|
py
|
Python
|
examples/list_ports.py
|
BossOfCreeps/pyxl320
|
c8ef9a638373d0e463da6d44f3415f0e22c78065
|
[
"MIT"
] | 4
|
2018-01-25T19:42:24.000Z
|
2018-06-11T20:11:47.000Z
|
examples/list_ports.py
|
BossOfCreeps/pyxl320
|
c8ef9a638373d0e463da6d44f3415f0e22c78065
|
[
"MIT"
] | 4
|
2018-12-01T16:36:37.000Z
|
2019-04-01T03:19:56.000Z
|
examples/list_ports.py
|
BossOfCreeps/pyxl320
|
c8ef9a638373d0e463da6d44f3415f0e22c78065
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
from __future__ import print_function
from pyxl320 import listSerialPorts
"""
lists available serial ports
"""
err, ret = listSerialPorts()
print('Serial ports:')
map(print, ret)
| 15.692308
| 37
| 0.754902
| 26
| 204
| 5.730769
| 0.692308
| 0.147651
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016949
| 0.132353
| 204
| 12
| 38
| 17
| 0.824859
| 0.098039
| 0
| 0
| 0
| 0
| 0.088435
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0.6
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
cdadd222afc38587bfbfbcd4d6447b4122daa8ed
| 100
|
py
|
Python
|
notebooks/_solutions/case2_observations16.py
|
jorisvandenbossche/FLAMES-python-data-wrangling
|
24a6dbe8637264f010c47affd3a8dcbe2b493e00
|
[
"BSD-3-Clause"
] | null | null | null |
notebooks/_solutions/case2_observations16.py
|
jorisvandenbossche/FLAMES-python-data-wrangling
|
24a6dbe8637264f010c47affd3a8dcbe2b493e00
|
[
"BSD-3-Clause"
] | 10
|
2020-11-09T09:21:01.000Z
|
2021-10-18T06:03:19.000Z
|
notebooks/_solutions/case2_observations16.py
|
jorisvandenbossche/FLAMES-python-data-wrangling
|
24a6dbe8637264f010c47affd3a8dcbe2b493e00
|
[
"BSD-3-Clause"
] | null | null | null |
observations_with_ID = observations_unique.dropna(subset=['species_ID'])
observations_with_ID.head()
| 50
| 72
| 0.85
| 13
| 100
| 6.076923
| 0.615385
| 0.405063
| 0.455696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03
| 100
| 2
| 73
| 50
| 0.814433
| 0
| 0
| 0
| 0
| 0
| 0.09901
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a823cd0db405aef6b391a90a5b5c3f6d20e3c9f8
| 33
|
py
|
Python
|
.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.7/rlcompleter.py
|
VPetras/mobile-test-app
|
6708dade6873ae2fb1ecb13aa70662f95fb42dc6
|
[
"MIT"
] | 12
|
2019-08-02T07:58:16.000Z
|
2022-01-31T23:45:08.000Z
|
.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.7/rlcompleter.py
|
VPetras/mobile-test-app
|
6708dade6873ae2fb1ecb13aa70662f95fb42dc6
|
[
"MIT"
] | 9
|
2019-10-24T05:21:44.000Z
|
2019-10-24T05:21:49.000Z
|
.buildozer/android/platform/build-armeabi-v7a/build/venv/lib/python3.7/rlcompleter.py
|
VPetras/mobile-test-app
|
6708dade6873ae2fb1ecb13aa70662f95fb42dc6
|
[
"MIT"
] | 11
|
2019-07-31T16:23:36.000Z
|
2022-01-29T08:30:07.000Z
|
/usr/lib/python3.7/rlcompleter.py
| 33
| 33
| 0.818182
| 6
| 33
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060606
| 0
| 33
| 1
| 33
| 33
| 0.757576
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a825e3c0b33f2414ec5e061285f18e39f840afe7
| 76
|
py
|
Python
|
idact/detail/auth/__init__.py
|
intdata-bsc/idact
|
54cb65a711c145351e205970c27c83e6393cccf5
|
[
"MIT"
] | 5
|
2018-12-06T15:40:34.000Z
|
2019-06-19T11:22:58.000Z
|
idact/detail/auth/__init__.py
|
garstka/idact
|
b9c8405c94db362c4a51d6bfdf418b14f06f0da1
|
[
"MIT"
] | 9
|
2018-12-06T16:35:26.000Z
|
2019-04-28T19:01:40.000Z
|
idact/detail/auth/__init__.py
|
intdata-bsc/idact
|
54cb65a711c145351e205970c27c83e6393cccf5
|
[
"MIT"
] | 2
|
2019-04-28T19:18:58.000Z
|
2019-06-17T06:56:28.000Z
|
"""This package contains internal functionality for host authentication."""
| 38
| 75
| 0.802632
| 8
| 76
| 7.625
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 76
| 1
| 76
| 76
| 0.897059
| 0.907895
| 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
| 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
| 4
|
b52ccefaf85ad05ae5d2f48579b27d1262d2073f
| 690
|
py
|
Python
|
test/lmp/util/validate/test_raise_if_is_directory.py
|
ProFatXuanAll/char-RNN
|
531f101b3d1ba20bafd28ca060aafe6f583d1efb
|
[
"Beerware"
] | null | null | null |
test/lmp/util/validate/test_raise_if_is_directory.py
|
ProFatXuanAll/char-RNN
|
531f101b3d1ba20bafd28ca060aafe6f583d1efb
|
[
"Beerware"
] | null | null | null |
test/lmp/util/validate/test_raise_if_is_directory.py
|
ProFatXuanAll/char-RNN
|
531f101b3d1ba20bafd28ca060aafe6f583d1efb
|
[
"Beerware"
] | null | null | null |
"""Test raise exception.
Test target:
- :py:meth:`lmp.util.validate.raise_if_is_directory`.
"""
import os
import pytest
import lmp.util.path
from lmp.util.validate import raise_if_is_directory
def test_not_raise() -> None:
"""Must not raise when ``path`` is a file or does not exist."""
raise_if_is_directory(path=os.path.join(lmp.util.path.PROJECT_ROOT, 'README.rst'))
raise_if_is_directory(path='')
def test_raise_when_empty() -> None:
"""Must raise when ``path`` is a directory."""
with pytest.raises(FileExistsError) as excinfo:
raise_if_is_directory(path=lmp.util.path.PROJECT_ROOT)
assert f'{lmp.util.path.PROJECT_ROOT} is a directory.' in str(excinfo.value)
| 25.555556
| 84
| 0.74058
| 111
| 690
| 4.396396
| 0.387387
| 0.086066
| 0.092213
| 0.184426
| 0.336066
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123188
| 690
| 26
| 85
| 26.538462
| 0.806612
| 0.272464
| 0
| 0
| 0
| 0
| 0.11134
| 0.057732
| 0
| 0
| 0
| 0
| 0.090909
| 1
| 0.181818
| true
| 0
| 0.363636
| 0
| 0.545455
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
b5a1f319a51d5603c4f7afc68d5c0cc186694afc
| 3,979
|
py
|
Python
|
src/morphforgecontrib/simulation/synapse_templates/exponential_form/neuron_records.py
|
mikehulluk/morphforge
|
2a95096f144ed4ea487decb735ce66706357d3c7
|
[
"BSD-2-Clause"
] | 1
|
2021-01-21T11:31:59.000Z
|
2021-01-21T11:31:59.000Z
|
src/morphforgecontrib/simulation/synapse_templates/exponential_form/neuron_records.py
|
mikehulluk/morphforge
|
2a95096f144ed4ea487decb735ce66706357d3c7
|
[
"BSD-2-Clause"
] | null | null | null |
src/morphforgecontrib/simulation/synapse_templates/exponential_form/neuron_records.py
|
mikehulluk/morphforge
|
2a95096f144ed4ea487decb735ce66706357d3c7
|
[
"BSD-2-Clause"
] | null | null | null |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# - Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ----------------------------------------------------------------------
from morphforge.simulation.neuron.objects.neuronrecordable import NEURONRecordable
from morphforge.units import qty, parse_unit_str
from morphforge.constants.standardtags import StandardTags
from morphforge.simulation.neuron.simulationdatacontainers.mhocfile import MHocFileData
from morphforge.simulation.neuron.hocmodbuilders.hocmodutils import HocModUtils
from morphforge.simulation.base.networks import Synapse
class Neuron_PSM_Std_CurrentRecord(NEURONRecordable):
def __init__(self, neuron_syn_post, description=None, **kwargs):
if not description:
description = 'Current of %s' % (neuron_syn_post.get_summary_description() )
super(Neuron_PSM_Std_CurrentRecord, self).__init__(description=description, **kwargs)
self.neuron_syn_post = neuron_syn_post
def get_unit(self):
return parse_unit_str('nA')
def get_std_tags(self):
return [StandardTags.Current, Synapse.Recordables.SynapticCurrent]
def build_hoc(self, hocfile_obj):
assert len(self.neuron_syn_post.synapses) == 1, ' Trying to record from a super imposed synapse'
obj_name_hoc = hocfile_obj[MHocFileData.Synapses][self.neuron_syn_post]["synnamepost"]
HocModUtils.create_record_from_object(hocfile_obj=hocfile_obj, vecname="RecVec%s" % self.name, objname=obj_name_hoc, objvar="i", recordobj=self)
def build_mod(self, modfile_set):
pass
class Neuron_PSM_Std_ConductanceRecord(NEURONRecordable):
def __init__(self, neuron_syn_post, description=None, **kwargs):
if not description:
description = 'Conductance of %s' % (neuron_syn_post.get_summary_description() )
super(Neuron_PSM_Std_ConductanceRecord, self).__init__(description=description,**kwargs)
self.neuron_syn_post = neuron_syn_post
def get_unit(self):
return parse_unit_str('uS')
def get_std_tags(self):
return [StandardTags.Conductance, Synapse.Recordables.SynapticConductance]
def build_hoc(self, hocfile_obj):
assert len(self.neuron_syn_post.synapses) == 1, ' Trying to record from a super imposed synapse'
obj_name_hoc = hocfile_obj[MHocFileData.Synapses][self.neuron_syn_post]["synnamepost"]
HocModUtils.create_record_from_object(hocfile_obj=hocfile_obj, vecname="RecVec%s" % self.name, objname=obj_name_hoc, objvar="g", recordobj=self)
def build_mod(self, modfile_set):
pass
| 42.784946
| 152
| 0.730586
| 499
| 3,979
| 5.633267
| 0.37475
| 0.03842
| 0.055496
| 0.048381
| 0.478833
| 0.461757
| 0.461757
| 0.436855
| 0.436855
| 0.406973
| 0
| 0.002095
| 0.16009
| 3,979
| 92
| 153
| 43.25
| 0.839019
| 0.371701
| 0
| 0.526316
| 0
| 0
| 0.067288
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 1
| 0.263158
| false
| 0.052632
| 0.157895
| 0.105263
| 0.578947
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
a91c4be3e2f5a67b621d74f30e0dda28727617ff
| 181
|
py
|
Python
|
src/duty/__init__.py
|
pawamoy/duty
|
dac90183543b73fdd6e5fab354a56c5484d5762a
|
[
"0BSD"
] | 25
|
2020-10-09T08:46:12.000Z
|
2022-03-16T18:58:39.000Z
|
src/duty/__init__.py
|
pawamoy/duty
|
dac90183543b73fdd6e5fab354a56c5484d5762a
|
[
"0BSD"
] | 4
|
2020-11-12T19:27:41.000Z
|
2021-08-01T13:24:31.000Z
|
src/duty/__init__.py
|
pawamoy/duty
|
dac90183543b73fdd6e5fab354a56c5484d5762a
|
[
"0BSD"
] | null | null | null |
"""
Duty package.
A simple task runner.
"""
from typing import List
from duty.decorator import duty
__all__: List[str] = ["duty"] # noqa: WPS410 (the only __variable__ we use)
| 15.083333
| 76
| 0.701657
| 26
| 181
| 4.576923
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02027
| 0.18232
| 181
| 11
| 77
| 16.454545
| 0.783784
| 0.447514
| 0
| 0
| 0
| 0
| 0.043478
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a99b192a4f25f5612de0cc681d2441409721b410
| 1,054
|
py
|
Python
|
defichain/node/modules/util.py
|
eric-volz/defichainLibrary
|
458a8155bd595bf0fdf026651d95a5fe78dafc9c
|
[
"MIT"
] | 1
|
2022-03-29T15:15:17.000Z
|
2022-03-29T15:15:17.000Z
|
defichain/node/modules/util.py
|
eric-volz/defichainPythonLibrary
|
b01dfddbb5e16d5b3dcda8e4014bcea8d2a1832b
|
[
"MIT"
] | null | null | null |
defichain/node/modules/util.py
|
eric-volz/defichainPythonLibrary
|
b01dfddbb5e16d5b3dcda8e4014bcea8d2a1832b
|
[
"MIT"
] | 1
|
2022-03-24T12:25:44.000Z
|
2022-03-24T12:25:44.000Z
|
class Util:
def __init__(self, node):
self._node = node
def createmultisig(self, nrequired, keys, address_type="legacy"): # 01
return self._node._rpc.call("createmultisig", nrequired, keys, address_type)
def deriveaddresses(self, descriptor, range=None): # 02
return self._node._rpc.call("deriveaddresses", descriptor, range)
def estimatesmartfee(self, conf_target, estimate_mode="CONSERVATIVE"): # 03
return self._node._rpc.call("estimatesmartfee", conf_target, estimate_mode)
def getdescriptorinfo(self, descriptor): # 04
return self._node._rpc.call("getdescriptorinfo", descriptor)
def signmessagewithprivkey(self, privkey, message): # 05
return self._node._rpc.call("signmessagewithprivkey", privkey, message)
def validateaddress(self, address): # 06
return self._node._rpc.call("validateaddress", address)
def verifymessage(self, address, signature, message): # 07
return self._node._rpc.call("verifymessage", address, signature, message)
| 42.16
| 84
| 0.708729
| 116
| 1,054
| 6.224138
| 0.336207
| 0.099723
| 0.135734
| 0.16482
| 0.203601
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016166
| 0.178368
| 1,054
| 24
| 85
| 43.916667
| 0.817552
| 0.018975
| 0
| 0
| 0
| 0
| 0.126706
| 0.021443
| 0
| 0
| 0
| 0
| 0
| 1
| 0.470588
| false
| 0
| 0
| 0.411765
| 0.941176
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
a9a05f3c3d674142f25cfecab33aff9be0c68246
| 135
|
py
|
Python
|
test.py
|
yuanmingqi/RISE
|
95577ac03c91937e5ddc22a8596270ad3e9d5e49
|
[
"MIT"
] | null | null | null |
test.py
|
yuanmingqi/RISE
|
95577ac03c91937e5ddc22a8596270ad3e9d5e49
|
[
"MIT"
] | null | null | null |
test.py
|
yuanmingqi/RISE
|
95577ac03c91937e5ddc22a8596270ad3e9d5e49
|
[
"MIT"
] | null | null | null |
import gym
env = gym.make('SpaceInvadersNoFrameskip-v4')
print(env.action_space.n, env.action_space.__class__.__name__)
#####hahahha
| 19.285714
| 62
| 0.777778
| 18
| 135
| 5.277778
| 0.722222
| 0.189474
| 0.294737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008
| 0.074074
| 135
| 7
| 63
| 19.285714
| 0.752
| 0.051852
| 0
| 0
| 0
| 0
| 0.217742
| 0.217742
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 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
| 0
| 0
|
0
| 4
|
8d6c75aa7888b78746bc5d66909dc44b4cd6fef6
| 499
|
py
|
Python
|
docs/02.AI_ML/code-1805/Day05all/cc2.py
|
mheanng/PythonNote
|
e3e5ede07968fab0a45f6ac4db96e62092c17026
|
[
"Apache-2.0"
] | 2
|
2020-04-09T05:56:23.000Z
|
2021-03-25T18:42:36.000Z
|
docs/02.AI_ML/code-1805/Day05all/cc2.py
|
mheanng/PythonNote
|
e3e5ede07968fab0a45f6ac4db96e62092c17026
|
[
"Apache-2.0"
] | 22
|
2020-04-09T06:09:14.000Z
|
2021-01-06T01:05:32.000Z
|
docs/02.AI_ML/code-1805/Day05all/cc2.py
|
mheanng/PythonNote
|
e3e5ede07968fab0a45f6ac4db96e62092c17026
|
[
"Apache-2.0"
] | 6
|
2020-03-09T07:19:21.000Z
|
2021-01-05T23:23:42.000Z
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import functools
def f1(a):
return map(lambda x: x + 3, a)
def f2(a):
return map(lambda x: x * 6, a)
def f3(a):
return map(lambda x: x - 9, a)
def fc(*fs):
return functools.reduce(
lambda fa, fb: lambda x: fa(fb(x)), *fs)
a = [2, 3, 4]
b = list(f3(f2(f1(a))))
print(b)
c = list(functools.reduce(
lambda fa, fb: lambda x: fa(fb(x)), [f3, f2, f1])(a))
print(c)
d = list(fc([f3, f2, f1])(a))
print(d)
| 16.633333
| 57
| 0.571142
| 94
| 499
| 2.978723
| 0.351064
| 0.125
| 0.107143
| 0.171429
| 0.585714
| 0.457143
| 0.264286
| 0.264286
| 0.264286
| 0.264286
| 0
| 0.049351
| 0.228457
| 499
| 29
| 58
| 17.206897
| 0.677922
| 0.042084
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.210526
| false
| 0
| 0.105263
| 0.210526
| 0.526316
| 0.157895
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
8d70c4157342c8a9525f7a86c982b07f3ce4d45f
| 44,085
|
py
|
Python
|
examples/eidelyur/threeApproachesVisualization_v0.py
|
radiasoft/rsdynfric
|
0d905e1ef85063ec6fe93df64751f7b8c19da160
|
[
"Apache-2.0"
] | null | null | null |
examples/eidelyur/threeApproachesVisualization_v0.py
|
radiasoft/rsdynfric
|
0d905e1ef85063ec6fe93df64751f7b8c19da160
|
[
"Apache-2.0"
] | 1
|
2022-03-23T22:53:10.000Z
|
2022-03-28T19:02:40.000Z
|
examples/eidelyur/threeApproachesVisualization_v0.py
|
radiasoft/rsdynfric
|
0d905e1ef85063ec6fe93df64751f7b8c19da160
|
[
"Apache-2.0"
] | 3
|
2017-01-06T04:24:29.000Z
|
2020-02-16T01:17:20.000Z
|
# from __future__ import division
#-------------------------------------
#
# Started at 09/19/2017 (YuE)
#
#-------------------------------------
import os, sys
import numpy as np
import math
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from matplotlib.colors import LogNorm
from matplotlib import ticker
import matplotlib as mpl
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib.legend_handler import HandlerLine2D
import scipy.integrate as integrate
from scipy.integrate import quad, nquad, dblquad
from scipy.constants import pi
from scipy.constants import speed_of_light as clight
from scipy.constants import epsilon_0 as eps0
from scipy.constants import mu_0 as mu0
from scipy.constants import elementary_charge as qe
from scipy.constants import electron_mass as me
from scipy.constants import proton_mass as mp
from scipy.constants import Boltzmann as kB
eVtoErg=1.602e-12 # energy from eV to erg (from CI to CGS)
# Indices:
(Ix, Ipx, Iy, Ipy, Iz, Ipz) = range(6)
#
# Initial parameters:
#
Z_ion = qe*2.997e+9 # charge of ion (proton), CGSE units of the charge
M_ion = mp*1.e+3 # mass of ion (proton), g
q_elec = qe*2.997e+9 # charge of electron, CGSE units of the charge (without sign!)
m_elec = me*1.e+3 # mass of electron, g
B_mag=1.e+3 # Gs
eTempTran = 0.5 # transversal temperature of electrons, eV
eTempLong = 2.e-4 # longitudinal temperature of electrons, eV
stepsNumberOnGyro = 25 # number of the steps on each Larmour period
#
# Larmor frequency electron:
#
def omega_Larmor(mass,B_mag):
return (q_elec)*B_mag/(mass*clight*1.e+2) # rad/sec
#
# Derived quantities:
#
omega_L = omega_Larmor(m_elec, B_mag) # rad/sec
T_larm = 2*pi/omega_L # sec
timeStep = T_larm/stepsNumberOnGyro # time step, sec
print 'omega_Larmor= %e rad/sec, T_larm = %e sec, timeStep = %e sec' % (omega_L,T_larm,timeStep)
eVrmsTran = np.sqrt(2.*eTempTran*eVtoErg/m_elec) # cm/sec
eVrmsLong = np.sqrt(2.*eTempLong*eVtoErg/m_elec) # cm/sec
print 'eVrmsTran = %e cm/sec, eVrmsLong = %e cm/sec' % (eVrmsTran,eVrmsLong)
ro_larmRMS = eVrmsTran/omega_L # cm
print 'ro_larmRMS =%e mkm = ', 1.e4*ro_larmRMS
#
# Electrons are magnetized for impact parameter >> rhoCrit:
#
rhoCrit=math.pow(q_elec**2/(m_elec*omega_L**2),1./3) # cm
print 'rhoCrit (mkm) = ' , 1.e+4*rhoCrit
###################################################
#
# Reading the data from output file for later processing and vizualization:
#
###################################################
#
#
# Opening the input file:
#
inputFile='dpApprch1.dat'
print 'Open input file "%s"...' % inputFile
inpfileFlag=0
try:
inpfile = open(inputFile,'r')
inpfileFlag=1
except:
print 'Problem to open input file "%s"' % inputFile
xAheaderLineNumber=0 # Serial number of line with header for xA-Data
yBheaderLineNumber=0 # Serial number of line with header for yB-Data
dpxDataHeaderLineNumber=0 # Serial number of line with header for dpxData
dpyDataHeaderLineNumber=0 # Serial number of line with header for dpyData
dpzDataHeaderLineNumber=0 # Serial number of line with header for dpzData
lastLineNumber=0 # Number of the last line
xAdataFlag=0 # =1 when xA-Data already read
yBdataFlag=0 # =1 when yB-Data already read
dpxDataFlag=0 # =1 when dpxData already read
dpyDataFlag=0 # =1 when dpyData already read
dpzDataFlag=0 # =1 when dpzData already read
xAdata=[] # Array of xA-Data
yBdata=[] # Array of yB-Data
dpxData=[] # Array of dpxData
dpyData=[] # Array of dpyData
dpzData=[] # Array of dpzData
dpxDataMax=0 # maximum for array of dpxData
indxAdpxDataMax=0 # index A of the maximum for array of dpxData
indxBdpxDataMax=0 # index B of the maximum for array of dpxData
dpyDataMax=0 # maximum for array of dpyData
indxAdpyDataMax=0 # index A of the maximum for array of dpyData
indxBdpyDataMax=0 # index B of the maximum for array of dpyData
dpzDataMax=0 # maximum for array of dpzData
indxAdpzDataMax=0 # index A of the maximum for array of dpzData
indxBdpzDataMax=0 # index B of the maximum for array of dpzData
lines=0 # Number of current line from input file
linesFull=0 # Number of fully filled rows with each type of data
dataNumber=0 # Number of current value of any types of Data
while True:
lineData=inpfile.readline()
# print 'line=%d: %s' % (lines,lineData)
if not lineData:
break
lines += 1
if lines == 2:
words=lineData.split()
indx1=words.index('Tracks:')
lastTrackNumber=int(words[indx1+1])
indx2=words.index('Factor:')
normFactor=float(words[indx2+1])
print 'lastTrackNumber=%d, normFactor=%e' % (lastTrackNumber,normFactor)
# Header for xA-Data:
if lines == 4:
words=lineData.split()
indx1=words.index('Entries:')
xAentries=int(words[indx1+1])
indx2=words.index('with')
perLine=int(words[indx2+1])
# print 'xAdata-Header from %d: words =%s, index1=%d, entries=%d, index2=%d, perLine=%d' % (lines,words,indx1,xAentries,indx2,perLine)
xAdata=np.zeros(xAentries)
linesFull=xAentries//perLine
entriesRem=xAentries-perLine*linesFull
yBheaderLineNumber=linesFull+7
if entriesRem > 0:
yBheaderLineNumber += 1
# print 'yBheaderLineNumber=%d' % yBheaderLineNumber
if xAdataFlag == 0:
#
# xAdata=log10(Upot/Ekin):
#
if lines > 5 and lines <= yBheaderLineNumber-2:
words=lineData.split()
nWords=len(words)
# print 'xA-Data from %d: words=%s, number of entries = %d' % (lines,words,nWords)
for m in range(nWords):
wordCrrnt=words[m].split(",")
xAdata[dataNumber]=float(wordCrrnt[0])
dataNumber += 1
if lines == yBheaderLineNumber-2:
xAdataFlag=1
print 'xA-Data(%d entries) already read' % xAentries
# Header for yB-Data:
if lines == yBheaderLineNumber:
words=lineData.split()
indx1=words.index('Entries:')
yBentries=int(words[indx1+1])
indx2=words.index('with')
perLine=int(words[indx2+1])
# print 'yBdata-Header from %d: words =%s, index1=%d, entries=%d, index2=%d, perLine=%d' % (lines,words,indx1,yBentries,indx2,perLine)
yBdata=np.zeros(yBentries)
linesFull=yBentries//perLine
entriesRem=yBentries-perLine*linesFull
dpxDataHeaderLineNumber=yBheaderLineNumber+linesFull+3
if entriesRem > 0:
dpxDataHeaderLineNumber += 1
# print 'dpxDataHeaderLineNumber=%d' % dpxDataHeaderLineNumber
dataNumber=0
if xAdataFlag == 1 and yBdataFlag == 0:
#
# yBdata=log10(R_larm/b):
#
if lines > yBheaderLineNumber+1 and lines <= dpxDataHeaderLineNumber-2:
words=lineData.split()
nWords=len(words)
# print 'yB-Data from %d: words=%s, number of entries = %d' % (lines,words,nWords)
for m in range(nWords):
wordCrrnt=words[m].split(",")
yBdata[dataNumber]=float(wordCrrnt[0])
dataNumber += 1
if lines == dpxDataHeaderLineNumber-2:
yBdataFlag=1
print 'yB-Data(%d entries) already read' % yBentries
# Header for dpxData:
if lines == dpxDataHeaderLineNumber:
words=lineData.split()
indx1=words.index('Entries:')
entriesA=int(words[indx1+1])
indx2=words.index('x')
entriesB=int(words[indx2+1])
indx3=words.index('with')
perLine=int(words[indx3+1])
# print 'dpxData-Header from %d: words =%s, index1=%d, entriesA=%d, index2=%d, entriesB=%d, index3=%d, perLine=%d' % \
# (lines,words,indx1,entriesA,indx2,entriesB,indx3,perLine)
dpxData=np.zeros((entriesA,entriesB))
# If data are written without skiping of the repeated zero values:
# linesFull=entriesA*entriesB//perLine
# entriesRem=entriesA*entriesB-perLine*linesFull
mA=0
mB=0
total_mAmB=0
if yBdataFlag == 1 and dpxDataFlag == 0:
#
# dpxData=zApprch1dpx (from script threeApproachesComparison_vN.py, N>=4)
# Format in input file: at the begining, the index mA for "xA-direction" increases and only after that index mB for "yB-direction")
#
if lines > dpxDataHeaderLineNumber+2:
# print 'line %d: "%s' % (lines,lineData)
words=lineData.split()
nWords=len(words)
# print 'Data from %d: words=%s, number of entries = %d' % (lines,words,nWords)
if nWords == 0:
dpxDataFlag=1
dpyDataHeaderLineNumber=lines+1
print 'dpyDataHeaderLineNumber=%d' % dpyDataHeaderLineNumber
else:
for m in range(nWords):
wordCrrnt=words[m].split(",")
# print 'wordCrrnt: ', wordCrrnt
indxBrsktOpn=wordCrrnt[0].find('(')
if indxBrsktOpn > 0:
indxBrsktCls=wordCrrnt[0].find(')')
if indxBrsktOpn < 0:
# Non zero value:
# print 'nonZero value=%e' % float(wordCrrnt[0])
dpxData[mA,mB]=normFactor*float(wordCrrnt[0])
if dpxDataMax < dpxData[mA,mB]:
dpxDataMax=dpxData[mA,mB]
indxAdpxDataMax=mA
indxBdpxDataMax=mB
total_mAmB += 1
mA += 1
if mA == entriesA:
mA=0
mB += 1
else:
# Repeated zero values:
wordHelp=wordCrrnt[0]
nZero=int(wordHelp[indxBrsktOpn+1:indxBrsktCls])
# print 'Number of zero=%d' % nZero
for nZ in range(nZero):
dpxData[mA,mB]=0.
total_mAmB += 1
mA += 1
if mA == entriesA:
mA=0
mB += 1
if dpxDataFlag == 1:
print 'dpxData(%d x %d entries) already read (total %d)' % (entriesA,entriesB,total_mAmB)
# Header for dpyData:
if lines == dpyDataHeaderLineNumber:
words=lineData.split()
indx1=words.index('Entries:')
entriesA=int(words[indx1+1])
indx2=words.index('x')
entriesB=int(words[indx2+1])
indx3=words.index('with')
perLine=int(words[indx3+1])
# print 'dpyData-Header from %d: words =%s, index1=%d, entriesA=%d, index2=%d, entriesB=%d, index3=%d, perLine=%d' % \
# (lines,words,indx1,entriesA,indx2,entriesB,indx3,perLine)
dpyData=np.zeros((entriesA,entriesB))
# If data are written without skiping of the repeated zero values:
# linesFull=entriesA*entriesB//perLine
# entriesRem=entriesA*entriesB-perLine*linesFull
mA=0
mB=0
total_mAmB=0
if dpxDataFlag == 1 and dpyDataFlag == 0:
#
# dpyData=zApprch1dpy (from script threeApproachesComparison_vN.py, N>=4)
# Format in input file: at the begining, the index mA for "xA-direction" increases and only after that index mB for "yB-direction")
#
if lines > dpyDataHeaderLineNumber+2:
# print 'line %d: "%s' % (lines,lineData)
words=lineData.split()
nWords=len(words)
# print 'Data from %d: words=%s, number of entries = %d' % (lines,words,nWords)
if nWords == 0:
dpyDataFlag=1
dpzDataHeaderLineNumber=lines+1
print 'dpzDataHeaderLineNumber=%d' % dpzDataHeaderLineNumber
else:
for m in range(nWords):
wordCrrnt=words[m].split(",")
# print 'wordCrrnt: ', wordCrrnt
indxBrsktOpn=wordCrrnt[0].find('(')
if indxBrsktOpn > 0:
indxBrsktCls=wordCrrnt[0].find(')')
if indxBrsktOpn < 0:
# Non zero value:
# print 'nonZero value=%e' % float(wordCrrnt[0])
dpyData[mA,mB]=normFactor*float(wordCrrnt[0])
if dpyDataMax < dpyData[mA,mB]:
dpyDataMax=dpyData[mA,mB]
indxAdpyDataMax=mA
indxBdpyDataMax=mB
total_mAmB += 1
mA += 1
if mA == entriesA:
mA=0
mB += 1
else:
# Repeated zero values:
wordHelp=wordCrrnt[0]
nZero=int(wordHelp[indxBrsktOpn+1:indxBrsktCls])
# print 'Number of zero=%d' % nZero
for nZ in range(nZero):
dpyData[mA,mB]=0.
total_mAmB += 1
mA += 1
if mA == entriesA:
mA=0
mB += 1
if dpyDataFlag == 1:
print 'dpyData(%d x %d entries) already read (total %d)' % (entriesA,entriesB,total_mAmB)
# Header for dpzData:
if lines == dpzDataHeaderLineNumber:
words=lineData.split()
indx1=words.index('Entries:')
entriesA=int(words[indx1+1])
indx2=words.index('x')
entriesB=int(words[indx2+1])
indx3=words.index('with')
perLine=int(words[indx3+1])
# print 'dpzData-Header from %d: words =%s, index1=%d, entriesA=%d, index2=%d, entriesB=%d, index3=%d, perLine=%d' % \
# (lines,words,indx1,entriesA,indx2,entriesB,indx3,perLine)
dpzData=np.zeros((entriesA,entriesB))
# If data are written without skiping of the repeated zero values:
# linesFull=entriesA*entriesB//perLine
# entriesRem=entriesA*entriesB-perLine*linesFull
mA=0
mB=0
total_mAmB=0
if dpyDataFlag == 1 and dpzDataFlag == 0:
#
# dpzData=zApprch1dpz (from script threeApproachesComparison_vN.py, N>=4)
# Format in input file: at the begining, the index mA for "xA-direction" increases and only after that index mB for "yB-direction")
#
if lines > dpzDataHeaderLineNumber+2:
# print 'line %d: "%s' % (lines,lineData)
words=lineData.split()
nWords=len(words)
# print 'Data from %d: words=%s, number of entries = %d' % (lines,words,nWords)
if nWords == 0:
dpzDataFlag=1
# Not necessary:
# dpzDataHeaderLineNumber=lines+1
# print 'dpzDataHeaderLineNumber=%d' % dpzDataHeaderLineNumber
else:
for m in range(nWords):
wordCrrnt=words[m].split(",")
# print 'wordCrrnt: ', wordCrrnt
indxBrsktOpn=wordCrrnt[0].find('(')
if indxBrsktOpn > 0:
indxBrsktCls=wordCrrnt[0].find(')')
if indxBrsktOpn < 0:
# Non zero value:
# print 'nonZero value=%e' % float(wordCrrnt[0])
dpzData[mA,mB]=normFactor*float(wordCrrnt[0])
if dpzDataMax < dpzData[mA,mB]:
dpzDataMax=dpzData[mA,mB]
indxAdpzDataMax=mA
indxBdpzDataMax=mB
total_mAmB += 1
mA += 1
if mA == entriesA:
mA=0
mB += 1
else:
# Repeated zero values:
wordHelp=wordCrrnt[0]
nZero=int(wordHelp[indxBrsktOpn+1:indxBrsktCls])
# print 'Number of zero=%d' % nZero
for nZ in range(nZero):
dpzData[mA,mB]=0.
total_mAmB += 1
mA += 1
if mA == entriesA:
mA=0
mB += 1
if dpzDataFlag == 1:
print 'dpyData(%d x %d entries) already read (total %d)' % (entriesA,entriesB,total_mAmB)
break
inpfile.close()
print 'Close input file "%s"' % inputFile
print 'Maximum dpxData=%e (point mA=%d, mB=%d)' % (dpxDataMax,indxAdpxDataMax,indxBdpxDataMax)
print 'Maximum dpyData=%e (point mA=%d, mB=%d)' % (dpyDataMax,indxAdpyDataMax,indxBdpyDataMax)
print 'Maximum dpzData=%e (point mA=%d, mB=%d)' % (dpzDataMax,indxAdpzDataMax,indxBdpzDataMax)
#
# Opening the input file 'dpApprch2.dat':
#
inputFile='dpApprch2.dat'
print 'Open input file "%s"...' % inputFile
inpfileFlag=0
try:
inpfile = open(inputFile,'r')
inpfileFlag=1
except:
print 'Problem to open input file "%s"' % inputFile
#
# Reading the results from input file:
#
xA_2headerLineNumber=0 # Serial number of line with header for xA_2data
yB_2headerLineNumber=0 # Serial number of line with header for yB_2data
dataDpxHeaderLineNumber_2=0 # Serial number of line with header for dpx_2Data
dataDpyHeaderLineNumber_2=0 # Serial number of line with header for dpy_2Data
dataDpzHeaderLineNumber_2=0 # Serial number of line with header for dpz_2Data
lastLineNumber_2=0 # Number of the last line
xA_2dataFlag=0 # =1 when xA_2data already read
yB_2dataFlag=0 # =1 when yB_2data already read
dataDpxFlag_2=0 # =1 when dpx_2Data already read
dataDpyFlag_2=0 # =1 when dpy_2Data already read
dataDpzFlag_2=0 # =1 when dpz_2Data already read
xA_2data=[] # Array of xA_2data
yB_2data=[] # Array of yB_2data
dpx_2Data=[] # Array of dpx_2Data
dpy_2Data=[] # Array of dpy_2Data
dpz_2Data=[] # Array of dp_2zData
dpxDataMax_2=0 # maximum for array of dpx_2Data
indxAdpxDataMax_2=0 # index A of the maximum for array of dpx_2Data
indxBdpxDataMax_2=0 # index B of the maximum for array of dpx_2Data
dpyDataMax_2=0 # maximum for array of dpy_2Data
indxAdpyDataMax_2=0 # index A of the maximum for array of dpy_2Data
indxBdpyDataMax_2=0 # index B of the maximum for array of dpy_2Data
dpzDataMax_2=0 # maximum for array of dpz_2Data
indxAdpzDataMax_2=0 # index A of the maximum for array of dpz_2Data
indxBdpzDataMax_2=0 # index B of the maximum for array of dpz_2Data
lines=0 # Number of current line from input file
linesFull=0 # Number of fully filled rows with each type of data
dataNumber=0 # Number of current value of any types of Data
while True:
lineData=inpfile.readline()
# print 'line=%d: %s' % (lines,lineData)
if not lineData:
break
lines += 1
if lines == 2:
words=lineData.split()
indx1=words.index('Tracks:')
lastTrackNumber=int(words[indx1+1])
indx2=words.index('Factor:')
normFactor=float(words[indx2+1])
print 'lastTrackNumber=%d, normFactor=%e' % (lastTrackNumber,normFactor)
# Header for xA-Data:
if lines == 4:
words=lineData.split()
indx1=words.index('Entries:')
xAentries=int(words[indx1+1])
indx2=words.index('with')
perLine=int(words[indx2+1])
# print 'xAdata-Header from %d: words =%s, index1=%d, entries=%d, index2=%d, perLine=%d' % (lines,words,indx1,xAentries,indx2,perLine)
xA_2data=np.zeros(xAentries)
linesFull=xAentries//perLine
entriesRem=xAentries-perLine*linesFull
yB_2headerLineNumber=linesFull+7
if entriesRem > 0:
yB_2headerLineNumber += 1
print 'yB_2headerLineNumber=%d' % yB_2headerLineNumber
if xA_2dataFlag == 0:
# xA_2data:
if lines > 5 and lines <= yB_2headerLineNumber-2:
words=lineData.split()
nWords=len(words)
# print 'xA_2data from %d: words=%s, number of entries = %d' % (lines,words,nWords)
for m in range(nWords):
wordCrrnt=words[m].split(",")
xA_2data[dataNumber]=float(wordCrrnt[0])
dataNumber += 1
if lines == yB_2headerLineNumber-2:
xA_2dataFlag=1
print 'xA_2data(%d entries) already read' % xAentries
# Header for yB_2data:
if lines == yBheaderLineNumber:
words=lineData.split()
indx1=words.index('Entries:')
yBentries=int(words[indx1+1])
indx2=words.index('with')
perLine=int(words[indx2+1])
# print 'yB_2data-Header from %d: words =%s, index1=%d, entries=%d, index2=%d, perLine=%d' % (lines,words,indx1,yBentries,indx2,perLine)
yB_2data=np.zeros(yBentries)
linesFull=yBentries//perLine
entriesRem=yBentries-perLine*linesFull
dataDpxHeaderLineNumber_2=yB_2headerLineNumber+linesFull+3
if entriesRem > 0:
dataDpxHeaderLineNumber_2 += 1
# print 'dataDpxHeaderLineNumber_2=%d' % dataDpxHeaderLineNumber_2
dataNumber=0
if xA_2dataFlag == 1 and yB_2dataFlag == 0:
# yB-Data:
if lines > yB_2headerLineNumber+1 and lines <= dataDpxHeaderLineNumber_2-2:
words=lineData.split()
nWords=len(words)
# print 'yB-Data from %d: words=%s, number of entries = %d' % (lines,words,nWords)
for m in range(nWords):
wordCrrnt=words[m].split(",")
yB_2data[dataNumber]=float(wordCrrnt[0])
dataNumber += 1
if lines == dataDpxHeaderLineNumber_2-2:
yB_2dataFlag=1
print 'yB_2data(%d entries) already read' % yBentries
# Header for dpx_2Data:
if lines == dataDpxHeaderLineNumber_2:
words=lineData.split()
indx1=words.index('Entries:')
entriesA=int(words[indx1+1])
indx2=words.index('x')
entriesB=int(words[indx2+1])
indx3=words.index('with')
perLine=int(words[indx3+1])
# print 'dpx_2Dat-Header from %d: words =%s, index1=%d, entriesA=%d, index2=%d, entriesB=%d, index3=%d, perLine=%d' % \
# (lines,words,indx1,entriesA,indx2,entriesB,indx3,perLine)
dpx_2Data=np.zeros((entriesA,entriesB))
# If data are written without skiping of the repeated zero values:
# linesFull=entriesA*entriesB//perLine
# entriesRem=entriesA*entriesB-perLine*linesFull
mA=0
mB=0
total_mAmB=0
if yB_2dataFlag == 1 and dataDpxFlag_2 == 0:
# dpx_2Data: (Format: at the begining, the index mA for "xA-direction" increases and only after that index mB for "yB-direction")
if lines > dataDpxHeaderLineNumber_2+2:
# print 'line %d: "%s' % (lines,lineData)
words=lineData.split()
nWords=len(words)
# print 'Data from %d: words=%s, number of entries = %d' % (lines,words,nWords)
if nWords == 0:
dataDpxFlag_2=1
dataDpyHeaderLineNumber_2=lines+1
# print 'dataDpyHeaderLineNumber_2=%d' % dataDpyHeaderLineNumber_2
else:
for m in range(nWords):
wordCrrnt=words[m].split(",")
# print 'wordCrrnt: ', wordCrrnt
indxBrsktOpn=wordCrrnt[0].find('(')
if indxBrsktOpn > 0:
indxBrsktCls=wordCrrnt[0].find(')')
# Nonrepeated zero values:
if indxBrsktOpn < 0:
# print 'nonZero value=%e' % float(wordCrrnt[0])
dpx_2Data[mA,mB]=normFactor*float(wordCrrnt[0])
if dpxDataMax_2 < dpx_2Data[mA,mB]:
dpxDataMax_2=dpx_2Data[mA,mB]
indxAdpxDataMax_2=mA
indxBdpxDataMax_2=mB
total_mAmB += 1
mA += 1
if mA == entriesA:
mA=0
mB += 1
else:
wordHelp=wordCrrnt[0]
nZero=int(wordHelp[indxBrsktOpn+1:indxBrsktCls])
# print 'Number of zero=%d' % nZero
for nZ in range(nZero):
dpx_2Data[mA,mB]=0.
total_mAmB += 1
mA += 1
if mA == entriesA:
mA=0
mB += 1
if dataDpxFlag_2 == 1:
print 'dpx_2Data(%d x %d entries) already read (total %d)' % (entriesA,entriesB,total_mAmB)
# Header for dpy_2Data:
if lines == dataDpyHeaderLineNumber_2:
words=lineData.split()
indx1=words.index('Entries:')
entriesA=int(words[indx1+1])
indx2=words.index('x')
entriesB=int(words[indx2+1])
indx3=words.index('with')
perLine=int(words[indx3+1])
# print 'dpy_2Data-Header from %d: words =%s, index1=%d, entriesA=%d, index2=%d, entriesB=%d, index3=%d, perLine=%d' % \
# (lines,words,indx1,entriesA,indx2,entriesB,indx3,perLine)
dpy_2Data=np.zeros((entriesA,entriesB))
# If data are written without skiping of the repeated zero values:
# linesFull=entriesA*entriesB//perLine
# entriesRem=entriesA*entriesB-perLine*linesFull
mA=0
mB=0
total_mAmB=0
if dataDpxFlag_2 == 1 and dataDpyFlag_2 == 0:
# dpy_2Data: (Format: at the begining, the index mA for "xA-direction" increases and only after that index mB for "yB-direction")
if lines > dataDpyHeaderLineNumber_2+2:
words=lineData.split()
nWords=len(words)
# print 'Data from %d: words=%s, number of entries = %d' % (lines,words,nWords)
if nWords == 0:
dataDpyFlag_2=1
dataDpzHeaderLineNumber_2=lines+1
# print 'dataDpzHeaderLineNumber_2=%d' % dataDpzHeaderLineNumber_2
else:
for m in range(nWords):
wordCrrnt=words[m].split(",")
# print 'wordCrrnt: ', wordCrrnt
indxBrsktOpn=wordCrrnt[0].find('(')
if indxBrsktOpn > 0:
indxBrsktCls=wordCrrnt[0].find(')')
# Nonrepeated zero values:
if indxBrsktOpn < 0:
# print 'nonZero value=%e' % float(wordCrrnt[0])
dpy_2Data[mA,mB]=normFactor*float(wordCrrnt[0])
if dpyDataMax_2 < dpy_2Data[mA,mB]:
dpyDataMax_2=dpy_2Data[mA,mB]
indxAdpyDataMax_2=mA
indxBdpyDataMax_2=mB
total_mAmB += 1
mA += 1
if mA == entriesA:
mA=0
mB += 1
else:
wordHelp=wordCrrnt[0]
nZero=int(wordHelp[indxBrsktOpn+1:indxBrsktCls])
# print 'Number of zero=%d' % nZero
for nZ in range(nZero):
dpy_2Data[mA,mB]=0.
total_mAmB += 1
mA += 1
if mA == entriesA:
mA=0
mB += 1
if dataDpyFlag_2 == 1:
print 'dpy_2Data(%d x %d entries) already read (total %d)' % (entriesA,entriesB,total_mAmB)
# Header for dpz_2Data:
if lines == dataDpzHeaderLineNumber_2:
words=lineData.split()
indx1=words.index('Entries:')
entriesA=int(words[indx1+1])
indx2=words.index('x')
entriesB=int(words[indx2+1])
indx3=words.index('with')
perLine=int(words[indx3+1])
# print 'dpz_2Data-Header from %d: words =%s, index1=%d, entriesA=%d, index2=%d, entriesB=%d, index3=%d, perLine=%d' % \
# (lines,words,indx1,entriesA,indx2,entriesB,indx3,perLine)
dpz_2Data=np.zeros((entriesA,entriesB))
# If data are written without skiping of the repeated zero values:
# linesFull=entriesA*entriesB//perLine
# entriesRem=entriesA*entriesB-perLine*linesFull
mA=0
mB=0
total_mAmB=0
if dataDpyFlag_2 == 1 and dataDpzFlag_2 == 0:
# dataDpz: (Format: at the begining, the index mA for "xA-direction" increases and only after that index mB for "yB-direction")
if lines > dataDpzHeaderLineNumber_2+2:
words=lineData.split()
nWords=len(words)
# print 'Data from %d: words=%s, number of entries = %d' % (lines,words,nWords)
if nWords == 0:
dataDpzFlag_2=1
# Not necessary:
# dataDpzHeaderLineNumber_2=lines+1
# print 'dataDpzHeaderLineNumber_2=%d' % dataDpzHeaderLineNumber_2
else:
for m in range(nWords):
wordCrrnt=words[m].split(",")
# print 'wordCrrnt: ', wordCrrnt
indxBrsktOpn=wordCrrnt[0].find('(')
if indxBrsktOpn > 0:
indxBrsktCls=wordCrrnt[0].find(')')
# Nonrepeated zero values:
if indxBrsktOpn < 0:
# print 'nonZero value=%e' % float(wordCrrnt[0])
dpz_2Data[mA,mB]=normFactor*float(wordCrrnt[0])
if dpzDataMax_2 < dpz_2Data[mA,mB]:
dpzDataMax_2=dpz_2Data[mA,mB]
indxAdpzDataMax_2=mA
indxBdpzDataMax_2=mB
total_mAmB += 1
mA += 1
if mA == entriesA:
mA=0
mB += 1
else:
wordHelp=wordCrrnt[0]
nZero=int(wordHelp[indxBrsktOpn+1:indxBrsktCls])
# print 'Number of zero=%d' % nZero
for nZ in range(nZero):
dpz_2Data[mA,mB]=0.
total_mAmB += 1
mA += 1
if mA == entriesA:
mA=0
mB += 1
if dataDpzFlag_2 == 1:
print 'dpz_2Data(%d x %d entries) already read (total %d)' % (entriesA,entriesB,total_mAmB)
break
inpfile.close()
print 'Close input file "%s"' % inputFile
print 'Maximum dpx_2Data=%e (point mA=%d, mB=%d)' % (dpxDataMax_2,indxAdpxDataMax_2,indxBdpxDataMax_2)
print 'Maximum dpy_2Data=%e (point mA=%d, mB=%d)' % (dpyDataMax_2,indxAdpyDataMax_2,indxBdpyDataMax_2)
print 'Maximum dpz_2Data=%e (point mA=%d, mB=%d)' % (dpzDataMax_2,indxAdpzDataMax_2,indxBdpzDataMax_2)
#
# Visualization of results
#
X,Y=np.meshgrid(xAdata,yBdata)
'''
fig70=plt.figure(70)
ax70=fig70.gca(projection='3d')
# surf=ax70.plot_surface(X,Y,zApprch1dpx,cmap=cm.coolwarm,linewidth=0,antialiased=False)
surf=ax70.plot_surface(X,Y,dpxData,cmap=cm.jet,linewidth=0,antialiased=False)
plt.title(('Approach-1: Transfered Momentum $dP_x$\nTracks: %d (Maximum = %5.1f $\cdot 10^{24}$ $g \cdot cm/sec$)' % \
(lastTrackNumber,dpxDataMax)), color='m',fontsize=16)
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
ax70.set_zlabel('$dP_x \cdot 10^{-24}$; $g \cdot cm/sec$',color='m',fontsize=16)
cb = fig70.colorbar(surf)
# cbar=fig70.colorbar(surf,ticks=[0,1000,2000,3000,4000,5000,6000,7000]) # Next 2 commands not work
# cbar.ax.set_yticklabels(['0','1000','2000','3000','4000','5000','6000','7000'])
# labels=np.arange(0,8000,1000) # Next 4 commands not work
# location=labels
# cb.set_ticks(location)
# cb.set_ticklabels(labels)
# tick_locator = ticker.MaxNLocator(nbins=10) # Next 3 commands not work
# cb.locator = tick_locator
# cb.update_ticks()
plt.grid(True)
fig75=plt.figure(75)
ax=fig75.add_subplot(111) # for contours plotting
mapDpx=ax.contourf(X,Y,dpxData)
# mapDpx=ax.contourf(X,Y,dpxApprch_1,levels)
# Contourrange=[int(NlarmCutofDown+1)]
# mapTurnCutoff=ax.contour(X,Y,Nlarm,Contourrange,format='%d',colors=('w'),linewidths=(2))
# plt.clabel(mapTurnCutoff,inline=1,fontsize=14,manual=[(-3,-1.5)])
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
plt.title(('Approach-1: Transfered Momentum $dP_x$\nTracks: %d (Maximum = %5.1f $\cdot 10^{-24}$ $g \cdot cm/sec$)' % \
(lastTrackNumber,dpxDataMax)), color='m',fontsize=16)
fig75.colorbar(mapDpx)
# X,Y=np.meshgrid(xAdata,yBdata)
fig80=plt.figure(80)
ax80=fig80.gca(projection='3d')
# surf=ax80.plot_surface(X,Y,zApprch1dpy,cmap=cm.coolwarm,linewidth=0,antialiased=False)
surf=ax80.plot_surface(X,Y,dpyData,cmap=cm.jet,linewidth=0,antialiased=False)
plt.title(('Approach-1: Transfered Momentum $dP_y$\nTracks: %d (Maximum = %5.1f $\cdot 10^{24}$ $g \cdot cm/sec$)' % \
(lastTrackNumber,dpyDataMax)), color='m',fontsize=16)
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
ax80.set_zlabel('$dP_y \cdot 10^{-24}$; $g \cdot cm/sec$',color='m',fontsize=16)
cb = fig80.colorbar(surf)
# cbar=fig80.colorbar(surf,ticks=[0,1000,2000,3000,4000,5000,6000,7000]) # Next 2 commands not work
# cbar.ax.set_yticklabels(['0','1000','2000','3000','4000','5000','6000','7000'])
# labels=np.arange(0,8000,1000) # Next 4 commands not work
# location=labels
# cb.set_ticks(location)
# cb.set_ticklabels(labels)
# tick_locator = ticker.MaxNLocator(nbins=10) # Next 3 commands not work
# cb.locator = tick_locator
# cb.update_ticks()
plt.grid(True)
fig85=plt.figure(85)
ax=fig85.add_subplot(111) # for contours plotting
mapDpy=ax.contourf(X,Y,dpyData)
# mapDpy=ax.contourf(X,Y,dpyApprch_1,levels)
# Contourrange=[int(NlarmCutofDown+1)]
# mapTurnCutoff=ax.contour(X,Y,Nlarm,Contourrange,format='%d',colors=('w'),linewidths=(2))
# plt.clabel(mapTurnCutoff,inline=1,fontsize=14,manual=[(-3,-1.5)])
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
plt.title(('Approach-1: Transfered Momentum $dP_y$\nTracks: %d (Maximum = %5.1f $\cdot 10^{-24}$ $g \cdot cm/sec$)' % \
(lastTrackNumber,dpyDataMax)), color='m',fontsize=16)
fig85.colorbar(mapDpy)
fig90=plt.figure(90)
ax90=fig90.gca(projection='3d')
# surf=ax90.plot_surface(X,Y,zApprch1dpy,cmap=cm.coolwarm,linewidth=0,antialiased=False)
surf=ax90.plot_surface(X,Y,dpzData,cmap=cm.jet,linewidth=0,antialiased=False)
plt.title(('Approach-1: Transfered Momentum $dP_z$\nTracks: %d (Maximum = %5.1f $\cdot 10^{24}$ $g \cdot cm/sec$)' % \
(lastTrackNumber,dpzDataMax)), color='m',fontsize=16)
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
ax90.set_zlabel('$dP_z \cdot 10^{-24}$; $g \cdot cm/sec$',color='m',fontsize=16)
cb = fig90.colorbar(surf)
# cbar=fig90.colorbar(surf,ticks=[0,1000,2000,3000,4000,5000,6000,7000]) # Next 2 commands not work
# cbar.ax.set_yticklabels(['0','1000','2000','3000','4000','5000','6000','7000'])
# labels=np.arange(0,8000,1000) # Next 4 commands not work
# location=labels
# cb.set_ticks(location)
# cb.set_ticklabels(labels)
# tick_locator = ticker.MaxNLocator(nbins=10) # Next 3 commands not work
# cb.locator = tick_locator
# cb.update_ticks()
plt.grid(True)
fig95=plt.figure(95)
ax=fig95.add_subplot(111) # for contours plotting
mapDpz=ax.contourf(X,Y,dpzData)
# mapDpz=ax.contourf(X,Y,dpzApprch_1,levels)
# Contourrange=[int(NlarmCutofDown+1)]
# mapTurnCutoff=ax.contour(X,Y,Nlarm,Contourrange,format='%d',colors=('w'),linewidths=(2))
# plt.clabel(mapTurnCutoff,inline=1,fontsize=14,manual=[(-3,-1.5)])
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
plt.title(('Approach-1: Transfered Momentum $dP_z$\nTracks: %d (Maximum = %5.1f $\cdot 10^{-24}$ $g \cdot cm/sec$)' % \
(lastTrackNumber,dpzDataMax)), color='m',fontsize=16)
fig95.colorbar(mapDpz)
X2,Y2=np.meshgrid(xA_2data,yB_2data)
fig170=plt.figure(170)
ax170=fig170.gca(projection='3d')
# surf=ax170.plot_surface(X,Y,zApprch2dpx,cmap=cm.coolwarm,linewidth=0,antialiased=False)
surf=ax170.plot_surface(X2,Y2,dpx_2Data,cmap=cm.jet,linewidth=0,antialiased=False)
plt.title(('Approach-2: Transfered Momentum $dP_x$\nTracks: %d (Maximum = %5.1f $\cdot 10^{24}$ $g \cdot cm/sec$)' % \
(lastTrackNumber,dpxDataMax_2)), color='m',fontsize=16)
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
ax170.set_zlabel('$dP_x \cdot 10^{-24}$; $g \cdot cm/sec$',color='m',fontsize=16)
cb = fig170.colorbar(surf)
# cbar=fig170.colorbar(surf,ticks=[0,1000,2000,3000,4000,5000,6000,7000]) # Next 2 commands not work
# cbar.ax.set_yticklabels(['0','1000','2000','3000','4000','5000','6000','7000'])
# labels=np.arange(0,8000,1000) # Next 4 commands not work
# location=labels
# cb.set_ticks(location)
# cb.set_ticklabels(labels)
# tick_locator = ticker.MaxNLocator(nbins=10) # Next 3 commands not work
# cb.locator = tick_locator
# cb.update_ticks()
plt.grid(True)
fig175=plt.figure(175)
ax=fig175.add_subplot(111) # for contours plotting
mapDpx=ax.contourf(X2,Y2,dpx_2Data)
# mapDpx=ax.contourf(X2,Y2,dpxApprch_2,levels)
# Contourrange=[int(NlarmCutofDown+1)]
# mapTurnCutoff=ax.contour(X,Y,Nlarm,Contourrange,format='%d',colors=('w'),linewidths=(2))
# plt.clabel(mapTurnCutoff,inline=1,fontsize=14,manual=[(-3,-1.5)])
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
plt.title(('Approach-2: Transfered Momentum $dP_x$\nTracks: %d (Maximum = %5.1f $\cdot 10^{-24}$ $g \cdot cm/sec$)' % \
(lastTrackNumber,dpxDataMax_2)), color='m',fontsize=16)
fig175.colorbar(mapDpx)
fig180=plt.figure(180)
ax180=fig180.gca(projection='3d')
# surf=ax180.plot_surface(X2,Y2,zApprch2dpy,cmap=cm.coolwarm,linewidth=0,antialiased=False)
surf=ax180.plot_surface(X2,Y2,dpy_2Data,cmap=cm.jet,linewidth=0,antialiased=False)
plt.title(('Approach-2: Transfered Momentum $dP_y$\nTracks: %d (Maximum = %5.1f $\cdot 10^{24}$ $g \cdot cm/sec$)' % \
(lastTrackNumber,dpyDataMax_2)), color='m',fontsize=16)
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
ax180.set_zlabel('$dP_y \cdot 10^{-24}$; $g \cdot cm/sec$',color='m',fontsize=16)
cb = fig180.colorbar(surf)
# cbar=fig180.colorbar(surf,ticks=[0,1000,2000,3000,4000,5000,6000,7000]) # Next 2 commands not work
# cbar.ax.set_yticklabels(['0','1000','2000','3000','4000','5000','6000','7000'])
# labels=np.arange(0,8000,1000) # Next 4 commands not work
# location=labels
# cb.set_ticks(location)
# cb.set_ticklabels(labels)
# tick_locator = ticker.MaxNLocator(nbins=10) # Next 3 commands not work
# cb.locator = tick_locator
# cb.update_ticks()
plt.grid(True)
fig185=plt.figure(185)
ax=fig185.add_subplot(111) # for contours plotting
mapDpy=ax.contourf(X2,Y2,dpy_2Data)
# mapDpy=ax.contourf(X2,Y2,dpyApprch_2,levels)
# Contourrange=[int(NlarmCutofDown+1)]
# mapTurnCutoff=ax.contour(X,Y,Nlarm,Contourrange,format='%d',colors=('w'),linewidths=(2))
# plt.clabel(mapTurnCutoff,inline=1,fontsize=14,manual=[(-3,-1.5)])
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
plt.title(('Approach-2: Transfered Momentum $dP_y$\nTracks: %d (Maximum = %5.1f $\cdot 10^{24}$ $g \cdot cm/sec$)' % \
(lastTrackNumber,dpyDataMax_2)), color='m',fontsize=16)
fig185.colorbar(mapDpy)
fig190=plt.figure(190)
ax190=fig190.gca(projection='3d')
# surf=ax190.plot_surface(X2,Y2,zApprch2dpy,cmap=cm.coolwarm,linewidth=0,antialiased=False)
surf=ax190.plot_surface(X2,Y2,dpz_2Data,cmap=cm.jet,linewidth=0,antialiased=False)
plt.title(('Approach-2: Transfered Momentum $dP_z$\nTracks: %d (Maximum = %5.1f $\cdot 10^{-24}$ $g \cdot cm/sec$)' % \
(lastTrackNumber,dpzDataMax_2)), color='m',fontsize=16)
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
ax190.set_zlabel('$dP_z \cdot 10^{-24}$; $g \cdot cm/sec$',color='m',fontsize=16)
cb = fig190.colorbar(surf)
# cbar=fig190.colorbar(surf,ticks=[0,1000,2000,3000,4000,5000,6000,7000]) # Next 2 commands not work
# cbar.ax.set_yticklabels(['0','1000','2000','3000','4000','5000','6000','7000'])
# labels=np.arange(0,8000,1000) # Next 4 commands not work
# location=labels
# cb.set_ticks(location)
# cb.set_ticklabels(labels)
# tick_locator = ticker.MaxNLocator(nbins=10) # Next 3 commands not work
# cb.locator = tick_locator
# cb.update_ticks()
plt.grid(True)
fig195=plt.figure(195)
ax=fig195.add_subplot(111) # for contours plotting
mapDpz=ax.contourf(X2,Y2,dpz_2Data)
# mapDpz=ax.contourf(X2,Y2,dpzApprch_2,levels)
# Contourrange=[int(NlarmCutofDown+1)]
# mapTurnCutoff=ax.contour(X,Y,Nlarm,Contourrange,format='%d',colors=('w'),linewidths=(2))
# plt.clabel(mapTurnCutoff,inline=1,fontsize=14,manual=[(-3,-1.5)])
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
plt.title(('Approach-2: Transfered Momentum $dP_z$\nTracks: %d (Maximum = %5.1f $\cdot 10^{-24}$ $g \cdot cm/sec$)' % \
(lastTrackNumber,dpzDataMax_2)), color='m',fontsize=16)
fig195.colorbar(mapDpz)
'''
diffPxApprchs=np.zeros((xAentries,yBentries))
for mA in range(int(xAentries)):
for mB in range(int(yBentries)):
if dpxData[mA,mB] != 0. and dpx_2Data[mA,mB] != 0.:
diffPxApprchs[mA,mB]=200.*(dpxData[mA,mB]-dpx_2Data[mA,mB])/(dpxData[mA,mB]+dpx_2Data[mA,mB]) # %
fig300=plt.figure(300)
ax=fig300.add_subplot(111) # for contours plotting
mapDpz=ax.contourf(X,Y,diffPxApprchs)
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
# plt.title(('Approach-2: Transfered Momentum $dP_z$\nTracks: %d (Maximum = %5.1f $\cdot 10^{-24}$ $g \cdot cm/sec$)' % \
# (lastTrackNumber,dpzDataMax_2)), color='m',fontsize=16)
plt.title(('Difference for $dP_x$ in Both Approaches (%%)\nTracks: %d' % lastTrackNumber), color='m',fontsize=16)
fig300.colorbar(mapDpz)
diffPzApprchs=np.zeros((xAentries,yBentries))
for mA in range(int(xAentries)):
for mB in range(int(yBentries)):
if dpzData[mA,mB] != 0. and dpz_2Data[mA,mB] != 0.:
diffPzApprchs[mA,mB]=200.*(dpzData[mA,mB]-dpz_2Data[mA,mB])/(dpzData[mA,mB]+dpz_2Data[mA,mB]) # %
fig310=plt.figure(310)
ax=fig310.add_subplot(111) # for contours plotting
mapDpz=ax.contourf(X,Y,diffPzApprchs)
plt.xlabel('$A=log_{10}(q_e^2/b/E_{kin})$',color='m',fontsize=16)
plt.ylabel('$B=log_{10}(R_L/b)$',color='m',fontsize=16)
# plt.title(('Approach-2: Transfered Momentum $dP_z$\nTracks: %d (Maximum = %5.1f $\cdot 10^{-24}$ $g \cdot cm/sec$)' % \
# (lastTrackNumber,dpzDataMax_2)), color='m',fontsize=16)
plt.title(('Difference for $dP_z$ in Both Approaches (%%)\nTracks: %d' % lastTrackNumber), color='m',fontsize=16)
fig310.colorbar(mapDpz)
plt.show()
sys.exit()
| 45.354938
| 142
| 0.59696
| 5,639
| 44,085
| 4.594786
| 0.077673
| 0.011579
| 0.027017
| 0.030876
| 0.75137
| 0.729217
| 0.711656
| 0.697954
| 0.672404
| 0.639213
| 0
| 0.053762
| 0.26585
| 44,085
| 971
| 143
| 45.401648
| 0.746794
| 0.229761
| 0
| 0.575488
| 0
| 0
| 0.066769
| 0.005858
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.039076
| null | null | 0.055062
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8d715b4fc8a7f73872e3b5e8e0e2c2aba64c504e
| 151
|
py
|
Python
|
configuracao/forms.py
|
Moisestuli/karrata
|
962ce0c573214bfc83720727c9cacae823a8c372
|
[
"MIT"
] | null | null | null |
configuracao/forms.py
|
Moisestuli/karrata
|
962ce0c573214bfc83720727c9cacae823a8c372
|
[
"MIT"
] | null | null | null |
configuracao/forms.py
|
Moisestuli/karrata
|
962ce0c573214bfc83720727c9cacae823a8c372
|
[
"MIT"
] | null | null | null |
from django import froms
from Configuracao.models import Perfil
class PerfilForm(forms.FormModel):
model = Perfil
fields = ('perfil','imagem')
| 25.166667
| 38
| 0.748344
| 18
| 151
| 6.277778
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15894
| 151
| 5
| 39
| 30.2
| 0.889764
| 0
| 0
| 0
| 0
| 0
| 0.07947
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
8daa99db93aeadb04a8a3c0bae5eafa6b02f91a1
| 12,760
|
py
|
Python
|
starks/test/test_stark.py
|
computablelabs/starks
|
f8e45d56c3934a1cf24220b58e073434379e3d78
|
[
"MIT"
] | 9
|
2018-11-30T18:53:54.000Z
|
2021-11-15T20:59:08.000Z
|
starks/test/test_stark.py
|
computablelabs/starks
|
f8e45d56c3934a1cf24220b58e073434379e3d78
|
[
"MIT"
] | 13
|
2018-11-30T00:13:49.000Z
|
2019-04-04T20:14:29.000Z
|
starks/test/test_stark.py
|
computablelabs/starks
|
f8e45d56c3934a1cf24220b58e073434379e3d78
|
[
"MIT"
] | 1
|
2020-05-14T20:35:48.000Z
|
2020-05-14T20:35:48.000Z
|
import unittest
from starks.merkle_tree import merkelize
from starks.merkle_tree import merkelize_polynomial_evaluations
from starks.air import AIR
from starks.fft import NonBinaryFFT
# TODO(rbharath): These need to be swapped out for correct imports
from starks.utils import generate_Xi_s
from starks.utils import get_pseudorandom_indices
from starks.stark import get_power_cycle
from starks.stark import construct_trace_polynomials
from starks.stark import construct_constraint_polynomials
from starks.stark import construct_remainder_polynomials
from starks.stark import construct_boundary_polynomials
from starks.stark import get_pseudorandom_ks
from starks.stark import compute_pseudorandom_linear_combination_1d
from starks.stark import compute_pseudorandom_linear_combination
from starks.stark import STARK
from starks.modp import IntegersModP
from starks.poly_utils import multivariates_over
from starks.finitefield import FiniteField
class TestStark(unittest.TestCase):
"""
Basic tests for Stark construction implementation.
"""
# def test_stark_init(self):
# """Test generation of stark parameters."""
# steps = 511
# modulus = 2**256 - 2**32 * 351 + 1
# field = IntegersModP(modulus)
# extension_factor = 8
# # Only tests that constructor works implicitly
# params = STARK(field, steps, extension_factor, width=1, step_polys=[])
#
# def test_binary_stark_init(self):
# """Test generation of stark parameters."""
# steps = 512
# # This finite field is of size 2^17
# p = 2
# m = 17
# Zp = IntegersModP(p)
# polysOver = polynomials_over(Zp)
# field = FiniteField(p, m)
# #field = FiniteField(p, m)
# #x^17 + x^3 + 1 is primitive
# coefficients = [Zp(0)] * 18
# coefficients[0] = Zp(1)
# coefficients[3] = Zp(1)
# coefficients[17] = Zp(1)
# poly = polysOver(coefficients)
# field = FiniteField(p, m, polynomialModulus=poly)
#
# # X is a gen
# X = field(polysOver([0, 1]))
# extension_factor = 8
# # Only tests that constructor works implicitly
# params = STARK(field, steps, extension_factor, width=1, step_polys=[])
#
#
# def test_trace_polynomials(self):
# """
# Tests construction of computation polynomial
# """
# width = 2
# steps = 128
# extension_factor = 8
# modulus = 2**256 - 2**32 * 351 + 1
# field = IntegersModP(modulus)
# inp = [field(2), field(5)]
# [X_1, X_2] = generate_Xi_s(field, width)
# step_polys = [X_2, X_1 + 2*X_2**2]
# comp = AIR(field, width, inp, steps, step_polys,
# extension_factor)
# witness = comp.generate_witness()
# params = STARK(field, steps, modulus, extension_factor, width, step_polys)
# trace_polys = construct_trace_polynomials(witness, params.field, params.G1)
# assert len(trace_polys) == width
# xs = get_power_cycle(params.G1, params.field)
# # Check that the trace polynomial reconstitutes the witness
# for dim in range(width):
# witness_dim = witness[dim]
# trace_poly = trace_polys[dim]
# for ind, x in enumerate(xs):
# assert witness_dim[ind] == trace_poly(x)
#
# def test_constraint_polynomials(self):
# """
# Tests construction of constraint polynomial.
# """
# width = 2
# steps = 4
# extension_factor = 2
# modulus = 2**256 - 2**32 * 351 + 1
# field = IntegersModP(modulus)
# G1 = field(7)**((modulus - 1) // steps)
# inp = [field(2), field(5)]
# [X_1, X_2] = generate_Xi_s(field, width)
# step_polys = [X_2, X_1 + 2*X_2**2]
# comp = AIR(field, width, inp, steps, step_polys,
# extension_factor)
# witness = comp.generate_witness()
#
# trace_polys = construct_trace_polynomials(witness, field, G1)
# constraint_polys = construct_constraint_polynomials(step_polys, trace_polys, field, G1, width)
# assert len(constraint_polys) == width
# # TODO(rbharath): Add more meaningful test here.
#
# def test_pseudorandom_combo_merkle_root(self):
# """
# Tests that merkle spot checks are constructed correctly.
# """
# modulus = 2**256 - 2**32 * 351 + 1
# field = IntegersModP(modulus)
# width = 3
# # state = [c_0, c_1, value]
# inp = [field(2), field(2), field(5)]
# steps = 4
# spot_check_security_factor = 80
# extension_factor = 8
# precision = steps * extension_factor
# G1 = field(7)**((modulus - 1) // steps)
# G2 = field(7)**((modulus - 1) // precision)
# xs = get_power_cycle(G2, field)
# last_step_position = xs[(steps - 1) * extension_factor]
#
# [X_1, X_2, X_3] = generate_Xi_s(field, width)
# step_polys = [X_1, X_2, X_1 + X_2*X_3**2]
# comp = AIR(field, width, inp, steps, step_polys, extension_factor)
# #params = STARK(field, steps, modulus, extension_factor, width, step_polys)
#
# witness = comp.generate_witness()
# boundary = comp.generate_boundary_constraints()
#
# trace_polys = construct_trace_polynomials(witness, field, G1)
# constraint_polys = construct_constraint_polynomials(step_polys, trace_polys, field, G1, width)
# remainder_polys = construct_remainder_polynomials(constraint_polys, field,
# steps, last_step_position)
# boundary_polys = construct_boundary_polynomials(
# trace_polys, witness, boundary, field, last_step_position, width)
#
# fft_solver = NonBinaryFFT(field, G2)
# polys = trace_polys + remainder_polys + boundary_polys
# poly_evals = []
# for poly in polys:
# poly_eval = fft_solver.fft(poly)
# poly_evals.append(poly_eval)
# mtree = merkelize_polynomial_evaluations(width, poly_evals)
# l_poly = compute_pseudorandom_linear_combination(mtree[1],
# trace_polys, remainder_polys, boundary_polys, field, G2, precision,
# steps, width)
# l_evaluations = fft_solver.fft(l_poly)
# l_mtree = merkelize(l_evaluations)
#
# # TODO(rbharath): Move this to anouther test
# ## Compute merkle spot checks
# #branches = stark.compute_merkle_spot_checks(mtree, l_mtree,
# # samples=spot_check_security_factor)
#
# ## Each spot check returns 3 branches, m[pos], m[pos+extension_factor], l[pos]
# #assert len(branches) == 3*spot_check_security_factor
#
# def test_get_pseudorandom_indices(self):
# """
# Tests that pseudorandom elements are computed correctly.
# """
# modulus = 2**256 - 2**32 * 351 + 1
# field = IntegersModP(modulus)
# inp = [field(2), field(2), field(5)]
# width = 3
# steps = 4
# spot_check_security_factor = 80
# polysOver = multivariates_over(field, width).factory
# extension_factor = 8
# ## Factoring out computation
# [X_1, X_2, X_3] = generate_Xi_s(field, width)
# step_polys = [X_1, X_2, X_1 + X_2*X_3**2]
# precision = steps * extension_factor
# G1 = field(7)**((modulus - 1) // steps)
# G2 = field(7)**((modulus - 1) // precision)
# xs = get_power_cycle(G2, field)
# last_step_position = xs[(steps - 1) * extension_factor]
#
# comp = AIR(field, width, inp, steps, step_polys, extension_factor)
# witness = comp.generate_witness()
# boundary = comp.generate_boundary_constraints()
#
# trace_polys = construct_trace_polynomials(witness, field, G1)
# constraint_polys = construct_constraint_polynomials(step_polys, trace_polys, field, G1, width)
# remainder_polys = construct_remainder_polynomials(constraint_polys, field,
# steps, last_step_position)
# boundary_polys = construct_boundary_polynomials(
# trace_polys, witness, boundary, field, last_step_position, width)
#
# fft_solver = NonBinaryFFT(field, G2)
# polys = trace_polys + remainder_polys + boundary_polys
# poly_evals = []
# for poly in polys:
# poly_eval = fft_solver.fft(poly)
# poly_evals.append(poly_eval)
# mtree = merkelize_polynomial_evaluations(width, poly_evals)
# l_poly = compute_pseudorandom_linear_combination(mtree[1],
# trace_polys, remainder_polys, boundary_polys, field, G2, precision,
# steps, width)
# l_evaluations = fft_solver.fft(l_poly)
# l_mtree = merkelize(l_evaluations)
#
# indices = get_pseudorandom_indices(l_mtree[1],
# precision, count=spot_check_security_factor,
# exclude_multiples_of=extension_factor)
# assert len(indices) == spot_check_security_factor
#
# def test_higher_dim_proof_verification(self):
# """
# Tests proof generation and verification for multidimensional state.
# """
# width = 2
# steps = 32
# modulus = 2**256 - 2**32 * 351 + 1
# field = IntegersModP(modulus)
# inp = [field(0), field(1)]
# extension_factor = 8
# [X_1, X_2] = generate_Xi_s(field, width)
# step_polys = [X_2, X_1 + X_2]
# comp = AIR(field, width, inp, steps, step_polys,
# extension_factor)
# witness = comp.generate_witness()
# boundary = comp.generate_boundary_constraints()
#
# stark = STARK(field, steps, modulus, extension_factor, width, step_polys)
# proof = stark.mk_proof(witness, boundary)
# assert stark.verify_proof(proof, witness, boundary)
#
# def test_quadratic_stark(self):
# """
# Basic tests of quadratic stark generation
# """
# width = 2
# steps = 8
# modulus = 2**256 - 2**32 * 351 + 1
# field = IntegersModP(modulus)
# inp = [field(2), field(5)]
# extension_factor = 8
#
# # Factoring out computation
# # Polys are: [X_1, X_1 + X_2**2]
# [X_1, X_2] = generate_Xi_s(field, width)
# step_polys = [X_1, X_1 + X_2**3]
#
# comp = AIR(field, width, inp, steps, step_polys,
# extension_factor)
# stark = STARK(field, steps, modulus, extension_factor, width, step_polys)
#
# witness = comp.generate_witness()
# boundary = comp.generate_boundary_constraints()
# proof = stark.mk_proof(witness, boundary)
# assert isinstance(proof, list)
# assert len(proof) == 4
# result = stark.verify_proof(proof, witness, boundary)
# assert result
#
#
# def test_mimc_stark_verification(self):
# """
# Basic tests of MiMC stark verification.
# """
# width = 2
# steps = 8
# constraint_degree = 4
# # TODO(rbharath): Should be able to encode these constants as boundary
# # conditions on the tape for the STARK
# #constants = [[(i**7) ^ 42] for i in range(64)]
# #constants = constants * (steps // 64)
# modulus = 2**256 - 2**32 * 351 + 1
# field = IntegersModP(modulus)
# inp = [field(2), field(5)]
# extension_factor = 8
#
# ## Factoring out computation
# [X_1, X_2] = generate_Xi_s(field, width)
# step_polys = [X_1, X_1 + X_2**3]
#
# comp = AIR(field, width, inp, steps, step_polys,
# extension_factor)
# witness = comp.generate_witness()
# boundary = comp.generate_boundary_constraints()
#
# stark = STARK(field, steps, modulus, extension_factor, width, step_polys)
# proof = stark.mk_proof(witness, boundary)
# result = stark.verify_proof(proof, witness, boundary)
# assert result
#
# def test_affine_stark(self):
# """
# Basic tests of affine stark generation
# """
# width = 2
# steps = 32
# modulus = 2**256 - 2**32 * 351 + 1
# field = IntegersModP(modulus)
# inp = [field(2), field(5)]
# extension_factor = 8
#
# ## Factoring out computation
# polysOver = multivariates_over(field, width).factory
# X_1 = polysOver({(1,0): field(1)})
# X_2 = polysOver({(0,1): field(1)})
# step_polys = [X_1, X_1 + 3*X_2]
#
# comp = AIR(field, width, inp, steps, step_polys,
# extension_factor)
# witness = comp.generate_witness()
# boundary = comp.generate_boundary_constraints()
#
# stark = STARK(field, steps, modulus, extension_factor, width, step_polys)
# proof = stark.mk_proof(witness, boundary)
# assert isinstance(proof, list)
# assert len(proof) == 4
# result = stark.verify_proof(proof, witness, boundary)
# assert result
#
# def test_varying_quintic_stark(self):
# """
# Basic tests of quintic stark generation
# """
# steps = 8
# width = 6
# modulus = 2**256 - 2**32 * 351 + 1
# field = IntegersModP(modulus)
# inp = [field(1), field(2), field(3), field(4), field(5), field(6)]
# extension_factor = 8
#
# ### Factoring out computation
# [X_1, X_2, X_3, X_4, X_5, X_6] = generate_Xi_s(field, width)
# step_polys = [X_1, X_2, X_3, X_4, X_5, X_1*X_2*X_3*X_4*X_5*X_6]
#
# comp = AIR(field, width, inp, steps, step_polys,
# extension_factor)
# witness = comp.generate_witness()
# boundary = comp.generate_boundary_constraints()
#
# stark = STARK(field, steps, modulus, extension_factor, width, step_polys)
# proof = stark.mk_proof(witness, boundary)
# assert isinstance(proof, list)
# assert len(proof) == 4
# (m_root, l_root, branches, fri_proof) = proof
# result = stark.verify_proof(proof, witness, boundary)
# assert result
| 36.353276
| 99
| 0.673276
| 1,681
| 12,760
| 4.879833
| 0.116002
| 0.064001
| 0.008046
| 0.008777
| 0.72571
| 0.693771
| 0.638059
| 0.627088
| 0.61319
| 0.59466
| 0
| 0.032682
| 0.201489
| 12,760
| 350
| 100
| 36.457143
| 0.772402
| 0.873824
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005714
| 0
| 1
| 0
| true
| 0
| 0.95
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a5ca8b8ff82e7b21e4a662b05746a7940c22ae79
| 73
|
py
|
Python
|
addressbook/__init__.py
|
Saviq/django-addressbook
|
a5cd51a91c86a18c8cbb60675de2a149152cfc86
|
[
"BSD-3-Clause"
] | null | null | null |
addressbook/__init__.py
|
Saviq/django-addressbook
|
a5cd51a91c86a18c8cbb60675de2a149152cfc86
|
[
"BSD-3-Clause"
] | null | null | null |
addressbook/__init__.py
|
Saviq/django-addressbook
|
a5cd51a91c86a18c8cbb60675de2a149152cfc86
|
[
"BSD-3-Clause"
] | null | null | null |
from django.utils.translation import ugettext_lazy as _
_("Addressbook")
| 24.333333
| 55
| 0.821918
| 9
| 73
| 6.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09589
| 73
| 2
| 56
| 36.5
| 0.863636
| 0
| 0
| 0
| 0
| 0
| 0.150685
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a5d0793bb758b4645c168c941a2cf7bff47d85d8
| 217
|
py
|
Python
|
tools/MethylSig/rpy2/rpy/robjects/constants.py
|
psnehal/MethylSig
|
5efad71e71ff2515feff2e49579c856ef9a1bbd8
|
[
"CC-BY-3.0"
] | null | null | null |
tools/MethylSig/rpy2/rpy/robjects/constants.py
|
psnehal/MethylSig
|
5efad71e71ff2515feff2e49579c856ef9a1bbd8
|
[
"CC-BY-3.0"
] | null | null | null |
tools/MethylSig/rpy2/rpy/robjects/constants.py
|
psnehal/MethylSig
|
5efad71e71ff2515feff2e49579c856ef9a1bbd8
|
[
"CC-BY-3.0"
] | null | null | null |
import rpy2.rinterface as rinterface
_reval = rinterface.baseenv['eval']
# NULL
NULL = _reval(rinterface.parse("NULL"))
# TRUE/FALSE
TRUE = _reval(rinterface.parse("TRUE"))
FALSE = _reval(rinterface.parse("FALSE"))
| 21.7
| 41
| 0.741935
| 27
| 217
| 5.814815
| 0.407407
| 0.382166
| 0.382166
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005128
| 0.101382
| 217
| 9
| 42
| 24.111111
| 0.8
| 0.069124
| 0
| 0
| 0
| 0
| 0.085427
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 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
| 0
| 0
| 0
| 0
|
0
| 4
|
a5ec68c7132d7b17792296ef17ecb127301109cc
| 34
|
py
|
Python
|
tests/data/src/compilewheel/simple/__init__.py
|
rsumnerz/pip
|
77d82801124292193b6155fd00160078fd69014b
|
[
"MIT"
] | 7,089
|
2015-01-01T10:48:04.000Z
|
2022-03-31T08:47:02.000Z
|
tests/data/src/compilewheel/simple/__init__.py
|
alex/pip
|
d51a4b345b31ec4c8defbefe7f12b996c00c67fa
|
[
"MIT"
] | 8,417
|
2015-01-01T13:03:16.000Z
|
2022-03-31T17:40:27.000Z
|
tests/data/src/compilewheel/simple/__init__.py
|
alex/pip
|
d51a4b345b31ec4c8defbefe7f12b996c00c67fa
|
[
"MIT"
] | 2,663
|
2015-01-02T04:02:12.000Z
|
2022-03-30T02:30:46.000Z
|
def spam(gen):
yield from gen
| 11.333333
| 18
| 0.647059
| 6
| 34
| 3.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.264706
| 34
| 2
| 19
| 17
| 0.88
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5746c7991640f24bc99ee03f7e9ae6c6d763a629
| 134
|
py
|
Python
|
taskqueue/apps.py
|
mjkillough/channels-task-queue
|
2d30a4943d6629e642812376165b57cf2dfb3d37
|
[
"MIT"
] | null | null | null |
taskqueue/apps.py
|
mjkillough/channels-task-queue
|
2d30a4943d6629e642812376165b57cf2dfb3d37
|
[
"MIT"
] | null | null | null |
taskqueue/apps.py
|
mjkillough/channels-task-queue
|
2d30a4943d6629e642812376165b57cf2dfb3d37
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# encoding: utf-8
from django.apps import AppConfig
class TaskqueueConfig(AppConfig):
name = 'taskqueue'
| 14.888889
| 33
| 0.731343
| 17
| 134
| 5.764706
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00885
| 0.156716
| 134
| 8
| 34
| 16.75
| 0.858407
| 0.268657
| 0
| 0
| 0
| 0
| 0.09375
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 4
|
574bfb90caef120bf598e3c72d20b751522a2355
| 1,205
|
py
|
Python
|
conflict/utils/model_info.py
|
peckhams/stochastic_conflict_model
|
31ce769cace54dba049cad474bab5a7ed92cdc00
|
[
"MIT"
] | 1
|
2022-03-09T19:42:06.000Z
|
2022-03-09T19:42:06.000Z
|
conflict/utils/model_info.py
|
peckhams/stochastic_conflict_model
|
31ce769cace54dba049cad474bab5a7ed92cdc00
|
[
"MIT"
] | null | null | null |
conflict/utils/model_info.py
|
peckhams/stochastic_conflict_model
|
31ce769cace54dba049cad474bab5a7ed92cdc00
|
[
"MIT"
] | null | null | null |
#-------------------------------------------------------------------
# Copyright (c) 2021, Scott D. Peckham
#
# Oct. 2021. Added to bypass old tf_utils.py for version, etc.
#
#-------------------------------------------------------------------
# Notes: Update these whenever a new version is released
#-------------------------------------------------------------------
#
# name()
# version_number()
# build_date()
# version_string()
#
#-------------------------------------------------------------------
def name():
return 'Stochastic Conflict Model'
# name()
#-------------------------------------------------------------------
def version_number():
return 0.8
# version_number()
#-------------------------------------------------------------------
def build_date():
return '2021-10-13'
# build_date()
#-------------------------------------------------------------------
def version_string():
num_str = str( version_number() )
date_str = ' (' + build_date() + ')'
ver_string = name() + ' Version ' + num_str + date_str
return ver_string
# version_string()
#-------------------------------------------------------------------
| 25.104167
| 71
| 0.33278
| 83
| 1,205
| 4.614458
| 0.506024
| 0.13577
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017493
| 0.146058
| 1,205
| 47
| 72
| 25.638298
| 0.354713
| 0.686307
| 0
| 0
| 0
| 0
| 0.133523
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.363636
| false
| 0
| 0
| 0.272727
| 0.727273
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
575938fc69d88e92f5c389826a98197dc92e89ef
| 91
|
py
|
Python
|
revision/apps.py
|
amineadmane/AutoCare
|
f4339cdc2d78c985b77b7b1cc469bae67728086b
|
[
"MIT"
] | null | null | null |
revision/apps.py
|
amineadmane/AutoCare
|
f4339cdc2d78c985b77b7b1cc469bae67728086b
|
[
"MIT"
] | 2
|
2016-08-11T09:30:41.000Z
|
2016-08-11T15:04:08.000Z
|
revision/apps.py
|
amineadmane/AutoCare
|
f4339cdc2d78c985b77b7b1cc469bae67728086b
|
[
"MIT"
] | 1
|
2021-04-11T07:41:27.000Z
|
2021-04-11T07:41:27.000Z
|
from django.apps import AppConfig
class RevisionConfig(AppConfig):
name = 'revision'
| 15.166667
| 33
| 0.758242
| 10
| 91
| 6.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164835
| 91
| 5
| 34
| 18.2
| 0.907895
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 4
|
93ab877b2ba4a4118fcc54feee2dacd0c74011cf
| 1,927
|
py
|
Python
|
TColors.py
|
SazanovGrigory/pythonCmdRun
|
7543549deee88ff55497139bfdc12a880181c4c4
|
[
"MIT"
] | 1
|
2021-04-30T21:54:40.000Z
|
2021-04-30T21:54:40.000Z
|
TColors.py
|
SazanovGrigory/pythonCmdRun
|
7543549deee88ff55497139bfdc12a880181c4c4
|
[
"MIT"
] | null | null | null |
TColors.py
|
SazanovGrigory/pythonCmdRun
|
7543549deee88ff55497139bfdc12a880181c4c4
|
[
"MIT"
] | null | null | null |
# name: TColors
# Version: 1
# Created by: Grigory Sazanov
# GitHub: https://github.com/SazanovGrigory
class TerminalColors:
# Description: Class that can be used to color terminal output
# Example: print('GitHub: '+f"{BColors.TerminalColors.UNDERLINE}https://github.com/SazanovGrigory{BColors.TerminalColors.ENDC}")
HEADER ='\033[95m'
OKBLUE ='\033[94m'
OKCYAN ='\033[96m'
OKGREEN ='\033[92m'
WARNING ='\033[93m'
FAIL ='\033[91m'
ENDC ='\033[0m'
BOLD ='\033[1m'
UNDERLINE ='\033[4m'
def main():
print('Name: '+f"{TerminalColors.HEADER}TColors{TerminalColors.ENDC}")
print('Version: '+f"{TerminalColors.WARNING}1{TerminalColors.ENDC}")
print('Created by: '+f"{TerminalColors.BOLD}Grigory Sazanov{TerminalColors.ENDC}")
print('GitHub: '+f"{TerminalColors.UNDERLINE}https://github.com/SazanovGrigory{TerminalColors.ENDC}")
print(f"{TerminalColors.OKGREEN}Description: This is just a class that can be used to color terminal output{TerminalColors.ENDC}")
print("Example: print(\"GitHub: \"+f\"{TColors.TerminalColors.UNDERLINE}Some text here{TColors.TerminalColors.ENDC}\")")
print('Colors:')
print(' '+f"{TerminalColors.HEADER}HEADER{TerminalColors.ENDC}")
print(' '+f"{TerminalColors.OKBLUE}OKBLUE{TerminalColors.ENDC}")
print(' '+f"{TerminalColors.OKCYAN}OKCYAN{TerminalColors.ENDC}")
print(' '+f"{TerminalColors.OKGREEN}OKGREEN{TerminalColors.ENDC}")
print(' '+f"{TerminalColors.WARNING}WARNING{TerminalColors.ENDC}")
print(' '+f"{TerminalColors.FAIL}FAIL{TerminalColors.ENDC}")
print(' '+f"{TerminalColors.BOLD}BOLD{TerminalColors.ENDC}")
print(' '+f"{TerminalColors.UNDERLINE}UNDERLINE{TerminalColors.ENDC}")
if __name__ == '__main__':
main()
| 50.710526
| 141
| 0.645563
| 201
| 1,927
| 6.149254
| 0.283582
| 0.218447
| 0.241909
| 0.15534
| 0.402913
| 0.218447
| 0.063107
| 0.063107
| 0.063107
| 0
| 0
| 0.028497
| 0.198755
| 1,927
| 38
| 142
| 50.710526
| 0.772021
| 0.162429
| 0
| 0
| 0
| 0.035714
| 0.643035
| 0.384328
| 0
| 0
| 0
| 0
| 0
| 1
| 0.035714
| false
| 0
| 0
| 0
| 0.392857
| 0.535714
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
93bf6a36517dd3da0fbb7f4368f50cc0041e727f
| 536
|
py
|
Python
|
codeforces/552B.py
|
italo-batista/problems-solving
|
f83ad34f0abebd52925c4020635556f20743ba06
|
[
"MIT"
] | null | null | null |
codeforces/552B.py
|
italo-batista/problems-solving
|
f83ad34f0abebd52925c4020635556f20743ba06
|
[
"MIT"
] | null | null | null |
codeforces/552B.py
|
italo-batista/problems-solving
|
f83ad34f0abebd52925c4020635556f20743ba06
|
[
"MIT"
] | null | null | null |
# LINK FOR PROBLEM: http://codeforces.com/problemset/problem/552/B
n = int(raw_input())
if n < 10:
print 1 * (n + 1) - 1
elif n < 100:
print 2 * (n + 1) - 11
elif n < 1000:
print 3 * (n + 1) - 111
elif n < 10000:
print 4 * (n + 1) - 1111
elif n < 100000:
print 5 * (n + 1) - 11111
elif n < 1000000:
print 6 * (n + 1) - 111111
elif n < 10000000:
print 7 * (n + 1) - 1111111
elif n < 100000000:
print 8 * (n + 1) - 11111111
elif n < 1000000000:
print 9 * (n + 1) - 111111111
else:
print 10 * (n + 1) - 1111111111
| 15.764706
| 66
| 0.563433
| 92
| 536
| 3.271739
| 0.478261
| 0.066445
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.34456
| 0.279851
| 536
| 33
| 67
| 16.242424
| 0.435233
| 0.119403
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.47619
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
93c8d45de6308b6cdbaaf0508c7a5c1df0c0d0f8
| 880
|
py
|
Python
|
tests/test_jc_output.py
|
stbraun/jupyter_commons
|
732eaf7e7bd1400591cb43d285dbedc83c9c6511
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_jc_output.py
|
stbraun/jupyter_commons
|
732eaf7e7bd1400591cb43d285dbedc83c9c6511
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_jc_output.py
|
stbraun/jupyter_commons
|
732eaf7e7bd1400591cb43d285dbedc83c9c6511
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
"""Tests for `jupyter_commons` package."""
import jupyter_commons.output as jc_out
def test_colorize():
"""Test colorization of string."""
assert "lightblue" in jc_out.colorize("some message", color="lightblue")
assert "darkgreen" in jc_out.colorize("some message", color="darkgreen")
def test_msg_red():
"""Test colorization of string."""
assert "red" in jc_out.msg_red("some message")
def test_msg_green():
"""Test colorization of string."""
assert "green" in jc_out.msg_green("some message")
def test_msg_blue():
"""Test colorization of string."""
assert "blue" in jc_out.msg_blue("some message")
def test_highlight():
"""Test highlighting of string."""
assert "background:yellow" in jc_out.highlight("some message")
assert "background:green" in jc_out.highlight("some message", color='green')
| 27.5
| 80
| 0.690909
| 120
| 880
| 4.891667
| 0.283333
| 0.068143
| 0.083475
| 0.163543
| 0.473595
| 0.197615
| 0.105622
| 0
| 0
| 0
| 0
| 0.001351
| 0.159091
| 880
| 31
| 81
| 28.387097
| 0.791892
| 0.231818
| 0
| 0
| 0
| 0
| 0.263566
| 0
| 0
| 0
| 0
| 0
| 0.538462
| 1
| 0.384615
| true
| 0
| 0.076923
| 0
| 0.461538
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
93fb83dffce75e3bb98f4ad8a7af5833f9e52fb1
| 89
|
py
|
Python
|
july17th_CNN.py
|
thoesy2010/ANN_practice
|
79f7d5bb1a34483a802e3052ba393245768e9ab9
|
[
"Apache-2.0"
] | null | null | null |
july17th_CNN.py
|
thoesy2010/ANN_practice
|
79f7d5bb1a34483a802e3052ba393245768e9ab9
|
[
"Apache-2.0"
] | null | null | null |
july17th_CNN.py
|
thoesy2010/ANN_practice
|
79f7d5bb1a34483a802e3052ba393245768e9ab9
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 17 14:15:21 2019
@author: hu
"""
| 11.125
| 36
| 0.505618
| 14
| 89
| 3.214286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.203125
| 0.280899
| 89
| 7
| 37
| 12.714286
| 0.5
| 0.797753
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f51328d34ad30bd021b0e253445996cf6e2f2b2e
| 263
|
py
|
Python
|
launchable/utils/file_name_pattern.py
|
takanabe/cli
|
7cbf781d7f286fc4e52ef0980712c28f386e8d09
|
[
"Apache-2.0"
] | null | null | null |
launchable/utils/file_name_pattern.py
|
takanabe/cli
|
7cbf781d7f286fc4e52ef0980712c28f386e8d09
|
[
"Apache-2.0"
] | null | null | null |
launchable/utils/file_name_pattern.py
|
takanabe/cli
|
7cbf781d7f286fc4e52ef0980712c28f386e8d09
|
[
"Apache-2.0"
] | null | null | null |
import re
# find *Test, *Tests, *TestCase + .java, .scala, .kt
jvm_test_pattern = re.compile(r'^.*Test(?:Case|s)?\.(?:java|scala|kt)$')
# find *_test.py, test_*.py without __init__.py and conftest.py
pytest_test_pattern = re.compile(r'.*_test\.py|test_.*\.py')
| 32.875
| 72
| 0.673004
| 42
| 263
| 3.928571
| 0.5
| 0.145455
| 0.133333
| 0.242424
| 0.30303
| 0.30303
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102662
| 263
| 7
| 73
| 37.571429
| 0.699153
| 0.425856
| 0
| 0
| 0
| 0
| 0.412162
| 0.412162
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f51a06ed5b27ecfaf85c9dae342bd9e81fde0050
| 216
|
py
|
Python
|
2nd_week/09_factorial.py
|
ysong0504/algorithm
|
76bfef16bd5bdc13b7ad260ee5f4e9dc62316403
|
[
"MIT"
] | null | null | null |
2nd_week/09_factorial.py
|
ysong0504/algorithm
|
76bfef16bd5bdc13b7ad260ee5f4e9dc62316403
|
[
"MIT"
] | null | null | null |
2nd_week/09_factorial.py
|
ysong0504/algorithm
|
76bfef16bd5bdc13b7ad260ee5f4e9dc62316403
|
[
"MIT"
] | null | null | null |
#factorial(N) = N * factorial(N-1)
# 예 factorial(4) = 4 * factorical(3)
#...
#factoral(1) = 1
def factorial(n):
if n == 1:
return 1
# 이 부분을 채워보세요!
return n * factorial(n-1)
print(factorial(5))
| 15.428571
| 36
| 0.560185
| 34
| 216
| 3.558824
| 0.470588
| 0.330579
| 0.181818
| 0.198347
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 0.259259
| 216
| 13
| 37
| 16.615385
| 0.69375
| 0.458333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.6
| 0.2
| 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
| 0
| 0
| 1
| 0
|
0
| 4
|
f5213673ee5cf78ec386955aa9b27eb0d3533c6c
| 81
|
py
|
Python
|
python/flask/app/config.py
|
kskumgk63/trace-examples
|
1de45b351aa03367c745933b4923f07d436aea3e
|
[
"BSD-3-Clause"
] | 75
|
2017-03-20T12:17:14.000Z
|
2022-03-24T02:55:53.000Z
|
python/flask/app/config.py
|
kskumgk63/trace-examples
|
1de45b351aa03367c745933b4923f07d436aea3e
|
[
"BSD-3-Clause"
] | 25
|
2017-05-10T18:21:20.000Z
|
2022-01-28T18:36:52.000Z
|
python/flask/app/config.py
|
kskumgk63/trace-examples
|
1de45b351aa03367c745933b4923f07d436aea3e
|
[
"BSD-3-Clause"
] | 54
|
2017-05-10T18:13:52.000Z
|
2022-01-11T21:04:42.000Z
|
import os
PIN_OVERRIDES = os.getenv('PIN_OVERRIDES', 'false').lower() == 'true'
| 20.25
| 69
| 0.691358
| 11
| 81
| 4.909091
| 0.727273
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 81
| 3
| 70
| 27
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.271605
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f53ba28b06538e3261ab6023515cc32b3723c658
| 66
|
py
|
Python
|
py_epg/__main__.py
|
szab100/py-epg
|
9868879005dae4344fd948658756d54d1bf7a101
|
[
"MIT"
] | null | null | null |
py_epg/__main__.py
|
szab100/py-epg
|
9868879005dae4344fd948658756d54d1bf7a101
|
[
"MIT"
] | null | null | null |
py_epg/__main__.py
|
szab100/py-epg
|
9868879005dae4344fd948658756d54d1bf7a101
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
from py_epg import main
# Run
main.main()
| 11
| 23
| 0.712121
| 12
| 66
| 3.833333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017857
| 0.151515
| 66
| 5
| 24
| 13.2
| 0.803571
| 0.378788
| 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
| 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
| 4
|
f5447bf9641954ba4c32982cda0f90ec25ef6b85
| 14,481
|
py
|
Python
|
modules/instagram.py
|
N7SALab/HEV
|
d449a2ba4eeb07127b97befd0a58d37279ed8a36
|
[
"Apache-2.0"
] | null | null | null |
modules/instagram.py
|
N7SALab/HEV
|
d449a2ba4eeb07127b97befd0a58d37279ed8a36
|
[
"Apache-2.0"
] | 1
|
2021-06-02T01:10:50.000Z
|
2021-06-02T01:10:50.000Z
|
modules/instagram.py
|
N7SALab/HEV
|
d449a2ba4eeb07127b97befd0a58d37279ed8a36
|
[
"Apache-2.0"
] | null | null | null |
from selenium.webdriver.common.keys import Keys
from core.helpers.hevlog import Hevlog
from core.helpers.selenium import (Browser, chrome_for_docker)
from core.helpers.sleeper import Sleeper
from core.helpers.minio import MinioWrapper
hevlog = Hevlog('instagram', level='info')
class Instagram:
def __init__(self, instagram_login, instagram_password, instagram_following,
minio_hosts, minio_access_key, minio_secret_key,
browser=Browser(chrome_for_docker())):
"""Class for controlling Instagram without API
"""
self.login = instagram_login
self.password = instagram_password
self.following = instagram_following
self.browser = browser
# self.authenticated_browser = None
self.minio_client = MinioWrapper(hosts=minio_hosts,
access_key=minio_access_key,
secret_key=minio_secret_key,
secure=False)
def run_stories(self, limit=None):
"""Run
"""
hevlog.logging.debug('[login] {}'.format(self.login))
hevlog.logging.info('Running...')
hevlog.logging.info('[accounts] {}'.format(len(self.following)))
self.authenticated_browser = self._authenticate()
if self.authenticated_browser and self.following:
count = 0
if limit:
for account in self.following:
hevlog.logging.debug(
'[runrun] [{}] {} session: {}'.format(self.authenticated_browser.browser.name,
self.authenticated_browser.browser.title,
self.authenticated_browser.browser.session_id))
num_of_stories = get_stories(self.authenticated_browser, account)
hevlog.logging.info('[{}] {} stories'.format(account, num_of_stories))
count = count + 1
if count == limit:
return
Sleeper.hour('instagram')
self.run_stories()
def _authenticate(self):
"""Authenticate to Instagram
"""
browser = self.browser
# TODO: create capture proxy
# send traffic to /api
login_page = 'https://www.instagram.com/accounts/login/?source=auth_switcher'
browser.new_resolution('1024x768')
if self.minio_client.connected:
browser.set_minio_client(self.minio_client)
browser.browser.get(login_page)
hevlog.logging.debug('[authenticate] {}'.format(login_page))
Sleeper.seconds('instagram get page', 1)
browser.type(Keys.TAB)
browser.type(self.login)
Sleeper.seconds('instagram get page', 1)
# the password field is sometimes div[3] and div[4]
login_pass_xpaths = [
'//*[@id="react-root"]/section/main/div/article/div/div[1]/div/form/div[3]/div/label/input',
'//*[@id="react-root"]/section/main/div/article/div/div[1]/div/form/div[4]/div/label/input'
]
login_btn_xpaths = [
'//*[@id="react-root"]/section/main/div/article/div/div[1]/div/form/div[4]/button',
'//*[@id="react-root"]/section/main/div/article/div/div[1]/div/form/div[6]/button'
]
found_pass = False
for xpath in login_pass_xpaths:
try:
login_pass = browser.browser.find_element_by_xpath(xpath)
found_pass = True
break
except:
pass
Sleeper.seconds('instagram get page', 2)
found_btn = False
for xpath in login_btn_xpaths:
try:
login_btn = browser.browser.find_element_by_xpath(xpath)
found_btn = True
break
except:
pass
if found_pass and found_btn:
pass
else:
hevlog.logging.error('[browser] Authentication failed')
hevlog.logging.debug(
'[browser] Found password field: {} Found login button: {}'.format(browser.browser.name,
found_pass,
found_btn))
Sleeper.minute("instagram can't authenticate")
return False
login_pass.send_keys(self.password)
login_btn.click()
Sleeper.seconds('wait for instagram to log in', 5)
hevlog.logging.debug(
'[authenticated browser] [{}] {} session: {}'.format(browser.browser.name, browser.browser.title,
browser.browser.session_id))
browser.save_screenshot_to_minio(bucket_name='screenshots', prefix='instagram/')
return browser
def _get_stories(self, account):
""" Retrieve story
"""
story = 'https://www.instagram.com/stories/{}/'.format(account)
num_of_stories = 0
hevlog.logging.debug('[get_stories] {}'.format(story))
browser = self.authenticated_browser
browser.browser.get(story)
browser.browser.save_screenshot_to_minio(bucket_name='screenshots', prefix='instagram/' + account)
if 'Page Not Found' in browser.browser.title:
hevlog.logging.debug('[get_stories] no stories for {}'.format(account))
return num_of_stories
Sleeper.seconds('instagram', 2)
while True:
try:
next_story(browser)
title = browser.browser.title
if title == 'Instagram':
hevlog.logging.debug(('[get_stories] {} end of stories'.format(account)))
raise Exception
num_of_stories += 1
browser.save_screenshot_to_minio(bucket_name='screenshots', prefix='instagram/' + account)
Sleeper.seconds('watch the story for a bit', 1)
browser.save_screenshot_to_minio(bucket_name='screenshots', prefix='instagram/' + account)
except:
# TODO: disable browser proxy when done
hevlog.logging.debug('[get_stories] done: {}'.format(account))
return num_of_stories
def _next_story(self, authenticated_browser):
""" Click next story button
"""
xpaths = [
'//*[@id="react-root"]/section/div/div/section/div[2]/div[1]/div/div/div[2]/div/div/button',
'//*[@id="react-root"]/section/div/div/section/div[2]/button[2]'
]
found_btn = False
for xpath in xpaths:
try:
browser = authenticated_browser
button = browser.browser.find_element_by_xpath(xpath)
found_btn = True
hevlog.logging.debug('[next_story] next story')
return button.click()
except:
pass
if not found_btn:
# no more stories. exit
hevlog.logging.debug('[_next_story] no more stories')
raise Exception
def _get_page(self, account):
""" Get page
"""
hevlog.logging.debug('[_get_page] getting {}'.format(account))
page = 'https://instagram.com/{}'.format(account)
browser = self.authenticated_browser
return browser.browser.get(page)
def authenticate(username, password, minio_client=None, retries=None):
"""Authenticates through browser and returns browser driver
:param username: username string
:param password: password string
:param minio_client: minio client
:param retries: not implemented
:return: authenticated browser
"""
while True:
# TODO: create capture proxy
# send traffic to /api
login_page = 'https://www.instagram.com/accounts/login/?source=auth_switcher'
# browser = Browser(chrome())
# browser = Browser(chrome_headless_nosandbox())
browser = Browser(chrome_for_docker())
# browser = Browser(chrome_sandboxed())
# browser = Browser(chrome_headless_sandboxed())
# browser = Browser(chrome_remote())
browser.new_resolution('1024x768')
if minio_client:
browser.set_minio_client(minio_client)
browser.browser.get(login_page)
hevlog.logging.debug('[authenticate] {}'.format(login_page))
Sleeper.seconds('instagram get page', 1)
browser.type(Keys.TAB)
browser.type(username)
Sleeper.seconds('instagram get page', 1)
# the password field is sometimes div[3] and div[4]
login_pass_xpaths = [
'//*[@id="react-root"]/section/main/div/article/div/div[1]/div/form/div[3]/div/label/input',
'//*[@id="react-root"]/section/main/div/article/div/div[1]/div/form/div[4]/div/label/input'
]
login_btn_xpaths = [
'//*[@id="react-root"]/section/main/div/article/div/div[1]/div/form/div[4]/button',
'//*[@id="react-root"]/section/main/div/article/div/div[1]/div/form/div[6]/button'
]
found_pass = False
for xpath in login_pass_xpaths:
try:
login_pass = browser.browser.find_element_by_xpath(xpath)
found_pass = True
break
except:
pass
Sleeper.seconds('instagram get page', 2)
found_btn = False
for xpath in login_btn_xpaths:
try:
login_btn = browser.browser.find_element_by_xpath(xpath)
found_btn = True
break
except:
pass
if found_pass and found_btn:
break
else:
hevlog.logging.error('[browser] Authentication failed')
hevlog.logging.debug(
'[browser] Found password field: {} Found login button: {}'.format(browser.browser.name, found_pass,
found_btn))
Sleeper.minute("instagram can't authenticate")
login_pass.send_keys(password)
login_btn.click()
Sleeper.seconds('wait for instagram to log in', 5)
hevlog.logging.debug(
'[authenticated browser] [{}] {} session: {}'.format(browser.browser.name, browser.browser.title,
browser.browser.session_id))
browser.save_screenshot_to_minio(bucket_name='screenshots', prefix='instagram/')
return browser
def get_stories(authenticated_browser, account):
""" Retrieve story
"""
story = 'https://www.instagram.com/stories/{}/'.format(account)
num_of_stories = 0
# TODO: set browser to redirect to proxy here
# TODO: check if account exists
browser = authenticated_browser
hevlog.logging.debug('[get_stories] {}'.format(story))
browser.browser.get(story)
browser.save_screenshot_to_minio(bucket_name='screenshots', prefix='instagram/' + account)
if 'Page Not Found' in browser.browser.title:
hevlog.logging.debug('[get_stories] no stories for {}'.format(account))
return num_of_stories
Sleeper.seconds('instagram', 2)
while True:
try:
next_story(browser)
title = browser.browser.title
if title == 'Instagram':
hevlog.logging.debug(('[get_stories] {} end of stories'.format(account)))
raise Exception
num_of_stories += 1
browser.save_screenshot_to_minio(bucket_name='screenshots', prefix='instagram/' + account)
Sleeper.seconds('watch the story for a bit', 1)
browser.save_screenshot_to_minio(bucket_name='screenshots', prefix='instagram/' + account)
except:
# TODO: disable browser proxy when done
hevlog.logging.debug('[get_stories] done: {}'.format(account))
return num_of_stories
def next_story(authenticated_browser):
""" Click next story button
"""
xpaths = [
'//*[@id="react-root"]/section/div/div/section/div[2]/div[1]/div/div/div[2]/div/div/button',
'//*[@id="react-root"]/section/div/div/section/div[2]/button[2]'
]
found_btn = False
for xpath in xpaths:
try:
browser = authenticated_browser
button = browser.browser.find_element_by_xpath(xpath)
found_btn = True
hevlog.logging.debug('[next_story] next story')
return button.click()
except:
pass
if not found_btn:
# no more stories. exit
hevlog.logging.debug('[next_story] no more stories')
raise Exception
def get_page(authenticated_browser, account):
""" Get page
"""
# TODO: need to download page
hevlog.logging.debug('[get_page] getting {}'.format(account))
page = 'https://instagram.com/{}'.format(account)
browser = authenticated_browser
return browser.browser.get(page)
def runrun(browser, account):
hevlog.logging.debug(
'[runrun] [{}] {} session: {}'.format(browser.browser.name, browser.browser.title,
browser.browser.session_id))
num_of_stories = get_stories(browser, account)
hevlog.logging.info('[{}] {} stories'.format(account, num_of_stories))
# Sleeper.minute('instagram')
return True
def test_run(config):
client = MinioWrapper(config['minio-hev'], secure=False)
instagram_config = config['instagram']
login = instagram_config['login']['account']
password = instagram_config['login']['password']
accounts = instagram_config['following']
hevlog.logging.debug('[login] {}'.format(login))
hevlog.logging.info('Running...')
hevlog.logging.info('[accounts] {}'.format(len(accounts)))
while True:
if len(accounts) > 0:
browser = authenticate(login, password, client)
for account in accounts:
while True:
if runrun(browser, account):
break
else:
browser = authenticate(login, password, client)
break
break
break
| 33.834112
| 116
| 0.576134
| 1,533
| 14,481
| 5.288324
| 0.112851
| 0.069076
| 0.053287
| 0.026644
| 0.741088
| 0.70544
| 0.697915
| 0.697915
| 0.674232
| 0.665968
| 0
| 0.006321
| 0.311719
| 14,481
| 427
| 117
| 33.913349
| 0.807063
| 0.079207
| 0
| 0.693727
| 0
| 0.04428
| 0.197234
| 0.073906
| 0
| 0
| 0
| 0.01171
| 0
| 1
| 0.04428
| false
| 0.110701
| 0.01845
| 0
| 0.114391
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
f54710f4e0fbb7a2bab0f8a3e83ec226f26d9861
| 169
|
py
|
Python
|
chapter3/3_2_2_2.py
|
kungbob/Machine_Learning_In_Action
|
007db9d2a6c957d314ecd0b4322cad5b04da7113
|
[
"MIT"
] | null | null | null |
chapter3/3_2_2_2.py
|
kungbob/Machine_Learning_In_Action
|
007db9d2a6c957d314ecd0b4322cad5b04da7113
|
[
"MIT"
] | 1
|
2018-01-05T15:48:33.000Z
|
2018-01-05T15:54:22.000Z
|
chapter3/3_2_2_2.py
|
kungbob/Machine_Learning_In_Action
|
007db9d2a6c957d314ecd0b4322cad5b04da7113
|
[
"MIT"
] | 2
|
2019-02-12T01:35:20.000Z
|
2019-03-24T03:00:51.000Z
|
import treePlotter
myTree = treePlotter.retrieveTree(0)
treePlotter.createPlot(myTree)
myTree['no surfacing'][3] = 'maybe'
print(myTree)
treePlotter.createPlot(myTree)
| 21.125
| 36
| 0.798817
| 19
| 169
| 7.105263
| 0.578947
| 0.251852
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012821
| 0.076923
| 169
| 7
| 37
| 24.142857
| 0.852564
| 0
| 0
| 0.333333
| 0
| 0
| 0.100592
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 0.166667
| 0.166667
| 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
| 0
|
0
| 4
|
f550397d25f66d7022d1f868491addc7abba0654
| 142
|
py
|
Python
|
Sanitizers/src/escapeHTML.py
|
Sophietje/SFTLearning
|
bff1202d8990b2974ae4bc7e161ff0c712040138
|
[
"Apache-2.0"
] | 1
|
2020-12-03T03:50:34.000Z
|
2020-12-03T03:50:34.000Z
|
Sanitizers/src/escapeHTML.py
|
Sophietje/SFTLearning
|
bff1202d8990b2974ae4bc7e161ff0c712040138
|
[
"Apache-2.0"
] | null | null | null |
Sanitizers/src/escapeHTML.py
|
Sophietje/SFTLearning
|
bff1202d8990b2974ae4bc7e161ff0c712040138
|
[
"Apache-2.0"
] | 1
|
2020-12-01T17:56:31.000Z
|
2020-12-01T17:56:31.000Z
|
#!/usr/bin/python
import sys
from cgi import escape
if __name__ == "__main__":
if len(sys.argv) > 0 :
print(escape(sys.argv[1]))
| 17.75
| 34
| 0.633803
| 22
| 142
| 3.727273
| 0.727273
| 0.170732
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017857
| 0.211268
| 142
| 7
| 35
| 20.285714
| 0.714286
| 0.112676
| 0
| 0
| 0
| 0
| 0.064
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0.2
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f57603cb07bf0e2bf7b010b9eed29012a9f6c00c
| 152
|
py
|
Python
|
src/logging/message_format.py
|
privong/still-magic
|
1d651840497d66d44ff43528f6e1f38e698ce168
|
[
"CC-BY-4.0"
] | null | null | null |
src/logging/message_format.py
|
privong/still-magic
|
1d651840497d66d44ff43528f6e1f38e698ce168
|
[
"CC-BY-4.0"
] | null | null | null |
src/logging/message_format.py
|
privong/still-magic
|
1d651840497d66d44ff43528f6e1f38e698ce168
|
[
"CC-BY-4.0"
] | null | null | null |
import logging
logging.basicConfig(format='%(asctime)s,%(levelname)s,"%(message)s"', datefmt='%Y-%m-%d:%H:%M:%S')
logging.warning('This is a warning')
| 30.4
| 98
| 0.684211
| 24
| 152
| 4.333333
| 0.708333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.059211
| 152
| 4
| 99
| 38
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0.480263
| 0.256579
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 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
| 0
| 0
|
0
| 4
|
f5862e7f31dd29e02ed80d6a735c6e501ef05d24
| 583
|
py
|
Python
|
tests/test_vehicle.py
|
WisconsinAutonomous/wa_simulator
|
405a086b16f262fc82513ca9b23fd040e6375945
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5
|
2021-02-14T03:56:07.000Z
|
2021-12-16T04:46:54.000Z
|
tests/test_vehicle.py
|
WisconsinAutonomous/wa_simulator
|
405a086b16f262fc82513ca9b23fd040e6375945
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1
|
2021-02-05T19:30:55.000Z
|
2021-02-05T19:51:21.000Z
|
tests/test_vehicle.py
|
WisconsinAutonomous/wa_simulator
|
405a086b16f262fc82513ca9b23fd040e6375945
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 3
|
2021-09-20T21:21:12.000Z
|
2022-01-09T20:49:46.000Z
|
"""
Wisconsin Autonomous - https://www.wisconsinautonomous.org
Copyright (c) 2021 wisconsinautonomous.org
All rights reserved.
Use of this source code is governed by a BSD-style license that can be found
in the LICENSE file at the top level of the repo
"""
import unittest
import numpy as np
# Import the core module
from wa_simulator.vehicle import WALinearKinematicBicycle
# -----
# Tests
# -----
class TestWALinearKinematicBicycle(unittest.TestCase):
"""Tests method related to the WALinearKinematicBicycle"""
pass
if __name__ == '__main__':
unittest.main()
| 19.433333
| 76
| 0.749571
| 74
| 583
| 5.783784
| 0.783784
| 0.102804
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008214
| 0.164666
| 583
| 29
| 77
| 20.103448
| 0.870637
| 0.591767
| 0
| 0
| 0
| 0
| 0.036036
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.142857
| 0.428571
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
f5915355c6a6f7f56e05f016ed0505e40ebcdf60
| 202
|
py
|
Python
|
src/python/WMCore/ReqMgr/DataStructs/DefaultConfig/DAS_RESULT_FILTER.py
|
khurtado/WMCore
|
f74e252412e49189a92962945a94f93bec81cd1e
|
[
"Apache-2.0"
] | 21
|
2015-11-19T16:18:45.000Z
|
2021-12-02T18:20:39.000Z
|
src/python/WMCore/ReqMgr/DataStructs/DefaultConfig/DAS_RESULT_FILTER.py
|
khurtado/WMCore
|
f74e252412e49189a92962945a94f93bec81cd1e
|
[
"Apache-2.0"
] | 5,671
|
2015-01-06T14:38:52.000Z
|
2022-03-31T22:11:14.000Z
|
src/python/WMCore/ReqMgr/DataStructs/DefaultConfig/DAS_RESULT_FILTER.py
|
khurtado/WMCore
|
f74e252412e49189a92962945a94f93bec81cd1e
|
[
"Apache-2.0"
] | 67
|
2015-01-21T15:55:38.000Z
|
2022-02-03T19:53:13.000Z
|
from __future__ import print_function, division
#filtered list which only send list information for DAS query
DAS_RESULT_FILTER = {"filter_list": ["RequestName", "PrepID", "CMSSWVersion", "GlobalTag"]}
| 50.5
| 91
| 0.787129
| 25
| 202
| 6.04
| 0.84
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108911
| 202
| 3
| 92
| 67.333333
| 0.838889
| 0.29703
| 0
| 0
| 0
| 0
| 0.347518
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.