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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
88c70e04902824593e5d3fc029a7fc3023e1c14f
| 59
|
py
|
Python
|
pyedf/__init__.py
|
vixus0/pyedf
|
b0b29e9feae622a60d86e0199586e33ead063079
|
[
"BSD-2-Clause"
] | null | null | null |
pyedf/__init__.py
|
vixus0/pyedf
|
b0b29e9feae622a60d86e0199586e33ead063079
|
[
"BSD-2-Clause"
] | null | null | null |
pyedf/__init__.py
|
vixus0/pyedf
|
b0b29e9feae622a60d86e0199586e33ead063079
|
[
"BSD-2-Clause"
] | null | null | null |
__version__ = "0.1"
from .edf import *
from .raw import *
| 11.8
| 19
| 0.661017
| 9
| 59
| 3.888889
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042553
| 0.20339
| 59
| 4
| 20
| 14.75
| 0.702128
| 0
| 0
| 0
| 0
| 0
| 0.050847
| 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
|
88d797c70ed5f2058f2c4d7c217ebca49f058fa0
| 173
|
py
|
Python
|
r3/app/handlers/healthcheck.py
|
timgates42/r3
|
cc6b4eb55c7ae30a8f75af2be165504565dbeb79
|
[
"Unlicense",
"MIT"
] | 49
|
2015-01-06T19:10:41.000Z
|
2021-08-01T03:39:39.000Z
|
r3/app/handlers/healthcheck.py
|
timgates42/r3
|
cc6b4eb55c7ae30a8f75af2be165504565dbeb79
|
[
"Unlicense",
"MIT"
] | 3
|
2015-03-30T12:37:00.000Z
|
2021-06-09T20:31:54.000Z
|
r3/app/handlers/healthcheck.py
|
timgates42/r3
|
cc6b4eb55c7ae30a8f75af2be165504565dbeb79
|
[
"Unlicense",
"MIT"
] | 12
|
2015-02-27T13:51:09.000Z
|
2021-06-09T20:30:59.000Z
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
from r3.app.handlers import BaseHandler
class HealthcheckHandler(BaseHandler):
def get(self):
self.write('WORKING')
| 17.3
| 39
| 0.67052
| 21
| 173
| 5.52381
| 0.904762
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013986
| 0.17341
| 173
| 9
| 40
| 19.222222
| 0.797203
| 0.219653
| 0
| 0
| 0
| 0
| 0.05303
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 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
|
88da66b2f8e4cbebe0fab5e2a6b67c4cdad92412
| 30
|
py
|
Python
|
data/studio21_generated/introductory/4702/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/4702/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/4702/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
def digits_product(product):
| 15
| 28
| 0.8
| 4
| 30
| 5.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 30
| 2
| 29
| 15
| 0.851852
| 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
|
002b9e732920846ae31da27498a6de49eae3c68c
| 294
|
py
|
Python
|
pytpp/attributes/validation_manager.py
|
Venafi/pytpp
|
42af655b2403b8c9447c86962abd4aaa0201f646
|
[
"MIT"
] | 4
|
2022-02-04T23:58:55.000Z
|
2022-02-15T18:53:08.000Z
|
pytpp/attributes/validation_manager.py
|
Venafi/pytpp
|
42af655b2403b8c9447c86962abd4aaa0201f646
|
[
"MIT"
] | null | null | null |
pytpp/attributes/validation_manager.py
|
Venafi/pytpp
|
42af655b2403b8c9447c86962abd4aaa0201f646
|
[
"MIT"
] | null | null | null |
from pytpp.attributes._helper import IterableMeta, Attribute
from pytpp.attributes.service_module import ServiceModuleAttributes
class ValidationManagerAttributes(ServiceModuleAttributes, metaclass=IterableMeta):
__config_class__ = "Validation Manager"
start_time = Attribute('Start Time')
| 36.75
| 83
| 0.857143
| 28
| 294
| 8.714286
| 0.642857
| 0.07377
| 0.155738
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081633
| 294
| 7
| 84
| 42
| 0.903704
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 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
|
cc355d32861626bbf41f93da924d0a8e2b8d1b05
| 1,002
|
py
|
Python
|
searchFunction/migrations/0007_auto_20181216_0253.py
|
lrbrwnn1/HIVE
|
3d5d83d09f91dbc14293b8f3b4a4a6bc8cd06e0b
|
[
"Apache-2.0"
] | 3
|
2019-03-06T02:17:08.000Z
|
2020-04-21T21:58:01.000Z
|
searchFunction/migrations/0007_auto_20181216_0253.py
|
lrbrwnn1/HIVE
|
3d5d83d09f91dbc14293b8f3b4a4a6bc8cd06e0b
|
[
"Apache-2.0"
] | null | null | null |
searchFunction/migrations/0007_auto_20181216_0253.py
|
lrbrwnn1/HIVE
|
3d5d83d09f91dbc14293b8f3b4a4a6bc8cd06e0b
|
[
"Apache-2.0"
] | 1
|
2020-04-21T21:58:04.000Z
|
2020-04-21T21:58:04.000Z
|
# Generated by Django 2.1.2 on 2018-12-16 02:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('searchFunction', '0006_auto_20181216_0252'),
]
operations = [
migrations.RemoveField(
model_name='investigator',
name='MI',
),
migrations.RemoveField(
model_name='investigator',
name='country',
),
migrations.RemoveField(
model_name='investigator',
name='department',
),
migrations.RemoveField(
model_name='investigator',
name='institution',
),
migrations.RemoveField(
model_name='investigator',
name='office',
),
migrations.RemoveField(
model_name='investigator',
name='phone',
),
migrations.RemoveField(
model_name='investigator',
name='position',
),
]
| 23.857143
| 54
| 0.530938
| 77
| 1,002
| 6.779221
| 0.454545
| 0.281609
| 0.348659
| 0.402299
| 0.616858
| 0.616858
| 0
| 0
| 0
| 0
| 0
| 0.048362
| 0.360279
| 1,002
| 41
| 55
| 24.439024
| 0.765991
| 0.04491
| 0
| 0.6
| 1
| 0
| 0.17801
| 0.024084
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.028571
| 0
| 0.114286
| 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
|
cc39db0f1984b0afa3945629e990c5c60eb3976d
| 161
|
py
|
Python
|
lib/utils.py
|
yiyangyi/cc98-tornado
|
45313f2313e5b5a4636469b4b82a02a8e62fc1f1
|
[
"MIT"
] | null | null | null |
lib/utils.py
|
yiyangyi/cc98-tornado
|
45313f2313e5b5a4636469b4b82a02a8e62fc1f1
|
[
"MIT"
] | null | null | null |
lib/utils.py
|
yiyangyi/cc98-tornado
|
45313f2313e5b5a4636469b4b82a02a8e62fc1f1
|
[
"MIT"
] | null | null | null |
import re
def find_memtions(content):
regex = re.compile(r"@(?P<username>)(\s|$)", re.I)
return [m.group("username") for m in regex.finditer(content)]
| 23
| 65
| 0.652174
| 25
| 161
| 4.16
| 0.76
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.149068
| 161
| 6
| 66
| 26.833333
| 0.759124
| 0
| 0
| 0
| 0
| 0
| 0.18125
| 0.13125
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 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
|
cc64f855c5e553e505b225a7635079010767878c
| 131
|
py
|
Python
|
backend/index.py
|
hack4impact-uiuc/mentee
|
c56945db8051e798c7bf6703577a0e50a54b0d67
|
[
"MIT"
] | 7
|
2020-10-03T22:45:38.000Z
|
2021-10-02T09:54:40.000Z
|
backend/index.py
|
hack4impact-uiuc/mentee
|
c56945db8051e798c7bf6703577a0e50a54b0d67
|
[
"MIT"
] | 265
|
2020-10-01T20:06:27.000Z
|
2022-02-27T12:18:55.000Z
|
backend/index.py
|
Leundai/twanalyze
|
bfccd9de43fae78e1cbdc0a6695f1cf827a3282b
|
[
"Apache-2.0"
] | 1
|
2020-10-06T19:57:37.000Z
|
2020-10-06T19:57:37.000Z
|
from api import create_app
from werkzeug.contrib.fixers import ProxyFix
app = create_app()
app.wsgi_app = ProxyFix(app.wsgi_app)
| 18.714286
| 44
| 0.801527
| 21
| 131
| 4.809524
| 0.47619
| 0.178218
| 0.19802
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122137
| 131
| 6
| 45
| 21.833333
| 0.878261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
cc707a2a87e4aa7fff4a3a24315ef8dac8f63b22
| 39
|
py
|
Python
|
data/studio21_generated/introductory/4484/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/4484/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/4484/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
def calculate(num1, operation, num2):
| 19.5
| 37
| 0.74359
| 5
| 39
| 5.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0.128205
| 39
| 2
| 38
| 19.5
| 0.794118
| 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
|
cc804604bb87a966cd563819f22b38e7a497f5ee
| 260
|
py
|
Python
|
codes_/0287_Find_the_Duplicate_Number.py
|
SaitoTsutomu/leetcode
|
4656d66ab721a5c7bc59890db9a2331c6823b2bf
|
[
"MIT"
] | null | null | null |
codes_/0287_Find_the_Duplicate_Number.py
|
SaitoTsutomu/leetcode
|
4656d66ab721a5c7bc59890db9a2331c6823b2bf
|
[
"MIT"
] | null | null | null |
codes_/0287_Find_the_Duplicate_Number.py
|
SaitoTsutomu/leetcode
|
4656d66ab721a5c7bc59890db9a2331c6823b2bf
|
[
"MIT"
] | null | null | null |
# %% [287. Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/)
class Solution:
def findDuplicate(self, nums: List[int]) -> int:
for i, v in enumerate(nums, 1):
if v in nums[i:]:
return v
| 37.142857
| 95
| 0.6
| 36
| 260
| 4.333333
| 0.694444
| 0.089744
| 0.205128
| 0.282051
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020725
| 0.257692
| 260
| 6
| 96
| 43.333333
| 0.787565
| 0.357692
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
ccaf13820034d7fcb76ee7a35bf87afd209d0d04
| 53
|
py
|
Python
|
tests/__init__.py
|
pombredanne/fabric8-analytics-tagger
|
840bf07bfe209311bfe8cf762834854f54b8383f
|
[
"Apache-2.0"
] | 9
|
2017-07-20T13:41:54.000Z
|
2020-12-13T15:04:17.000Z
|
tests/__init__.py
|
pombredanne/fabric8-analytics-tagger
|
840bf07bfe209311bfe8cf762834854f54b8383f
|
[
"Apache-2.0"
] | 110
|
2017-07-26T13:53:09.000Z
|
2021-12-13T19:50:49.000Z
|
tests/__init__.py
|
pombredanne/fabric8-analytics-tagger
|
840bf07bfe209311bfe8cf762834854f54b8383f
|
[
"Apache-2.0"
] | 11
|
2017-07-20T12:25:29.000Z
|
2020-04-16T14:02:50.000Z
|
"""Module with unit tests for the Tagger project."""
| 26.5
| 52
| 0.716981
| 8
| 53
| 4.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150943
| 53
| 1
| 53
| 53
| 0.844444
| 0.867925
| 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
|
aec6459a4c5d1345cfcd670a2c86646fe022e066
| 1,596
|
py
|
Python
|
algCri.py
|
AndersonMarco/apresentacaoCriptografiaCaotica
|
257b27a44a1993ebe1dcf7b79bb23d7f5ba8d06c
|
[
"MIT"
] | null | null | null |
algCri.py
|
AndersonMarco/apresentacaoCriptografiaCaotica
|
257b27a44a1993ebe1dcf7b79bb23d7f5ba8d06c
|
[
"MIT"
] | null | null | null |
algCri.py
|
AndersonMarco/apresentacaoCriptografiaCaotica
|
257b27a44a1993ebe1dcf7b79bb23d7f5ba8d06c
|
[
"MIT"
] | null | null | null |
def alloc(n):
i=0
ret=[]
while(i<n):
ret.append(None)
i=i+1
return ret
v=[1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1]
s=[1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1,
1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0,
1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1,
1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1,
0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0,
1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1,
0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1]
c=alloc(len(v))
a1=0
a2=0
a3=0
for i in range(43):
a1=a1+((2**i)*s[i])
for i in range(43):
a2=a2+((2**i)*s[i+43])
for i in range(42):
a3=a3+((2**i)*s[i+86])
lambda1=2**64
b=49191317529892137642
p=28*lambda1
o=10*lambda1
w=2000
#============calcula o numero de iteracoes necessarias============
#============necessario para criar os vetores que=================
#============guardam a evolucao das variveis x,y,z================
ite=w*len(v)
x=alloc(ite+1)
y=alloc(ite+1)
z=alloc(ite+1)
#======================fim==================
dt=184467440737095516
x[0]=(3*lambda1)+a1
y[0]=(5*lambda1)+a2
z[0]=(7*lambda1)+a3
for n in range(ite):
x[n+1]=x[n]+((dt*((o*(y[n]-x[n]))>>64))>>64)
y[n+1]=y[n]+((dt*(((x[n]*(p-z[n]))>>64)-y[n]))>>64)
z[n+1]=z[n]+((dt*(((x[n]*y[n])>>64)-((b*z[n])>>64)))>>64)
for j in range(len(c)):
c[j]=v[j]^(x[j*w]&1)
#============imprime o valor c[j] na tela=========================
for cj in c:
print str(cj)+",",
#======================fim==================
| 23.130435
| 66
| 0.41604
| 356
| 1,596
| 1.865169
| 0.19382
| 0.120482
| 0.112952
| 0.084337
| 0.260542
| 0.221386
| 0.209337
| 0.182229
| 0.146084
| 0.120482
| 0
| 0.204905
| 0.20802
| 1,596
| 68
| 67
| 23.470588
| 0.320411
| 0.216792
| 0
| 0.042553
| 0
| 0
| 0.000804
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.021277
| 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
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
aec734e164352df564445f2e6caede2aad5ccb65
| 2,142
|
py
|
Python
|
frontier/feincms/module/page/migrations/0018_auto_20180122_2211.py
|
mcmaxwell/frontier
|
d1f59154108566c652965a43c4b999de33c05c58
|
[
"MIT"
] | null | null | null |
frontier/feincms/module/page/migrations/0018_auto_20180122_2211.py
|
mcmaxwell/frontier
|
d1f59154108566c652965a43c4b999de33c05c58
|
[
"MIT"
] | null | null | null |
frontier/feincms/module/page/migrations/0018_auto_20180122_2211.py
|
mcmaxwell/frontier
|
d1f59154108566c652965a43c4b999de33c05c58
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2018-01-22 19:11
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('page', '0017_auto_20180122_2158'),
]
operations = [
migrations.AddField(
model_name='customersblock',
name='analitics_text',
field=models.CharField(blank=True, max_length=255, verbose_name='analitics_text'),
),
migrations.AddField(
model_name='customersblock',
name='clock_text',
field=models.CharField(blank=True, max_length=255, verbose_name='clock_text'),
),
migrations.AddField(
model_name='customersblock',
name='cost_text',
field=models.CharField(blank=True, max_length=255, verbose_name='cost_text'),
),
migrations.AddField(
model_name='customersblock',
name='cube_text',
field=models.CharField(blank=True, max_length=255, verbose_name='cube_text'),
),
migrations.AddField(
model_name='customersblock',
name='money_text',
field=models.CharField(blank=True, max_length=255, verbose_name='money_text'),
),
migrations.AddField(
model_name='customersblock',
name='network_text',
field=models.CharField(blank=True, max_length=255, verbose_name='network_text'),
),
migrations.AddField(
model_name='customersblock',
name='responce_text',
field=models.CharField(blank=True, max_length=255, verbose_name='responce_text'),
),
migrations.AddField(
model_name='customersblock',
name='speed_text',
field=models.CharField(blank=True, max_length=255, verbose_name='speed_text'),
),
migrations.AddField(
model_name='customersblock',
name='standart_text',
field=models.CharField(blank=True, max_length=255, verbose_name='standart_text'),
),
]
| 35.114754
| 94
| 0.605509
| 217
| 2,142
| 5.732719
| 0.248848
| 0.130225
| 0.166399
| 0.195338
| 0.756431
| 0.756431
| 0.720257
| 0.405145
| 0.405145
| 0.405145
| 0
| 0.03876
| 0.277311
| 2,142
| 60
| 95
| 35.7
| 0.764858
| 0.031746
| 0
| 0.509434
| 1
| 0
| 0.170449
| 0.011106
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.037736
| 0
| 0.09434
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 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
|
aef8df75eae49bef17bd661a5a17bab20a4c0207
| 1,137
|
py
|
Python
|
pypurl/purl.py
|
pombredanne/pypurl
|
461b7bb51963dae410baebade5290b22dc45cc87
|
[
"MIT"
] | 3
|
2021-10-17T17:30:04.000Z
|
2022-02-20T01:35:38.000Z
|
pypurl/purl.py
|
pombredanne/pypurl
|
461b7bb51963dae410baebade5290b22dc45cc87
|
[
"MIT"
] | null | null | null |
pypurl/purl.py
|
pombredanne/pypurl
|
461b7bb51963dae410baebade5290b22dc45cc87
|
[
"MIT"
] | 1
|
2021-10-17T17:30:07.000Z
|
2021-10-17T17:30:07.000Z
|
import pypurl.purlutils as utils
class Purl:
""" Provides essential functionality to decompose any purl into components
or build a purl from passed parameters.
"""
def __init__(self):
self.type = ''
def purl_to_dict(self, purl):
return utils.parse_purl(purl, {})
def durl_to_dict(self, download_url, version='', qualifiers='', subpath=''):
purl_dict = utils.parse_durl(download_url)
return utils.build_purl_dict_from_params_optionals(purl_dict, version, qualifiers, subpath)
def durl_to_purl(self, download_url, version='', qualifiers='', subpath=''):
purl_dict = utils.parse_durl(download_url)
purl_dict = utils.build_purl_dict_from_params_optionals(purl_dict, version, qualifiers, subpath)
return self.dict_to_purl(purl_dict)
def dict_to_purl(self, dict):
purl = utils.build_host_part(dict)
return utils.build_params_part(dict, purl)
def params_to_purl(self, type, namespace, name, version='', qualifiers='', subpath=''):
return utils.build_purl_from_params(type, namespace, name, version, qualifiers, subpath)
| 37.9
| 104
| 0.706245
| 149
| 1,137
| 5.080537
| 0.268456
| 0.084544
| 0.190225
| 0.058124
| 0.480845
| 0.480845
| 0.372523
| 0.372523
| 0.372523
| 0.372523
| 0
| 0
| 0.188215
| 1,137
| 29
| 105
| 39.206897
| 0.820152
| 0.096746
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.055556
| 0.111111
| 0.722222
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
4e0e33fbb8daeab8167256cc9ea0c3fb47c2b8bf
| 97
|
pyt
|
Python
|
tests/extensions/python_test_files/group_failures_1.pyt
|
regisb/code-annotations
|
10eccfc9843809cc789d98bdb95a7f13768276b7
|
[
"Apache-2.0"
] | 2
|
2019-02-08T17:59:50.000Z
|
2021-04-06T13:18:03.000Z
|
tests/extensions/python_test_files/group_failures_1.pyt
|
regisb/code-annotations
|
10eccfc9843809cc789d98bdb95a7f13768276b7
|
[
"Apache-2.0"
] | 32
|
2018-11-27T20:16:06.000Z
|
2021-08-24T11:06:52.000Z
|
tests/extensions/python_test_files/group_failures_1.pyt
|
regisb/code-annotations
|
10eccfc9843809cc789d98bdb95a7f13768276b7
|
[
"Apache-2.0"
] | 3
|
2020-07-02T15:12:01.000Z
|
2021-07-28T22:18:03.000Z
|
"""
Test group missing the last item
.. pii: Group 2 - Annotation 1
.. pii_types: id, name
"""
| 12.125
| 32
| 0.639175
| 15
| 97
| 4.066667
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.026316
| 0.216495
| 97
| 7
| 33
| 13.857143
| 0.776316
| 0.896907
| 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
|
4e13c6f5a578ea29ffe0e3fe153846221af3e990
| 412
|
py
|
Python
|
acclist/lib/logic/modelutil.py
|
ko-naka-3010527/accup-python
|
e10ff96111be889573d830f4b710d9b8b19e1828
|
[
"MIT"
] | null | null | null |
acclist/lib/logic/modelutil.py
|
ko-naka-3010527/accup-python
|
e10ff96111be889573d830f4b710d9b8b19e1828
|
[
"MIT"
] | null | null | null |
acclist/lib/logic/modelutil.py
|
ko-naka-3010527/accup-python
|
e10ff96111be889573d830f4b710d9b8b19e1828
|
[
"MIT"
] | null | null | null |
def obj_sort_by_lambda(obj_list, lmbd):
new_obj_list = obj_list.copy()
new_obj_list.sort(key=lmbd)
return new_obj_list
def obj_sort_by_property_name(obj_list, prop_name):
return obj_sort_by_lambda(obj_list, lambda x:getattr(x, prop_name))
def obj_list_decrypt(obj_list, enc):
new_obj_list = []
for obj in obj_list:
new_obj_list.append(obj.decrypt(enc))
return new_obj_list
| 27.466667
| 71
| 0.742718
| 73
| 412
| 3.753425
| 0.287671
| 0.332117
| 0.218978
| 0.087591
| 0.160584
| 0.160584
| 0
| 0
| 0
| 0
| 0
| 0
| 0.167476
| 412
| 14
| 72
| 29.428571
| 0.798834
| 0
| 0
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0
| 0.090909
| 0.545455
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
4e1c88e7f4605dd58b9def4ebfbeb10b76579e8f
| 667
|
py
|
Python
|
builder/basecontainer.py
|
nagisc007/storybuilder
|
54b28934de8acedbe35930ce27e12a7e75f91be0
|
[
"MIT"
] | null | null | null |
builder/basecontainer.py
|
nagisc007/storybuilder
|
54b28934de8acedbe35930ce27e12a7e75f91be0
|
[
"MIT"
] | 176
|
2019-03-07T13:31:26.000Z
|
2019-11-02T12:38:23.000Z
|
builder/basecontainer.py
|
nagisc007/storybuilder
|
54b28934de8acedbe35930ce27e12a7e75f91be0
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""Define base container type class.
"""
from . import assertion
class BaseContainer(object):
"""Base class for a container.
"""
def __init__(self, title: str, priority: int):
self._title = assertion.is_str(title)
self._priority = assertion.is_int(priority)
@property
def title(self): return self._title
@property
def priority(self): return self._priority
def setPriority(self, pri: int):
# TODO: min max check
self._priority = pri
return self
def omit(self):
from .action import Action
self._priority = Action.MIN_PRIORITY
return self
| 22.233333
| 51
| 0.629685
| 80
| 667
| 5.0875
| 0.4125
| 0.117936
| 0.068796
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002041
| 0.265367
| 667
| 29
| 52
| 23
| 0.828571
| 0.163418
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034483
| 0.1875
| 1
| 0.3125
| false
| 0
| 0.125
| 0.125
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
4e36890dbb46039c8308c89bd17b8ff41bfe235e
| 168
|
py
|
Python
|
jinwebpage/jinenv/bin/django-admin.py
|
sotdjin/jinpage
|
a764a3025e92c38fbd2dbd27b1d767174c5dbc6a
|
[
"MIT"
] | null | null | null |
jinwebpage/jinenv/bin/django-admin.py
|
sotdjin/jinpage
|
a764a3025e92c38fbd2dbd27b1d767174c5dbc6a
|
[
"MIT"
] | null | null | null |
jinwebpage/jinenv/bin/django-admin.py
|
sotdjin/jinpage
|
a764a3025e92c38fbd2dbd27b1d767174c5dbc6a
|
[
"MIT"
] | null | null | null |
#!/home/ubuntu/workspace/jinpage/jinwebpage/jinenv/bin/python
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 28
| 61
| 0.797619
| 21
| 168
| 5.857143
| 0.904762
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089286
| 168
| 5
| 62
| 33.6
| 0.803922
| 0.357143
| 0
| 0
| 0
| 0
| 0.074766
| 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
|
9d7a05d777039f02022755e261d5fce5dd0ae9a9
| 364
|
py
|
Python
|
tools/yuidoc/test/lang/python/test.py
|
shane-tomlinson/AFrame-JS
|
70bd27d79cc31b61aee9cc366afbbac0eaa80fad
|
[
"CC-BY-3.0"
] | 2
|
2016-07-16T09:58:26.000Z
|
2021-05-11T22:51:57.000Z
|
lib/yui-yuidoc/test/lang/python/test.py
|
jonas/alloy-ui
|
d5a0414c13298050a5c5bc2455d4c36bae2c2645
|
[
"BSD-3-Clause"
] | null | null | null |
lib/yui-yuidoc/test/lang/python/test.py
|
jonas/alloy-ui
|
d5a0414c13298050a5c5bc2455d4c36bae2c2645
|
[
"BSD-3-Clause"
] | 1
|
2019-07-23T13:29:04.000Z
|
2019-07-23T13:29:04.000Z
|
#!/usr/bin/env python
'''
/**
* Test Python File
* @module testpy
*/
'''
import os, sys, string, shutil, urllib2, urllib, pprint, simplejson, datetime
from cStringIO import StringIO
from subprocess import call, PIPE, Popen
'''
/**
* This is a test class
* @class TestPy
* @namespace Python
*/
'''
'''
/**
* Test Method
* @method test
*/
'''
def test():
pass
| 13
| 77
| 0.642857
| 45
| 364
| 5.2
| 0.733333
| 0.08547
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003378
| 0.186813
| 364
| 27
| 78
| 13.481481
| 0.787162
| 0.173077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0.2
| 0.6
| 0
| 0.8
| 0.2
| 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
|
9d9b779e9720c8e25ceea8d24337c5b43846aff5
| 588
|
py
|
Python
|
lib/galaxy/managers/lddas.py
|
ramezrawas/galaxy-1
|
c03748dd49c060a68d07bce56eae33e0ba154414
|
[
"CC-BY-3.0"
] | 6
|
2018-11-03T22:43:35.000Z
|
2022-02-15T17:51:33.000Z
|
lib/galaxy/managers/lddas.py
|
igorhollaender/OBSOLETE_sirv_dashboard
|
85aec60b80ef6f561d89398e3da5963d3d0f2aa4
|
[
"CC-BY-3.0"
] | 7
|
2016-12-07T22:19:37.000Z
|
2019-01-30T15:04:26.000Z
|
lib/galaxy/managers/lddas.py
|
igorhollaender/OBSOLETE_sirv_dashboard
|
85aec60b80ef6f561d89398e3da5963d3d0f2aa4
|
[
"CC-BY-3.0"
] | 10
|
2017-04-10T21:40:22.000Z
|
2022-02-21T16:50:10.000Z
|
from galaxy.managers import base as manager_base
class LDDAManager( object ):
"""
A fairly sparse manager for LDDAs.
"""
def __init__( self, app ):
"""
Set up and initialize other managers needed by lddas.
"""
pass
def get( self, trans, id, check_accessible=True ):
return manager_base.get_object( trans, id,
'LibraryDatasetDatasetAssociation',
check_ownership=False,
check_accessible=check_accessible )
| 29.4
| 75
| 0.534014
| 54
| 588
| 5.611111
| 0.685185
| 0.148515
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.397959
| 588
| 19
| 76
| 30.947368
| 0.855932
| 0.14966
| 0
| 0
| 0
| 0
| 0.069414
| 0.069414
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0.111111
| 0.111111
| 0.111111
| 0.555556
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
d1ab3877a458991017d3471b99124e702a5b261c
| 33
|
py
|
Python
|
opencanary/__init__.py
|
patron-it/opencanary
|
c6b59fbabd2655c235484dbb095a6c53cb3b61ab
|
[
"BSD-3-Clause"
] | 3
|
2019-01-11T14:45:31.000Z
|
2021-02-07T21:49:54.000Z
|
opencanary/__init__.py
|
patron-it/opencanary
|
c6b59fbabd2655c235484dbb095a6c53cb3b61ab
|
[
"BSD-3-Clause"
] | 12
|
2018-08-31T06:54:13.000Z
|
2019-01-15T22:18:31.000Z
|
opencanary/__init__.py
|
patron-it/opencanary
|
c6b59fbabd2655c235484dbb095a6c53cb3b61ab
|
[
"BSD-3-Clause"
] | 1
|
2018-11-13T19:26:31.000Z
|
2018-11-13T19:26:31.000Z
|
"""Opencanary Python package."""
| 16.5
| 32
| 0.69697
| 3
| 33
| 7.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 33
| 1
| 33
| 33
| 0.766667
| 0.787879
| 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
|
d1b71b5c1383a43aba9e55fbbc884c16e77adad0
| 2,041
|
py
|
Python
|
physical_validation/tests/test_util_util.py
|
shirtsgroup/physical_validation
|
2af444e849ae64a99e25f87b4e4b17dea24a747c
|
[
"MIT"
] | 26
|
2018-04-02T18:47:14.000Z
|
2022-02-16T04:13:50.000Z
|
physical_validation/tests/test_util_util.py
|
shirtsgroup/physical_validation
|
2af444e849ae64a99e25f87b4e4b17dea24a747c
|
[
"MIT"
] | 151
|
2018-03-03T02:43:36.000Z
|
2022-03-02T16:20:19.000Z
|
physical_validation/tests/test_util_util.py
|
shirtsgroup/physical_validation
|
2af444e849ae64a99e25f87b4e4b17dea24a747c
|
[
"MIT"
] | 18
|
2018-04-20T15:55:47.000Z
|
2021-08-20T08:54:15.000Z
|
###########################################################################
# #
# physical_validation, #
# a python package to test the physical validity of MD results #
# #
# Written by Pascal T. Merz <pascal.merz@me.com> #
# Michael R. Shirts <michael.shirts@colorado.edu> #
# #
# Copyright (c) 2017-2021 University of Colorado Boulder #
# (c) 2012 The University of Virginia #
# #
###########################################################################
r"""
This file contains tests for the `physical_validation.util.util` module.
"""
import numpy as np
from ..util.util import array_equal_shape_and_close
class TestArrayEqualShapeAndClose:
@staticmethod
def test_none_is_true() -> None:
assert array_equal_shape_and_close(None, None)
@staticmethod
def test_none_with_array_is_false() -> None:
assert not array_equal_shape_and_close(None, np.array(None))
assert not array_equal_shape_and_close(None, np.array(0))
assert not array_equal_shape_and_close(None, np.zeros(0))
assert not array_equal_shape_and_close(np.array(None), None)
assert not array_equal_shape_and_close(np.array(0), None)
assert not array_equal_shape_and_close(np.zeros(0), None)
@staticmethod
def test_shape_and_content() -> None:
assert array_equal_shape_and_close(np.ones((4, 5)), np.ones((4, 5)))
assert not array_equal_shape_and_close(np.ones((4, 5)), np.ones((5, 4)))
assert not array_equal_shape_and_close(np.ones(0), np.ones(1))
assert array_equal_shape_and_close(np.ones(0), np.zeros(0))
| 49.780488
| 80
| 0.503185
| 221
| 2,041
| 4.371041
| 0.303167
| 0.10766
| 0.186335
| 0.223602
| 0.503106
| 0.479296
| 0.475155
| 0.436853
| 0.42236
| 0.173913
| 0
| 0.020974
| 0.345909
| 2,041
| 40
| 81
| 51.025
| 0.702622
| 0.348359
| 0
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.52381
| 1
| 0.142857
| true
| 0
| 0.095238
| 0
| 0.285714
| 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
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d1f5a14dcca2071ff493a8886d7161668fd0fd5e
| 599
|
py
|
Python
|
models/user.py
|
team-backspace/backend
|
c4cced64f2f3f795dfe4684442d5563daa6b60e8
|
[
"Apache-2.0"
] | null | null | null |
models/user.py
|
team-backspace/backend
|
c4cced64f2f3f795dfe4684442d5563daa6b60e8
|
[
"Apache-2.0"
] | 1
|
2021-10-17T16:05:53.000Z
|
2021-10-17T16:05:53.000Z
|
models/user.py
|
team-backspace/backend
|
c4cced64f2f3f795dfe4684442d5563daa6b60e8
|
[
"Apache-2.0"
] | 1
|
2021-10-17T13:04:11.000Z
|
2021-10-17T13:04:11.000Z
|
from tortoise.models import Model
from tortoise import fields
class ProfileUser(Model):
id = fields.TextField(pk=True)
name = fields.TextField(default="새 유저")
bio = fields.TextField(null=True, default="새로운 유저를 환영해주세요!")
profile_url = fields.TextField(null=True, default="")
banner_url = fields.TextField(null=True, default="")
class AnonymousUser(Model):
id = fields.TextField(pk=True)
name = fields.TextField()
profile_url = fields.TextField(null=True, default="")
class LoginUser(Model):
email = fields.TextField(pk=True)
user_id = fields.TextField()
| 27.227273
| 64
| 0.709516
| 76
| 599
| 5.539474
| 0.368421
| 0.356295
| 0.180523
| 0.218527
| 0.586698
| 0.515439
| 0.515439
| 0.223278
| 0.223278
| 0
| 0
| 0
| 0.161937
| 599
| 21
| 65
| 28.52381
| 0.838645
| 0
| 0
| 0.266667
| 0
| 0
| 0.03172
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.133333
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
d1fb2bfddd58f7fdc53b1c768f8092f52fd86735
| 34
|
py
|
Python
|
chronology/Waiter.py
|
idin/chronology
|
7a80a5817a0d03215beb588d06bf75b6831d2e85
|
[
"MIT"
] | null | null | null |
chronology/Waiter.py
|
idin/chronology
|
7a80a5817a0d03215beb588d06bf75b6831d2e85
|
[
"MIT"
] | null | null | null |
chronology/Waiter.py
|
idin/chronology
|
7a80a5817a0d03215beb588d06bf75b6831d2e85
|
[
"MIT"
] | null | null | null |
class Waiter:
def __init__(self):
| 17
| 20
| 0.764706
| 5
| 34
| 4.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 34
| 2
| 20
| 17
| 0.733333
| 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
|
d1fd881c1277728ea67e8a6f032fc0b529b9d001
| 508
|
py
|
Python
|
HW7/VeronyWise/areamodule.py
|
kolyasalubov/Lv-677.PythonCore
|
c9f9107c734a61e398154a90b8a3e249276c2704
|
[
"MIT"
] | null | null | null |
HW7/VeronyWise/areamodule.py
|
kolyasalubov/Lv-677.PythonCore
|
c9f9107c734a61e398154a90b8a3e249276c2704
|
[
"MIT"
] | null | null | null |
HW7/VeronyWise/areamodule.py
|
kolyasalubov/Lv-677.PythonCore
|
c9f9107c734a61e398154a90b8a3e249276c2704
|
[
"MIT"
] | 6
|
2022-02-22T22:30:49.000Z
|
2022-03-28T12:51:19.000Z
|
import math
from math import(pow, pi)
def rectangle_funk():
a = float(input("Please, enter first side of rectangle: "))
b = float(input("Please, enter second side of rectangle: "))
return a * b
def triangle_funk():
a = float(input("Please, enter side of triangle: "))
h = float(input("Please, enter height of triangle: "))
return 0.5 * a * h
def circle_funk():
radius = float(input("Please, enter radius of circle: "))
return round(math.pi * math.pow(radius, 2), 2)
| 33.866667
| 65
| 0.641732
| 75
| 508
| 4.306667
| 0.373333
| 0.154799
| 0.247678
| 0.325077
| 0.160991
| 0.160991
| 0
| 0
| 0
| 0
| 0
| 0.010101
| 0.220472
| 508
| 14
| 66
| 36.285714
| 0.805556
| 0
| 0
| 0
| 0
| 0
| 0.348425
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0
| 0.153846
| 0
| 0.615385
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
0610d3fc347f9da210c545b61e4cf6994b908ad5
| 80
|
py
|
Python
|
settings.py
|
legoktm/supersimplemediawiki
|
65d39c0657d702a9c3862e1be27ea51c0c5fc6f2
|
[
"MIT"
] | 2
|
2015-10-09T04:53:32.000Z
|
2021-07-28T12:01:14.000Z
|
settings.py
|
legoktm/supersimplemediawiki
|
65d39c0657d702a9c3862e1be27ea51c0c5fc6f2
|
[
"MIT"
] | null | null | null |
settings.py
|
legoktm/supersimplemediawiki
|
65d39c0657d702a9c3862e1be27ea51c0c5fc6f2
|
[
"MIT"
] | null | null | null |
username='USERNAME'
password='password'
url='http://en.wikipedia.org/w/api.php'
| 20
| 39
| 0.75
| 12
| 80
| 5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0375
| 80
| 3
| 40
| 26.666667
| 0.779221
| 0
| 0
| 0
| 0
| 0
| 0.6125
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.333333
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
ae0d6297346e9310a6a7d83375135625daadbfbf
| 4,662
|
py
|
Python
|
MLStudio/supervised/algorithms/optimization/services/regularizers.py
|
j2slab/MLStudio
|
7d7c4b1073617968c28f0e496020e4720b552451
|
[
"BSD-3-Clause"
] | 1
|
2019-05-13T01:07:23.000Z
|
2019-05-13T01:07:23.000Z
|
MLStudio/supervised/algorithms/optimization/services/regularizers.py
|
DecisionScients/MLStudio
|
7d7c4b1073617968c28f0e496020e4720b552451
|
[
"BSD-3-Clause"
] | 1
|
2020-04-11T22:14:42.000Z
|
2020-04-11T22:14:42.000Z
|
MLStudio/supervised/algorithms/optimization/services/regularizers.py
|
decisionscients/MLStudio
|
7d7c4b1073617968c28f0e496020e4720b552451
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# =========================================================================== #
# Project : ML Studio #
# Version : 0.1.0 #
# File : regularization.py #
# Python : 3.8.2 #
# -------------------------------------------------------------------------- #
# Author : John James #
# Company : DecisionScients #
# Email : jjames@decisionscients.com #
# URL : https://github.com/decisionscients/MLStudio #
# -------------------------------------------------------------------------- #
# Created : Saturday, May 16th 2020, 11:17:15 pm #
# Last Modified : Saturday, May 16th 2020, 11:17:15 pm #
# Modified By : John James (jjames@decisionscients.com) #
# -------------------------------------------------------------------------- #
# License : BSD #
# Copyright (c) 2020 DecisionScients #
# =========================================================================== #
"""Classes used to regularize cost and gradient computations."""
from abc import ABC, abstractmethod
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from mlstudio.utils.data_manager import ZeroBiasTerm
from mlstudio.utils import validation
# -------------------------------------------------------------------------- #
class Regularizer(ABC, BaseEstimator, TransformerMixin):
"""Base class for regularization classes."""
@abstractmethod
def __init__(self):
pass
@property
def alpha(self):
return self._alpha
@alpha.setter
def alpha(self, x):
validation.validate_range(x, 'alpha', minimum=0, left='open', right='closed')
self._alpha = x
@abstractmethod
def cost(self, theta):
"""Computes regularization to be added to cost function.
Parameters
----------
theta : np.array shape = (n_features) or (n_features, n_classes)
The model parameters
m : int
The sample size
"""
pass
@abstractmethod
def gradient(self, theta):
"""Computes the regularization gradient.
Parameters
----------
theta : np.array shape = (n_features) or (n_features, n_classes)
The model parameters
m : int
The sample size
"""
pass
# -------------------------------------------------------------------------- #
class L1(Regularizer):
""" Regularizer for Lasso Regression """
def __init__(self, alpha=0.01):
self.alpha = alpha
self.name = "Lasso (L1) Regularizer"
def cost(self, theta):
return self.alpha * np.sum(np.abs(theta))
def gradient(self, theta):
return self.alpha * np.sign(theta)
# -------------------------------------------------------------------------- #
class L2(Regularizer):
""" Regularizer for Ridge Regression """
def __init__(self, alpha=0.01):
self.alpha = alpha
self.name = "Ridge (L2) Regularizer"
def cost(self, theta):
return self.alpha * np.sum(np.square(theta))
def gradient(self, theta):
return self.alpha * theta
# -------------------------------------------------------------------------- #
class L1_L2(Regularizer):
""" Regularizer for Elastic Net Regression """
def __init__(self, alpha=0.01, ratio=0.5):
self.alpha = alpha
self.ratio = ratio
self.name = "Elasticnet (L1_L2) Regularizer"
@property
def ratio(self):
return self._ratio
@ratio.setter
def ratio(self, x):
validation.validate_range(x, 'ratio', minimum=0, maximum=1, left='closed', right='closed')
self._ratio = x
def cost(self, theta):
l1_contr = self._ratio * np.sum(np.abs(theta))
l2_contr = (1 - self._ratio)/2 * np.sum(np.square(theta))
return self._alpha * (l1_contr + l2_contr)
def gradient(self, theta):
l1_contr = self._ratio * np.sign(theta)
l2_contr = (1 - self._ratio) * theta
return self._alpha * (l1_contr + l2_contr)
| 37.902439
| 98
| 0.440583
| 407
| 4,662
| 4.936118
| 0.307125
| 0.062718
| 0.052265
| 0.059731
| 0.401692
| 0.38676
| 0.334993
| 0.293678
| 0.193131
| 0.193131
| 0
| 0.02201
| 0.327542
| 4,662
| 123
| 99
| 37.902439
| 0.61882
| 0.496783
| 0
| 0.396552
| 0
| 0
| 0.049371
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.275862
| false
| 0.051724
| 0.086207
| 0.103448
| 0.568966
| 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
|
ae109fc2fa8ec4bfa60bca1adde8bd07ac167279
| 667
|
py
|
Python
|
python/cudf/dataframe/__init__.py
|
revans2/cudf
|
59bbb17ec4a2d040e999c3f86c56158e89d9dd0b
|
[
"Apache-2.0"
] | 1
|
2019-05-06T21:34:15.000Z
|
2019-05-06T21:34:15.000Z
|
python/cudf/dataframe/__init__.py
|
revans2/cudf
|
59bbb17ec4a2d040e999c3f86c56158e89d9dd0b
|
[
"Apache-2.0"
] | 1
|
2020-10-23T17:44:07.000Z
|
2020-10-23T17:44:07.000Z
|
python/cudf/dataframe/__init__.py
|
nartal1/cudf
|
27656c1f7ab730548a21d37aaf3488a560abca7e
|
[
"Apache-2.0"
] | null | null | null |
# Copyright (c) 2018-2019, NVIDIA CORPORATION.
from cudf.dataframe import (buffer, dataframe, series,
index, numerical, datetime, categorical, string)
from cudf.dataframe.dataframe import DataFrame, from_pandas, merge
from cudf.dataframe.index import (Index, GenericIndex,
RangeIndex, DatetimeIndex, CategoricalIndex)
from cudf.dataframe.multiindex import MultiIndex
from cudf.dataframe.series import Series
from cudf.dataframe.buffer import Buffer
from cudf.dataframe.numerical import NumericalColumn
from cudf.dataframe.datetime import DatetimeColumn
from cudf.dataframe.categorical import CategoricalColumn
from cudf.dataframe.string import StringColumn
| 41.6875
| 66
| 0.833583
| 79
| 667
| 7.025316
| 0.35443
| 0.144144
| 0.306306
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013378
| 0.103448
| 667
| 15
| 67
| 44.466667
| 0.914716
| 0.065967
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.833333
| 0
| 0.833333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ae43c2f4f1627fb06856e1019b6fb8811c6d340e
| 55
|
py
|
Python
|
tests/api/tc/v3/workflow_events/__init__.py
|
GShepherdTC/tcex
|
70b1199b8bb9e63f53e2ba792489267108c909cd
|
[
"Apache-2.0"
] | null | null | null |
tests/api/tc/v3/workflow_events/__init__.py
|
GShepherdTC/tcex
|
70b1199b8bb9e63f53e2ba792489267108c909cd
|
[
"Apache-2.0"
] | null | null | null |
tests/api/tc/v3/workflow_events/__init__.py
|
GShepherdTC/tcex
|
70b1199b8bb9e63f53e2ba792489267108c909cd
|
[
"Apache-2.0"
] | null | null | null |
"""ThreatConnect API Module Testing."""
# flake8: noqa
| 18.333333
| 39
| 0.709091
| 6
| 55
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020833
| 0.127273
| 55
| 2
| 40
| 27.5
| 0.791667
| 0.854545
| 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
|
ae447c3e197d8f9dc476f19d3f3be7ccf09e2df7
| 56
|
py
|
Python
|
transform.py
|
minskylab/pe2020ru
|
4c1f48be874372841786f4c20b04bf7a547e747f
|
[
"MIT"
] | 3
|
2020-01-23T21:02:39.000Z
|
2020-01-25T15:41:28.000Z
|
transform.py
|
minskylab/pe2020ru
|
4c1f48be874372841786f4c20b04bf7a547e747f
|
[
"MIT"
] | null | null | null |
transform.py
|
minskylab/pe2020ru
|
4c1f48be874372841786f4c20b04bf7a547e747f
|
[
"MIT"
] | 3
|
2020-01-27T02:23:07.000Z
|
2020-02-15T22:04:05.000Z
|
import csv
csv = csv.reader("file.csv", delimeter=",")
| 14
| 43
| 0.660714
| 8
| 56
| 4.625
| 0.625
| 0.324324
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 56
| 3
| 44
| 18.666667
| 0.755102
| 0
| 0
| 0
| 0
| 0
| 0.160714
| 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
|
ae481579428105458dc8751e29575381e28750f6
| 874
|
py
|
Python
|
tests/SampleData.py
|
rmetcalf9/dockerRegistryPythonClient
|
7394bde6551993e53151f6dd693b89b2c177d32f
|
[
"MIT"
] | null | null | null |
tests/SampleData.py
|
rmetcalf9/dockerRegistryPythonClient
|
7394bde6551993e53151f6dd693b89b2c177d32f
|
[
"MIT"
] | null | null | null |
tests/SampleData.py
|
rmetcalf9/dockerRegistryPythonClient
|
7394bde6551993e53151f6dd693b89b2c177d32f
|
[
"MIT"
] | null | null | null |
def getSampleMetadata(catalogName, tagName, digest):
return {
'schemaVersion': 2,
'mediaType': 'application/vnd.docker.distribution.manifest.v2+json',
'config': {
'mediaType': 'application/vnd.docker.container.image.v1+json',
'size': 1111,
'digest': digest
},
'layers': [
{
'mediaType': 'application/vnd.docker.image.rootfs.diff.tar.gzip', 'size': 123, 'digest': 'sha256:e6c96db7181be991f19a9fb6975cdbbd73c65f4a2681348e63a141a2192a5f10'
}, {
'mediaType': 'application/vnd.docker.image.rootfs.diff.tar.gzip', 'size': 123, 'digest': 'sha256:8985e402e050840450bd9d60b20a9bec70d57a507b33a85e5c3b3caf2e0ada6e'
}, {
'mediaType': 'application/vnd.docker.image.rootfs.diff.tar.gzip', 'size': 23, 'digest': 'sha256:78986f489cfa0d72ea6e357ab3e81a9d5ebdb9cf4797a41eb49bdefe579f1b01'
}
]
}
| 39.727273
| 170
| 0.687643
| 72
| 874
| 8.347222
| 0.458333
| 0.166389
| 0.191348
| 0.241265
| 0.324459
| 0.324459
| 0.324459
| 0.324459
| 0.324459
| 0.324459
| 0
| 0.19015
| 0.163616
| 874
| 21
| 171
| 41.619048
| 0.632011
| 0
| 0
| 0.105263
| 0
| 0
| 0.651376
| 0.525229
| 0
| 0
| 0
| 0
| 0
| 1
| 0.052632
| false
| 0
| 0
| 0.052632
| 0.105263
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8821115d38d85599e508237e42b5cc4cf4861002
| 35
|
py
|
Python
|
tests/__init__.py
|
Kripankc/geeet
|
64f183e62376dc119989ba0e7db0ed6acbd041c6
|
[
"MIT"
] | 12
|
2021-03-11T12:09:13.000Z
|
2022-03-15T07:53:02.000Z
|
tests/__init__.py
|
Kripankc/geeet
|
64f183e62376dc119989ba0e7db0ed6acbd041c6
|
[
"MIT"
] | 2
|
2021-08-29T11:39:12.000Z
|
2022-01-12T13:10:45.000Z
|
tests/__init__.py
|
Kripankc/geeet
|
64f183e62376dc119989ba0e7db0ed6acbd041c6
|
[
"MIT"
] | 5
|
2021-03-27T19:48:13.000Z
|
2022-02-28T05:57:26.000Z
|
"""Unit test package for geeet."""
| 17.5
| 34
| 0.657143
| 5
| 35
| 4.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 35
| 1
| 35
| 35
| 0.766667
| 0.8
| 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
|
882be2d035efdb7a6c98ad7d2c79a4b7bd5e5662
| 489
|
py
|
Python
|
aiosvc/__init__.py
|
acsnem/aiosvc
|
5bb316fe6958d4143bc0434f6dfbe9bfa9328916
|
[
"MIT"
] | null | null | null |
aiosvc/__init__.py
|
acsnem/aiosvc
|
5bb316fe6958d4143bc0434f6dfbe9bfa9328916
|
[
"MIT"
] | null | null | null |
aiosvc/__init__.py
|
acsnem/aiosvc
|
5bb316fe6958d4143bc0434f6dfbe9bfa9328916
|
[
"MIT"
] | null | null | null |
"""
aiosvc.Component
aiosvc.Application
aiosvc.amqp.Connection
aiosvc.amqp.Publisher
aiosvc.amqp.PublisherPool
aiosvc.amqp.Consumer
aiosvc.amqp.TaskManager
aiosvc.db.PgPool
aiosvc.db.TarantoolPool
aiosvc.web.server.Server
aiosvc.web.server.SimpleHandler
aiosvc.web.server.JsonRpcHandler
aiosvc.web.server.RestRpcHandler
aiosvc.web.client.Client
aiosvc.web.client.JsonRpcClient
aiosvc.web.client.RestRpcClient
aiosvc.web.client.SoapRpcClient
"""
from .app import Application, Componet
| 18.807692
| 38
| 0.842536
| 62
| 489
| 6.645161
| 0.403226
| 0.174757
| 0.145631
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.059305
| 489
| 25
| 39
| 19.56
| 0.895652
| 0.897751
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
882be3d57e40b0bb1756fae07ee6acb78574429e
| 116
|
py
|
Python
|
toolbox/static/build.py
|
avatao-content/challenge-engine
|
38700b96895f12f310e6cf266b9c24b639dbad40
|
[
"Apache-2.0"
] | 23
|
2017-08-15T08:18:27.000Z
|
2021-05-16T20:38:30.000Z
|
toolbox/static/build.py
|
avatao-content/challenge-engine
|
38700b96895f12f310e6cf266b9c24b639dbad40
|
[
"Apache-2.0"
] | 7
|
2017-08-31T18:18:04.000Z
|
2019-10-20T00:07:10.000Z
|
toolbox/static/build.py
|
avatao-content/challenge-engine
|
38700b96895f12f310e6cf266b9c24b639dbad40
|
[
"Apache-2.0"
] | 9
|
2017-08-31T18:37:01.000Z
|
2020-02-11T08:30:46.000Z
|
# pylint: disable=unused-argument
def run(repo_path: str, repo_name: str, repo_branch: str, config: dict):
pass
| 29
| 72
| 0.732759
| 18
| 116
| 4.555556
| 0.777778
| 0.170732
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146552
| 116
| 3
| 73
| 38.666667
| 0.828283
| 0.267241
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
88364bf354169370a5424f3ce62d4e4aa2d957d4
| 30
|
py
|
Python
|
__init__.py
|
salbeik/notesandmath
|
110821ba8caaec6cfda237be57c345f66940bc89
|
[
"MIT"
] | 15
|
2016-04-24T21:46:38.000Z
|
2021-03-19T13:21:41.000Z
|
__init__.py
|
salbeik/notesandmath
|
110821ba8caaec6cfda237be57c345f66940bc89
|
[
"MIT"
] | null | null | null |
__init__.py
|
salbeik/notesandmath
|
110821ba8caaec6cfda237be57c345f66940bc89
|
[
"MIT"
] | 3
|
2018-02-15T20:49:40.000Z
|
2021-12-02T20:38:57.000Z
|
"""test_data
!INCLUDE mod1"""
| 10
| 16
| 0.666667
| 4
| 30
| 4.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037037
| 0.1
| 30
| 2
| 17
| 15
| 0.666667
| 0.766667
| 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
|
8859adcb54fcdfa89e2921166c1c2f02ddb2e963
| 122
|
py
|
Python
|
pyckaxe/lib/pack/abc/resource.py
|
Arcensoth/pyckaxe
|
09ed0828d6660a233b827721454293579329991b
|
[
"MIT"
] | 3
|
2018-09-23T05:16:44.000Z
|
2021-12-23T03:06:07.000Z
|
pyckaxe/lib/pack/abc/resource.py
|
Arcensoth/pyckaxe
|
09ed0828d6660a233b827721454293579329991b
|
[
"MIT"
] | 5
|
2018-07-11T02:31:56.000Z
|
2018-07-11T03:15:05.000Z
|
pyckaxe/lib/pack/abc/resource.py
|
Arcensoth/pyckaxe
|
09ed0828d6660a233b827721454293579329991b
|
[
"MIT"
] | null | null | null |
from abc import ABC
from dataclasses import dataclass
__all__ = ("Resource",)
@dataclass
class Resource(ABC):
pass
| 12.2
| 33
| 0.737705
| 15
| 122
| 5.733333
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180328
| 122
| 9
| 34
| 13.555556
| 0.86
| 0
| 0
| 0
| 0
| 0
| 0.065574
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.166667
| 0.333333
| 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
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
31f102464d2f6be4aec4fb7b3d352deb287ae4fc
| 247
|
py
|
Python
|
extras/setup.py
|
dmitmel/openkrosskod
|
45f620170de9a22d5de3a5b3d8e7ef4dc05d2cf8
|
[
"MIT"
] | 7
|
2020-11-17T06:19:17.000Z
|
2022-01-13T01:47:33.000Z
|
extras/setup.py
|
dmitmel/openkrosskod
|
45f620170de9a22d5de3a5b3d8e7ef4dc05d2cf8
|
[
"MIT"
] | null | null | null |
extras/setup.py
|
dmitmel/openkrosskod
|
45f620170de9a22d5de3a5b3d8e7ef4dc05d2cf8
|
[
"MIT"
] | 1
|
2021-04-05T13:15:37.000Z
|
2021-04-05T13:15:37.000Z
|
from distutils.core import Extension, setup
setup(
name="openkrosskod_extras",
version="0.0.0",
ext_modules=[
Extension("mega_tournament_ultra_fast", sources=["mega_tournament_ultra_fast.cpp"], extra_compile_args=["-std=c++11"]),
]
)
| 24.7
| 123
| 0.732794
| 33
| 247
| 5.181818
| 0.757576
| 0.023392
| 0.222222
| 0.269006
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022727
| 0.109312
| 247
| 9
| 124
| 27.444444
| 0.754545
| 0
| 0
| 0
| 0
| 0
| 0.364372
| 0.226721
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.125
| 0
| 0.125
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ee4504a8f38b2f387903c432f1df6832a816bc3f
| 165
|
py
|
Python
|
run_script_after_pkg_installs.py
|
AnnAnnFryingPan/iot_api_poller
|
1a42eaf58b984c6ff3ca86a6b1f28b60f46211d5
|
[
"MIT"
] | null | null | null |
run_script_after_pkg_installs.py
|
AnnAnnFryingPan/iot_api_poller
|
1a42eaf58b984c6ff3ca86a6b1f28b60f46211d5
|
[
"MIT"
] | 1
|
2021-06-02T00:26:16.000Z
|
2021-06-02T00:26:16.000Z
|
run_script_after_pkg_installs.py
|
AnnAnnFryingPan/iot_api_poller
|
1a42eaf58b984c6ff3ca86a6b1f28b60f46211d5
|
[
"MIT"
] | null | null | null |
from iot_api_poller.iotApiPoller import IotApiPoller
poller = IotApiPoller(True, '/home/ann/Code/iot_api_poller/iot_api_poller', file, 3600.0, True)
poller.start()
| 33
| 95
| 0.806061
| 25
| 165
| 5.08
| 0.56
| 0.141732
| 0.283465
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032895
| 0.078788
| 165
| 4
| 96
| 41.25
| 0.802632
| 0
| 0
| 0
| 0
| 0
| 0.268293
| 0.268293
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ee586d81cd33a31ed3dc66ac7bb8e1824caf875d
| 54
|
py
|
Python
|
src/features/build_features.py
|
TuomoKareoja/tj_kaggle_ga
|
d7df2849897e373e810cd55736b7b00e0f495d2c
|
[
"MIT"
] | null | null | null |
src/features/build_features.py
|
TuomoKareoja/tj_kaggle_ga
|
d7df2849897e373e810cd55736b7b00e0f495d2c
|
[
"MIT"
] | 1
|
2018-10-01T14:58:22.000Z
|
2018-10-01T15:17:32.000Z
|
src/features/build_features.py
|
TuomoKareoja/tj_kaggle_ga
|
d7df2849897e373e810cd55736b7b00e0f495d2c
|
[
"MIT"
] | null | null | null |
"""
.. module:: build_features.py
:synopsis:
"""
| 9
| 29
| 0.555556
| 5
| 54
| 5.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.203704
| 54
| 5
| 30
| 10.8
| 0.674419
| 0.814815
| 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
|
ee762d5d4f1c76d6bf4372c59e0f7a9f712ac165
| 2,042
|
py
|
Python
|
indoorair_front/pages/views.py
|
ydang5/indoorair-front
|
24264fbbd0da0ab007d9dc058311dd4914953d59
|
[
"BSD-3-Clause"
] | null | null | null |
indoorair_front/pages/views.py
|
ydang5/indoorair-front
|
24264fbbd0da0ab007d9dc058311dd4914953d59
|
[
"BSD-3-Clause"
] | null | null | null |
indoorair_front/pages/views.py
|
ydang5/indoorair-front
|
24264fbbd0da0ab007d9dc058311dd4914953d59
|
[
"BSD-3-Clause"
] | null | null | null |
from rest_framework import status, response, views
from django.http import HttpResponse, JsonResponse
from django.shortcuts import render
from django.shortcuts import redirect
# ---- homepage -----
def index_page(request):
user = request.user
return render(request,'pages/index.html',{})
def contact_page(request):
context = {}
return render(request,'pages/contact.html',context)
#----gateway----
def register_page(request):
return render(request, "pages/gateway/register.html", {})
def register_ok_page(request):
return render(request, "pages/gateway/register_ok_page.html",{})
def login_page(request):
user = request.user
return render(request, "pages/gateway/login.html", {})
def logout_page(request):
user = request.user
return render(request, "pages/gateway/logout.html", {})
#---dashboard---
def dashboard_page(request):
user = request.user
if user.is_authenticated == False:
return HttpResponse("Cannot view page - you must login first")
context = {
'user': user,
}
return render(request,'dashboard/dashboard.html',context)
# ---instrument ---
def i_list_page(request):
return render(request, "pages/instrument/list.html", {})
def i_retrieve_page(request, id):
return render(request, "pages/instrument/retrieve.html", {
"instrument_id": int(id),
})
def i_update_page(request, id):
return render(request, "pages/instrument/update.html", {
"instrument_id": int(id),
})
#---user profile---
def profile_retrieve_page(request):
return render(request, "userprofile/retrieve.html", {})
def profile_update_page(request):
return render(request, "userprofile/update.html", {})
#---report---
def report_list_page(request):
return render(request,"report/list.html",{})
def report_01_page(request):
return render(request,"report/01.html",{})
def sensor_retrieve_page(request, id):
return render(request, "sensor/retrieve.html", {
"sensor_id": int(id),
})
| 19.825243
| 70
| 0.682664
| 245
| 2,042
| 5.563265
| 0.212245
| 0.121056
| 0.209098
| 0.158474
| 0.499633
| 0.442406
| 0.297872
| 0.262656
| 0.120323
| 0.083639
| 0
| 0.002363
| 0.170911
| 2,042
| 102
| 71
| 20.019608
| 0.802717
| 0.047502
| 0
| 0.18
| 0
| 0
| 0.221362
| 0.137771
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0
| 0.08
| 0.2
| 0.7
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
c99474873665e42b03e87bb825a9df3ee540e862
| 1,351
|
py
|
Python
|
backend/__init__.py
|
sougannkyou/AppSimulator
|
0803d557b0451b049f11e90c258ec11f7074a2ac
|
[
"MIT"
] | 6
|
2018-10-21T03:41:03.000Z
|
2021-12-17T11:09:50.000Z
|
backend/__init__.py
|
sougannkyou/AppSimulator
|
0803d557b0451b049f11e90c258ec11f7074a2ac
|
[
"MIT"
] | null | null | null |
backend/__init__.py
|
sougannkyou/AppSimulator
|
0803d557b0451b049f11e90c258ec11f7074a2ac
|
[
"MIT"
] | 4
|
2020-01-30T14:46:50.000Z
|
2021-12-04T01:07:46.000Z
|
from __future__ import absolute_import, unicode_literals
# django-celery
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
# import pymysql
# pymysql.install_as_MySQLdb()
#
# from django.db.models.signals import post_syncdb
# from django.contrib.contenttypes.models import ContentType
# from django.contrib.auth.models import Permission
#
#
# def add_view_permissions(sender, **kwargs):
# """
# This syncdb hooks takes care of adding a view permission too all our
# content types.
# """
# # for each of our content types
# for content_type in ContentType.objects.all():
# # build our permission slug
# codename = "view_%s" % content_type.model
#
# # if it doesn't exist..
# if not Permission.objects.filter(content_type=content_type, codename=codename):
# # add it
# # model_name = '%s\.%s'
#
# Permission.objects.create(content_type=content_type,
# codename=codename,
# name="可以查看 %s" % content_type.name)
#
#
# # check for all our view permissions after a syncdb
# post_syncdb.connect(add_view_permissions)
#
# from django.db.backends.mysql.features import DatabaseFeatures
#
# DatabaseFeatures.allows_auto_pk_0 = True
| 32.166667
| 89
| 0.665433
| 167
| 1,351
| 5.221557
| 0.520958
| 0.088303
| 0.027523
| 0.041284
| 0.087156
| 0.087156
| 0
| 0
| 0
| 0
| 0
| 0.000978
| 0.243523
| 1,351
| 41
| 90
| 32.95122
| 0.85225
| 0.895633
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c9f663a2b47952aba4958a0565d6b9622715fd9c
| 90
|
py
|
Python
|
python_resolutions/beginner/1435.py
|
DanielYe1/UriResolutions
|
7140c4a7f37b95cc15d9c77612c4abde469d379f
|
[
"Apache-2.0"
] | null | null | null |
python_resolutions/beginner/1435.py
|
DanielYe1/UriResolutions
|
7140c4a7f37b95cc15d9c77612c4abde469d379f
|
[
"Apache-2.0"
] | null | null | null |
python_resolutions/beginner/1435.py
|
DanielYe1/UriResolutions
|
7140c4a7f37b95cc15d9c77612c4abde469d379f
|
[
"Apache-2.0"
] | null | null | null |
size = int(input())
matrix = [[1 for y in range(size)] for x in range(size)]
print(matrix)
| 30
| 56
| 0.666667
| 17
| 90
| 3.529412
| 0.647059
| 0.233333
| 0.366667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013158
| 0.155556
| 90
| 3
| 57
| 30
| 0.776316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 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
|
c9fe96841f528034e12a008a691cb125b131c255
| 982
|
py
|
Python
|
asyncEvento/_error.py
|
akshitgrover/asyncEvento
|
ce9f3dd83360420d3b0772bec4cf8a086649c32f
|
[
"Apache-2.0"
] | 4
|
2018-09-21T12:16:17.000Z
|
2018-09-27T16:03:14.000Z
|
asyncEvento/_error.py
|
akshitgrover/asyncEvento
|
ce9f3dd83360420d3b0772bec4cf8a086649c32f
|
[
"Apache-2.0"
] | null | null | null |
asyncEvento/_error.py
|
akshitgrover/asyncEvento
|
ce9f3dd83360420d3b0772bec4cf8a086649c32f
|
[
"Apache-2.0"
] | null | null | null |
"""
Copyright 2018 Akshit Grover
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
class ListenerCountReached(Exception):
def __init__(self, count = 0, event = ""):
self.__listenerCount = count
self.__eventName = event
def string(self):
return "\nListenerCountReached: Maximum Listener count '{}' reached for event '{}'\n".format(self.__listenerCount, self.__eventName)
pass
def errorHandler(err):
print(err.string())
| 30.6875
| 140
| 0.709776
| 129
| 982
| 5.310078
| 0.658915
| 0.087591
| 0.037956
| 0.046715
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011643
| 0.212831
| 982
| 31
| 141
| 31.677419
| 0.874515
| 0.563136
| 0
| 0
| 0
| 0
| 0.194373
| 0.058824
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.111111
| 0
| 0.111111
| 0.555556
| 0.111111
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
a01168e974b663a964f60e3bc48a78a4447ee929
| 138
|
py
|
Python
|
uplift/meta/__init__.py
|
Antiguru11/uplift
|
ffaa5bcd20d6aa264fa3b2d191327c86384e4f7c
|
[
"Apache-2.0"
] | null | null | null |
uplift/meta/__init__.py
|
Antiguru11/uplift
|
ffaa5bcd20d6aa264fa3b2d191327c86384e4f7c
|
[
"Apache-2.0"
] | null | null | null |
uplift/meta/__init__.py
|
Antiguru11/uplift
|
ffaa5bcd20d6aa264fa3b2d191327c86384e4f7c
|
[
"Apache-2.0"
] | null | null | null |
from .slearner import SClassifier, SRegressor
from .tlearner import TClassifier, TRegressor
from .xlearner import XClassifier, XRegressor
| 34.5
| 45
| 0.847826
| 15
| 138
| 7.8
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108696
| 138
| 3
| 46
| 46
| 0.95122
| 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
|
a01bd90af86f8019680265bdeeab8cf405d34a4c
| 80
|
py
|
Python
|
scrapeSRApy/__main__.py
|
mmrmas/SRAMicrobiomeCategoryPipeline
|
75786cf79f770758602ee70d945e1d7ef297ca6d
|
[
"MIT"
] | null | null | null |
scrapeSRApy/__main__.py
|
mmrmas/SRAMicrobiomeCategoryPipeline
|
75786cf79f770758602ee70d945e1d7ef297ca6d
|
[
"MIT"
] | null | null | null |
scrapeSRApy/__main__.py
|
mmrmas/SRAMicrobiomeCategoryPipeline
|
75786cf79f770758602ee70d945e1d7ef297ca6d
|
[
"MIT"
] | null | null | null |
from scrapeSRA import scrapeSRA
if __name__ == '__main__':
scrapeSRA.run()
| 16
| 31
| 0.725
| 9
| 80
| 5.555556
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.175
| 80
| 4
| 32
| 20
| 0.757576
| 0
| 0
| 0
| 0
| 0
| 0.1
| 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
|
4e5bdc9938c077fe66170f23c7befda5796bd764
| 123
|
py
|
Python
|
private_messages/conf/settings.py
|
plazix/django-private-messages
|
e0b2a4821f74da25d8b140501aa20da247a03382
|
[
"BSD-3-Clause"
] | 5
|
2015-07-01T13:23:08.000Z
|
2017-11-15T09:48:11.000Z
|
private_messages/conf/settings.py
|
plazix/django-private-messages
|
e0b2a4821f74da25d8b140501aa20da247a03382
|
[
"BSD-3-Clause"
] | null | null | null |
private_messages/conf/settings.py
|
plazix/django-private-messages
|
e0b2a4821f74da25d8b140501aa20da247a03382
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
from django.conf import settings
USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
| 17.571429
| 62
| 0.699187
| 17
| 123
| 4.882353
| 0.705882
| 0.216867
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009434
| 0.138211
| 123
| 6
| 63
| 20.5
| 0.773585
| 0.170732
| 0
| 0
| 0
| 0
| 0.24
| 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
|
4e8131b6ccb2cd3196fc4bd4c73c6bf2ad1da546
| 168
|
py
|
Python
|
Mundo 1/ex21.py
|
Silvalhd/Aulas-Python
|
77ddc0e276accff4bfef9d474f80d0ad399ef74f
|
[
"MIT"
] | null | null | null |
Mundo 1/ex21.py
|
Silvalhd/Aulas-Python
|
77ddc0e276accff4bfef9d474f80d0ad399ef74f
|
[
"MIT"
] | null | null | null |
Mundo 1/ex21.py
|
Silvalhd/Aulas-Python
|
77ddc0e276accff4bfef9d474f80d0ad399ef74f
|
[
"MIT"
] | null | null | null |
'''import pygame
pygame.init()
pygame.mixer.music.load('ex21.mp3')
pygame.mixer.music.play()
pygame.event.wait()'''
import playsound
playsound.playsound('ex21.mp3')
| 15.272727
| 35
| 0.738095
| 23
| 168
| 5.391304
| 0.521739
| 0.177419
| 0.258065
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038462
| 0.071429
| 168
| 10
| 36
| 16.8
| 0.75641
| 0.64881
| 0
| 0
| 0
| 0
| 0.156863
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
14cc298c014a76c66885d304ac640f44cf812644
| 3,651
|
py
|
Python
|
HelloWorld_python/string/string_demo.py
|
wang153723482/HelloWorld_my
|
b8642ad9742f95cfebafc61f25b00e917485e50c
|
[
"Apache-2.0"
] | null | null | null |
HelloWorld_python/string/string_demo.py
|
wang153723482/HelloWorld_my
|
b8642ad9742f95cfebafc61f25b00e917485e50c
|
[
"Apache-2.0"
] | null | null | null |
HelloWorld_python/string/string_demo.py
|
wang153723482/HelloWorld_my
|
b8642ad9742f95cfebafc61f25b00e917485e50c
|
[
"Apache-2.0"
] | null | null | null |
# encoding=utf8
from time import time
aa = 'a..a.a.aa.tx.t'
print aa.rfind('.')
print aa[aa.rfind('.'):] #获取文件扩展名
print aa.index('tx')
if aa.find('tx')>-1:
print 1
else:
print 2
print 22222222
a = 'a'
if a :
print 11
else:
print 22
table_name = 'ss'
sql_create_table = 'create table ' + table_name + ' (' \
'time_ varchar(500) default null,' \
'scp varchar(500) default null,' \
'result varchar(500) default null,' \
'trans_type varchar(500) default null,' \
'req_no varchar(500) default null,' \
'cost varchar(500) default null,' \
'mark varchar(500) default null' \
') ENGINE=InnoDB DEFAULT CHARSET=latin1;'
print sql_create_table
s = '[lo[g4j]'
print s.find('[')
pass
s = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response><certificates><certificate><amount>100.00</amount><certificateId>g3VGvCB/yczklst97WzChYzNkCSlz8O6MHvqU0Lx7Oc=</certificateId><datePurchased>1481163455000</datePurchased><ephemeralPublicKey>MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE43IDxnPVaNVL/4PnSzoExG2LTJ3s1EbHLzBvCMnL2ASBXSwpZkHbGe6Zswd10JSxGR2iNtEfGSUsT7LDzU0mWQ==</ephemeralPublicKey><refId>PNCZ20161208H00EBF55</refId><scn>TCA90966819121</scn><status>2</status></certificate></certificates></response>'
print s[s.index('<refId>') + 7:s.index('</refId>')]
s = '[log4j] 2016-12-07 15:38:45,422 - com.zihexin.web.controller.CommunicationController_getMessage INFO - |SCP|SUCCESS|CreateCertificate|077f0f2bbe3ea8801c300b14c0acc86c|486|完成业务操作|'
print s[s.index('|SCP|'):]
print s[8:31]
print ''.join(['aa', 'bb'])
t = time()
for i in range(1000000):
s = ''.join(['aa', 'bab', 'bab'])
print time() - t
t = time()
for i in range(1000000):
s = 'aa' + 'bb' + 'byb'
print time() - t
def method1():
t = time()
for i in xrange(1000000):
s = 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab' + 'pythontab'
print time() - t
def method2():
t = time()
for i in xrange(1000000):
s = ''.join(
['pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab',
'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab',
'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab',
'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab',
'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab',
'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab', 'pythontab'])
print time() - t
method1()
method2()
| 41.488636
| 653
| 0.586689
| 343
| 3,651
| 6.215743
| 0.314869
| 0.75985
| 1.114447
| 1.452158
| 0.443715
| 0.443715
| 0.443715
| 0.443715
| 0.397749
| 0.397749
| 0
| 0.065723
| 0.245686
| 3,651
| 87
| 654
| 41.965517
| 0.708424
| 0.005478
| 0
| 0.295082
| 0
| 0.032787
| 0.517365
| 0.169791
| 0.032787
| 0
| 0
| 0
| 0
| 0
| null | null | 0.016393
| 0.016393
| null | null | 0.295082
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
14d3022dfee2189fc681796f00778a7077d333b5
| 1,075
|
py
|
Python
|
stores/migrations/0005_auto_20201112_1537.py
|
thgazis/django-oscar-stores
|
373f45a9f7d18f5ffaec06580fbe7ecf8edc27df
|
[
"BSD-3-Clause"
] | null | null | null |
stores/migrations/0005_auto_20201112_1537.py
|
thgazis/django-oscar-stores
|
373f45a9f7d18f5ffaec06580fbe7ecf8edc27df
|
[
"BSD-3-Clause"
] | null | null | null |
stores/migrations/0005_auto_20201112_1537.py
|
thgazis/django-oscar-stores
|
373f45a9f7d18f5ffaec06580fbe7ecf8edc27df
|
[
"BSD-3-Clause"
] | null | null | null |
# Generated by Django 3.0.11 on 2020-11-12 15:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stores', '0004_auto_20200921_1130'),
]
operations = [
migrations.AddField(
model_name='storeaddress',
name='line1_el',
field=models.CharField(max_length=255, null=True, verbose_name='First line of address'),
),
migrations.AddField(
model_name='storeaddress',
name='line1_en',
field=models.CharField(max_length=255, null=True, verbose_name='First line of address'),
),
migrations.AddField(
model_name='storeaddress',
name='state_el',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='State/County'),
),
migrations.AddField(
model_name='storeaddress',
name='state_en',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='State/County'),
),
]
| 31.617647
| 103
| 0.603721
| 117
| 1,075
| 5.384615
| 0.401709
| 0.114286
| 0.146032
| 0.171429
| 0.749206
| 0.749206
| 0.749206
| 0.580952
| 0.580952
| 0.580952
| 0
| 0.059202
| 0.277209
| 1,075
| 33
| 104
| 32.575758
| 0.751609
| 0.042791
| 0
| 0.592593
| 1
| 0
| 0.170399
| 0.022395
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.037037
| 0
| 0.148148
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 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
|
14d61307a578c6a37d132e820cfa1a92d243e039
| 228
|
py
|
Python
|
posts/admin.py
|
carloalejandrosalas/Boletin
|
600c7c1f3de3c41ba26fd34e7377fc28f280badc
|
[
"MIT"
] | null | null | null |
posts/admin.py
|
carloalejandrosalas/Boletin
|
600c7c1f3de3c41ba26fd34e7377fc28f280badc
|
[
"MIT"
] | 2
|
2020-05-02T09:14:46.000Z
|
2020-05-02T09:17:08.000Z
|
posts/admin.py
|
carloalejandrosalas/Boletin
|
600c7c1f3de3c41ba26fd34e7377fc28f280badc
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Post
# Register your models here.
class PostAdmin(admin.ModelAdmin):
list_display = ('title','author', 'subtitle', 'registered_at')
admin.site.register(Post, PostAdmin)
| 25.333333
| 66
| 0.758772
| 29
| 228
| 5.896552
| 0.724138
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122807
| 228
| 9
| 67
| 25.333333
| 0.855
| 0.114035
| 0
| 0
| 0
| 0
| 0.159204
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 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
|
14ffe703f4d842e3630ab8d11b81b2248bb6cc66
| 120
|
py
|
Python
|
Zip File/zipfile_create.py
|
Davidboga4/hacking-with-python
|
cef2d2cdbfede3fe88af2ed86ad1621586f8649c
|
[
"MIT"
] | 2
|
2020-05-26T01:08:08.000Z
|
2020-05-26T01:08:13.000Z
|
Zip File/zipfile_create.py
|
Davidboga4/hacking-with-python
|
cef2d2cdbfede3fe88af2ed86ad1621586f8649c
|
[
"MIT"
] | null | null | null |
Zip File/zipfile_create.py
|
Davidboga4/hacking-with-python
|
cef2d2cdbfede3fe88af2ed86ad1621586f8649c
|
[
"MIT"
] | null | null | null |
import pyminizip
compression_level = 2
pyminizip.compress("Testing.txt", '\\', "myzip.zip", "hello", compression_level)
| 30
| 80
| 0.75
| 14
| 120
| 6.285714
| 0.785714
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009091
| 0.083333
| 120
| 3
| 81
| 40
| 0.790909
| 0
| 0
| 0
| 0
| 0
| 0.225
| 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
|
09035a5bec8923dec1a79a6187bc0b322a86350d
| 109
|
py
|
Python
|
__init__.py
|
nahidupa/grr
|
100a9d85ef2abb234e12e3ac2623caffb4116be7
|
[
"Apache-2.0"
] | 6
|
2015-04-03T02:25:28.000Z
|
2021-11-17T21:42:59.000Z
|
__init__.py
|
nahidupa/grr
|
100a9d85ef2abb234e12e3ac2623caffb4116be7
|
[
"Apache-2.0"
] | 3
|
2020-09-11T12:54:50.000Z
|
2020-09-11T12:55:01.000Z
|
__init__.py
|
nahidupa/grr
|
100a9d85ef2abb234e12e3ac2623caffb4116be7
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python
# Copyright 2010 Google Inc. All Rights Reserved.
"""GRR Rapid Response Framework."""
| 21.8
| 49
| 0.724771
| 15
| 109
| 5.266667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042553
| 0.137615
| 109
| 4
| 50
| 27.25
| 0.797872
| 0.899083
| 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
|
0924939c42ccee8aac5d959fb9ae0f9cc1c62d18
| 158
|
py
|
Python
|
mymongomodules/process_data.py
|
Elfennacht/mymongo
|
8d0388bcb907c59d37c1559ff91a4bdc8442627d
|
[
"Apache-2.0"
] | 6
|
2016-08-15T13:22:40.000Z
|
2020-12-03T03:40:40.000Z
|
mymongomodules/process_data.py
|
Elfennacht/mymongo
|
8d0388bcb907c59d37c1559ff91a4bdc8442627d
|
[
"Apache-2.0"
] | 2
|
2021-03-31T19:41:27.000Z
|
2021-12-13T20:35:38.000Z
|
mymongomodules/process_data.py
|
Elfennacht/mymongo
|
8d0388bcb907c59d37c1559ff91a4bdc8442627d
|
[
"Apache-2.0"
] | 9
|
2016-09-28T03:25:08.000Z
|
2021-07-30T02:25:26.000Z
|
import time
class ProcessData:
def __init__(self, mongo):
self.mongo = mongo
def run(self):
while True:
time.sleep(60)
| 14.363636
| 30
| 0.56962
| 19
| 158
| 4.526316
| 0.684211
| 0.209302
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019231
| 0.341772
| 158
| 10
| 31
| 15.8
| 0.807692
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.142857
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
0927527e56b648b6ee621bf084e0e68af18a4bc1
| 324
|
py
|
Python
|
QueryFile.py
|
bpx-energy/LE-Utility
|
a130810ef03933c41e425036119b42beb8f51f2f
|
[
"MIT"
] | 1
|
2019-08-12T19:22:48.000Z
|
2019-08-12T19:22:48.000Z
|
QueryFile.py
|
bpx-energy/LE-Utility
|
a130810ef03933c41e425036119b42beb8f51f2f
|
[
"MIT"
] | 2
|
2019-10-28T20:40:16.000Z
|
2019-10-28T20:40:23.000Z
|
QueryFile.py
|
bpx-energy/LE_Utility_1b
|
8ba9551997eb1940109c00ac4d06bd7e50f26a67
|
[
"MIT"
] | null | null | null |
def GetRoutes(area):
query = 'select distinct Route from [dimensions].[wells] where [Area] = \'' + area + '\''
return query
def GetWells(area, route):
query = 'select distinct WellName from [dimensions].[wells] where [Route] = \'' + route + '\' and [Area] = \'' + area + '\''
return query
| 24.923077
| 129
| 0.574074
| 34
| 324
| 5.470588
| 0.441176
| 0.11828
| 0.204301
| 0.258065
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.253086
| 324
| 12
| 130
| 27
| 0.768595
| 0
| 0
| 0.333333
| 0
| 0
| 0.577922
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
0937dc1a013569b519665cf92c8f2033c5e36733
| 883
|
py
|
Python
|
quiz/models.py
|
vparjunmohan/Django-Quiz-App
|
b625bc4fd87a42ea069ccd3ae7ca857aac344088
|
[
"MIT"
] | 2
|
2022-02-10T09:45:55.000Z
|
2022-02-17T07:26:26.000Z
|
quiz/models.py
|
vparjunmohan/Django-Quiz-App
|
b625bc4fd87a42ea069ccd3ae7ca857aac344088
|
[
"MIT"
] | null | null | null |
quiz/models.py
|
vparjunmohan/Django-Quiz-App
|
b625bc4fd87a42ea069ccd3ae7ca857aac344088
|
[
"MIT"
] | 1
|
2022-02-18T21:47:43.000Z
|
2022-02-18T21:47:43.000Z
|
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Category(models.Model):
owner = models.ForeignKey(to=User, on_delete=models.CASCADE)
category = models.CharField(max_length=200)
def __str__(self):
return self.category
class Question(models.Model):
choice = models.ForeignKey(Category, on_delete=models.CASCADE)
question = models.CharField(max_length=250)
answer = models.CharField(max_length=100)
option_one = models.CharField(max_length=100)
option_two = models.CharField(max_length=100)
option_three = models.CharField(max_length=100, blank=True)
option_four = models.CharField(max_length=100, blank=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
def __str__(self):
return self.question
| 35.32
| 66
| 0.746319
| 118
| 883
| 5.364407
| 0.398305
| 0.165877
| 0.199052
| 0.265403
| 0.421801
| 0.270142
| 0.113744
| 0
| 0
| 0
| 0
| 0.028188
| 0.156285
| 883
| 25
| 67
| 35.32
| 0.821477
| 0.02718
| 0
| 0.105263
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.105263
| false
| 0
| 0.105263
| 0.105263
| 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
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
093d480abf419c0fbe249e27525959f2fbe3ddb5
| 4,149
|
py
|
Python
|
Leak #5 - Lost In Translation/windows/Resources/Ops/PyScripts/lib/ops/survey/extra.py
|
bidhata/EquationGroupLeaks
|
1ff4bc115cb2bd5bf2ed6bf769af44392926830c
|
[
"Unlicense"
] | 9
|
2019-11-22T04:58:40.000Z
|
2022-02-26T16:47:28.000Z
|
Python.Fuzzbunch/Resources/Ops/PyScripts/lib/ops/survey/extra.py
|
010001111/Vx-Suites
|
6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79
|
[
"MIT"
] | null | null | null |
Python.Fuzzbunch/Resources/Ops/PyScripts/lib/ops/survey/extra.py
|
010001111/Vx-Suites
|
6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79
|
[
"MIT"
] | 8
|
2017-09-27T10:31:18.000Z
|
2022-01-08T10:30:46.000Z
|
import dsz
import ops, ops.survey
import ops.cmd
import ops.env
import ops.files.dirs
import ops.system.registry
import ops.system.environment
import ops.project
from optparse import OptionParser
import datetime
import os.path
import traceback
ONE_DAY = 86400
ONE_MONTH = (ONE_DAY * 30)
ONE_YEAR = (ONE_DAY * 365)
def main():
keylist = [('system\\currentcontrolset\\control\\timezoneinformation', 'OPS_EXTRA_TIMEZONE_KEY', ONE_DAY, True), ('SYSTEM\\CurrentControlSet\\Enum\\USB', 'OPS_USB_USB_KEY', ONE_DAY, True), ('SYSTEM\\CurrentControlSet\\Enum\\USBSTOR', 'OPS_USB_USBSTOR_KEY', ONE_DAY, True), ('Software\\Policies\\Microsoft\\Windows\\WindowsUpdate', 'OPS_EXTRA_WUPOLICY_KEY', ONE_DAY, True), ('Software\\Microsoft\\Windows\\CurrentVersion\\WindowsUpdate', 'OPS_EXTRA_WU_KEY', ONE_DAY, True), ('SYSTEM\\CurrentControlSet\\Services\\Dhcp\\Parameters', 'OPS_EXTRA_DHCP_KEY', ONE_DAY, True), ('SYSTEM\\CurrentControlSet\\Services\\wuauserv', 'OPS_EXTRA_WUSERV_KEY', ONE_DAY, True), ('Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Connection\\WinHttpSettings', 'OPS_EXTRA_WINHTTP_KEY', ONE_DAY, True), ('HARDWARE\\DESCRIPTION\\System\\CentralProcessor', 'OPS_EXTRA_CPU_KEY', ONE_DAY, True), ('SYSTEM\\CurrentControlSet\\Control\\LSA\\Data', 'OPS_SLRO_LSADATA', ONE_YEAR, False), ('SYSTEM\\CurrentControlSet\\Control\\LSA\\GBG', 'OPS_SLRO_LSAGBG', ONE_YEAR, False), ('SYSTEM\\CurrentControlSet\\Control\\LSA\\JD', 'OPS_SLRO_LSAJD', ONE_YEAR, False), ('SYSTEM\\CurrentControlSet\\Control\\LSA\\Skew1', 'OPS_SLRO_LSASKEWL', ONE_YEAR, False), ('SECURITY\\Policy\\Secrets\\DPAPI_SYSTEM\\CurrVal', 'OPS_SLRO_DPAPICURRVAL', ONE_YEAR, False), ('SECURITY\\Policy\\PolSecretEncryptionKey', 'OPS_SLRO_POLSECRET', ONE_YEAR, False), ('SECURITY\\Policy\\L$HYDRAENCKEY_28ada6da-d622-11d1-9cb9-00c04fb16e75\\CurrVal', 'OPS_SLRO_HYDRAKEY', ONE_YEAR, False), ('SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\RCM\\Secrets\\L$HYDRAENCKEY_28ada6da-d622-11d1-9cb9-00c04fb16e75\\CurrVal', 'OPS_SLRO_RCMSECRETS', ONE_YEAR, False), ('SECURITY\\Policy\\PolEKList', 'OPS_SLRO_POLEKLIST', ONE_YEAR, False), ('system\\RAdmin\\v2.0\\Server\\Parameters', 'OPS_SLRO_RADMIN2', ONE_MONTH, False), ('SOFTWARE\\RAdmin\\v3.0\\Server\\Parameters\\Radmin Security', 'OPS_SLRO_RADMIN3', ONE_MONTH, False), ('SECURITY\\Policy\\Secrets', 'OPS_SLRO_POLICYSECRETS', ONE_MONTH, True), ('software\\pgp corporation\\pgp', 'OPS_SLRO_PGP', ONE_MONTH, True), ('software\\network associates\\pgp60', 'OPS_SLRO_NAPGP60', ONE_MONTH, True), ('software\\network associates\\pgp55', 'OPS_SLRO_NAPGP55', ONE_MONTH, True), ('software\\network associates\\pgp', 'OPS_SLRO_NAPGP', ONE_MONTH, True), ('Software\\TeamViewer', 'OPS_SLRO_TEAMVIEWER', ONE_DAY, True)]
winroot = ops.env.get('OPS_WINDOWSDIR')
sysroot = ops.env.get('OPS_SYSTEMDIR')
programdata = ops.system.environment.get_environment_var('ALLUSERSPROFILE', maxage=datetime.timedelta(seconds=14400)).value
progfiles = ops.system.environment.get_environment_var('PROGRAMFILES', maxage=datetime.timedelta(seconds=14400)).value
dirwalklist = [(os.path.join(sysroot, 'Microsoft\\Protect\\S-1-5-18'), 'OPS_SLRO_PROTECT18', ONE_DAY, True), (os.path.join(sysroot, 'Microsoft\\Protect\\S-1-5-20'), 'OPS_SLRO_PROTECT20', ONE_DAY, True), (os.path.join(programdata, 'Microsoft\\Crypto\\RSA'), 'OPS_SLRO_RSAKEYS', ONE_DAY, True), (os.path.join(progfiles, 'InfoTeCS\\ViPNet Client'), 'OPS_SLRO_VIPNET', ONE_DAY, False), (os.path.join(winroot, 'Fonts'), 'OPS_WINDOWS_FONTS', ONE_DAY, False)]
results = []
for pair in keylist:
try:
results.append(ops.system.registry.get_registrykey('L', pair[0], cache_tag=pair[1], cache_size=1, maxage=datetime.timedelta(pair[2]), dszquiet=False, dszlog=True, recursive=pair[3]))
except:
pass
for pair in dirwalklist:
try:
results.append(ops.files.dirs.get_dirlisting(pair[0], cache_tag=pair[1], cache_size=1, maxage=datetime.timedelta(pair[2]), dszquiet=False, dszlog=True, recursive=pair[3]))
except:
pass
if ((__name__ == '__main__') or (__name__ == ops.survey.PLUGIN)):
main()
| 112.135135
| 2,407
| 0.743794
| 545
| 4,149
| 5.416514
| 0.300917
| 0.049797
| 0.044038
| 0.039634
| 0.446138
| 0.403794
| 0.270664
| 0.168022
| 0.133469
| 0.109079
| 0
| 0.025066
| 0.086527
| 4,149
| 37
| 2,408
| 112.135135
| 0.753826
| 0
| 0
| 0.171429
| 0
| 0.028571
| 0.472885
| 0.307303
| 0
| 0
| 0
| 0
| 0
| 1
| 0.028571
| false
| 0.057143
| 0.342857
| 0
| 0.371429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
09607a79f3bc7627125c9f0d235cd9de1135fa5c
| 42
|
py
|
Python
|
easyQuake/__init__.py
|
jakewalter/EasyQuake
|
9b6afa30d2f1de27434d5da14e644f0a91bd7682
|
[
"MIT"
] | 31
|
2020-09-04T03:03:28.000Z
|
2021-12-20T02:32:51.000Z
|
easyQuake/__init__.py
|
jakewalter/EasyQuake
|
9b6afa30d2f1de27434d5da14e644f0a91bd7682
|
[
"MIT"
] | 5
|
2021-03-17T11:26:43.000Z
|
2022-03-21T19:44:04.000Z
|
easyQuake/__init__.py
|
jakewalter/EasyQuake
|
9b6afa30d2f1de27434d5da14e644f0a91bd7682
|
[
"MIT"
] | 9
|
2020-11-06T00:20:19.000Z
|
2021-12-17T02:16:54.000Z
|
name='easyQuake'
from .easyQuake import *
| 14
| 24
| 0.761905
| 5
| 42
| 6.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119048
| 42
| 2
| 25
| 21
| 0.864865
| 0
| 0
| 0
| 0
| 0
| 0.214286
| 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
|
117e456b0148faf71449b2cb9279ef01e9b80075
| 186
|
py
|
Python
|
PyLeague/exceptions.py
|
Ahuge/PyLeague
|
ee8a14061c44c1c26a5102a05e33ad820f2b1b63
|
[
"MIT"
] | null | null | null |
PyLeague/exceptions.py
|
Ahuge/PyLeague
|
ee8a14061c44c1c26a5102a05e33ad820f2b1b63
|
[
"MIT"
] | null | null | null |
PyLeague/exceptions.py
|
Ahuge/PyLeague
|
ee8a14061c44c1c26a5102a05e33ad820f2b1b63
|
[
"MIT"
] | null | null | null |
class TestingError(BaseException): pass
class MisnamedFunctionError(TestingError): pass
class TestNotFoundError(TestingError): pass
class SolutionNotFoundError(TestingError): pass
| 16.909091
| 47
| 0.83871
| 16
| 186
| 9.75
| 0.4375
| 0.173077
| 0.269231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096774
| 186
| 10
| 48
| 18.6
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 1
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
11916c58fa5c1d0ae9f6dcdc80539b40f318a6ef
| 15
|
py
|
Python
|
openml_data_integration/protobuf_generator/openml_1464/myconstants.py
|
tuix/tutorials
|
733d35a8a39df079e8c2432c441b70785ab08440
|
[
"Apache-2.0"
] | 8
|
2020-04-21T13:29:04.000Z
|
2021-12-13T08:59:09.000Z
|
openml_data_integration/protobuf_generator/openml_1464/myconstants.py
|
tuix/tutorials
|
733d35a8a39df079e8c2432c441b70785ab08440
|
[
"Apache-2.0"
] | 3
|
2021-04-27T11:03:04.000Z
|
2021-05-24T18:22:57.000Z
|
openml_data_integration/protobuf_generator/openml_1464/myconstants.py
|
tuix/tutorials
|
733d35a8a39df079e8c2432c441b70785ab08440
|
[
"Apache-2.0"
] | 6
|
2020-07-06T08:23:25.000Z
|
2021-11-24T10:39:34.000Z
|
DATA_ID = 1464
| 7.5
| 14
| 0.733333
| 3
| 15
| 3.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 0.2
| 15
| 1
| 15
| 15
| 0.5
| 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
|
11b381d17cc275b88a23849a6c449da6a68cacef
| 98
|
py
|
Python
|
windowsonedge/server.py
|
TheMindVirus/webgl-stuff
|
d47e07add67c0c3048e2af542f655e356d8f97d7
|
[
"MIT"
] | null | null | null |
windowsonedge/server.py
|
TheMindVirus/webgl-stuff
|
d47e07add67c0c3048e2af542f655e356d8f97d7
|
[
"MIT"
] | null | null | null |
windowsonedge/server.py
|
TheMindVirus/webgl-stuff
|
d47e07add67c0c3048e2af542f655e356d8f97d7
|
[
"MIT"
] | null | null | null |
from http.server import *
HTTPServer(("0.0.0.0", 9090), SimpleHTTPRequestHandler).serve_forever()
| 32.666667
| 71
| 0.765306
| 13
| 98
| 5.692308
| 0.769231
| 0.081081
| 0.081081
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 0.071429
| 98
| 2
| 72
| 49
| 0.725275
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 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
|
ee9513b16ac22c921028dce2ac6b2c4ae33549ad
| 604
|
py
|
Python
|
ex34.py
|
Eieiphyu/python_exercises
|
ce732f236e4e9dc62bbbe8daf0f530aeeb151ee7
|
[
"MIT"
] | null | null | null |
ex34.py
|
Eieiphyu/python_exercises
|
ce732f236e4e9dc62bbbe8daf0f530aeeb151ee7
|
[
"MIT"
] | null | null | null |
ex34.py
|
Eieiphyu/python_exercises
|
ce732f236e4e9dc62bbbe8daf0f530aeeb151ee7
|
[
"MIT"
] | null | null | null |
animals = ['bear' , 'python 3.6' , 'peacock' , 'kangroo' , 'whale' , 'zebra']
print(f"The animal at 1 is the 2nd animal and is a {animals[1]}.")
print(f"The third (3rd) animal is at 2 and is a {animals[2]}.")
print(f"The first (1st) animal is at 0 and is a {animals[0]}.")
print(f"The animal at 3 is the forth animal and is a animal {animals[3]}.")
print(f"The fifth (5th) animal is at 4 and is a {animals[4]}.")
print(f"The animal at 2 is the 3rd animal and is {animals[2]}.")
print(f"The sixth (6th) animal is at 5 and is a {animals[5]}.")
print(f"The animal at 4 is the 5th and is a {animals[4]}.")
| 50.333333
| 77
| 0.655629
| 124
| 604
| 3.193548
| 0.258065
| 0.121212
| 0.181818
| 0.19697
| 0.328283
| 0
| 0
| 0
| 0
| 0
| 0
| 0.050302
| 0.177152
| 604
| 11
| 78
| 54.909091
| 0.746479
| 0
| 0
| 0
| 0
| 0
| 0.78607
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.888889
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
eea87afaa6c683590568a3392952a9a0a0c11a8e
| 621
|
py
|
Python
|
src/cloudconvert/exceptions.py
|
kidosoft/cloudconvert
|
bcf845dc0ae3d3f1f2e887e491bd924068712333
|
[
"Beerware"
] | null | null | null |
src/cloudconvert/exceptions.py
|
kidosoft/cloudconvert
|
bcf845dc0ae3d3f1f2e887e491bd924068712333
|
[
"Beerware"
] | null | null | null |
src/cloudconvert/exceptions.py
|
kidosoft/cloudconvert
|
bcf845dc0ae3d3f1f2e887e491bd924068712333
|
[
"Beerware"
] | null | null | null |
"""
CloudConvert exceptions classes.
"""
class CloudConvertError(Exception):
""" Basic CloudConvert exceptions class. """
pass
class MissingFileException(CloudConvertError):
"""Raises when file to conversion is missed. """
pass
class WrongRequestDataException(CloudConvertError):
"""Raises when some data in request sending to cloudconvert service are missed. """
pass
class WrongResourceException(CloudConvertError):
"""Raises when given resource URL is wrong. """
pass
class FilesCountException(CloudConvertError):
"""Raises when too many files are sent in one request """
| 22.178571
| 87
| 0.731079
| 62
| 621
| 7.322581
| 0.564516
| 0.079295
| 0.237885
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178744
| 621
| 27
| 88
| 23
| 0.890196
| 0.458937
| 0
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.444444
| 0
| 0
| 0.555556
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
eec3135ea8127e8e110ba8fcf31937cc8cdde3f3
| 435
|
py
|
Python
|
mayan/apps/dynamic_search/__init__.py
|
camerondphillips/MAYAN
|
b8cd44af50f0b2f2b59286d9c88e2f7aa573a93f
|
[
"Apache-2.0"
] | null | null | null |
mayan/apps/dynamic_search/__init__.py
|
camerondphillips/MAYAN
|
b8cd44af50f0b2f2b59286d9c88e2f7aa573a93f
|
[
"Apache-2.0"
] | 1
|
2022-03-12T01:03:39.000Z
|
2022-03-12T01:03:39.000Z
|
mayan/apps/dynamic_search/__init__.py
|
camerondphillips/MAYAN
|
b8cd44af50f0b2f2b59286d9c88e2f7aa573a93f
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import unicode_literals
from navigation.api import register_links
from rest_api.classes import APIEndPoint
from .links import search, search_advanced, search_again
register_links(['search:search', 'search:search_advanced', 'search:results'], [search, search_advanced], menu_name='form_header')
register_links(['search:results'], [search_again], menu_name='sidebar')
APIEndPoint('search', app_name='dynamic_search')
| 36.25
| 129
| 0.809195
| 56
| 435
| 5.946429
| 0.410714
| 0.18018
| 0.18018
| 0.156156
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075862
| 435
| 11
| 130
| 39.545455
| 0.828358
| 0
| 0
| 0
| 0
| 0
| 0.232184
| 0.050575
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.571429
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
eef53466d020902809b8180a451df19bbb87f300
| 315
|
py
|
Python
|
evaluate_tags.py
|
ktwaco/nlproject
|
16f02158fecdfe55a73a2c5c1e78376da935b50d
|
[
"Apache-2.0"
] | null | null | null |
evaluate_tags.py
|
ktwaco/nlproject
|
16f02158fecdfe55a73a2c5c1e78376da935b50d
|
[
"Apache-2.0"
] | null | null | null |
evaluate_tags.py
|
ktwaco/nlproject
|
16f02158fecdfe55a73a2c5c1e78376da935b50d
|
[
"Apache-2.0"
] | null | null | null |
from code.learning.model_event import evaluate_tagging
annotated_dir = '/home/ymeng/projects/sandbox/val_set_tagged/tagged/'
newsreader_dir = '/home/ymeng/projects/TEA/newsreader_annotations/1-20/'
results = evaluate_tagging(annotated_dir, newsreader_dir)
for key in sorted(results):
print key, results[key]
| 35
| 72
| 0.806349
| 44
| 315
| 5.545455
| 0.636364
| 0.122951
| 0.196721
| 0.221311
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010453
| 0.088889
| 315
| 8
| 73
| 39.375
| 0.839721
| 0
| 0
| 0
| 0
| 0
| 0.330159
| 0.330159
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.166667
| null | null | 0.166667
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0113df80fa356473cab6555f50588635fe1fce19
| 1,772
|
py
|
Python
|
test/test_ezsignfolder_create_object_v1_response.py
|
ezmaxinc/eZmax-SDK-python
|
6794b8001abfb7d9ae18a3b87aba164839b925a0
|
[
"MIT"
] | null | null | null |
test/test_ezsignfolder_create_object_v1_response.py
|
ezmaxinc/eZmax-SDK-python
|
6794b8001abfb7d9ae18a3b87aba164839b925a0
|
[
"MIT"
] | null | null | null |
test/test_ezsignfolder_create_object_v1_response.py
|
ezmaxinc/eZmax-SDK-python
|
6794b8001abfb7d9ae18a3b87aba164839b925a0
|
[
"MIT"
] | null | null | null |
"""
eZmax API Definition (Full)
This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501
The version of the OpenAPI document: 1.1.7
Contact: support-api@ezmax.ca
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import eZmaxApi
from eZmaxApi.model.common_response import CommonResponse
from eZmaxApi.model.common_response_obj_debug import CommonResponseObjDebug
from eZmaxApi.model.common_response_obj_debug_payload import CommonResponseObjDebugPayload
from eZmaxApi.model.ezsignfolder_create_object_v1_response_all_of import EzsignfolderCreateObjectV1ResponseAllOf
from eZmaxApi.model.ezsignfolder_create_object_v1_response_m_payload import EzsignfolderCreateObjectV1ResponseMPayload
globals()['CommonResponse'] = CommonResponse
globals()['CommonResponseObjDebug'] = CommonResponseObjDebug
globals()['CommonResponseObjDebugPayload'] = CommonResponseObjDebugPayload
globals()['EzsignfolderCreateObjectV1ResponseAllOf'] = EzsignfolderCreateObjectV1ResponseAllOf
globals()['EzsignfolderCreateObjectV1ResponseMPayload'] = EzsignfolderCreateObjectV1ResponseMPayload
from eZmaxApi.model.ezsignfolder_create_object_v1_response import EzsignfolderCreateObjectV1Response
class TestEzsignfolderCreateObjectV1Response(unittest.TestCase):
"""EzsignfolderCreateObjectV1Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testEzsignfolderCreateObjectV1Response(self):
"""Test EzsignfolderCreateObjectV1Response"""
# FIXME: construct object with mandatory attributes with example values
# model = EzsignfolderCreateObjectV1Response() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()
| 37.702128
| 118
| 0.813205
| 159
| 1,772
| 8.861635
| 0.45912
| 0.0511
| 0.072392
| 0.048971
| 0.185947
| 0.163946
| 0.163946
| 0.108588
| 0
| 0
| 0
| 0.015454
| 0.123589
| 1,772
| 46
| 119
| 38.521739
| 0.891822
| 0.260158
| 0
| 0.130435
| 0
| 0
| 0.121164
| 0.103855
| 0
| 0
| 0
| 0.021739
| 0
| 1
| 0.130435
| false
| 0.130435
| 0.391304
| 0
| 0.565217
| 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
|
011d582c21ef36a5d5b7d9a84f5d1f2698b87059
| 35
|
py
|
Python
|
oldstuff/tutorial2/tutorial2/lib/python3.8/sre_constants.py
|
miusuarioamigo/python-Le
|
dbb653255dab7d11b87f25eec94bcce63a86aa42
|
[
"MIT"
] | 6
|
2020-08-04T13:12:42.000Z
|
2020-08-16T13:26:19.000Z
|
oldstuff/tutorial2/tutorial2/lib/python3.8/sre_constants.py
|
miusuarioamigo/python-Le
|
dbb653255dab7d11b87f25eec94bcce63a86aa42
|
[
"MIT"
] | 19
|
2020-02-03T10:46:48.000Z
|
2022-01-13T03:06:15.000Z
|
oldstuff/tutorial2/tutorial2/lib/python3.8/sre_constants.py
|
miusuarioamigo/python-Le
|
dbb653255dab7d11b87f25eec94bcce63a86aa42
|
[
"MIT"
] | 6
|
2021-04-02T11:36:48.000Z
|
2022-03-22T09:39:34.000Z
|
/usr/lib/python3.8/sre_constants.py
| 35
| 35
| 0.828571
| 7
| 35
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057143
| 0
| 35
| 1
| 35
| 35
| 0.742857
| 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
|
0129ec76b8f07d4e56fd91abd36236ee5c4fed93
| 283
|
py
|
Python
|
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/api/resp_models.py
|
r2rstep/ddd-fastapi-template
|
fd91261f38c239b34d87d4a2d5aef08e7f7508f9
|
[
"MIT"
] | null | null | null |
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/api/resp_models.py
|
r2rstep/ddd-fastapi-template
|
fd91261f38c239b34d87d4a2d5aef08e7f7508f9
|
[
"MIT"
] | null | null | null |
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/api/resp_models.py
|
r2rstep/ddd-fastapi-template
|
fd91261f38c239b34d87d4a2d5aef08e7f7508f9
|
[
"MIT"
] | null | null | null |
from pydantic import BaseModel
from {{cookiecutter.project_slug}} import domain
class {{cookiecutter.aggregate_name_camel}}Resp(BaseModel):
class Links(BaseModel):
self: str = None
data: domain.{{cookiecutter.aggregate_name_camel}}Base
links: Links = Links()
| 23.583333
| 59
| 0.734982
| 33
| 283
| 6.151515
| 0.575758
| 0.206897
| 0.246305
| 0.295567
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162544
| 283
| 11
| 60
| 25.727273
| 0.85654
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.285714
| null | null | 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
013b0d4aaa1d8fc35643b257f225b2c7611915e9
| 102
|
py
|
Python
|
src/apps/incidencias/config.py
|
SGC-Tlaxcala/cerebro
|
6c842f66d849065a70002fccdb1eaca1e3d61d99
|
[
"MIT"
] | null | null | null |
src/apps/incidencias/config.py
|
SGC-Tlaxcala/cerebro
|
6c842f66d849065a70002fccdb1eaca1e3d61d99
|
[
"MIT"
] | 48
|
2017-04-21T17:35:23.000Z
|
2020-08-29T04:19:35.000Z
|
src/apps/incidencias/config.py
|
SGC-Tlaxcala/cerebro
|
6c842f66d849065a70002fccdb1eaca1e3d61d99
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class IncidenciasConfig(AppConfig):
name = 'apps.incidencias'
| 17
| 35
| 0.77451
| 11
| 102
| 7.181818
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147059
| 102
| 5
| 36
| 20.4
| 0.908046
| 0
| 0
| 0
| 0
| 0
| 0.156863
| 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
|
014278787db5039dca6e7cb69ea2b8a2f3116bd7
| 52
|
py
|
Python
|
solve.py
|
GoRoadster/syslineq
|
329a2ffe6222fb4f90a558a423613c495bba877a
|
[
"MIT"
] | 4
|
2020-03-09T11:57:39.000Z
|
2021-03-28T09:16:19.000Z
|
solve.py
|
GoRoadster/syslineq
|
329a2ffe6222fb4f90a558a423613c495bba877a
|
[
"MIT"
] | null | null | null |
solve.py
|
GoRoadster/syslineq
|
329a2ffe6222fb4f90a558a423613c495bba877a
|
[
"MIT"
] | null | null | null |
if __name__ == "__main__":
print("Hello Gauss")
| 17.333333
| 26
| 0.634615
| 6
| 52
| 4.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.192308
| 52
| 2
| 27
| 26
| 0.595238
| 0
| 0
| 0
| 0
| 0
| 0.365385
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 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
|
0143828e58e602f5b664bf18854ffed9c65bc673
| 3,796
|
py
|
Python
|
Demo/tkinter/ttk/mac_searchentry.py
|
akruis/stackless_historic
|
f8af5dd49558f0ef046cf99dc5d34db2b9a90ce2
|
[
"PSF-2.0"
] | 1
|
2019-05-14T05:05:42.000Z
|
2019-05-14T05:05:42.000Z
|
Demo/tkinter/ttk/mac_searchentry.py
|
akruis/stackless_historic
|
f8af5dd49558f0ef046cf99dc5d34db2b9a90ce2
|
[
"PSF-2.0"
] | null | null | null |
Demo/tkinter/ttk/mac_searchentry.py
|
akruis/stackless_historic
|
f8af5dd49558f0ef046cf99dc5d34db2b9a90ce2
|
[
"PSF-2.0"
] | 2
|
2018-07-15T06:35:21.000Z
|
2019-05-14T05:05:31.000Z
|
"""Mac style search widget
Translated from Tcl code by Schelte Bron, http://wiki.tcl.tk/18188
"""
import Tkinter
import ttk
root = Tkinter.Tk()
data = """
R0lGODlhKgAaAOfnAFdZVllbWFpcWVtdWlxeW11fXF9hXmBiX2ZnZWhpZ2lraGxua25wbXJ0
cXR2c3V3dHZ4dXh6d3x+e31/fH6AfYSGg4eJhoiKh4qMiYuNio2PjHmUqnqVq3yXrZGTkJKU
kX+asJSWk32cuJWXlIGcs5aYlX6euZeZloOetZial4SftpqbmIWgt4GhvYahuIKivpudmYei
uYOjv5yem4ijuoSkwIWlwYmlu56gnYamwp+hnoenw4unvaCin4ioxJCnuZykrImpxZmlsoaq
zI2pv6KkoZGouoqqxpqms4erzaOloo6qwYurx5Kqu5untIiszqSmo5CrwoysyJeqtpOrvJyo
tZGsw42typSsvaaopZKtxJWtvp6qt4+uy6epppOuxZCvzKiqp5quuZSvxoyx06mrqJWwx42y
1JKxzpmwwaqsqZaxyI6z1ZqxwqutqpOzz4+01qyuq56yvpizypS00Jm0y5W10Zq1zJa20rCy
rpu3zqizwbGzr6C3yZy4z7K0saG4yp250LO1sqK5y5660Z+70qO7zKy4xaC806S8zba4taG9
1KW9zq66x6+7yLi6t6S/1rC8yrm7uLO8xLG9y7q8ubS9xabB2anB07K+zLW+xrO/za7CzrTA
zrjAyLXBz77BvbbC0K/G2LjD0bnE0rLK28TGw8bIxcLL07vP28HN28rMycvOyr/T38DU4cnR
2s/RztHT0NLU0cTY5MrW5MvX5dHX2c3Z59bY1dPb5Nbb3dLe7Nvd2t3f3NXh797g3d3j5dnl
9OPl4eTm4+Ln6tzo9uXn5Obo5eDp8efp5uHq8uXq7ejq5+nr6OPs9Ovu6unu8O3v6+vw8+7w
7ezx9O/x7vDy7/Hz8O/19/P18vT38/L3+fb49Pf59vX6/fj69/b7/vn7+Pr8+ff9//v9+vz/
+/7//P//////////////////////////////////////////////////////////////////
/////////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJZAD/ACwC
AAIAKAAWAAAI/gD/CRz4bwUGCg8eQFjIsGHDBw4iTLAQgqBFgisuePCiyJOpUyBDihRpypMi
Lx8qaLhIMIyGFZ5sAUsmjZrNmzhzWpO2DJgtTysqfGDpxoMbW8ekeQsXzty4p1CjRjUXrps3
asJsuclQ4uKKSbamMR3n1JzZs2jRkh1HzuxVXX8y4CDYAwqua+DInVrRwMGJU2kDp31KThy1
XGWGDlxhi1rTPAUICBBAoEAesoIzn6Vm68MKgVAUHftmzhOCBCtQwQKSoABgzZnJdSMmyIPA
FbCotdUQAIhNa9B6DPCAGbZac+SowVIMRVe4pwkA4GpqDlwuAAmMZx4nTtfnf1mO5JEDNy46
MHJkxQEDgKC49rPjwC0bqGaZuOoZAKjBPE4NgAzUvYcWOc0QZF91imAnCDHJ5JFAAJN0I2Ba
4iRDUC/gOEVNDwIUcEABCAgAAATUTIgWOMBYRFp80ghiAQIIVAAEAwJIYI2JZnUji0XSYAYO
NcsQA8wy0hCTwAASXGOiONFcxAtpTokTHznfiLMNMAkcAMuE43jDC0vLeGOWe2R5o4sn1LgH
GzkWsvTPMgEOaA433Ag4TjjMuDkQMNi0tZ12sqWoJ0HATMPNffAZZ6U0wLAyqJ62RGoLLrhI
aqmlpzwaEAAh+QQJZAD/ACwAAAAAKgAaAAAI/gD/CRw40JEhQoEC+fGjcOHCMRAjRkxDsKLF
f5YcAcID582ZjyBDJhmZZIjJIUySEDHiBMhFghrtdNnRAgSHmzhz6sTZQcSLITx+CHn5bxSk
Nz5MCMGy55CjTVCjbuJEtSrVQ3uwqDBRQwrFi476SHHxow8qXcemVbPGtm21t3CnTaP27Jgu
VHtuiIjBsuImQkRiiEEFTNo2cOTMKV7MuLE5cN68QUOGSgwKG1EqJqJDY8+rZt8UjxtNunTj
cY3DgZOWS46KIFgGjiI0ZIsqaqNNjWjgYMUpx8Adc3v2aosNMAI1DbqyI9WycOb4IAggQEAB
A3lQBxet/TG4cMpI/tHwYeSfIzxM0uTKNs7UgAQrYL1akaDA7+3bueVqY4NJlUhIcQLNYx8E
AIQ01mwjTQ8DeNAdfouNA8440GBCQxJY3MEGD6p4Y844CQCAizcSgpMLAAlAuJ03qOyQRBR3
nEHEK+BMGKIui4kDDAAIPKiiYuSYSMQQRCDCxhiziPMYBgDkEaEaAGQA3Y+MjUPOLFoMoUUh
cKxRC4ngeILiH8Qkk0cCAUzSDZWpzbLEE1EwggcYqWCj2DNADFDAAQUgIAAAEFDDJmPYqNJF
F1s4cscTmCDjDTjdSPOHBQggUAEQDAgggTWDPoYMJkFoUdRmddyyjWLeULMMMcAsIw0x4wkM
IME1g25zyxpHxFYUHmyIggw4H4ojITnfiLMNMAkcAAub4BQjihRdDGTJHmvc4Qo1wD6Imje6
eILbj+BQ4wqu5Q3ECSJ0FOKKMtv4mBg33Pw4zjbKuBIIE1xYpIkhdQQiyi7OtAucj6dt48wu
otQhBRa6VvSJIRwhIkotvgRTzMUYZ6xxMcj4QkspeKDxxRhEmUfIHWjAgQcijEDissuXvCyz
zH7Q8YQURxDhUsn/bCInR3AELfTQZBRt9BBJkCGFFVhMwTNBlnBCSCGEIJQQIAklZMXWRBAR
RRRWENHwRQEBADs="""
s1 = Tkinter.PhotoImage("search1", data=data, format="gif -index 0")
s2 = Tkinter.PhotoImage("search2", data=data, format="gif -index 1")
style = ttk.Style()
style.element_create("Search.field", "image", "search1",
("focus", "search2"), border=[22, 7, 14], sticky="ew")
style.layout("Search.entry", [
("Search.field", {"sticky": "nswe", "border": 1, "children":
[("Entry.padding", {"sticky": "nswe", "children":
[("Entry.textarea", {"sticky": "nswe"})]
})]
})]
)
style.configure("Search.entry", background="#b2b2b2")
root.configure(background="#b2b2b2")
e1 = ttk.Entry(style="Search.entry", width=20)
e2 = ttk.Entry(style="Search.entry", width=20)
e1.grid(padx=10, pady=10)
e2.grid(padx=10, pady=10)
root.mainloop()
| 48.050633
| 73
| 0.838251
| 216
| 3,796
| 14.726852
| 0.694444
| 0.013832
| 0.008802
| 0.010688
| 0.043383
| 0.019491
| 0.019491
| 0
| 0
| 0
| 0
| 0.118261
| 0.066649
| 3,796
| 78
| 74
| 48.666667
| 0.779565
| 0.023973
| 0
| 0.032258
| 0
| 0.016129
| 0.834254
| 0.755801
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.032258
| 0
| 0.032258
| 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
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
01440a75801903f97f52954c180b15e423249c56
| 59
|
py
|
Python
|
src/metrics/__init__.py
|
okunator/Dippa
|
dcbb7056511dd6f66bcc7b095716c385d0b0a8bb
|
[
"MIT"
] | 13
|
2021-01-25T07:47:03.000Z
|
2022-01-20T16:02:51.000Z
|
src/metrics/__init__.py
|
okunator/Dippa
|
dcbb7056511dd6f66bcc7b095716c385d0b0a8bb
|
[
"MIT"
] | 1
|
2022-02-12T15:03:23.000Z
|
2022-02-12T15:03:23.000Z
|
src/metrics/__init__.py
|
okunator/Dippa
|
dcbb7056511dd6f66bcc7b095716c385d0b0a8bb
|
[
"MIT"
] | null | null | null |
from .metrics import *
from .benchmarker import Benchmarker
| 29.5
| 36
| 0.830508
| 7
| 59
| 7
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118644
| 59
| 2
| 36
| 29.5
| 0.942308
| 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
|
015a9a3e1016f6146e9c0da0d769a69346ce8fbc
| 91
|
py
|
Python
|
profiles/__init__.py
|
0xa1ed/hpcscan
|
86884b40e5c76457b33f6e4fd28f7ca11873cab7
|
[
"MIT"
] | 2
|
2019-04-09T23:26:20.000Z
|
2019-04-10T02:39:44.000Z
|
profiles/__init__.py
|
0xa1ed/hpcscan
|
86884b40e5c76457b33f6e4fd28f7ca11873cab7
|
[
"MIT"
] | null | null | null |
profiles/__init__.py
|
0xa1ed/hpcscan
|
86884b40e5c76457b33f6e4fd28f7ca11873cab7
|
[
"MIT"
] | null | null | null |
__all__ = ['flashcache', 'mailvir', 'wfyd']
import flashcache
import mailvir
import wfyd
| 15.166667
| 44
| 0.736264
| 10
| 91
| 6.3
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 91
| 5
| 45
| 18.2
| 0.807692
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 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
|
017def8db0862557f24d7b25dc9164b5fba01430
| 3,834
|
py
|
Python
|
2019/04-angstromctf/cry-Paint/solve.py
|
wani-hackase/wani-writeup
|
dd4ad0607d2f2193ad94c1ce65359294aa591681
|
[
"MIT"
] | 25
|
2019-03-06T11:55:56.000Z
|
2021-05-21T22:07:14.000Z
|
2019/04-angstromctf/cry-Paint/solve.py
|
wani-hackase/wani-writeup
|
dd4ad0607d2f2193ad94c1ce65359294aa591681
|
[
"MIT"
] | 1
|
2020-06-25T07:27:15.000Z
|
2020-06-25T07:27:15.000Z
|
2019/04-angstromctf/cry-Paint/solve.py
|
wani-hackase/wani-writeup
|
dd4ad0607d2f2193ad94c1ce65359294aa591681
|
[
"MIT"
] | 1
|
2019-02-14T00:42:28.000Z
|
2019-02-14T00:42:28.000Z
|
import binascii
from Crypto.Util.number import inverse
# base ** secret = my_mix mod palette
class Solve:
def __init__(self):
self.palette = 2 ** 2048
self.base = 13489305024865487703110255658234329747698118206959778644688156332043783846078839120693894255527894489531905012244713117142764166452312133019772171674466933769775907460046497284522592167536594047800489828714315435570429416637425443402332599055774982796405757075108551322778712959943658831605397635195107786224617525627358659165255604556424206194207190437525742567525338826878962081515333896433312311548844614323540250054093970082337500580573165008440265840792908334486258260848163001490152587781983042546491301026074736907693887630347258892882871059741621049169714319440564952700454580681894452760215968494428411686329
self.my_mix = 6870295205307030503255600311283969014496436297715066273709495591567561187646528069669895230912327862244474990612611625088862250315706633708998214109152824455738719595737772769297517386968692628228327225922261219083693899105983726637012353264168761696183327692619506267951701511870035935612090359086376808592001973358166067468618577312983514388332736591060901174314042634365304017788649960016991442596975922402288221898367955532116456798868804571091463566329706023967280838744359633963847966790121312196824818606244189274966061324393424041211903396020720341163472399763951106703068172772579049891895580785347369093113
self.your_mix = 14317253516668543276504878316838097235650210449758621543536146016892160048656997634541093315774403078357942150970695487937570449270120625898199254439189104072891595263513437420116930684308702803055295267600790477195902538538739117809573391251939794413361184343367694928615752045687223262368136262534778688889202144260002584306527206705616186699377315031757095455954292951059462279988296369935635246644221722025457496936215039008069820514166063271894671978845634968761626636993374291118230179892722513818307254406450607168911057458141649111515924404215975886422961651958216688209696158879621701708955382424640000048217
self.painting = 17665922529512695488143524113273224470194093921285273353477875204196603230641896039854934719468650093602325707751566466034447988065494130102242572713515917910688574332104680867377750329904425039785453961697828887505197701127086732126907914324992806733394244034438537271953062873710421922341053639880387051921552573241651939698279628619278357238684137922164483956735128373164911380749908774512869223017256152942356111845682044048514917460601214157119487675633689081081818805777951203838578632029105960085810547586385599419736400861419214277678792284994133722491622512615732083564207280344459191773058670866354126043620
self.secret = [0]
# base ** n = 1 mod palette を見たす n を計算する
def get_order_of_base(self):
for n in range(2049):
if pow(self.base, 2 ** n, 2 ** 2048) == 1:
self.order_of_base = 2 ** n
self.p = 2
self.e = n
break
def get_pohlig_hellman(self):
self.get_order_of_base()
gamma = pow(self.base, self.p ** (self.e - 1), self.palette)
for k in range(self.e):
item = pow(inverse(self.base, self.palette), self.secret[k], self.palette) * self.my_mix % self.palette
h_k = pow(item, pow(self.p, self.e - 1 - k), self.palette)
d_k = 1 if gamma == h_k else 0
self.secret.append(self.secret[k] + self.p ** k * d_k)
return self.secret[-1]
def get_flag(self):
secret = self.get_pohlig_hellman()
shared_mix = pow(self.your_mix, secret, self.palette)
image = self.painting ^ shared_mix
return binascii.unhexlify(hex(image)[2:])
if __name__ == '__main__':
solve = Solve()
print(solve.get_flag())
| 85.2
| 641
| 0.842462
| 200
| 3,834
| 15.965
| 0.305
| 0.024115
| 0.010335
| 0.008769
| 0.00689
| 0
| 0
| 0
| 0
| 0
| 0
| 0.733667
| 0.113719
| 3,834
| 44
| 642
| 87.136364
| 0.206004
| 0.019301
| 0
| 0
| 0
| 0
| 0.002129
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0.117647
| false
| 0
| 0.058824
| 0
| 0.264706
| 0.029412
| 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
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
01804aca4bfd1ef952175f6c9b27e4962a99dad9
| 24
|
py
|
Python
|
src/dpmmlearn/__version__.py
|
ground0state/dpmmlearn
|
c602082586fba4e8b3163a694c9c32f44d6dd01c
|
[
"BSD-2-Clause",
"MIT"
] | null | null | null |
src/dpmmlearn/__version__.py
|
ground0state/dpmmlearn
|
c602082586fba4e8b3163a694c9c32f44d6dd01c
|
[
"BSD-2-Clause",
"MIT"
] | null | null | null |
src/dpmmlearn/__version__.py
|
ground0state/dpmmlearn
|
c602082586fba4e8b3163a694c9c32f44d6dd01c
|
[
"BSD-2-Clause",
"MIT"
] | null | null | null |
__version__ = '0.0.1b1'
| 12
| 23
| 0.666667
| 4
| 24
| 3
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.190476
| 0.125
| 24
| 1
| 24
| 24
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0.291667
| 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
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0181f808a907724317a24fb7a5b7b97dd9ed14eb
| 55
|
py
|
Python
|
ExampleBuilders/FeatureBuilders/__init__.py
|
rothadamg/UPSITE
|
80cce9c9dfc097bb5aaecb0a0975e6a49fdf184c
|
[
"MIT"
] | 1
|
2020-05-09T19:23:35.000Z
|
2020-05-09T19:23:35.000Z
|
tees/ExampleBuilders/FeatureBuilders/__init__.py
|
sbnlp/2017BioNLPEvaluation
|
79c4a556fe48a204c95fdc0ee388d1bd9829e515
|
[
"MIT"
] | 10
|
2015-09-18T11:45:40.000Z
|
2015-10-29T18:16:41.000Z
|
tees/ExampleBuilders/FeatureBuilders/__init__.py
|
sbnlp/2017BioNLPEvaluation
|
79c4a556fe48a204c95fdc0ee388d1bd9829e515
|
[
"MIT"
] | 1
|
2018-12-21T04:12:59.000Z
|
2018-12-21T04:12:59.000Z
|
"""
Provide methods used by several ExampleBuilders
"""
| 18.333333
| 47
| 0.763636
| 6
| 55
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127273
| 55
| 3
| 48
| 18.333333
| 0.875
| 0.854545
| 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
|
6d6a2d66b57bd86f36fead347e81a89a1e95eac9
| 87
|
py
|
Python
|
yAdmin/apps.py
|
yuanxiaotian666/djmanage
|
2210409ecba934c6dfb827bbe7cf147bd6225a4f
|
[
"MIT"
] | 1
|
2021-01-07T07:25:46.000Z
|
2021-01-07T07:25:46.000Z
|
yAdmin/apps.py
|
yuanxiaotian666/djmanage
|
2210409ecba934c6dfb827bbe7cf147bd6225a4f
|
[
"MIT"
] | 11
|
2021-04-06T18:26:43.000Z
|
2022-03-12T00:53:10.000Z
|
yAdmin/apps.py
|
yuanxiaotian666/djmanage
|
2210409ecba934c6dfb827bbe7cf147bd6225a4f
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class YadminConfig(AppConfig):
name = 'yAdmin'
| 14.5
| 33
| 0.747126
| 10
| 87
| 6.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172414
| 87
| 5
| 34
| 17.4
| 0.902778
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 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
|
6d784eb007ae97e06badd7c6231e2fb01b6dc8c0
| 216
|
py
|
Python
|
live_recorder/you_live/_recorder.py
|
xiangruhuang/LiveRecorder
|
46baffaea18dd3ef097e251a10834c5790465d83
|
[
"MIT"
] | 146
|
2020-01-19T03:10:40.000Z
|
2022-03-27T18:44:56.000Z
|
live_recorder/you_live/_recorder.py
|
xiangruhuang/LiveRecorder
|
46baffaea18dd3ef097e251a10834c5790465d83
|
[
"MIT"
] | 12
|
2020-02-05T08:29:42.000Z
|
2022-02-21T14:01:58.000Z
|
live_recorder/you_live/_recorder.py
|
xiangruhuang/LiveRecorder
|
46baffaea18dd3ef097e251a10834c5790465d83
|
[
"MIT"
] | 20
|
2020-06-07T09:52:12.000Z
|
2022-03-18T09:49:28.000Z
|
# coding=utf-8
from ._base_recorder import recorders
def createRecorder(liver, short_id, **args):
if liver in recorders:
return recorders[liver](short_id, **args)
else:
return None
| 21.6
| 50
| 0.652778
| 27
| 216
| 5.074074
| 0.703704
| 0.145985
| 0.175182
| 0.233577
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006211
| 0.25463
| 216
| 9
| 51
| 24
| 0.844721
| 0.055556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.166667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
6db5b5a730a069cc07b79f71d7119732f699dae5
| 25
|
py
|
Python
|
tests/__init__.py
|
maxwolfe/autocsr
|
6c8295c0796f597c8780658de1570f9951b3d846
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
maxwolfe/autocsr
|
6c8295c0796f597c8780658de1570f9951b3d846
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
maxwolfe/autocsr
|
6c8295c0796f597c8780658de1570f9951b3d846
|
[
"MIT"
] | null | null | null |
"""Tests for autocsr."""
| 12.5
| 24
| 0.6
| 3
| 25
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 25
| 1
| 25
| 25
| 0.681818
| 0.72
| 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
|
6db60abbee6605f2e1067d39225d26409f975915
| 750
|
py
|
Python
|
tests/test_types.py
|
lorien/test-server
|
0f86e97b638506560110755b5ef73ceea261891f
|
[
"MIT"
] | null | null | null |
tests/test_types.py
|
lorien/test-server
|
0f86e97b638506560110755b5ef73ceea261891f
|
[
"MIT"
] | null | null | null |
tests/test_types.py
|
lorien/test-server
|
0f86e97b638506560110755b5ef73ceea261891f
|
[
"MIT"
] | null | null | null |
from typing import Mapping, MutableMapping, Dict
def test_dict():
box = {}
assert isinstance(box, Mapping)
assert isinstance(box, MutableMapping)
assert isinstance(box, Dict)
assert isinstance(box, dict)
def test_mapping_instance():
class Box(MutableMapping): # pragma: no cover
def __delitem__(self, key):
pass
def __getitem__(self, key):
pass
def __setitem__(self, key, val):
pass
def __iter__(self):
return iter([])
def __len__(self):
return 0
box = Box()
assert isinstance(box, Mapping)
assert isinstance(box, MutableMapping)
assert not isinstance(box, Dict)
assert not isinstance(box, dict)
| 22.058824
| 50
| 0.614667
| 82
| 750
| 5.341463
| 0.341463
| 0.237443
| 0.260274
| 0.100457
| 0.415525
| 0.310502
| 0.310502
| 0.310502
| 0.310502
| 0.310502
| 0
| 0.001898
| 0.297333
| 750
| 33
| 51
| 22.727273
| 0.829222
| 0.021333
| 0
| 0.291667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.291667
| false
| 0.125
| 0.041667
| 0.083333
| 0.458333
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
6de0057a45643b580dea1d64e086c7305e69f81a
| 132
|
py
|
Python
|
app_collaborative_sci_workflow/pipeline_modules/Source_Load_Dataset/NiCAD_GET_Data_settings.py
|
pseudoPixels/SourceFlow
|
e1738c8b838c71b18598ceca29d7c487c76f876b
|
[
"MIT"
] | null | null | null |
app_collaborative_sci_workflow/pipeline_modules/Source_Load_Dataset/NiCAD_GET_Data_settings.py
|
pseudoPixels/SourceFlow
|
e1738c8b838c71b18598ceca29d7c487c76f876b
|
[
"MIT"
] | null | null | null |
app_collaborative_sci_workflow/pipeline_modules/Source_Load_Dataset/NiCAD_GET_Data_settings.py
|
pseudoPixels/SourceFlow
|
e1738c8b838c71b18598ceca29d7c487c76f876b
|
[
"MIT"
] | null | null | null |
user_input = 0.0
output_destination= '/home/ubuntu/Webpage/app_collaborative_sci_workflow/workflow_outputs/test_workflow/Module_1'
| 33
| 113
| 0.863636
| 19
| 132
| 5.578947
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02381
| 0.045455
| 132
| 4
| 113
| 33
| 0.81746
| 0
| 0
| 0
| 0
| 0
| 0.694656
| 0.694656
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0966a680e3bd114066a13fe84fa38afca93f27a9
| 470
|
py
|
Python
|
rastervision/v2/rv/evaluation/evaluation_item.py
|
carderne/raster-vision
|
915fbcd3263d8f2193e65c2cd0eb53e050a47a01
|
[
"Apache-2.0"
] | 1,577
|
2017-05-22T14:22:00.000Z
|
2022-03-31T02:03:25.000Z
|
rastervision/v2/rv/evaluation/evaluation_item.py
|
carderne/raster-vision
|
915fbcd3263d8f2193e65c2cd0eb53e050a47a01
|
[
"Apache-2.0"
] | 933
|
2017-05-09T20:25:02.000Z
|
2022-03-31T10:22:59.000Z
|
rastervision_core/rastervision/core/evaluation/evaluation_item.py
|
monocilindro/raster-vision
|
fc181a6f31f085affa1ee12f0204bdbc5a6bf85a
|
[
"Apache-2.0"
] | 336
|
2017-05-15T16:30:44.000Z
|
2022-03-28T06:19:33.000Z
|
from abc import (ABC, abstractmethod)
class EvaluationItem(ABC):
@abstractmethod
def merge(self, other):
"""Merges another item from a different scene into this one.
This is used to average metrics over scenes. Merges by taking a
weighted average (by gt_count) of the metrics.
"""
pass
@abstractmethod
def to_json(self):
return self.__dict__
def __repr__(self):
return str(self.to_json())
| 23.5
| 71
| 0.644681
| 60
| 470
| 4.866667
| 0.65
| 0.116438
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.280851
| 470
| 19
| 72
| 24.736842
| 0.863905
| 0.359574
| 0
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0.1
| 0.1
| 0.2
| 0.7
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
09ab2be2eab98be9542cbb2ca86c2507a82873a1
| 572
|
py
|
Python
|
reamber/quaver/lists/QuaSvList.py
|
Bestfast/reamberPy
|
91b76ca6adf11fbe8b7cee7c186481776a4d7aaa
|
[
"MIT"
] | null | null | null |
reamber/quaver/lists/QuaSvList.py
|
Bestfast/reamberPy
|
91b76ca6adf11fbe8b7cee7c186481776a4d7aaa
|
[
"MIT"
] | null | null | null |
reamber/quaver/lists/QuaSvList.py
|
Bestfast/reamberPy
|
91b76ca6adf11fbe8b7cee7c186481776a4d7aaa
|
[
"MIT"
] | null | null | null |
from __future__ import annotations
from typing import List
from reamber.base.lists.TimedList import TimedList
from reamber.quaver.QuaSv import QuaSv
class QuaSvList(List[QuaSv], TimedList):
def _upcast(self, objList: List = None) -> QuaSvList:
""" This is to facilitate inherited functions to work
:param objList: The List to cast
:rtype: QuaSvList
"""
return QuaSvList(objList)
def data(self) -> List[QuaSv]:
return self
def multipliers(self) -> List[float]:
return self.attribute('multiplier')
| 23.833333
| 61
| 0.676573
| 68
| 572
| 5.617647
| 0.529412
| 0.057592
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.236014
| 572
| 23
| 62
| 24.869565
| 0.874142
| 0.176573
| 0
| 0
| 0
| 0
| 0.022779
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0.363636
| 0.181818
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
09d84bf29c2e6f0c81d2e05c27393726f91f5fd5
| 66
|
py
|
Python
|
open_connect/connect_core/__init__.py
|
lpatmo/actionify_the_news
|
998d8ca6b35d0ef1b16efca70f50e59503f5a62d
|
[
"MIT"
] | 66
|
2015-11-30T20:35:38.000Z
|
2019-06-12T17:40:32.000Z
|
open_connect/connect_core/__init__.py
|
lpatmo/actionify_the_news
|
998d8ca6b35d0ef1b16efca70f50e59503f5a62d
|
[
"MIT"
] | 18
|
2015-11-30T22:03:05.000Z
|
2019-07-02T00:50:29.000Z
|
open_connect/connect_core/__init__.py
|
lpatmo/actionify_the_news
|
998d8ca6b35d0ef1b16efca70f50e59503f5a62d
|
[
"MIT"
] | 11
|
2015-11-30T20:56:01.000Z
|
2019-07-01T17:06:09.000Z
|
"""
Connect Core App
Contains "Base" Template & Static Assets
"""
| 13.2
| 40
| 0.69697
| 8
| 66
| 5.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 66
| 4
| 41
| 16.5
| 0.836364
| 0.863636
| 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
|
09f09d2a801f0138bfc3973c0cf41d7ce2f0ecb0
| 98
|
py
|
Python
|
ran-django-template/apps/mysensing/apps.py
|
nature1995/Face-Recognition-System
|
cab48c6ce853edaa3e5d15d630525c568d613c65
|
[
"MIT"
] | 48
|
2019-01-17T09:37:08.000Z
|
2022-03-20T10:19:57.000Z
|
ran-django-template/apps/mysensing/apps.py
|
tspannhw/Face-Recognition-System
|
9c3e795f04e9c8a95003d453f8417a5b7650bab0
|
[
"MIT"
] | 1
|
2020-06-01T23:27:48.000Z
|
2020-06-02T13:46:53.000Z
|
ran-django-template/apps/mysensing/apps.py
|
tspannhw/Face-Recognition-System
|
9c3e795f04e9c8a95003d453f8417a5b7650bab0
|
[
"MIT"
] | 13
|
2019-01-28T17:00:25.000Z
|
2021-06-16T05:02:50.000Z
|
from django.apps import AppConfig
class MysensingConfig(AppConfig):
name = 'apps.mysensing'
| 16.333333
| 33
| 0.765306
| 11
| 98
| 6.818182
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153061
| 98
| 5
| 34
| 19.6
| 0.903614
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 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
|
09f422e32ccd354ff7d269fa236775a8780d6b96
| 179
|
py
|
Python
|
src/yellowdog_client/model/add_user_request.py
|
yellowdog/yellowdog-sdk-python-public
|
da69a7d6e45c92933e34fefcaef8b5d98dcd6036
|
[
"Apache-2.0"
] | null | null | null |
src/yellowdog_client/model/add_user_request.py
|
yellowdog/yellowdog-sdk-python-public
|
da69a7d6e45c92933e34fefcaef8b5d98dcd6036
|
[
"Apache-2.0"
] | null | null | null |
src/yellowdog_client/model/add_user_request.py
|
yellowdog/yellowdog-sdk-python-public
|
da69a7d6e45c92933e34fefcaef8b5d98dcd6036
|
[
"Apache-2.0"
] | null | null | null |
from dataclasses import dataclass
from typing import Optional
@dataclass
class AddUserRequest:
username: str
name: str
password: str
email: Optional[str] = None
| 16.272727
| 33
| 0.731844
| 21
| 179
| 6.238095
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.217877
| 179
| 10
| 34
| 17.9
| 0.935714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.125
| 0.25
| 0
| 0.875
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
61d18deaef7b0d25f76d8473412a5a540514aedc
| 56
|
py
|
Python
|
src/bioregistry/data/__init__.py
|
Adafede/bioregistry
|
9b6a281354554005d985499f9d61aecb58a0a84c
|
[
"MIT"
] | 17
|
2021-09-14T17:58:16.000Z
|
2022-03-11T06:22:11.000Z
|
src/bioregistry/data/__init__.py
|
Adafede/bioregistry
|
9b6a281354554005d985499f9d61aecb58a0a84c
|
[
"MIT"
] | 148
|
2021-09-18T08:52:46.000Z
|
2022-03-23T15:57:35.000Z
|
src/bioregistry/data/__init__.py
|
Adafede/bioregistry
|
9b6a281354554005d985499f9d61aecb58a0a84c
|
[
"MIT"
] | 9
|
2021-09-28T20:18:53.000Z
|
2022-03-14T17:23:35.000Z
|
# -*- coding: utf-8 -*-
"""Data in the bioregistry."""
| 14
| 30
| 0.535714
| 7
| 56
| 4.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021739
| 0.178571
| 56
| 3
| 31
| 18.666667
| 0.630435
| 0.839286
| 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
|
11151f74676870ba032bbc898142a8d9a916bf87
| 465
|
py
|
Python
|
structural/bridge/logic/archetypes/archetype.py
|
Kozak24/Patterns
|
351d5c11f7c64ce5d58db37b6715fc8f7d31945a
|
[
"MIT"
] | null | null | null |
structural/bridge/logic/archetypes/archetype.py
|
Kozak24/Patterns
|
351d5c11f7c64ce5d58db37b6715fc8f7d31945a
|
[
"MIT"
] | null | null | null |
structural/bridge/logic/archetypes/archetype.py
|
Kozak24/Patterns
|
351d5c11f7c64ce5d58db37b6715fc8f7d31945a
|
[
"MIT"
] | null | null | null |
from abc import ABC, abstractmethod
class Archetype(ABC):
_ARCHETYPE = None
def __init__(self, weapon: str) -> None:
self.weapon = weapon
@abstractmethod
def attack(self) -> None:
pass
@property
def weapon(self) -> str:
return self._weapon
@weapon.setter
def weapon(self, weapon: str) -> None:
self._weapon = weapon
def __str__(self) -> str:
return f"Archetype '{self._ARCHETYPE}'"
| 19.375
| 47
| 0.608602
| 53
| 465
| 5.113208
| 0.339623
| 0.184502
| 0.177122
| 0.125461
| 0.243542
| 0.243542
| 0.243542
| 0
| 0
| 0
| 0
| 0
| 0.283871
| 465
| 23
| 48
| 20.217391
| 0.813814
| 0
| 0
| 0
| 0
| 0
| 0.062366
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3125
| false
| 0.0625
| 0.0625
| 0.125
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
111e699f2078a670a6138a57ca2e05881568a51a
| 36
|
py
|
Python
|
sncore.py
|
fxnn/standardnotes-tools
|
6267d2a19a68f233eeee8cf573f2f812abef06e4
|
[
"MIT"
] | null | null | null |
sncore.py
|
fxnn/standardnotes-tools
|
6267d2a19a68f233eeee8cf573f2f812abef06e4
|
[
"MIT"
] | null | null | null |
sncore.py
|
fxnn/standardnotes-tools
|
6267d2a19a68f233eeee8cf573f2f812abef06e4
|
[
"MIT"
] | null | null | null |
FXNN_APP_ID="de.fxnn.standardnotes"
| 18
| 35
| 0.833333
| 6
| 36
| 4.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027778
| 36
| 1
| 36
| 36
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.583333
| 0.583333
| 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
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
112febf566d550ba7c292e56fbc7595c3b8ec16d
| 278
|
py
|
Python
|
acquisition/tomviz/utility/__init__.py
|
sankhesh/tomviz
|
7116f4eb75b30534a24462f4ddfb1694fe41c308
|
[
"BSD-3-Clause"
] | 284
|
2015-01-05T08:53:20.000Z
|
2022-03-31T07:35:16.000Z
|
acquisition/tomviz/utility/__init__.py
|
sankhesh/tomviz
|
7116f4eb75b30534a24462f4ddfb1694fe41c308
|
[
"BSD-3-Clause"
] | 1,579
|
2015-03-19T15:56:44.000Z
|
2022-03-21T11:29:04.000Z
|
acquisition/tomviz/utility/__init__.py
|
sankhesh/tomviz
|
7116f4eb75b30534a24462f4ddfb1694fe41c308
|
[
"BSD-3-Clause"
] | 74
|
2015-01-29T16:24:32.000Z
|
2022-03-07T21:52:29.000Z
|
import functools
class inject(object):
def __init__(self, param):
self._param = param
def __call__(self, func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
return func(self._param, *args, **kwargs)
return wrapper
| 19.857143
| 53
| 0.600719
| 31
| 278
| 5.064516
| 0.516129
| 0.171975
| 0.203822
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.284173
| 278
| 13
| 54
| 21.384615
| 0.788945
| 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 | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
11390f7a50926da3f78a924ba517273141da5136
| 133
|
py
|
Python
|
src/common/models/instruction.py
|
wenksi/pren-robo-cube-ipcv
|
e2cf655a7e33aa63dae6e2b2a91abaa11d587f8f
|
[
"MIT"
] | null | null | null |
src/common/models/instruction.py
|
wenksi/pren-robo-cube-ipcv
|
e2cf655a7e33aa63dae6e2b2a91abaa11d587f8f
|
[
"MIT"
] | null | null | null |
src/common/models/instruction.py
|
wenksi/pren-robo-cube-ipcv
|
e2cf655a7e33aa63dae6e2b2a91abaa11d587f8f
|
[
"MIT"
] | null | null | null |
class Instruction:
def __init__(self, direction, distance):
self.direction = direction
self.distance = distance
| 22.166667
| 44
| 0.676692
| 13
| 133
| 6.615385
| 0.538462
| 0.302326
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.24812
| 133
| 5
| 45
| 26.6
| 0.86
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
feeaec66e77ccfe53e58badd9a253a3e1f24fd74
| 187
|
py
|
Python
|
tests/__init__.py
|
awintel/lava-dl
|
53bc4f968aa135b8c15858758b4f71607bf114b6
|
[
"BSD-3-Clause"
] | null | null | null |
tests/__init__.py
|
awintel/lava-dl
|
53bc4f968aa135b8c15858758b4f71607bf114b6
|
[
"BSD-3-Clause"
] | null | null | null |
tests/__init__.py
|
awintel/lava-dl
|
53bc4f968aa135b8c15858758b4f71607bf114b6
|
[
"BSD-3-Clause"
] | null | null | null |
try:
__import__('pkg_resources').declare_namespace(__name__)
except: # noqa E722
print('Error')
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
| 31.166667
| 59
| 0.737968
| 22
| 187
| 5.181818
| 0.727273
| 0.175439
| 0.245614
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019231
| 0.165775
| 187
| 6
| 60
| 31.166667
| 0.711538
| 0.048128
| 0
| 0
| 0
| 0
| 0.101695
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.166667
| 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
|
fefa9bdcef6e686825462619220cfa672a340b2d
| 383
|
py
|
Python
|
gym_rock_paper_scissors/fixed_agents/__init__.py
|
kyuhyoung/gym-rock-paper-scissors
|
f527c9f0835193008f04575bca1b63a815c44c8a
|
[
"MIT"
] | 5
|
2020-02-17T16:29:22.000Z
|
2022-01-24T15:42:49.000Z
|
gym_rock_paper_scissors/fixed_agents/__init__.py
|
kyuhyoung/gym-rock-paper-scissors
|
f527c9f0835193008f04575bca1b63a815c44c8a
|
[
"MIT"
] | 1
|
2019-01-15T16:09:36.000Z
|
2019-01-15T16:09:36.000Z
|
gym_rock_paper_scissors/fixed_agents/__init__.py
|
kyuhyoung/gym-rock-paper-scissors
|
f527c9f0835193008f04575bca1b63a815c44c8a
|
[
"MIT"
] | 3
|
2019-01-09T09:44:54.000Z
|
2021-09-06T01:04:25.000Z
|
from .mixed_strategy_agent import MixedStrategyAgent
rockAgent = MixedStrategyAgent(support_vector=[1, 0, 0], name='RockAgent')
paperAgent = MixedStrategyAgent(support_vector=[0, 1, 0], name='PaperAgent')
scissorsAgent = MixedStrategyAgent(support_vector=[0, 0, 1], name='ScissorsAgent')
randomAgent = MixedStrategyAgent(support_vector=[1/3, 1/3, 1/3], name='RandomAgent')
| 54.714286
| 86
| 0.765013
| 45
| 383
| 6.377778
| 0.355556
| 0.348432
| 0.432056
| 0.222997
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 0.099217
| 383
| 6
| 87
| 63.833333
| 0.788406
| 0
| 0
| 0
| 0
| 0
| 0.112272
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3a04332cd9b87ad588309517268b11733dd02d89
| 38
|
py
|
Python
|
src/consts.py
|
ggmorais/gip
|
2a87bfce8b015f8fbbef909edd95772a82c7b609
|
[
"MIT"
] | null | null | null |
src/consts.py
|
ggmorais/gip
|
2a87bfce8b015f8fbbef909edd95772a82c7b609
|
[
"MIT"
] | null | null | null |
src/consts.py
|
ggmorais/gip
|
2a87bfce8b015f8fbbef909edd95772a82c7b609
|
[
"MIT"
] | null | null | null |
CONFIG_FILE = '/tmp/tmp_gipconf.json'
| 19
| 37
| 0.763158
| 6
| 38
| 4.5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078947
| 38
| 1
| 38
| 38
| 0.771429
| 0
| 0
| 0
| 0
| 0
| 0.552632
| 0.552632
| 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
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3a077d7028a0d1cb98603006e1504c32e06c3b11
| 96
|
py
|
Python
|
app/core/wallet/balance.py
|
temojudo/BitcoinWallet
|
5a7fda9d5051d0e448e385856ed6a23cf60324c0
|
[
"MIT"
] | null | null | null |
app/core/wallet/balance.py
|
temojudo/BitcoinWallet
|
5a7fda9d5051d0e448e385856ed6a23cf60324c0
|
[
"MIT"
] | null | null | null |
app/core/wallet/balance.py
|
temojudo/BitcoinWallet
|
5a7fda9d5051d0e448e385856ed6a23cf60324c0
|
[
"MIT"
] | null | null | null |
from dataclasses import dataclass
@dataclass
class Balance:
btc: float
# satoshi: int
| 12
| 33
| 0.71875
| 11
| 96
| 6.272727
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.229167
| 96
| 7
| 34
| 13.714286
| 0.932432
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 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
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
3a37ae4bad1e0d8cb310001a0a8bbae52f1e433f
| 6,269
|
py
|
Python
|
SNCPython/SensorDrivers/SensorRecords.py
|
rt-ispace/SNC
|
890acbbe336bb0429f47fa7bed499a46215aac64
|
[
"MIT"
] | 1
|
2021-08-08T05:40:52.000Z
|
2021-08-08T05:40:52.000Z
|
SNCPython/SensorDrivers/SensorRecords.py
|
rt-ispace/SNC
|
890acbbe336bb0429f47fa7bed499a46215aac64
|
[
"MIT"
] | null | null | null |
SNCPython/SensorDrivers/SensorRecords.py
|
rt-ispace/SNC
|
890acbbe336bb0429f47fa7bed499a46215aac64
|
[
"MIT"
] | 1
|
2021-08-08T05:40:56.000Z
|
2021-08-08T05:40:56.000Z
|
#!/usr/bin/python
'''
This file is part of SNC
Copyright (c) 2014-2021, Richard Barnett
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
'''
import json
import SensorJSON
import SensorRecordInstance
# global defines
SENSOR_RECORD_TIME_INTERVAL = 1.0 # everything is unified to this interval (in seconds)
SENSOR_RECORD_LENGTH = 600 # number of time intervals (default 10 mins of data)
# the sensor record array indices
SENSOR_RECORD_ACCEL_X = 0
SENSOR_RECORD_ACCEL_Y = 1
SENSOR_RECORD_ACCEL_Z = 2
SENSOR_RECORD_LIGHT = 3
SENSOR_RECORD_TEMPERATURE = 4
SENSOR_RECORD_PRESSURE = 5
SENSOR_RECORD_HUMIDITY = 6
SENSOR_RECORD_COUNT = 7
class SensorRecords():
''' Sensor model used by viewers '''
def __init__(self, serviceName, servicePort):
# the sensor instance vars
self.sensorRecords = []
for i in range (0, SENSOR_RECORD_COUNT):
self.sensorRecords.append(SensorRecordInstance.SensorRecordInstance(SENSOR_RECORD_LENGTH,
SENSOR_RECORD_TIME_INTERVAL))
# these vars used to identify the SyntroNet connection
self.serviceName = serviceName
self.servicePort = servicePort
def newJSONData(self, data):
''' adds a sensor JSON record to the record '''
# decode the JSON record
sensorDict = json.loads(data)
newTimestamp = sensorDict.get(SensorJSON.TIMESTAMP)
newAccelData = sensorDict.get(SensorJSON.ACCEL_DATA)
newLightData = sensorDict.get(SensorJSON.LIGHT_DATA)
newTemperatureData = sensorDict.get(SensorJSON.TEMPERATURE_DATA)
newPressureData = sensorDict.get(SensorJSON.PRESSURE_DATA)
newHumidityData = sensorDict.get(SensorJSON.HUMIDITY_DATA)
if (newTimestamp == None):
print ("Received JSON record without timestamp")
return
# now update instances
if (newAccelData != None):
self.sensorRecords[SENSOR_RECORD_ACCEL_X].addData(newTimestamp, newAccelData[0])
self.sensorRecords[SENSOR_RECORD_ACCEL_Y].addData(newTimestamp, newAccelData[1])
self.sensorRecords[SENSOR_RECORD_ACCEL_Z].addData(newTimestamp, newAccelData[2])
if (newLightData != None):
self.sensorRecords[SENSOR_RECORD_LIGHT].addData(newTimestamp, newLightData)
if (newTemperatureData != None):
self.sensorRecords[SENSOR_RECORD_TEMPERATURE].addData(newTimestamp, newTemperatureData)
if (newPressureData != None):
self.sensorRecords[SENSOR_RECORD_PRESSURE].addData(newTimestamp, newPressureData)
if (newHumidityData != None):
self.sensorRecords[SENSOR_RECORD_HUMIDITY].addData(newTimestamp, newHumidityData)
def getServiceName(self):
return self.serviceName
# data validity functions
def getAccelValid(self):
return self.sensorRecords[SENSOR_RECORD_ACCEL_X].getDataValid()
def getLightValid(self):
return self.sensorRecords[SENSOR_RECORD_LIGHT].getDataValid()
def getTemperatureValid(self):
return self.sensorRecords[SENSOR_RECORD_TEMPERATURE].getDataValid()
def getPressureValid(self):
return self.sensorRecords[SENSOR_RECORD_PRESSURE].getDataValid()
def getHumidityValid(self):
return self.sensorRecords[SENSOR_RECORD_HUMIDITY].getDataValid()
# accumulated data access function
def getAccelDataX(self):
return self.sensorRecords[SENSOR_RECORD_ACCEL_X].getData()
def getAccelDataY(self):
return self.sensorRecords[SENSOR_RECORD_ACCEL_Y].getData()
def getAccelDataZ(self):
return self.sensorRecords[SENSOR_RECORD_ACCEL_Z].getData()
def getLightData(self):
return self.sensorRecords[SENSOR_RECORD_LIGHT].getData()
def getTemperatureData(self):
return self.sensorRecords[SENSOR_RECORD_TEMPERATURE].getData()
def getPressureData(self):
return self.sensorRecords[SENSOR_RECORD_PRESSURE].getData()
def getHumidityData(self):
return self.sensorRecords[SENSOR_RECORD_HUMIDITY].getData()
# current data access function
def getCurrentAccelDataX(self):
return self.sensorRecords[SENSOR_RECORD_ACCEL_X].getCurrentData()
def getCurrentAccelDataY(self):
return self.sensorRecords[SENSOR_RECORD_ACCEL_Y].getCurrentData()
def getCurrentAccelDataZ(self):
return self.sensorRecords[SENSOR_RECORD_ACCEL_Z].getCurrentData()
def getCurrentLightData(self):
return self.sensorRecords[SENSOR_RECORD_LIGHT].getCurrentData()
def getCurrentTemperatureData(self):
return self.sensorRecords[SENSOR_RECORD_TEMPERATURE].getCurrentData()
def getCurrentPressureData(self):
return self.sensorRecords[SENSOR_RECORD_PRESSURE].getCurrentData()
def getCurrentHumidityData(self):
return self.sensorRecords[SENSOR_RECORD_HUMIDITY].getCurrentData()
| 37.094675
| 113
| 0.69405
| 664
| 6,269
| 6.399096
| 0.319277
| 0.112968
| 0.140739
| 0.177454
| 0.271123
| 0.231584
| 0.206872
| 0.074135
| 0
| 0
| 0
| 0.005664
| 0.239592
| 6,269
| 168
| 114
| 37.315476
| 0.885672
| 0.245015
| 0
| 0
| 0
| 0
| 0.008141
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.261905
| false
| 0
| 0.035714
| 0.238095
| 0.559524
| 0.011905
| 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
|
28a51a0666a4eb6b8f890838516ba4d3a7af4c71
| 28,130
|
py
|
Python
|
cardboard/cards/sets/nemesis.py
|
Julian/cardboard
|
6ab676d04b38bf9b0d0c4a849364159947b8ea7f
|
[
"MIT"
] | 5
|
2015-03-23T10:25:40.000Z
|
2021-05-29T06:00:40.000Z
|
cardboard/cards/sets/nemesis.py
|
Julian/cardboard
|
6ab676d04b38bf9b0d0c4a849364159947b8ea7f
|
[
"MIT"
] | null | null | null |
cardboard/cards/sets/nemesis.py
|
Julian/cardboard
|
6ab676d04b38bf9b0d0c4a849364159947b8ea7f
|
[
"MIT"
] | 1
|
2019-02-17T14:45:29.000Z
|
2019-02-17T14:45:29.000Z
|
from cardboard import types
from cardboard.ability import (
AbilityNotImplemented, spell, activated, triggered, static
)
from cardboard.cards import card, common, keywords, match
@card("Belbe's Portal")
def belbes_portal(card, abilities):
def belbes_portal():
return AbilityNotImplemented
def belbes_portal():
return AbilityNotImplemented
return belbes_portal, belbes_portal,
@card("Silkenfist Fighter")
def silkenfist_fighter(card, abilities):
def silkenfist_fighter():
return AbilityNotImplemented
return silkenfist_fighter,
@card("Ascendant Evincar")
def ascendant_evincar(card, abilities):
def ascendant_evincar():
return AbilityNotImplemented
def ascendant_evincar():
return AbilityNotImplemented
def ascendant_evincar():
return AbilityNotImplemented
return ascendant_evincar, ascendant_evincar, ascendant_evincar,
@card("Angelic Favor")
def angelic_favor(card, abilities):
def angelic_favor():
return AbilityNotImplemented
def angelic_favor():
return AbilityNotImplemented
def angelic_favor():
return AbilityNotImplemented
return angelic_favor, angelic_favor, angelic_favor,
@card("Mogg Alarm")
def mogg_alarm(card, abilities):
def mogg_alarm():
return AbilityNotImplemented
def mogg_alarm():
return AbilityNotImplemented
return mogg_alarm, mogg_alarm,
@card("Rhox")
def rhox(card, abilities):
def rhox():
return AbilityNotImplemented
def rhox():
return AbilityNotImplemented
return rhox, rhox,
@card("Jolting Merfolk")
def jolting_merfolk(card, abilities):
def jolting_merfolk():
return AbilityNotImplemented
def jolting_merfolk():
return AbilityNotImplemented
return jolting_merfolk, jolting_merfolk,
@card("Skyshroud Cutter")
def skyshroud_cutter(card, abilities):
def skyshroud_cutter():
return AbilityNotImplemented
return skyshroud_cutter,
@card("Mogg Toady")
def mogg_toady(card, abilities):
def mogg_toady():
return AbilityNotImplemented
def mogg_toady():
return AbilityNotImplemented
return mogg_toady, mogg_toady,
@card("Cloudskate")
def cloudskate(card, abilities):
def cloudskate():
return AbilityNotImplemented
def cloudskate():
return AbilityNotImplemented
return cloudskate, cloudskate,
@card("Carrion Wall")
def carrion_wall(card, abilities):
def carrion_wall():
return AbilityNotImplemented
def carrion_wall():
return AbilityNotImplemented
return carrion_wall, carrion_wall,
@card("Belbe's Armor")
def belbes_armor(card, abilities):
def belbes_armor():
return AbilityNotImplemented
return belbes_armor,
@card("Mind Swords")
def mind_swords(card, abilities):
def mind_swords():
return AbilityNotImplemented
def mind_swords():
return AbilityNotImplemented
return mind_swords, mind_swords,
@card("Air Bladder")
def air_bladder(card, abilities):
def air_bladder():
return AbilityNotImplemented
def air_bladder():
return AbilityNotImplemented
def air_bladder():
return AbilityNotImplemented
return air_bladder, air_bladder, air_bladder,
@card("Ancient Hydra")
def ancient_hydra(card, abilities):
def ancient_hydra():
return AbilityNotImplemented
def ancient_hydra():
return AbilityNotImplemented
return ancient_hydra, ancient_hydra,
@card("Ensnare")
def ensnare(card, abilities):
def ensnare():
return AbilityNotImplemented
def ensnare():
return AbilityNotImplemented
return ensnare, ensnare,
@card("Accumulated Knowledge")
def accumulated_knowledge(card, abilities):
def accumulated_knowledge():
return AbilityNotImplemented
return accumulated_knowledge,
@card("Nesting Wurm")
def nesting_wurm(card, abilities):
def nesting_wurm():
return AbilityNotImplemented
def nesting_wurm():
return AbilityNotImplemented
return nesting_wurm, nesting_wurm,
@card("Lin Sivvi, Defiant Hero")
def lin_sivvi_defiant_hero(card, abilities):
def lin_sivvi_defiant_hero():
return AbilityNotImplemented
def lin_sivvi_defiant_hero():
return AbilityNotImplemented
return lin_sivvi_defiant_hero, lin_sivvi_defiant_hero,
@card("Chieftain en-Dal")
def chieftain_endal(card, abilities):
def chieftain_endal():
return AbilityNotImplemented
return chieftain_endal,
@card("Fanatical Devotion")
def fanatical_devotion(card, abilities):
def fanatical_devotion():
return AbilityNotImplemented
return fanatical_devotion,
@card("Avenger en-Dal")
def avenger_endal(card, abilities):
def avenger_endal():
return AbilityNotImplemented
return avenger_endal,
@card("Belbe's Percher")
def belbes_percher(card, abilities):
def belbes_percher():
return AbilityNotImplemented
def belbes_percher():
return AbilityNotImplemented
return belbes_percher, belbes_percher,
@card("Laccolith Whelp")
def laccolith_whelp(card, abilities):
def laccolith_whelp():
return AbilityNotImplemented
return laccolith_whelp,
@card("Laccolith Grunt")
def laccolith_grunt(card, abilities):
def laccolith_grunt():
return AbilityNotImplemented
return laccolith_grunt,
@card("Sliptide Serpent")
def sliptide_serpent(card, abilities):
def sliptide_serpent():
return AbilityNotImplemented
return sliptide_serpent,
@card("Mogg Salvage")
def mogg_salvage(card, abilities):
def mogg_salvage():
return AbilityNotImplemented
def mogg_salvage():
return AbilityNotImplemented
return mogg_salvage, mogg_salvage,
@card("Phyrexian Driver")
def phyrexian_driver(card, abilities):
def phyrexian_driver():
return AbilityNotImplemented
return phyrexian_driver,
@card("Seal of Removal")
def seal_of_removal(card, abilities):
def seal_of_removal():
return AbilityNotImplemented
return seal_of_removal,
@card("Seahunter")
def seahunter(card, abilities):
def seahunter():
return AbilityNotImplemented
return seahunter,
@card("Predator, Flagship")
def predator_flagship(card, abilities):
def predator_flagship():
return AbilityNotImplemented
def predator_flagship():
return AbilityNotImplemented
return predator_flagship, predator_flagship,
@card("Noble Stand")
def noble_stand(card, abilities):
def noble_stand():
return AbilityNotImplemented
return noble_stand,
@card("Dominate")
def dominate(card, abilities):
def dominate():
return AbilityNotImplemented
return dominate,
@card("Infiltrate")
def infiltrate(card, abilities):
def infiltrate():
return AbilityNotImplemented
return infiltrate,
@card("Arc Mage")
def arc_mage(card, abilities):
def arc_mage():
return AbilityNotImplemented
return arc_mage,
@card("Mind Slash")
def mind_slash(card, abilities):
def mind_slash():
return AbilityNotImplemented
return mind_slash,
@card("Eye of Yawgmoth")
def eye_of_yawgmoth(card, abilities):
def eye_of_yawgmoth():
return AbilityNotImplemented
return eye_of_yawgmoth,
@card("Seal of Cleansing")
def seal_of_cleansing(card, abilities):
def seal_of_cleansing():
return AbilityNotImplemented
return seal_of_cleansing,
@card("Kill Switch")
def kill_switch(card, abilities):
def kill_switch():
return AbilityNotImplemented
return kill_switch,
@card("Defender en-Vec")
def defender_envec(card, abilities):
def defender_envec():
return AbilityNotImplemented
def defender_envec():
return AbilityNotImplemented
return defender_envec, defender_envec,
@card("Parallax Nexus")
def parallax_nexus(card, abilities):
def parallax_nexus():
return AbilityNotImplemented
def parallax_nexus():
return AbilityNotImplemented
def parallax_nexus():
return AbilityNotImplemented
return parallax_nexus, parallax_nexus, parallax_nexus,
@card("Rootwater Commando")
def rootwater_commando(card, abilities):
def rootwater_commando():
return AbilityNotImplemented
return rootwater_commando,
@card("Divining Witch")
def divining_witch(card, abilities):
def divining_witch():
return AbilityNotImplemented
return divining_witch,
@card("Coiling Woodworm")
def coiling_woodworm(card, abilities):
def coiling_woodworm():
return AbilityNotImplemented
return coiling_woodworm,
@card("Pack Hunt")
def pack_hunt(card, abilities):
def pack_hunt():
return AbilityNotImplemented
return pack_hunt,
@card("Rathi Fiend")
def rathi_fiend(card, abilities):
def rathi_fiend():
return AbilityNotImplemented
def rathi_fiend():
return AbilityNotImplemented
return rathi_fiend, rathi_fiend,
@card("Skyshroud Claim")
def skyshroud_claim(card, abilities):
def skyshroud_claim():
return AbilityNotImplemented
return skyshroud_claim,
@card("Oraxid")
def oraxid(card, abilities):
def oraxid():
return AbilityNotImplemented
return oraxid,
@card("Animate Land")
def animate_land(card, abilities):
def animate_land():
return AbilityNotImplemented
return animate_land,
@card("Fog Patch")
def fog_patch(card, abilities):
def fog_patch():
return AbilityNotImplemented
def fog_patch():
return AbilityNotImplemented
return fog_patch, fog_patch,
@card("Netter en-Dal")
def netter_endal(card, abilities):
def netter_endal():
return AbilityNotImplemented
return netter_endal,
@card("Daze")
def daze(card, abilities):
def daze():
return AbilityNotImplemented
def daze():
return AbilityNotImplemented
return daze, daze,
@card("Flowstone Strike")
def flowstone_strike(card, abilities):
def flowstone_strike():
return AbilityNotImplemented
return flowstone_strike,
@card("Overlaid Terrain")
def overlaid_terrain(card, abilities):
def overlaid_terrain():
return AbilityNotImplemented
def overlaid_terrain():
return AbilityNotImplemented
return overlaid_terrain, overlaid_terrain,
@card("Lawbringer")
def lawbringer(card, abilities):
def lawbringer():
return AbilityNotImplemented
return lawbringer,
@card("Mossdog")
def mossdog(card, abilities):
def mossdog():
return AbilityNotImplemented
return mossdog,
@card("Flowstone Slide")
def flowstone_slide(card, abilities):
def flowstone_slide():
return AbilityNotImplemented
return flowstone_slide,
@card("Rackling")
def rackling(card, abilities):
def rackling():
return AbilityNotImplemented
return rackling,
@card("Plague Witch")
def plague_witch(card, abilities):
def plague_witch():
return AbilityNotImplemented
return plague_witch,
@card("Vicious Hunger")
def vicious_hunger(card, abilities):
def vicious_hunger():
return AbilityNotImplemented
return vicious_hunger,
@card("Seal of Fire")
def seal_of_fire(card, abilities):
def seal_of_fire():
return AbilityNotImplemented
return seal_of_fire,
@card("Voice of Truth")
def voice_of_truth(card, abilities):
def voice_of_truth():
return AbilityNotImplemented
return voice_of_truth,
@card("Wild Mammoth")
def wild_mammoth(card, abilities):
def wild_mammoth():
return AbilityNotImplemented
return wild_mammoth,
@card("Parallax Inhibitor")
def parallax_inhibitor(card, abilities):
def parallax_inhibitor():
return AbilityNotImplemented
return parallax_inhibitor,
@card("Moggcatcher")
def moggcatcher(card, abilities):
def moggcatcher():
return AbilityNotImplemented
return moggcatcher,
@card("Skyshroud Ridgeback")
def skyshroud_ridgeback(card, abilities):
def skyshroud_ridgeback():
return AbilityNotImplemented
return skyshroud_ridgeback,
@card("Murderous Betrayal")
def murderous_betrayal(card, abilities):
def murderous_betrayal():
return AbilityNotImplemented
return murderous_betrayal,
@card("Kor Haven")
def kor_haven(card, abilities):
def kor_haven():
return AbilityNotImplemented
def kor_haven():
return AbilityNotImplemented
return kor_haven, kor_haven,
@card("Death Pit Offering")
def death_pit_offering(card, abilities):
def death_pit_offering():
return AbilityNotImplemented
def death_pit_offering():
return AbilityNotImplemented
return death_pit_offering, death_pit_offering,
@card("Rising Waters")
def rising_waters(card, abilities):
def rising_waters():
return AbilityNotImplemented
def rising_waters():
return AbilityNotImplemented
return rising_waters, rising_waters,
@card("Bola Warrior")
def bola_warrior(card, abilities):
def bola_warrior():
return AbilityNotImplemented
return bola_warrior,
@card("Pale Moon")
def pale_moon(card, abilities):
def pale_moon():
return AbilityNotImplemented
return pale_moon,
@card("Laccolith Warrior")
def laccolith_warrior(card, abilities):
def laccolith_warrior():
return AbilityNotImplemented
return laccolith_warrior,
@card("Off Balance")
def off_balance(card, abilities):
def off_balance():
return AbilityNotImplemented
return off_balance,
@card("Trickster Mage")
def trickster_mage(card, abilities):
def trickster_mage():
return AbilityNotImplemented
return trickster_mage,
@card("Defiant Vanguard")
def defiant_vanguard(card, abilities):
def defiant_vanguard():
return AbilityNotImplemented
def defiant_vanguard():
return AbilityNotImplemented
return defiant_vanguard, defiant_vanguard,
@card("Skyshroud Sentinel")
def skyshroud_sentinel(card, abilities):
def skyshroud_sentinel():
return AbilityNotImplemented
return skyshroud_sentinel,
@card("Topple")
def topple(card, abilities):
def topple():
return AbilityNotImplemented
return topple,
@card("Flame Rift")
def flame_rift(card, abilities):
def flame_rift():
return AbilityNotImplemented
return flame_rift,
@card("Flowstone Overseer")
def flowstone_overseer(card, abilities):
def flowstone_overseer():
return AbilityNotImplemented
return flowstone_overseer,
@card("Battlefield Percher")
def battlefield_percher(card, abilities):
def battlefield_percher():
return AbilityNotImplemented
def battlefield_percher():
return AbilityNotImplemented
def battlefield_percher():
return AbilityNotImplemented
return battlefield_percher, battlefield_percher, battlefield_percher,
@card("Reverent Silence")
def reverent_silence(card, abilities):
def reverent_silence():
return AbilityNotImplemented
def reverent_silence():
return AbilityNotImplemented
return reverent_silence, reverent_silence,
@card("Laccolith Rig")
def laccolith_rig(card, abilities):
def laccolith_rig():
return AbilityNotImplemented
def laccolith_rig():
return AbilityNotImplemented
return laccolith_rig, laccolith_rig,
@card("Blastoderm")
def blastoderm(card, abilities):
def blastoderm():
return AbilityNotImplemented
def blastoderm():
return AbilityNotImplemented
return blastoderm, blastoderm,
@card("Seal of Strength")
def seal_of_strength(card, abilities):
def seal_of_strength():
return AbilityNotImplemented
return seal_of_strength,
@card("Viseling")
def viseling(card, abilities):
def viseling():
return AbilityNotImplemented
return viseling,
@card("Rejuvenation Chamber")
def rejuvenation_chamber(card, abilities):
def rejuvenation_chamber():
return AbilityNotImplemented
def rejuvenation_chamber():
return AbilityNotImplemented
return rejuvenation_chamber, rejuvenation_chamber,
@card("Rath's Edge")
def raths_edge(card, abilities):
def raths_edge():
return AbilityNotImplemented
def raths_edge():
return AbilityNotImplemented
return raths_edge, raths_edge,
@card("Stronghold Zeppelin")
def stronghold_zeppelin(card, abilities):
def stronghold_zeppelin():
return AbilityNotImplemented
def stronghold_zeppelin():
return AbilityNotImplemented
return stronghold_zeppelin, stronghold_zeppelin,
@card("Parallax Wave")
def parallax_wave(card, abilities):
def parallax_wave():
return AbilityNotImplemented
def parallax_wave():
return AbilityNotImplemented
def parallax_wave():
return AbilityNotImplemented
return parallax_wave, parallax_wave, parallax_wave,
@card("Shrieking Mogg")
def shrieking_mogg(card, abilities):
def shrieking_mogg():
return AbilityNotImplemented
def shrieking_mogg():
return AbilityNotImplemented
return shrieking_mogg, shrieking_mogg,
@card("Refreshing Rain")
def refreshing_rain(card, abilities):
def refreshing_rain():
return AbilityNotImplemented
def refreshing_rain():
return AbilityNotImplemented
return refreshing_rain, refreshing_rain,
@card("Defiant Falcon")
def defiant_falcon(card, abilities):
def defiant_falcon():
return AbilityNotImplemented
def defiant_falcon():
return AbilityNotImplemented
return defiant_falcon, defiant_falcon,
@card("Terrain Generator")
def terrain_generator(card, abilities):
def terrain_generator():
return AbilityNotImplemented
def terrain_generator():
return AbilityNotImplemented
return terrain_generator, terrain_generator,
@card("Silkenfist Order")
def silkenfist_order(card, abilities):
def silkenfist_order():
return AbilityNotImplemented
return silkenfist_order,
@card("Rathi Intimidator")
def rathi_intimidator(card, abilities):
def rathi_intimidator():
return AbilityNotImplemented
def rathi_intimidator():
return AbilityNotImplemented
return rathi_intimidator, rathi_intimidator,
@card("Mana Cache")
def mana_cache(card, abilities):
def mana_cache():
return AbilityNotImplemented
def mana_cache():
return AbilityNotImplemented
return mana_cache, mana_cache,
@card("Saproling Cluster")
def saproling_cluster(card, abilities):
def saproling_cluster():
return AbilityNotImplemented
return saproling_cluster,
@card("Flowstone Surge")
def flowstone_surge(card, abilities):
def flowstone_surge():
return AbilityNotImplemented
return flowstone_surge,
@card("Flowstone Armor")
def flowstone_armor(card, abilities):
def flowstone_armor():
return AbilityNotImplemented
def flowstone_armor():
return AbilityNotImplemented
return flowstone_armor, flowstone_armor,
@card("Saproling Burst")
def saproling_burst(card, abilities):
def saproling_burst():
return AbilityNotImplemented
def saproling_burst():
return AbilityNotImplemented
def saproling_burst():
return AbilityNotImplemented
return saproling_burst, saproling_burst, saproling_burst,
@card("Oracle's Attendants")
def oracles_attendants(card, abilities):
def oracles_attendants():
return AbilityNotImplemented
return oracles_attendants,
@card("Complex Automaton")
def complex_automaton(card, abilities):
def complex_automaton():
return AbilityNotImplemented
return complex_automaton,
@card("Parallax Tide")
def parallax_tide(card, abilities):
def parallax_tide():
return AbilityNotImplemented
def parallax_tide():
return AbilityNotImplemented
def parallax_tide():
return AbilityNotImplemented
return parallax_tide, parallax_tide, parallax_tide,
@card("Stronghold Gambit")
def stronghold_gambit(card, abilities):
def stronghold_gambit():
return AbilityNotImplemented
return stronghold_gambit,
@card("Stronghold Machinist")
def stronghold_machinist(card, abilities):
def stronghold_machinist():
return AbilityNotImplemented
return stronghold_machinist,
@card("Laccolith Titan")
def laccolith_titan(card, abilities):
def laccolith_titan():
return AbilityNotImplemented
return laccolith_titan,
@card("Woodripper")
def woodripper(card, abilities):
def woodripper():
return AbilityNotImplemented
def woodripper():
return AbilityNotImplemented
return woodripper, woodripper,
@card("Lashknife")
def lashknife(card, abilities):
def lashknife():
return AbilityNotImplemented
def lashknife():
return AbilityNotImplemented
def lashknife():
return AbilityNotImplemented
return lashknife, lashknife, lashknife,
@card("AEther Barrier")
def aether_barrier(card, abilities):
def aether_barrier():
return AbilityNotImplemented
return aether_barrier,
@card("Flint Golem")
def flint_golem(card, abilities):
def flint_golem():
return AbilityNotImplemented
return flint_golem,
@card("Flowstone Crusher")
def flowstone_crusher(card, abilities):
def flowstone_crusher():
return AbilityNotImplemented
return flowstone_crusher,
@card("Stronghold Biologist")
def stronghold_biologist(card, abilities):
def stronghold_biologist():
return AbilityNotImplemented
return stronghold_biologist,
@card("Rootwater Thief")
def rootwater_thief(card, abilities):
def rootwater_thief():
return AbilityNotImplemented
def rootwater_thief():
return AbilityNotImplemented
return rootwater_thief, rootwater_thief,
@card("Blinding Angel")
def blinding_angel(card, abilities):
def blinding_angel():
return AbilityNotImplemented
def blinding_angel():
return AbilityNotImplemented
return blinding_angel, blinding_angel,
@card("Sivvi's Ruse")
def sivvis_ruse(card, abilities):
def sivvis_ruse():
return AbilityNotImplemented
def sivvis_ruse():
return AbilityNotImplemented
return sivvis_ruse, sivvis_ruse,
@card("Treetop Bracers")
def treetop_bracers(card, abilities):
def treetop_bracers():
return AbilityNotImplemented
def treetop_bracers():
return AbilityNotImplemented
return treetop_bracers, treetop_bracers,
@card("Harvest Mage")
def harvest_mage(card, abilities):
def harvest_mage():
return AbilityNotImplemented
return harvest_mage,
@card("Stronghold Discipline")
def stronghold_discipline(card, abilities):
def stronghold_discipline():
return AbilityNotImplemented
return stronghold_discipline,
@card("Stampede Driver")
def stampede_driver(card, abilities):
def stampede_driver():
return AbilityNotImplemented
return stampede_driver,
@card("Spiritual Asylum")
def spiritual_asylum(card, abilities):
def spiritual_asylum():
return AbilityNotImplemented
def spiritual_asylum():
return AbilityNotImplemented
return spiritual_asylum, spiritual_asylum,
@card("Spineless Thug")
def spineless_thug(card, abilities):
def spineless_thug():
return AbilityNotImplemented
return spineless_thug,
@card("Parallax Dementia")
def parallax_dementia(card, abilities):
def parallax_dementia():
return AbilityNotImplemented
def parallax_dementia():
return AbilityNotImplemented
def parallax_dementia():
return AbilityNotImplemented
def parallax_dementia():
return AbilityNotImplemented
return parallax_dementia, parallax_dementia, parallax_dementia, parallax_dementia,
@card("Downhill Charge")
def downhill_charge(card, abilities):
def downhill_charge():
return AbilityNotImplemented
def downhill_charge():
return AbilityNotImplemented
return downhill_charge, downhill_charge,
@card("Volrath the Fallen")
def volrath_the_fallen(card, abilities):
def volrath_the_fallen():
return AbilityNotImplemented
return volrath_the_fallen,
@card("Rathi Assassin")
def rathi_assassin(card, abilities):
def rathi_assassin():
return AbilityNotImplemented
def rathi_assassin():
return AbilityNotImplemented
return rathi_assassin, rathi_assassin,
@card("Lightbringer")
def lightbringer(card, abilities):
def lightbringer():
return AbilityNotImplemented
return lightbringer,
@card("Flowstone Thopter")
def flowstone_thopter(card, abilities):
def flowstone_thopter():
return AbilityNotImplemented
return flowstone_thopter,
@card("Spiteful Bully")
def spiteful_bully(card, abilities):
def spiteful_bully():
return AbilityNotImplemented
return spiteful_bully,
@card("Wandering Eye")
def wandering_eye(card, abilities):
def wandering_eye():
return AbilityNotImplemented
def wandering_eye():
return AbilityNotImplemented
return wandering_eye, wandering_eye,
@card("Tangle Wire")
def tangle_wire(card, abilities):
def tangle_wire():
return AbilityNotImplemented
def tangle_wire():
return AbilityNotImplemented
return tangle_wire, tangle_wire,
@card("Flowstone Wall")
def flowstone_wall(card, abilities):
def flowstone_wall():
return AbilityNotImplemented
def flowstone_wall():
return AbilityNotImplemented
return flowstone_wall, flowstone_wall,
@card("Submerge")
def submerge(card, abilities):
def submerge():
return AbilityNotImplemented
def submerge():
return AbilityNotImplemented
return submerge, submerge,
@card("Skyshroud Behemoth")
def skyshroud_behemoth(card, abilities):
def skyshroud_behemoth():
return AbilityNotImplemented
def skyshroud_behemoth():
return AbilityNotImplemented
return skyshroud_behemoth, skyshroud_behemoth,
@card("Massacre")
def massacre(card, abilities):
def massacre():
return AbilityNotImplemented
def massacre():
return AbilityNotImplemented
return massacre, massacre,
@card("Skyshroud Poacher")
def skyshroud_poacher(card, abilities):
def skyshroud_poacher():
return AbilityNotImplemented
return skyshroud_poacher,
@card("Dark Triumph")
def dark_triumph(card, abilities):
def dark_triumph():
return AbilityNotImplemented
def dark_triumph():
return AbilityNotImplemented
return dark_triumph, dark_triumph,
@card("Seal of Doom")
def seal_of_doom(card, abilities):
def seal_of_doom():
return AbilityNotImplemented
return seal_of_doom,
@card("Phyrexian Prowler")
def phyrexian_prowler(card, abilities):
def phyrexian_prowler():
return AbilityNotImplemented
def phyrexian_prowler():
return AbilityNotImplemented
return phyrexian_prowler, phyrexian_prowler,
@card("Rupture")
def rupture(card, abilities):
def rupture():
return AbilityNotImplemented
return rupture,
@card("Rusting Golem")
def rusting_golem(card, abilities):
def rusting_golem():
return AbilityNotImplemented
def rusting_golem():
return AbilityNotImplemented
return rusting_golem, rusting_golem,
@card("Sivvi's Valor")
def sivvis_valor(card, abilities):
def sivvis_valor():
return AbilityNotImplemented
def sivvis_valor():
return AbilityNotImplemented
return sivvis_valor, sivvis_valor,
@card("Sneaky Homunculus")
def sneaky_homunculus(card, abilities):
def sneaky_homunculus():
return AbilityNotImplemented
return sneaky_homunculus,
| 18.506579
| 86
| 0.715535
| 2,798
| 28,130
| 7.001787
| 0.085418
| 0.301822
| 0.116788
| 0.017457
| 0.295748
| 0.081466
| 0.073503
| 0.068501
| 0.062529
| 0.062529
| 0
| 0
| 0.206719
| 28,130
| 1,520
| 87
| 18.506579
| 0.87793
| 0
| 0
| 0.412844
| 0
| 0
| 0.06971
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.415138
| false
| 0
| 0.00344
| 0.251147
| 0.833716
| 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
|
28a56e7417288957cab7fafb231bf26b69bdf272
| 116
|
py
|
Python
|
tools/python/maps_generator/utils/algo.py
|
Polas/omim
|
03558b418b338f506fbf3aa72ddf15187a2005ee
|
[
"Apache-2.0"
] | 1
|
2020-11-10T01:13:12.000Z
|
2020-11-10T01:13:12.000Z
|
tools/python/maps_generator/utils/algo.py
|
Polas/omim
|
03558b418b338f506fbf3aa72ddf15187a2005ee
|
[
"Apache-2.0"
] | 1
|
2019-05-14T15:26:55.000Z
|
2019-05-16T11:00:33.000Z
|
tools/python/maps_generator/utils/collections.py
|
vmihaylenko/omim
|
00087f340e723fc611cbc82e0ae898b9053b620a
|
[
"Apache-2.0"
] | null | null | null |
def unique(s):
seen = set()
seen_add = seen.add
return [x for x in s if not (x in seen or seen_add(x))]
| 23.2
| 59
| 0.594828
| 24
| 116
| 2.791667
| 0.541667
| 0.313433
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.284483
| 116
| 4
| 60
| 29
| 0.807229
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
28c805bf23e723ec0077da74994c4e5b09864213
| 35
|
py
|
Python
|
tests/__init__.py
|
byaka/sublime_docblockr_python
|
bcfdb58edc9ed26d0d8fec38bf1d2649647f4a4a
|
[
"MIT"
] | 61
|
2015-12-21T11:58:40.000Z
|
2021-07-09T03:45:15.000Z
|
tests/__init__.py
|
byaka/sublime_docblockr_python
|
bcfdb58edc9ed26d0d8fec38bf1d2649647f4a4a
|
[
"MIT"
] | 28
|
2015-12-15T08:50:59.000Z
|
2021-07-14T10:59:34.000Z
|
tests/__init__.py
|
byaka/sublime_docblockr_python
|
bcfdb58edc9ed26d0d8fec38bf1d2649647f4a4a
|
[
"MIT"
] | 15
|
2016-01-19T14:22:39.000Z
|
2021-08-25T15:11:46.000Z
|
"""Docblockr Python Unit Tests."""
| 17.5
| 34
| 0.685714
| 4
| 35
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114286
| 35
| 1
| 35
| 35
| 0.774194
| 0.8
| 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
|
28db93c260624871ed5b9147cc17ed4f14c1af13
| 332
|
py
|
Python
|
namedstruct/__init__.py
|
hubo1016/namedstruct
|
5039026e0df4ce23003d212358918dbe1a6e1d76
|
[
"Apache-2.0"
] | 27
|
2016-01-22T17:14:19.000Z
|
2021-06-17T06:37:42.000Z
|
namedstruct/__init__.py
|
hubo1016/namedstruct
|
5039026e0df4ce23003d212358918dbe1a6e1d76
|
[
"Apache-2.0"
] | 1
|
2016-03-14T19:22:46.000Z
|
2016-03-15T12:36:31.000Z
|
namedstruct/__init__.py
|
hubo1016/namedstruct
|
5039026e0df4ce23003d212358918dbe1a6e1d76
|
[
"Apache-2.0"
] | 4
|
2016-10-12T02:52:47.000Z
|
2021-03-30T15:22:45.000Z
|
from __future__ import absolute_import
from namedstruct.namedstruct import dump, DUMPTYPE_FLAT, DUMPTYPE_KEY, DUMPTYPE_NONE, packexpr, packsize, packrealsize,\
packvalue, sizefromlen, nstruct, prim, raw, char, enum, varchr, cstr, optional, bitfield, darray, typedef,\
NamedStruct, nvariant
from namedstruct.stdprim import *
| 55.333333
| 120
| 0.798193
| 38
| 332
| 6.763158
| 0.736842
| 0.116732
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123494
| 332
| 5
| 121
| 66.4
| 0.883162
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 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
|
e911caf2e5a61c4f1487f3c7cded632f3a903f9d
| 15,116
|
py
|
Python
|
xdd-7.0.0.rc-ramses3/tests/unit/site-packages/xdd_flow_test.py
|
eunsungc/gt6-RAMSES_8_5
|
529b50245375855cffc7ab3feec45bee6dc48d2a
|
[
"Apache-2.0"
] | 1
|
2016-09-27T01:35:12.000Z
|
2016-09-27T01:35:12.000Z
|
xdd-7.0.0.rc-ramses3/tests/unit/site-packages/xdd_flow_test.py
|
eunsungc/gt6-RAMSES_8_5
|
529b50245375855cffc7ab3feec45bee6dc48d2a
|
[
"Apache-2.0"
] | 10
|
2015-08-26T20:52:57.000Z
|
2017-03-04T11:09:37.000Z
|
xdd-7.0.0.rc-ramses3/tests/unit/site-packages/xdd_flow_test.py
|
eunsungc/gt6-RAMSES_8_5
|
529b50245375855cffc7ab3feec45bee6dc48d2a
|
[
"Apache-2.0"
] | null | null | null |
#!/bin/env python
# Import modules
import unittest
import subprocess
from xdd.flow import *
# "constants"
TEST_PORT = 40010
# Standard testing strategy: try to check each side of each branch statement
# for correctness
# Test checkPreconditions method of Flow
class FlowCheckPreconditionsTestCase(unittest.TestCase):
"""Test checkPreconditions method of Flow"""
def test_valid_xdd(self):
"""Test sink side of branch"""
flow = Flow(True, 32768,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'bin')
flow.target = '/dev/null'
flow.dataSize = 1
self.assertEqual(True, flow.checkPreconditions())
def test_invalid_xdd(self):
"""Test sink side of branch"""
flow = Flow(True, 32768,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'sbin')
flow.target = '/dev/null'
self.assertEqual(False, flow.checkPreconditions())
def test_sink(self):
"""Test sink side of branch"""
flow = Flow(True, 32768,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'bin')
flow.target = '/dev/null'
flow.dataSize = 1
self.assertEqual(True, flow.checkPreconditions())
def test_source(self):
"""Test source side of branch"""
flow = Flow(False, 8192,
0, 1, [("localhost", TEST_PORT, 8)],
False, True, True, True, 'bin')
flow.target = '/dev/zero'
flow.dataSize = 1
self.assertEqual(True, flow.checkPreconditions())
class FlowCheckSinkPreconditionsTestCase(unittest.TestCase):
"""Test checkSinkPreconditions method of Flow"""
def test_character_device(self):
"""Test a valid character device"""
flow = Flow(True, 4096,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'bin')
flow.target = '/dev/null'
self.assertEqual(True, flow.checkSinkPreconditions())
def test_character_device_permission(self):
"""Test a character device that is read-only"""
flow = Flow(True, 4096,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'bin')
flow.target = '/dev/zero'
self.assertEqual(True, flow.checkSinkPreconditions())
def test_character_device_dio(self):
"""Test an invalid character device flag (DIO is not allowed)"""
flow = Flow(True, 8192,
0, 1, [("localhost", TEST_PORT, 1)],
True, False, False, False, 'bin')
flow.target = '/dev/null'
self.assertEqual(False, flow.checkSinkPreconditions())
def test_block_device_non_root(self):
"""Test a block device device (non-root is not allowed)"""
flow = Flow(True, 16384,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'bin')
flow.target = '/dev/Disk0'
self.assertEqual(False, flow.checkSinkPreconditions())
def test_regular_file(self):
"""Test a valid existing file"""
flow = Flow(True, 1024,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'bin')
flow.target = 'Makefile'
self.assertEqual(True, flow.checkSinkPreconditions())
def test_regular_file_parent_dir_exists(self):
"""Test a valid file with a valid parent directory"""
flow = Flow(True, 1024,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'bin')
flow.target = '/tmp/non_existant_file'
self.assertEqual(True, flow.checkSinkPreconditions())
class FlowCheckSourcePreconditionsTestCase(unittest.TestCase):
"""Test checkSourcePreconditions method of Flow"""
def test_character_device(self):
flow = Flow(False, 1024,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'bin')
flow.target = '/dev/zero'
self.assertEqual(True, flow.checkSourcePreconditions())
def test_character_device_dio(self):
flow = Flow(False, 1024,
0, 1, [("localhost", TEST_PORT, 1)],
True, False, False, False, 'bin')
flow.target = '/dev/zero'
self.assertEqual(False, flow.checkSourcePreconditions())
def test_block_device_non_root(self):
flow = Flow(False, 1024,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'bin')
flow.target = '/dev/Disk0'
self.assertEqual(False, flow.checkSourcePreconditions())
def test_regular_file_exists(self):
flow = Flow(False, 1024,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'bin')
flow.target = 'Makefile'
self.assertEqual(True, flow.checkSourcePreconditions())
def test_non_file(self):
flow = Flow(False, 1024,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'bin')
flow.target = "/not/defined/path/to/file"
self.assertEqual(False, flow.checkSourcePreconditions())
class FlowCreateCommandArgsTestCase(unittest.TestCase):
"""Test createCommandArgs method of Flow"""
def test_single_sink(self):
"""Test a valid single sink"""
expected = ["./xdd", "-target", "foo1", "-op", "write"]
expected.extend(["-e2e", "isdest"])
expected.extend(["-reqsize", "1024", "-blocksize", "1"])
expected.extend(["-bytes", "1024"])
expected.extend(["-e2e", "dest", "host:%d,1" % TEST_PORT])
expected.extend(["-noordering"])
expected.extend(["-preallocate", "1024"])
expected.extend(["-verbose", "-minall", "-stoponerror"])
#expected.extend(["-stdout", "logfile"])
expected.extend(["-hb", "1", "-hb", "bytes", "-hb", "lf"])
flow = Flow(True, 1024,
0, 1, [("host", TEST_PORT, 1)],
False, False, False, False, '.')
flow.target = 'foo1'
flow.dataSize = 1024
cmd = flow.createCommandArgs()
i = 0
for e in expected:
self.assertEqual(e, cmd[i])
i += 1
self.assertEqual(len(expected), len(cmd))
def test_single_source(self):
"""Test a valid single source"""
expected = ["dir/xdd", "-target", "foo2", "-op", "read", "-e2e", "issource"]
expected.extend(["-reqsize", "1024", "-blocksize", "1"])
expected.extend(["-bytes", "1024"])
expected.extend(["-e2e", "dest", "localhost:%d,1" % TEST_PORT])
expected.extend(["-looseordering"])
expected.extend(["-verbose", "-minall", "-stoponerror"])
#expected.extend(["-hb", "1", "-hb", "bytes", "-hb", "lf"])
flow = Flow(False, 1024,
0, 1, [("localhost", TEST_PORT, 1)],
False, False, False, False, 'dir')
flow.target = 'foo2'
flow.dataSize = 1024
cmd = flow.createCommandArgs()
i = 0
for e in expected:
self.assertEqual(e, cmd[i])
i += 1
self.assertEqual(len(expected), len(cmd))
def test_multiple_sink(self):
"""Test a valid multiple sink"""
expected = ["bin/xdd", "-target", "foo3", "-op", "write", "-e2e", "isdest"]
expected.extend(["-reqsize", "1024", "-blocksize", "1"])
expected.extend(["-bytes", "1024"])
expected.extend(["-e2e", "dest", "if1:%d,1" % TEST_PORT])
expected.extend(["-e2e", "dest", "if2:%d,1" % TEST_PORT])
expected.extend(["-noordering"])
expected.extend(["-preallocate", "1024"])
expected.extend(["-verbose", "-minall", "-stoponerror"])
#expected.extend(["-stdout", "logfile"])
expected.extend(["-hb", "1", "-hb", "bytes", "-hb", "lf"])
flow = Flow(True, 1024,
0, 1, [("if1", TEST_PORT, 1), ("if2", TEST_PORT, 1)],
False, False, False, False, 'bin')
flow.target = 'foo3'
flow.dataSize = 1024
cmd = flow.createCommandArgs()
i = 0
for e in expected:
self.assertEqual(e, cmd[i])
i += 1
self.assertEqual(len(expected), len(cmd))
def test_multiple_source(self):
"""Test a valid multiple source"""
expected = ["./xdd", "-target", "foo4", "-op", "read", "-e2e", "issource"]
expected.extend(["-reqsize", "1024", "-blocksize", "1"])
expected.extend(["-bytes", "1024"])
expected.extend(["-e2e", "dest", "if1:%d,1" % TEST_PORT])
expected.extend(["-e2e", "dest", "if2:%d,1" % TEST_PORT])
expected.extend(["-looseordering"])
expected.extend(["-verbose", "-minall", "-stoponerror"])
#expected.extend(["-hb", "1", "-hb", "bytes", "-hb", "lf"])
flow = Flow(False, 1024,
0, 1, [("if1", TEST_PORT, 1), ("if2", TEST_PORT, 1)],
False, False, False, False, '.')
flow.target = 'foo4'
flow.dataSize = 1024
cmd = flow.createCommandArgs()
i = 0
for e in expected:
self.assertEqual(e, cmd[i])
i += 1
self.assertEqual(len(expected), len(cmd))
def test_source_serial_ordering(self):
"""Test a source with serial ordering"""
expected = ["./xdd", "-target", "foo4", "-op", "read", "-e2e", "issource"]
expected.extend(["-reqsize", "1024", "-blocksize", "1"])
expected.extend(["-bytes", "1024"])
expected.extend(["-e2e", "dest", "if1:%d,1" % TEST_PORT])
expected.extend(["-serialordering"])
expected.extend(["-verbose", "-minall", "-stoponerror"])
#expected.extend(["-hb", "1", "-hb", "bytes", "-hb", "lf"])
flow = Flow(False, 1024,
0, 1, [("if1", TEST_PORT, 1)],
dioFlag=False, serialFlag=True, verboseFlag=False,
timestampFlag=False, xddPath='.')
flow.target = 'foo4'
flow.dataSize = 1024
cmd = flow.createCommandArgs()
i = 0
for e in expected:
self.assertEqual(e, cmd[i])
i += 1
self.assertEqual(len(expected), len(cmd))
def test_sink_serial_ordering(self):
"""Test a sink with serial ordering"""
expected = ["./xdd", "-target", "foo4", "-op", "write", "-e2e", "isdest"]
expected.extend(["-reqsize", "1024", "-blocksize", "1"])
expected.extend(["-bytes", "1024"])
expected.extend(["-e2e", "dest", "if1:%d,1" % TEST_PORT])
expected.extend(["-serialordering"])
expected.extend(["-preallocate", "1024"])
expected.extend(["-verbose", "-minall", "-stoponerror"])
expected.extend(["-hb", "1", "-hb", "bytes", "-hb", "lf"])
flow = Flow(True, 1024,
0, 1, [("if1", TEST_PORT, 1)],
dioFlag=False, serialFlag=True, verboseFlag=False,
timestampFlag=False, xddPath='.')
flow.target = 'foo4'
flow.dataSize = 1024
cmd = flow.createCommandArgs()
i = 0
for e in expected:
self.assertEqual(e, cmd[i])
i += 1
self.assertEqual(len(expected), len(cmd))
def test_sink_dio(self):
"""Test a sink with serial ordering"""
expected = ["./xdd", "-target", "foo4", "-op", "write", "-e2e", "isdest"]
expected.extend(["-reqsize", "1024", "-blocksize", "1"])
expected.extend(["-bytes", "1024"])
expected.extend(["-e2e", "dest", "if1:%d,1" % TEST_PORT])
expected.extend(["-dio"])
expected.extend(["-noordering"])
expected.extend(["-preallocate", "1024"])
expected.extend(["-verbose", "-minall", "-stoponerror"])
expected.extend(["-hb", "1", "-hb", "bytes", "-hb", "lf"])
flow = Flow(True, 1024,
0, 1, [("if1", TEST_PORT, 1)],
dioFlag=True, serialFlag=False, verboseFlag=False,
timestampFlag=False, xddPath='.')
flow.target = 'foo4'
flow.dataSize = 1024
cmd = flow.createCommandArgs()
i = 0
for e in expected:
self.assertEqual(e, cmd[i])
i += 1
self.assertEqual(len(expected), len(cmd))
def test_default_xdd_path(self):
"""Test a valid multiple source"""
# Get the default path of xdd
p = subprocess.Popen(['which', 'xdd'], stdout=subprocess.PIPE)
(xddPath, _) = p.communicate()
xddPath = xddPath.rstrip()
expected = [xddPath, "-target", "foo4", "-op", "read"]
expected.extend(["-e2e", "issource"])
expected.extend(["-reqsize", "1024", "-blocksize", "1"])
expected.extend(["-bytes", "1024"])
expected.extend(["-e2e", "dest", "if2:%d,1" % TEST_PORT])
expected.extend(["-looseordering"])
expected.extend(["-verbose", "-minall", "-stoponerror"])
#expected.extend(["-hb", "1", "-hb", "bytes", "-hb", "lf"])
flow = Flow(False, 1024,
0, 1, [("if2", TEST_PORT, 1)],
False, False, False, False)
flow.target = 'foo4'
flow.dataSize = 1024
cmd = flow.createCommandArgs()
i = 0
for e in expected:
self.assertEqual(e, cmd[i])
i += 1
self.assertEqual(len(expected), len(cmd))
class FlowStartTestCase(unittest.TestCase):
"""Test start method of Flow"""
def test_zero_to_null(self):
"""Start a zero to null flow"""
sink = Flow(True, 1024,
0, 1, [("localhost", TEST_PORT, 1), ("localhost", TEST_PORT+10, 1)],
False, False, False, False, 'bin')
sinkStatus = sink.start('/dev/null', 4096)
source = Flow(False, 1024,
0, 1, [("localhost", TEST_PORT, 1), ("localhost", TEST_PORT+10, 1)],
False, False, False, False, 'bin')
sourceStatus = source.start('/dev/zero', 4096)
import time
while sinkStatus.completion() is None:
time.sleep(3)
self.assertEqual(sinkStatus.completion(), 0)
self.assertEqual(sourceStatus.completion(), 0)
class FlowHasPreallocateTestCase(unittest.TestCase):
"""Test hasPreallocate method of Flow"""
def test_platform_has_it(self):
f = Flow(True, 1024,
0, 1, [("localhost", TEST_PORT, 1), ("localhost", TEST_PORT+10, 1)],
False, False, False, False, 'bin')
if sys.platform.startswith('linux'):
self.assertEqual(True, f.hasPreallocate())
elif sys.platform.startswith('darwin'):
self.assertEqual(False, f.hasPreallocate())
else:
self.assertEqual(True, False)
if __name__ == '__main__':
unittest.main()
| 39.989418
| 90
| 0.541479
| 1,615
| 15,116
| 4.995666
| 0.105882
| 0.079326
| 0.078086
| 0.049083
| 0.785077
| 0.737481
| 0.715419
| 0.683193
| 0.659147
| 0.641299
| 0
| 0.039358
| 0.290685
| 15,116
| 377
| 91
| 40.095491
| 0.713113
| 0.090103
| 0
| 0.739726
| 0
| 0
| 0.124559
| 0.003452
| 0
| 0
| 0
| 0
| 0.123288
| 1
| 0.085616
| false
| 0
| 0.013699
| 0
| 0.119863
| 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
|
e9231b50d58217e43ed41e8a92990459e4330cac
| 302
|
py
|
Python
|
todo/settings.py
|
GibbsConsulting/django-todo
|
238e39085df5332e91eda9eedd23ea1e31bae7b2
|
[
"BSD-3-Clause"
] | null | null | null |
todo/settings.py
|
GibbsConsulting/django-todo
|
238e39085df5332e91eda9eedd23ea1e31bae7b2
|
[
"BSD-3-Clause"
] | null | null | null |
todo/settings.py
|
GibbsConsulting/django-todo
|
238e39085df5332e91eda9eedd23ea1e31bae7b2
|
[
"BSD-3-Clause"
] | 2
|
2018-03-25T16:51:04.000Z
|
2019-12-21T08:56:07.000Z
|
from django.conf import settings
STAFF_ONLY = getattr(settings, 'TODO_STAFF_ONLY', False)
DEFAULT_LIST_ID = getattr(settings, 'TODO_DEFAULT_LIST_ID', 1)
DEFAULT_ASSIGNEE = getattr(settings, 'TODO_DEFAULT_ASSIGNEE', None)
PUBLIC_SUBMIT_REDIRECT = getattr(settings, 'TODO_PUBLIC_SUBMIT_REDIRECT', '/')
| 37.75
| 78
| 0.807947
| 40
| 302
| 5.7
| 0.475
| 0.263158
| 0.333333
| 0.22807
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003623
| 0.086093
| 302
| 7
| 79
| 43.142857
| 0.822464
| 0
| 0
| 0
| 0
| 0
| 0.278146
| 0.15894
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.