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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
80e28e3d61ee552a5bc75d7be2e316ae51e5bf47
| 37
|
py
|
Python
|
mhealth/users/__init__.py
|
theCreedo/indigitous-mental-health-app
|
e3a66a6b2e7fbd105106d0315f78ea3c93647fe8
|
[
"MIT"
] | null | null | null |
mhealth/users/__init__.py
|
theCreedo/indigitous-mental-health-app
|
e3a66a6b2e7fbd105106d0315f78ea3c93647fe8
|
[
"MIT"
] | null | null | null |
mhealth/users/__init__.py
|
theCreedo/indigitous-mental-health-app
|
e3a66a6b2e7fbd105106d0315f78ea3c93647fe8
|
[
"MIT"
] | null | null | null |
from mhealth.users.models import User
| 37
| 37
| 0.864865
| 6
| 37
| 5.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081081
| 37
| 1
| 37
| 37
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
80f9945307775457f5eb395b64dc5838c231b405
| 126
|
py
|
Python
|
opencorpora/__init__.py
|
OpenCorpora/opencorpora-tools
|
a4064b911347cbb1ded88e108e135186aeeb27e9
|
[
"MIT"
] | 3
|
2017-02-24T17:25:28.000Z
|
2019-02-27T22:09:54.000Z
|
opencorpora/__init__.py
|
OpenCorpora/opencorpora-tools
|
a4064b911347cbb1ded88e108e135186aeeb27e9
|
[
"MIT"
] | null | null | null |
opencorpora/__init__.py
|
OpenCorpora/opencorpora-tools
|
a4064b911347cbb1ded88e108e135186aeeb27e9
|
[
"MIT"
] | 1
|
2020-10-18T21:38:21.000Z
|
2020-10-18T21:38:21.000Z
|
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .reader import CorpusReader
from .reader_lxml import load
| 25.2
| 38
| 0.777778
| 17
| 126
| 5.411765
| 0.647059
| 0.217391
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009174
| 0.134921
| 126
| 4
| 39
| 31.5
| 0.834862
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
039c5f3d8fc83df85196aadd3df23016fb2c75aa
| 139
|
py
|
Python
|
topsim/core/algorithm.py
|
myxie/topsim
|
0d2ebe918f214903760fbf044a4875d470dda688
|
[
"MIT"
] | null | null | null |
topsim/core/algorithm.py
|
myxie/topsim
|
0d2ebe918f214903760fbf044a4875d470dda688
|
[
"MIT"
] | 7
|
2019-11-11T07:52:29.000Z
|
2020-10-21T05:31:59.000Z
|
topsim/core/algorithm.py
|
myxie/topsim
|
0d2ebe918f214903760fbf044a4875d470dda688
|
[
"MIT"
] | null | null | null |
from abc import ABC, abstractmethod
class Algorithm(ABC):
@abstractmethod
def __call__(self, cluster, clock, plan):
pass
| 17.375
| 45
| 0.690647
| 16
| 139
| 5.75
| 0.8125
| 0.369565
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.230216
| 139
| 7
| 46
| 19.857143
| 0.859813
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
03d92340bd10af002e8bd4ef840bbb07da51f20c
| 234
|
py
|
Python
|
project2/blackjack/player/playerbase.py
|
vcelis/python-3-bootcamp
|
6b1fdeca6a3c8fe9e56e39ea8ef186eaeb29deba
|
[
"MIT"
] | null | null | null |
project2/blackjack/player/playerbase.py
|
vcelis/python-3-bootcamp
|
6b1fdeca6a3c8fe9e56e39ea8ef186eaeb29deba
|
[
"MIT"
] | null | null | null |
project2/blackjack/player/playerbase.py
|
vcelis/python-3-bootcamp
|
6b1fdeca6a3c8fe9e56e39ea8ef186eaeb29deba
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Module docstring
TODO:
* Write module docstring
"""
from .hand import Hand
class PlayerBase:
"""Class to represent a base for player objects"""
def __init__(self):
self.hand = Hand()
| 15.6
| 54
| 0.623932
| 29
| 234
| 4.896552
| 0.758621
| 0.211268
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005618
| 0.239316
| 234
| 14
| 55
| 16.714286
| 0.792135
| 0.512821
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
208a1e5a7963215135f66216e6938f9bcc9d4059
| 241
|
py
|
Python
|
Calculadora de Area/circle.py
|
luisxfelipe/arquitetura-projetos-sistemas_IMPACTA
|
41405014d82ab8439b92d7c6e68b41117a4e8f0d
|
[
"Apache-2.0"
] | null | null | null |
Calculadora de Area/circle.py
|
luisxfelipe/arquitetura-projetos-sistemas_IMPACTA
|
41405014d82ab8439b92d7c6e68b41117a4e8f0d
|
[
"Apache-2.0"
] | null | null | null |
Calculadora de Area/circle.py
|
luisxfelipe/arquitetura-projetos-sistemas_IMPACTA
|
41405014d82ab8439b92d7c6e68b41117a4e8f0d
|
[
"Apache-2.0"
] | null | null | null |
from calculator import Calculator
class Circle(Calculator):
def __init__(self, radius:float):
self.__radius = radius
def calculate(self) -> float:
return float("%.2f" % (3.14*(self.__radius ** 2)))
| 24.1
| 65
| 0.60166
| 27
| 241
| 5.074074
| 0.592593
| 0.218978
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028409
| 0.26971
| 241
| 10
| 66
| 24.1
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.016529
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0.166667
| 0.833333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
20afb110c4c999a3c20f41398bce03d4f945ae9b
| 219
|
py
|
Python
|
utils/helpers.py
|
bmwant21/bmwlog
|
bfbe2718714f6ccf5cfca2204305f203aac3682a
|
[
"Unlicense"
] | 1
|
2019-09-23T06:01:14.000Z
|
2019-09-23T06:01:14.000Z
|
utils/helpers.py
|
bmwant21/bmwlog
|
bfbe2718714f6ccf5cfca2204305f203aac3682a
|
[
"Unlicense"
] | 1
|
2018-06-03T16:30:16.000Z
|
2018-06-03T16:30:16.000Z
|
utils/helpers.py
|
bmwant21/bmwlog
|
bfbe2718714f6ccf5cfca2204305f203aac3682a
|
[
"Unlicense"
] | null | null | null |
import click
def note(message):
click.secho(f'\n==> {message}', fg='green')
def info(message):
click.secho(f'\n==> {message}', fg='yellow')
def warn(message):
click.secho(f'\n==> {message}', fg='red')
| 15.642857
| 48
| 0.593607
| 32
| 219
| 4.0625
| 0.4375
| 0.276923
| 0.392308
| 0.415385
| 0.646154
| 0.646154
| 0.646154
| 0
| 0
| 0
| 0
| 0
| 0.159817
| 219
| 13
| 49
| 16.846154
| 0.706522
| 0
| 0
| 0
| 0
| 0
| 0.269406
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| false
| 0
| 0.142857
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
20f1351396f83c0857b50952f9c673c1e6459d19
| 248
|
py
|
Python
|
src/lamberthub/plotting/__init__.py
|
jorgepiloto/lamberthub
|
fedf6aaa939ee08e3bccb754b519397352cb5a84
|
[
"Apache-2.0"
] | 10
|
2021-05-18T11:16:09.000Z
|
2022-02-07T13:20:37.000Z
|
src/lamberthub/plotting/__init__.py
|
jorgepiloto/lamberthub
|
fedf6aaa939ee08e3bccb754b519397352cb5a84
|
[
"Apache-2.0"
] | 39
|
2021-05-18T10:08:58.000Z
|
2021-10-14T14:28:05.000Z
|
src/lamberthub/plotting/__init__.py
|
jorgepiloto/lamberthub
|
fedf6aaa939ee08e3bccb754b519397352cb5a84
|
[
"Apache-2.0"
] | 1
|
2021-10-21T15:00:00.000Z
|
2021-10-21T15:00:00.000Z
|
""" A sub-package holding a collection of plotting utilities """
from lamberthub.plotting.iterations import IterationsPlotter
from lamberthub.plotting.time import TPIPlotter, TTCPlotter
__all__ = ["IterationsPlotter", "TPIPlotter", "TTCPlotter"]
| 35.428571
| 64
| 0.802419
| 26
| 248
| 7.5
| 0.653846
| 0.14359
| 0.225641
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104839
| 248
| 6
| 65
| 41.333333
| 0.878378
| 0.225806
| 0
| 0
| 0
| 0
| 0.201087
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
20f2d1851a0097be8a97c06a089689608ff68db8
| 135
|
py
|
Python
|
videoApp/admin.py
|
AktanKasymaliev/django-video-hosting
|
b201ed3421025da22b43405452bde617ea26a90f
|
[
"MIT"
] | null | null | null |
videoApp/admin.py
|
AktanKasymaliev/django-video-hosting
|
b201ed3421025da22b43405452bde617ea26a90f
|
[
"MIT"
] | null | null | null |
videoApp/admin.py
|
AktanKasymaliev/django-video-hosting
|
b201ed3421025da22b43405452bde617ea26a90f
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from videoApp.models import Video, Comments
admin.site.register(Video)
admin.site.register(Comments)
| 22.5
| 43
| 0.82963
| 19
| 135
| 5.894737
| 0.578947
| 0.160714
| 0.303571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088889
| 135
| 6
| 44
| 22.5
| 0.910569
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
45665552cc839c59358c541473a9be2a72efd9c8
| 35
|
py
|
Python
|
tests/conftest.py
|
zenoone/deepqmc
|
c05e6c0398212aff9a514e7ad2e7a19243115aef
|
[
"MIT"
] | 224
|
2020-07-16T11:14:01.000Z
|
2022-03-30T11:02:35.000Z
|
tests/conftest.py
|
zenoone/deepqmc
|
c05e6c0398212aff9a514e7ad2e7a19243115aef
|
[
"MIT"
] | 39
|
2020-07-19T14:44:31.000Z
|
2022-03-28T07:54:35.000Z
|
tests/conftest.py
|
zenoone/deepqmc
|
c05e6c0398212aff9a514e7ad2e7a19243115aef
|
[
"MIT"
] | 50
|
2020-07-28T18:12:51.000Z
|
2022-03-30T11:02:46.000Z
|
import torch
torch.manual_seed(0)
| 8.75
| 20
| 0.8
| 6
| 35
| 4.5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032258
| 0.114286
| 35
| 3
| 21
| 11.666667
| 0.83871
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
45ce6bdd96a0265c9d10ec4d2554808613bf7a13
| 241
|
py
|
Python
|
app/routes/__init__.py
|
thainaferreira/matriz-de-eisenhower
|
651226fc41d3b9756033b57ac67438380dae7e71
|
[
"MIT"
] | null | null | null |
app/routes/__init__.py
|
thainaferreira/matriz-de-eisenhower
|
651226fc41d3b9756033b57ac67438380dae7e71
|
[
"MIT"
] | null | null | null |
app/routes/__init__.py
|
thainaferreira/matriz-de-eisenhower
|
651226fc41d3b9756033b57ac67438380dae7e71
|
[
"MIT"
] | null | null | null |
from flask import Flask
def init_app(app: Flask):
from app.routes.category_blueprint import bp_category
from app.routes.tasks_blueprint import bp_task
app.register_blueprint(bp_category)
app.register_blueprint(bp_task)
| 26.777778
| 57
| 0.780083
| 35
| 241
| 5.114286
| 0.371429
| 0.078212
| 0.145251
| 0.24581
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161826
| 241
| 9
| 58
| 26.777778
| 0.886139
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.5
| 0
| 0.666667
| 0.666667
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
|
0
| 5
|
b303d7c2d8fe9216075879ee51961ee32145e81d
| 24
|
py
|
Python
|
read/read/str/readers/wikidump.py
|
vitalfadeev/read
|
f8893daa732d50bb6f1da94e66d016d5611f1983
|
[
"MIT"
] | null | null | null |
read/read/str/readers/wikidump.py
|
vitalfadeev/read
|
f8893daa732d50bb6f1da94e66d016d5611f1983
|
[
"MIT"
] | null | null | null |
read/read/str/readers/wikidump.py
|
vitalfadeev/read
|
f8893daa732d50bb6f1da94e66d016d5611f1983
|
[
"MIT"
] | null | null | null |
def reader():
...
| 4.8
| 13
| 0.375
| 2
| 24
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.375
| 24
| 4
| 14
| 6
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b319e56e1760b4f77a1330c8b89e23a3aa1e7782
| 45
|
py
|
Python
|
holobot/framework/network/__init__.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | 1
|
2021-05-24T00:17:46.000Z
|
2021-05-24T00:17:46.000Z
|
holobot/framework/network/__init__.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | 41
|
2021-03-24T22:50:09.000Z
|
2021-12-17T12:15:13.000Z
|
holobot/framework/network/__init__.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | null | null | null |
from .http_client_pool import HttpClientPool
| 22.5
| 44
| 0.888889
| 6
| 45
| 6.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088889
| 45
| 1
| 45
| 45
| 0.926829
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
b34549e573b4646d91ee371dfdfba2450f863011
| 97
|
py
|
Python
|
gitgud/hooks/precommit.py
|
elandt/git-gud
|
4def16519e6f7d911355f3d0b6f0d60bbef6fcf9
|
[
"MIT"
] | null | null | null |
gitgud/hooks/precommit.py
|
elandt/git-gud
|
4def16519e6f7d911355f3d0b6f0d60bbef6fcf9
|
[
"MIT"
] | null | null | null |
gitgud/hooks/precommit.py
|
elandt/git-gud
|
4def16519e6f7d911355f3d0b6f0d60bbef6fcf9
|
[
"MIT"
] | null | null | null |
import sys
print('Command "git commit" is diabled. Use "git gud commit" instead.')
sys.exit(1)
| 16.166667
| 71
| 0.71134
| 16
| 97
| 4.3125
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012195
| 0.154639
| 97
| 5
| 72
| 19.4
| 0.829268
| 0
| 0
| 0
| 0
| 0
| 0.645833
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
b352cdc77589368e5ca3e3b9b3fdcd520559a8bc
| 24,460
|
py
|
Python
|
health_workforce/migrations/0001_initial.py
|
MarkJaroski/aho-dev-dct
|
75ad72d408ce60ebfdf9c02fe57cdf9edba5e4d7
|
[
"MIT"
] | null | null | null |
health_workforce/migrations/0001_initial.py
|
MarkJaroski/aho-dev-dct
|
75ad72d408ce60ebfdf9c02fe57cdf9edba5e4d7
|
[
"MIT"
] | null | null | null |
health_workforce/migrations/0001_initial.py
|
MarkJaroski/aho-dev-dct
|
75ad72d408ce60ebfdf9c02fe57cdf9edba5e4d7
|
[
"MIT"
] | null | null | null |
# Generated by Django 2.2.12 on 2021-03-18 11:32
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import health_workforce.models
import parler.fields
import parler.models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
('publications', '0020_auto_20210315_1356'),
('home', '0020_auto_20201205_1938'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('regions', '0015_stglocationcodes'),
]
operations = [
migrations.CreateModel(
name='StgAnnouncements',
fields=[
('event_id', models.AutoField(primary_key=True, serialize=False)),
('uuid', models.CharField(default=uuid.uuid4, editable=False, max_length=36, unique=True, verbose_name='Unique ID')),
('code', models.CharField(blank=True, max_length=45, unique=True, verbose_name='Code')),
('internal_url', models.FileField(blank=True, upload_to='media/files/events', verbose_name='Upload File/Video(s)')),
('external_url', models.CharField(blank=True, max_length=2083, null=True, verbose_name='Web Link (URL)')),
('cover_image', models.ImageField(blank=True, upload_to='media/images/events', verbose_name='Upload Picture/Banner(s)')),
('start_year', models.PositiveIntegerField(default=2021, help_text='This marks the start of reporting period', validators=[django.core.validators.MinValueValidator(1900), health_workforce.models.max_value_current_year], verbose_name='Starting period')),
('end_year', models.PositiveIntegerField(default=2021, help_text='This marks the end of reporting. The value must be current year or greater than the start year', validators=[django.core.validators.MinValueValidator(1900), health_workforce.models.max_value_current_year], verbose_name='Ending Period')),
('period', models.CharField(blank=True, max_length=10, verbose_name='Period')),
('status', models.CharField(choices=[('active', 'Open'), ('inactive', 'Closed'), ('suspended', 'Suspended')], default='active', max_length=10, verbose_name='Status')),
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date Created')),
('date_lastupdated', models.DateTimeField(auto_now=True, null=True, verbose_name='Date Modified')),
('location', models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='regions.StgLocation', verbose_name='Location')),
],
options={
'verbose_name': 'Announcement',
'verbose_name_plural': 'Announcements',
'db_table': 'stg_event_announcement',
'ordering': ('translations__name',),
'managed': True,
'unique_together': {('location', 'start_year', 'end_year')},
},
bases=(parler.models.TranslatableModelMixin, models.Model),
),
migrations.CreateModel(
name='StgHealthCadre',
fields=[
('cadre_id', models.AutoField(primary_key=True, serialize=False)),
('uuid', models.CharField(default=uuid.uuid4, editable=False, max_length=36, unique=True, verbose_name='Unique ID')),
('code', models.CharField(blank=True, max_length=45, unique=True, verbose_name='ISCO-08 Code')),
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date Created')),
('date_lastupdated', models.DateTimeField(auto_now=True, null=True, verbose_name='Date Modified')),
('parent', models.ForeignKey(blank=True, default=1, null=True, on_delete=django.db.models.deletion.PROTECT, to='health_workforce.StgHealthCadre', verbose_name='Parent Cadre')),
],
options={
'verbose_name': 'Health Cadre',
'verbose_name_plural': ' Health Cadres',
'db_table': 'stg_health_cadre',
'ordering': ('translations__name',),
'managed': True,
},
bases=(parler.models.TranslatableModelMixin, models.Model),
),
migrations.CreateModel(
name='StgInstitutionProgrammes',
fields=[
('course_id', models.AutoField(primary_key=True, serialize=False)),
('uuid', models.CharField(default=uuid.uuid4, editable=False, max_length=36, unique=True, verbose_name='Unique ID')),
('code', models.CharField(blank=True, max_length=50, null=True, unique=True, verbose_name='Code')),
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date Created')),
('date_lastupdated', models.DateTimeField(auto_now=True, null=True, verbose_name='Date Modified')),
],
options={
'verbose_name': 'Training Programme',
'verbose_name_plural': ' Training Programmes',
'db_table': 'stg_institution_programme',
'ordering': ('translations__name',),
'managed': True,
},
bases=(parler.models.TranslatableModelMixin, models.Model),
),
migrations.CreateModel(
name='StgInstitutionType',
fields=[
('type_id', models.AutoField(primary_key=True, serialize=False)),
('uuid', models.CharField(default=uuid.uuid4, editable=False, max_length=36, unique=True, verbose_name='Unique ID')),
('code', models.CharField(blank=True, max_length=50, null=True, unique=True, verbose_name='Code')),
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date Created')),
('date_lastupdated', models.DateTimeField(auto_now=True, null=True, verbose_name='Date Modified')),
],
options={
'verbose_name': 'Institution Type',
'verbose_name_plural': ' Institution Types',
'db_table': 'stg_institution_type',
'ordering': ('translations__name',),
'managed': True,
},
bases=(parler.models.TranslatableModelMixin, models.Model),
),
migrations.CreateModel(
name='StgRecurringEvent',
fields=[
('event_id', models.AutoField(primary_key=True, serialize=False)),
('uuid', models.CharField(default=uuid.uuid4, editable=False, max_length=36, unique=True, verbose_name='Unique ID')),
('code', models.CharField(blank=True, max_length=45, unique=True, verbose_name='Event Code')),
('internal_url', models.FileField(blank=True, upload_to='media/files/events', verbose_name='Upload File/Video(s)')),
('external_url', models.CharField(blank=True, max_length=2083, null=True, verbose_name='Web Address (URL)')),
('cover_image', models.ImageField(blank=True, upload_to='media/images/events', verbose_name='Upload Picture/Banner(s)')),
('start_year', models.PositiveIntegerField(default=2021, help_text='This marks the start of reporting period', validators=[django.core.validators.MinValueValidator(1900), health_workforce.models.max_value_current_year], verbose_name='Starting period')),
('end_year', models.PositiveIntegerField(default=2021, help_text='This marks the end of reporting. The value must be current year or greater than the start year', validators=[django.core.validators.MinValueValidator(1900), health_workforce.models.max_value_current_year], verbose_name='Ending Period')),
('period', models.CharField(blank=True, max_length=10, verbose_name='Period')),
('status', models.CharField(choices=[('active', 'Open'), ('inactive', 'Closed'), ('suspended', 'Suspended')], default='active', max_length=10, verbose_name='Status')),
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date Created')),
('date_lastupdated', models.DateTimeField(auto_now=True, null=True, verbose_name='Date Modified')),
('cadre_id', models.ManyToManyField(blank=True, db_table='stg_recurring_event_lookup', to='health_workforce.StgHealthCadre', verbose_name='Target Focus')),
('location', models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='regions.StgLocation', verbose_name='Event Location')),
],
options={
'verbose_name': 'Nursing & Midwifery',
'verbose_name_plural': 'Nursing and Midwifery',
'db_table': 'stg_recurring_event',
'ordering': ('translations__name',),
'managed': True,
'unique_together': {('location', 'start_year', 'end_year')},
},
bases=(parler.models.TranslatableModelMixin, models.Model),
),
migrations.CreateModel(
name='StgTrainingInstitution',
fields=[
('institution_id', models.AutoField(primary_key=True, serialize=False)),
('uuid', models.CharField(default=uuid.uuid4, editable=False, max_length=36, unique=True, verbose_name='Unique ID')),
('code', models.CharField(blank=True, max_length=15, unique=True, verbose_name='Institution Code')),
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date Created')),
('date_lastupdated', models.DateTimeField(auto_now=True, null=True, verbose_name='Date Modified')),
('location', models.ForeignKey(default='1', on_delete=django.db.models.deletion.PROTECT, to='regions.StgLocation', verbose_name='Location')),
('programmes', models.ManyToManyField(blank=True, db_table='stg_institution_programs_lookup', to='health_workforce.StgInstitutionProgrammes', verbose_name='Training Programmes')),
('type', models.ForeignKey(default=6, on_delete=django.db.models.deletion.PROTECT, to='health_workforce.StgInstitutionType', verbose_name='Institution Type')),
('user', models.ForeignKey(default=2, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='User Name (Email)')),
],
options={
'verbose_name': 'Institution',
'verbose_name_plural': ' Training Institutions',
'db_table': 'stg_traininginstitution',
'ordering': ('translations__name',),
'managed': True,
},
bases=(parler.models.TranslatableModelMixin, models.Model),
),
migrations.CreateModel(
name='HumanWorkforceResourceProxy',
fields=[
],
options={
'verbose_name': 'Resource/Guide',
'verbose_name_plural': 'Resources/Guides',
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=('publications.stgknowledgeproduct',),
),
migrations.CreateModel(
name='ResourceCategoryProxy',
fields=[
],
options={
'verbose_name': 'Resource Category',
'verbose_name_plural': 'Resource Categories',
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=('publications.stgresourcecategory',),
),
migrations.CreateModel(
name='ResourceTypeProxy',
fields=[
],
options={
'verbose_name': 'Resource Type',
'verbose_name_plural': 'Resource Types',
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=('publications.stgresourcetype',),
),
migrations.CreateModel(
name='StgHealthWorkforceFacts',
fields=[
('fact_id', models.AutoField(primary_key=True, serialize=False)),
('uuid', models.CharField(default=uuid.uuid4, editable=False, max_length=36, unique=True, verbose_name='Unique ID')),
('value', models.DecimalField(decimal_places=3, max_digits=20, verbose_name='Data Value')),
('start_year', models.PositiveIntegerField(default=2021, help_text='This marks the start of reporting period', validators=[django.core.validators.MinValueValidator(1900), health_workforce.models.max_value_current_year], verbose_name='Starting period')),
('end_year', models.PositiveIntegerField(default=2021, help_text='This marks the end of reporting. The value must be current year or greater than the start year', validators=[django.core.validators.MinValueValidator(1900), health_workforce.models.max_value_current_year], verbose_name='Ending Period')),
('period', models.CharField(blank=True, max_length=10, verbose_name='Period')),
('status', models.CharField(choices=[('pending', 'Pending'), ('approved', 'Approved'), ('rejected', 'Rejected')], default='pending', max_length=10, verbose_name='Status')),
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date Created')),
('date_lastupdated', models.DateTimeField(auto_now=True, null=True, verbose_name='Date Modified')),
('cadre_id', models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='health_workforce.StgHealthCadre', verbose_name='Occupation/Cadre')),
('categoryoption', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='home.StgCategoryoption', verbose_name='Disaggregation Options')),
('datasource', models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='home.StgDatasource', verbose_name='Data Source')),
('location', models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='regions.StgLocation', verbose_name='Location')),
('measuremethod', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='home.StgMeasuremethod', verbose_name='Measure Type')),
('user', models.ForeignKey(default=2, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='User Name (Email)')),
],
options={
'verbose_name': 'Health Workforce',
'verbose_name_plural': ' Health Workforce',
'db_table': 'fact_health_workforce',
'ordering': ('cadre_id',),
'managed': True,
},
),
migrations.CreateModel(
name='StgTrainingInstitutionTranslation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
('name', models.CharField(max_length=230, verbose_name='Institution Name')),
('faculty', models.CharField(blank=True, max_length=150, null=True, verbose_name='Faculty Name')),
('accreditation', models.CharField(choices=[('accredited', 'Accredited'), ('charterted', 'Chartered'), ('unacredited', 'Not Accredited'), ('pending', 'Pending Accreditation')], default='accredited', max_length=50, verbose_name='Accreditation Status')),
('regulator', models.CharField(blank=True, max_length=150, null=True, verbose_name='Regulatory Body')),
('accreditation_info', models.CharField(blank=True, max_length=2000, verbose_name='Accreditation Details')),
('language', models.CharField(blank=True, max_length=50, null=True, verbose_name='Teaching Language')),
('address', models.CharField(blank=True, max_length=500, null=True, verbose_name='Contact Person')),
('posta', models.CharField(blank=True, max_length=500, null=True, verbose_name='Post Address')),
('email', models.EmailField(blank=True, max_length=150, null=True, unique=True, verbose_name='Email')),
('phone_number', models.CharField(blank=True, max_length=15, validators=[django.core.validators.RegexValidator(message="Phone format: '+999999999' maximum 15.", regex='^\\+?1?\\d{9,15}$')], verbose_name='Phone Number')),
('url', models.URLField(blank=True, max_length=2083, null=True, verbose_name='Web Address')),
('latitude', models.FloatField(blank=True, null=True, verbose_name='Latitude')),
('longitude', models.FloatField(blank=True, null=True, verbose_name='Longitude')),
('master', parler.fields.TranslationsForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='health_workforce.StgTrainingInstitution')),
],
options={
'verbose_name': 'Institution Translation',
'db_table': 'stg_traininginstitution_translation',
'db_tablespace': '',
'managed': True,
'default_permissions': (),
'unique_together': {('language_code', 'master')},
},
bases=(parler.models.TranslatedFieldsModelMixin, models.Model),
),
migrations.CreateModel(
name='StgRecurringEventTranslation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
('name', models.CharField(default='International Year of the Nurse and the Midwife', max_length=230, verbose_name='Name of Event')),
('shortname', models.CharField(max_length=230, verbose_name='Short Name')),
('theme', models.TextField(blank=True, null=True, verbose_name='Theme')),
('master', parler.fields.TranslationsForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='health_workforce.StgRecurringEvent')),
],
options={
'verbose_name': 'Nursing & Midwifery Translation',
'db_table': 'stg_recurring_event_translation',
'db_tablespace': '',
'managed': True,
'default_permissions': (),
'unique_together': {('language_code', 'master')},
},
bases=(parler.models.TranslatedFieldsModelMixin, models.Model),
),
migrations.CreateModel(
name='StgInstitutionTypeTranslation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
('name', models.CharField(max_length=230, verbose_name='Name')),
('shortname', models.CharField(blank=True, max_length=230, null=True, verbose_name='Short Name')),
('description', models.TextField(blank=True, null=True, verbose_name='Brief Description')),
('master', parler.fields.TranslationsForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='health_workforce.StgInstitutionType')),
],
options={
'verbose_name': 'Institution Type Translation',
'db_table': 'stg_institution_type_translation',
'db_tablespace': '',
'managed': True,
'default_permissions': (),
'unique_together': {('language_code', 'master')},
},
bases=(parler.models.TranslatedFieldsModelMixin, models.Model),
),
migrations.CreateModel(
name='StgInstitutionProgrammesTranslation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
('name', models.CharField(max_length=230, verbose_name='Type Name')),
('shortname', models.CharField(blank=True, max_length=230, null=True, verbose_name='Short Name')),
('description', models.TextField(blank=True, null=True, verbose_name='Brief Description')),
('master', parler.fields.TranslationsForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='health_workforce.StgInstitutionProgrammes')),
],
options={
'verbose_name': 'Training Programme Translation',
'db_table': 'stg_institution_programme_translation',
'db_tablespace': '',
'managed': True,
'default_permissions': (),
'unique_together': {('language_code', 'master')},
},
bases=(parler.models.TranslatedFieldsModelMixin, models.Model),
),
migrations.CreateModel(
name='StgHealthCadreTranslation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
('name', models.CharField(max_length=230, verbose_name='Cadre Name')),
('shortname', models.CharField(max_length=230, verbose_name='Short Name')),
('academic', models.CharField(choices=[('degree', 'Degree'), ('diploma', 'Diploma'), ('masters', 'Masters'), ('phd', 'Doctorate'), ('certificate', 'Certificate'), ('basic', 'Basic Education')], default='degree', max_length=10, verbose_name='Academic Qualification')),
('description', models.TextField(blank=True, null=True, verbose_name='Brief Description')),
('master', parler.fields.TranslationsForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='health_workforce.StgHealthCadre')),
],
options={
'verbose_name': 'Health Cadre Translation',
'db_table': 'stg_health_cadre_translation',
'db_tablespace': '',
'managed': True,
'default_permissions': (),
'unique_together': {('language_code', 'master')},
},
bases=(parler.models.TranslatedFieldsModelMixin, models.Model),
),
migrations.CreateModel(
name='StgAnnouncementsTranslation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
('name', models.CharField(max_length=230, verbose_name='Announcment Title')),
('shortname', models.CharField(max_length=230, verbose_name='Short Title')),
('message', models.TextField(blank=True, null=True, verbose_name='Message')),
('master', parler.fields.TranslationsForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='health_workforce.StgAnnouncements')),
],
options={
'verbose_name': 'Announcement Translation',
'db_table': 'stg_event_announcement_translation',
'db_tablespace': '',
'managed': True,
'default_permissions': (),
'unique_together': {('language_code', 'master')},
},
bases=(parler.models.TranslatedFieldsModelMixin, models.Model),
),
]
| 68.901408
| 331
| 0.621014
| 2,405
| 24,460
| 6.126819
| 0.120998
| 0.094808
| 0.045809
| 0.039973
| 0.780658
| 0.737631
| 0.720326
| 0.710825
| 0.699016
| 0.689108
| 0
| 0.01392
| 0.23933
| 24,460
| 354
| 332
| 69.096045
| 0.778029
| 0.001881
| 0
| 0.585014
| 1
| 0
| 0.261675
| 0.050098
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.023055
| 0
| 0.034582
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2fade62f1e7d503c856301c01ed9541c67676181
| 69
|
py
|
Python
|
project_1/src/models/__init__.py
|
kkaryl/AI6126-Advanced_Computer_Vision
|
6a55fe02f3267dc295b001f88df595e649c1fd31
|
[
"MIT"
] | 3
|
2020-12-28T06:58:31.000Z
|
2021-08-30T16:47:03.000Z
|
project_1/src/models/__init__.py
|
kkaryl/AI6126-Advanced_Computer_Vision
|
6a55fe02f3267dc295b001f88df595e649c1fd31
|
[
"MIT"
] | null | null | null |
project_1/src/models/__init__.py
|
kkaryl/AI6126-Advanced_Computer_Vision
|
6a55fe02f3267dc295b001f88df595e649c1fd31
|
[
"MIT"
] | 2
|
2020-12-28T06:57:56.000Z
|
2022-01-15T09:04:53.000Z
|
from __future__ import absolute_import
from .face_attr_net import *
| 17.25
| 38
| 0.84058
| 10
| 69
| 5.1
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 69
| 3
| 39
| 23
| 0.85
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2fb822a32228ad341f937329178ccf15f8d0feac
| 52
|
py
|
Python
|
web.py/v6/spatial_blocking.py
|
columbustech/label-debugger
|
e509c64e3184c05ef936c0a7a881ee0124067776
|
[
"MIT"
] | 1
|
2020-09-23T16:42:53.000Z
|
2020-09-23T16:42:53.000Z
|
web.py/v6/spatial_blocking.py
|
columbustech/label-debugger
|
e509c64e3184c05ef936c0a7a881ee0124067776
|
[
"MIT"
] | 1
|
2019-10-04T22:16:02.000Z
|
2019-11-07T23:19:17.000Z
|
web.py/v6/spatial_blocking.py
|
columbustech/label-debugger
|
e509c64e3184c05ef936c0a7a881ee0124067776
|
[
"MIT"
] | 1
|
2019-09-24T21:17:31.000Z
|
2019-09-24T21:17:31.000Z
|
'''
Created on Mar 9, 2019
@author: hzhang0418
'''
| 8.666667
| 22
| 0.634615
| 7
| 52
| 4.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.214286
| 0.192308
| 52
| 5
| 23
| 10.4
| 0.571429
| 0.826923
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2fc182179e17165fa2991d61377cba99d57fca3f
| 49
|
py
|
Python
|
algorithms/tree/trie/__init__.py
|
duncangh/algorithms
|
9fa789d91294cb3a8045aa36f74d045db6875388
|
[
"MIT"
] | null | null | null |
algorithms/tree/trie/__init__.py
|
duncangh/algorithms
|
9fa789d91294cb3a8045aa36f74d045db6875388
|
[
"MIT"
] | null | null | null |
algorithms/tree/trie/__init__.py
|
duncangh/algorithms
|
9fa789d91294cb3a8045aa36f74d045db6875388
|
[
"MIT"
] | null | null | null |
from .add_and_search import *
from .trie import *
| 24.5
| 29
| 0.77551
| 8
| 49
| 4.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 49
| 2
| 30
| 24.5
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2ff3464d5ec58f64928e909041b7c4ed2e1f639e
| 36
|
py
|
Python
|
toontown/dna/DNAError.py
|
LittleNed/toontown-stride
|
1252a8f9a8816c1810106006d09c8bdfe6ad1e57
|
[
"Apache-2.0"
] | 3
|
2020-01-02T08:43:36.000Z
|
2020-07-05T08:59:02.000Z
|
toontown/dna/DNAError.py
|
NoraTT/Historical-Commits-Project-Altis-Source
|
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
|
[
"Apache-2.0"
] | null | null | null |
toontown/dna/DNAError.py
|
NoraTT/Historical-Commits-Project-Altis-Source
|
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
|
[
"Apache-2.0"
] | 4
|
2019-06-20T23:45:23.000Z
|
2020-10-14T20:30:15.000Z
|
class DNAError(Exception):
pass
| 12
| 26
| 0.722222
| 4
| 36
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.194444
| 36
| 3
| 27
| 12
| 0.896552
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
2ff4a2c49980460cb7549cb9a4e7d8cf71228bcb
| 103
|
py
|
Python
|
LCADMM-0.0.1/LCADMM/__init__.py
|
chenyx09/LCADMM
|
11800fa018bf2057ab73f9b8da3707c13ba19954
|
[
"MIT"
] | null | null | null |
LCADMM-0.0.1/LCADMM/__init__.py
|
chenyx09/LCADMM
|
11800fa018bf2057ab73f9b8da3707c13ba19954
|
[
"MIT"
] | null | null | null |
LCADMM-0.0.1/LCADMM/__init__.py
|
chenyx09/LCADMM
|
11800fa018bf2057ab73f9b8da3707c13ba19954
|
[
"MIT"
] | 1
|
2021-09-24T02:53:51.000Z
|
2021-09-24T02:53:51.000Z
|
from LCADMM.solver import ADMM_problem
from LCADMM.node import ADMM_var
from LCADMM.constants import *
| 25.75
| 38
| 0.84466
| 16
| 103
| 5.3125
| 0.5625
| 0.352941
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116505
| 103
| 3
| 39
| 34.333333
| 0.934066
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2ff911e4d2d6ef66cf748bf106b1b46505e311b5
| 51
|
py
|
Python
|
archive/MCQ/metrics/__init__.py
|
dreinq/DeepQ
|
abb6d8b492f802fefbc0095e8719377dc708069c
|
[
"Apache-2.0"
] | null | null | null |
archive/MCQ/metrics/__init__.py
|
dreinq/DeepQ
|
abb6d8b492f802fefbc0095e8719377dc708069c
|
[
"Apache-2.0"
] | null | null | null |
archive/MCQ/metrics/__init__.py
|
dreinq/DeepQ
|
abb6d8b492f802fefbc0095e8719377dc708069c
|
[
"Apache-2.0"
] | 1
|
2020-11-23T09:13:58.000Z
|
2020-11-23T09:13:58.000Z
|
from .helpers import Reconstruct, QuantizationError
| 51
| 51
| 0.882353
| 5
| 51
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078431
| 51
| 1
| 51
| 51
| 0.957447
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
ff2b85c10f05406abde39babc2e57420c39ded2f
| 294
|
py
|
Python
|
tools/__init__.py
|
zs-liu/Pytorch-AS
|
4e41f96522cce7a35f6625bdbe3863c0b74ee0ca
|
[
"MIT"
] | null | null | null |
tools/__init__.py
|
zs-liu/Pytorch-AS
|
4e41f96522cce7a35f6625bdbe3863c0b74ee0ca
|
[
"MIT"
] | null | null | null |
tools/__init__.py
|
zs-liu/Pytorch-AS
|
4e41f96522cce7a35f6625bdbe3863c0b74ee0ca
|
[
"MIT"
] | null | null | null |
from tools.trainer import Trainer
from tools.evaluator import Evaluator
from tools.sim_function import CosSim
from tools.sim_function import GesdSim
from tools.sim_function import AesdSim
from tools.load_save import save_checkpoint, load_checkpoint
from tools.gpu_monitor import get_memory_use
| 36.75
| 60
| 0.87415
| 45
| 294
| 5.511111
| 0.4
| 0.254032
| 0.145161
| 0.241935
| 0.314516
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098639
| 294
| 7
| 61
| 42
| 0.935849
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
ff548290b01847c59941315ed209a3ac495640fb
| 143
|
py
|
Python
|
4_Backwoods_Forest/150-Backwoods_Ambush_A/back_amb_a.py
|
katitek/Code-Combat
|
fbda1ac0ae4a2e2cbfce21492a2caec8098f1bef
|
[
"MIT"
] | null | null | null |
4_Backwoods_Forest/150-Backwoods_Ambush_A/back_amb_a.py
|
katitek/Code-Combat
|
fbda1ac0ae4a2e2cbfce21492a2caec8098f1bef
|
[
"MIT"
] | null | null | null |
4_Backwoods_Forest/150-Backwoods_Ambush_A/back_amb_a.py
|
katitek/Code-Combat
|
fbda1ac0ae4a2e2cbfce21492a2caec8098f1bef
|
[
"MIT"
] | null | null | null |
# Works only with a good seed
# You need the Emperor's gloves to cast "Chain Lightning"
hero.cast("chain-lightning", hero.findNearestEnemy())
| 28.6
| 57
| 0.755245
| 22
| 143
| 4.909091
| 0.818182
| 0.166667
| 0.333333
| 0.407407
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13986
| 143
| 4
| 58
| 35.75
| 0.878049
| 0.58042
| 0
| 0
| 0
| 0
| 0.263158
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
442c233b0311315e711a70a22c503c695a8891bc
| 50
|
py
|
Python
|
buildscripts/__init__.py
|
EshaMaharishi/pubsub-1
|
13cb194078ed39b00ea623db0d87df8e153e7981
|
[
"Apache-2.0"
] | 324
|
2015-01-01T14:56:10.000Z
|
2022-03-08T04:52:37.000Z
|
buildscripts/__init__.py
|
wujf/mongo
|
f2f48b749ded0c5585c798c302f6162f19336670
|
[
"Apache-2.0"
] | 38
|
2015-01-31T03:57:16.000Z
|
2019-04-21T03:30:53.000Z
|
buildscripts/__init__.py
|
wujf/mongo
|
f2f48b749ded0c5585c798c302f6162f19336670
|
[
"Apache-2.0"
] | 60
|
2015-01-14T14:19:41.000Z
|
2021-02-10T21:54:12.000Z
|
import os;
def findHacks( un ):
return None
| 8.333333
| 20
| 0.64
| 7
| 50
| 4.571429
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.28
| 50
| 5
| 21
| 10
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
|
0
| 5
|
44375a389733736a47263faebccf61d7e8dfc27b
| 29
|
py
|
Python
|
src/lib/scientific.py
|
edcheng160/abacus
|
f967528322d23b5624c7a62e123b24cf542bdada
|
[
"MIT"
] | null | null | null |
src/lib/scientific.py
|
edcheng160/abacus
|
f967528322d23b5624c7a62e123b24cf542bdada
|
[
"MIT"
] | null | null | null |
src/lib/scientific.py
|
edcheng160/abacus
|
f967528322d23b5624c7a62e123b24cf542bdada
|
[
"MIT"
] | null | null | null |
#Scientific arithmetic modul
| 14.5
| 28
| 0.862069
| 3
| 29
| 8.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103448
| 29
| 1
| 29
| 29
| 0.961538
| 0.931034
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
445abd07b66650cfee22200057fa2ad2d8b8fca8
| 655
|
py
|
Python
|
src/tests/webDriverFunction.py
|
Chrisfufu/FullStackTesting1
|
1b5b5486e00e71cb08626cb4294be4a862ecc52c
|
[
"Apache-2.0"
] | null | null | null |
src/tests/webDriverFunction.py
|
Chrisfufu/FullStackTesting1
|
1b5b5486e00e71cb08626cb4294be4a862ecc52c
|
[
"Apache-2.0"
] | 2
|
2021-03-19T08:59:35.000Z
|
2021-03-30T13:52:33.000Z
|
src/tests/webDriverFunction.py
|
Chrisfufu/FullStackTesting1
|
1b5b5486e00e71cb08626cb4294be4a862ecc52c
|
[
"Apache-2.0"
] | null | null | null |
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
# this is wait Web Driver to update the XPATH
def waitWebDriver(driver, xpath):
return WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.XPATH, xpath))
)
def waitWebDriverByClass_name(driver, className):
return WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.CLASS_NAME, className))
)
| 34.473684
| 66
| 0.783206
| 86
| 655
| 5.860465
| 0.430233
| 0.142857
| 0.208333
| 0.166667
| 0.380952
| 0.380952
| 0.238095
| 0.238095
| 0.238095
| 0.238095
| 0
| 0.007117
| 0.141985
| 655
| 18
| 67
| 36.388889
| 0.88968
| 0.065649
| 0
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.428571
| 0.142857
| 0.714286
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
44672db167d9f091f5d504cbd84899f02df16473
| 124
|
py
|
Python
|
prog.py
|
bhargavbhegde7/GoChat
|
d0a163da2a1a60fa152d5b03bfebc87390137a30
|
[
"MIT"
] | 1
|
2020-05-24T07:31:25.000Z
|
2020-05-24T07:31:25.000Z
|
prog.py
|
bhargavbhegde7/GoChat
|
d0a163da2a1a60fa152d5b03bfebc87390137a30
|
[
"MIT"
] | 1
|
2020-05-24T18:28:25.000Z
|
2020-05-24T18:28:25.000Z
|
prog.py
|
bhargavbhegde7/GoChat
|
d0a163da2a1a60fa152d5b03bfebc87390137a30
|
[
"MIT"
] | null | null | null |
import sys
print 'what is your name?'
sys.stdout.flush()
name = raw_input()
print 'your name is ' + name
sys.stdout.flush()
| 17.714286
| 28
| 0.709677
| 21
| 124
| 4.142857
| 0.52381
| 0.183908
| 0.298851
| 0.413793
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153226
| 124
| 6
| 29
| 20.666667
| 0.828571
| 0
| 0
| 0.333333
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.166667
| null | null | 0.333333
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
924ce0006f0303761422a873aa0c8d201fcf41b9
| 286
|
py
|
Python
|
pyCHNOSZ/__init__.py
|
worm-portal/pyCHNOSZ
|
c00370557abcdea84bdf14aa3f5d6dfe12475fba
|
[
"MIT"
] | null | null | null |
pyCHNOSZ/__init__.py
|
worm-portal/pyCHNOSZ
|
c00370557abcdea84bdf14aa3f5d6dfe12475fba
|
[
"MIT"
] | null | null | null |
pyCHNOSZ/__init__.py
|
worm-portal/pyCHNOSZ
|
c00370557abcdea84bdf14aa3f5d6dfe12475fba
|
[
"MIT"
] | null | null | null |
from .fun import subcrt, info, add_OBIGT, mod_OBIGT, reset, basis, species, affinity, equilibrate, diagram, seq2aa, add_protein, entropy, zc, mass, makeup, thermo, water, diagram_interactive, animation, html_chemname_format, unicurve, univariant_TP, syslab, ratlab, retrieve, solubility
| 286
| 286
| 0.804196
| 37
| 286
| 6.027027
| 0.918919
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003891
| 0.101399
| 286
| 1
| 286
| 286
| 0.863813
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2b9de7919311f1a26c867bbc789fcbab3c202d4c
| 223
|
py
|
Python
|
Exercicios07_MediaAritimetica.py
|
icarogoggin/Exercitando_python
|
718193e962cfcceebee0a643dd48e521ecda1133
|
[
"MIT"
] | null | null | null |
Exercicios07_MediaAritimetica.py
|
icarogoggin/Exercitando_python
|
718193e962cfcceebee0a643dd48e521ecda1133
|
[
"MIT"
] | null | null | null |
Exercicios07_MediaAritimetica.py
|
icarogoggin/Exercitando_python
|
718193e962cfcceebee0a643dd48e521ecda1133
|
[
"MIT"
] | null | null | null |
nota1 = float(input('Primeira nota do aluno: '))
nota2 = float(input('Segunda nota do aluno: '))
media = nota1/nota2
print(f'A primeira nota do aluno foi {nota1} a segunda nota foi {nota2} e a média final foi {media:.2f}.')
| 55.75
| 106
| 0.70852
| 38
| 223
| 4.157895
| 0.473684
| 0.113924
| 0.208861
| 0.240506
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037037
| 0.152466
| 223
| 4
| 106
| 55.75
| 0.798942
| 0
| 0
| 0
| 0
| 0.25
| 0.638393
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 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
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2ba8781330f1afa9e1e955c19bee42e50635e548
| 360
|
pyde
|
Python
|
Tasks/Nesterenko_2_4/Nesterenko_2_4.pyde
|
Rubeuz/2019-fall-polytech-cs
|
3efa8a5d6d0fee3bdadf77fa95fe2817a6b945c4
|
[
"MIT"
] | null | null | null |
Tasks/Nesterenko_2_4/Nesterenko_2_4.pyde
|
Rubeuz/2019-fall-polytech-cs
|
3efa8a5d6d0fee3bdadf77fa95fe2817a6b945c4
|
[
"MIT"
] | null | null | null |
Tasks/Nesterenko_2_4/Nesterenko_2_4.pyde
|
Rubeuz/2019-fall-polytech-cs
|
3efa8a5d6d0fee3bdadf77fa95fe2817a6b945c4
|
[
"MIT"
] | null | null | null |
def setup():
noLoop()
size(500, 500)
noStroke()
smooth()
def draw():
background(50)
fill(94, 206, 40, 100)
ellipse(250, 100, 160, 160)
fill(94, 206, 40, 150)
ellipse(250, 200, 160, 160)
fill(94, 206, 40, 200)
ellipse(250, 300, 160, 160)
fill(94, 206, 40, 250)
ellipse(250, 400, 160, 160)
| 18
| 31
| 0.525
| 52
| 360
| 3.634615
| 0.423077
| 0.126984
| 0.190476
| 0.232804
| 0.269841
| 0.269841
| 0
| 0
| 0
| 0
| 0
| 0.390244
| 0.316667
| 360
| 19
| 32
| 18.947368
| 0.378049
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.133333
| true
| 0
| 0
| 0
| 0.133333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 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
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2bbe43004db365f2cf8a84cf93529ccc9c34a247
| 957
|
py
|
Python
|
src/inquirer/__init__.py
|
philipbergen/python-inquirer
|
f32aed731d74f0f32c15ba949137dee73d023146
|
[
"MIT"
] | null | null | null |
src/inquirer/__init__.py
|
philipbergen/python-inquirer
|
f32aed731d74f0f32c15ba949137dee73d023146
|
[
"MIT"
] | null | null | null |
src/inquirer/__init__.py
|
philipbergen/python-inquirer
|
f32aed731d74f0f32c15ba949137dee73d023146
|
[
"MIT"
] | null | null | null |
from inquirer.prompt import prompt
from inquirer.questions import Checkbox
from inquirer.questions import Confirm
from inquirer.questions import Editor
from inquirer.questions import List
from inquirer.questions import Password
from inquirer.questions import Path
from inquirer.questions import Text
from inquirer.questions import load_from_dict
from inquirer.questions import load_from_json
from inquirer.questions import load_from_list
from inquirer.shortcuts import checkbox
from inquirer.shortcuts import confirm
from inquirer.shortcuts import editor
from inquirer.shortcuts import list_input
from inquirer.shortcuts import password
from inquirer.shortcuts import text
__all__ = [
"prompt",
"Text",
"Editor",
"Password",
"Confirm",
"List",
"Checkbox",
"Path",
"load_from_list",
"load_from_dict",
"load_from_json",
"text",
"editor",
"password",
"confirm",
"list_input",
"checkbox",
]
| 24.538462
| 45
| 0.759666
| 117
| 957
| 6.059829
| 0.153846
| 0.287729
| 0.296192
| 0.380818
| 0.229901
| 0.148096
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166144
| 957
| 38
| 46
| 25.184211
| 0.888471
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.111111
| 0.472222
| 0
| 0.472222
| 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
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
2be10ab4208b2d3947378f644161e0ceaa063c87
| 7,293
|
py
|
Python
|
python_modules/dagster-pandas/dagster_pandas_tests/test_config_driven_df.py
|
vishvananda/dagster
|
f6aa44714246bc770fe05a9c986fe8b7d848956b
|
[
"Apache-2.0"
] | null | null | null |
python_modules/dagster-pandas/dagster_pandas_tests/test_config_driven_df.py
|
vishvananda/dagster
|
f6aa44714246bc770fe05a9c986fe8b7d848956b
|
[
"Apache-2.0"
] | null | null | null |
python_modules/dagster-pandas/dagster_pandas_tests/test_config_driven_df.py
|
vishvananda/dagster
|
f6aa44714246bc770fe05a9c986fe8b7d848956b
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import unicode_literals
import pytest
import pandas as pd
from dagster import (
DependencyDefinition,
InputDefinition,
PipelineConfigEvaluationError,
PipelineDefinition,
OutputDefinition,
execute_pipeline,
solid,
)
from dagster.utils import script_relative_path
from dagster.utils.test import get_temp_file_name
from dagster_pandas import DataFrame
def test_dataframe_csv_from_inputs():
called = {}
@solid(inputs=[InputDefinition('df', DataFrame)])
def df_as_config(_context, df):
assert df.to_dict('list') == {'num1': [1, 3], 'num2': [2, 4]}
called['yup'] = True
pipeline = PipelineDefinition(solids=[df_as_config])
result = execute_pipeline(
pipeline,
{
'solids': {
'df_as_config': {
'inputs': {'df': {'csv': {'path': script_relative_path('num.csv')}}}
}
}
},
)
assert result.success
assert called['yup']
def test_dataframe_wrong_sep_from_inputs():
called = {}
@solid(inputs=[InputDefinition('df', DataFrame)])
def df_as_config(_context, df):
# this is the pandas behavior
assert df.to_dict('list') == {'num1,num2': ['1,2', '3,4']}
called['yup'] = True
pipeline = PipelineDefinition(solids=[df_as_config])
result = execute_pipeline(
pipeline,
{
'solids': {
'df_as_config': {
'inputs': {'df': {'csv': {'path': script_relative_path('num.csv'), 'sep': '|'}}}
}
}
},
)
assert result.success
assert called['yup']
def test_dataframe_pipe_sep_csv_from_inputs():
called = {}
@solid(inputs=[InputDefinition('df', DataFrame)])
def df_as_config(_context, df):
assert df.to_dict('list') == {'num1': [1, 3], 'num2': [2, 4]}
called['yup'] = True
pipeline = PipelineDefinition(solids=[df_as_config])
result = execute_pipeline(
pipeline,
{
'solids': {
'df_as_config': {
'inputs': {
'df': {'csv': {'path': script_relative_path('num_pipes.csv'), 'sep': '|'}}
}
}
}
},
)
assert result.success
assert called['yup']
def test_dataframe_csv_missing_inputs():
called = {}
@solid(inputs=[InputDefinition('df', DataFrame)])
def df_as_input(_context, df): # pylint: disable=W0613
called['yup'] = True
pipeline = PipelineDefinition(name='missing_inputs', solids=[df_as_input])
with pytest.raises(PipelineConfigEvaluationError) as exc_info:
execute_pipeline(pipeline)
assert (
'Missing required field "solids" at document config root. Expected: "{ context?: '
'MissingInputs.ContextConfig execution?: MissingInputs.ExecutionConfig '
'expectations?: MissingInputs.ExpectationsConfig solids: '
'MissingInputs.SolidsConfigDictionary }"'
) in str(exc_info.value)
assert 'yup' not in called
def test_dataframe_csv_missing_input_collision():
called = {}
@solid(outputs=[OutputDefinition(DataFrame)])
def df_as_output(_context):
return pd.DataFrame()
@solid(inputs=[InputDefinition('df', DataFrame)])
def df_as_input(_context, df): # pylint: disable=W0613
called['yup'] = True
pipeline = PipelineDefinition(
name='overlapping',
solids=[df_as_input, df_as_output],
dependencies={'df_as_input': {'df': DependencyDefinition('df_as_output')}},
)
with pytest.raises(PipelineConfigEvaluationError) as exc_info:
execute_pipeline(
pipeline,
{
'solids': {
'df_as_input': {
'inputs': {'df': {'csv': {'path': script_relative_path('num.csv')}}}
}
}
},
)
assert 'Error 1: Undefined field "inputs" at path root:solids:df_as_input' in str(
exc_info.value
)
assert 'yup' not in called
def test_dataframe_parquet_from_inputs():
called = {}
@solid(inputs=[InputDefinition('df', DataFrame)])
def df_as_config(_context, df):
assert df.to_dict('list') == {'num1': [1, 3], 'num2': [2, 4]}
called['yup'] = True
pipeline = PipelineDefinition(solids=[df_as_config])
result = execute_pipeline(
pipeline,
{
'solids': {
'df_as_config': {
'inputs': {'df': {'parquet': {'path': script_relative_path('num.parquet')}}}
}
}
},
)
assert result.success
assert called['yup']
def test_dataframe_table_from_inputs():
called = {}
@solid(inputs=[InputDefinition('df', DataFrame)])
def df_as_config(_context, df):
assert df.to_dict('list') == {'num1': [1, 3], 'num2': [2, 4]}
called['yup'] = True
pipeline = PipelineDefinition(solids=[df_as_config])
result = execute_pipeline(
pipeline,
{
'solids': {
'df_as_config': {
'inputs': {'df': {'table': {'path': script_relative_path('num_table.txt')}}}
}
}
},
)
assert result.success
assert called['yup']
def test_dataframe_csv_materialization():
@solid(outputs=[OutputDefinition(DataFrame)])
def return_df(_context):
return pd.DataFrame({'num1': [1, 3], 'num2': [2, 4]})
pipeline_def = PipelineDefinition(name='return_df_pipeline', solids=[return_df])
with get_temp_file_name() as filename:
result = execute_pipeline(
pipeline_def,
{'solids': {'return_df': {'outputs': [{'result': {'csv': {'path': filename}}}]}}},
)
assert result.success
df = pd.read_csv(filename)
assert df.to_dict('list') == {'num1': [1, 3], 'num2': [2, 4]}
def test_dataframe_parquet_materialization():
@solid(outputs=[OutputDefinition(DataFrame)])
def return_df(_context):
return pd.DataFrame({'num1': [1, 3], 'num2': [2, 4]})
pipeline_def = PipelineDefinition(name='return_df_pipeline', solids=[return_df])
with get_temp_file_name() as filename:
result = execute_pipeline(
pipeline_def,
{'solids': {'return_df': {'outputs': [{'result': {'parquet': {'path': filename}}}]}}},
)
assert result.success
df = pd.read_parquet(filename)
assert df.to_dict('list') == {'num1': [1, 3], 'num2': [2, 4]}
def test_dataframe_table_materialization():
@solid(outputs=[OutputDefinition(DataFrame)])
def return_df(_context):
return pd.DataFrame({'num1': [1, 3], 'num2': [2, 4]})
pipeline_def = PipelineDefinition(name='return_df_pipeline', solids=[return_df])
with get_temp_file_name() as filename:
filename = '/tmp/table_test.txt'
result = execute_pipeline(
pipeline_def,
{'solids': {'return_df': {'outputs': [{'result': {'table': {'path': filename}}}]}}},
)
assert result.success
df = pd.read_table(filename)
assert df.to_dict('list') == {'num1': [1, 3], 'num2': [2, 4]}
| 27.730038
| 100
| 0.576855
| 756
| 7,293
| 5.320106
| 0.132275
| 0.024863
| 0.037295
| 0.024863
| 0.771755
| 0.745152
| 0.737195
| 0.737195
| 0.708105
| 0.684734
| 0
| 0.01424
| 0.277801
| 7,293
| 262
| 101
| 27.835878
| 0.749383
| 0.009735
| 0
| 0.528205
| 0
| 0
| 0.138127
| 0.020366
| 0
| 0
| 0
| 0
| 0.128205
| 1
| 0.107692
| false
| 0
| 0.035897
| 0.020513
| 0.164103
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2bf862c7581e56ab5478cffb04c54c240af29acc
| 95
|
py
|
Python
|
foo.py
|
ecreager/pocket
|
98bb63988645f6714ab3307abb265cc7d128f69b
|
[
"Apache-2.0"
] | null | null | null |
foo.py
|
ecreager/pocket
|
98bb63988645f6714ab3307abb265cc7d128f69b
|
[
"Apache-2.0"
] | null | null | null |
foo.py
|
ecreager/pocket
|
98bb63988645f6714ab3307abb265cc7d128f69b
|
[
"Apache-2.0"
] | null | null | null |
l = [58, 60, 67, 72, 76, 74, 79]
s = '['
for ll in l:
s += ' %i' % (ll + 9)
s += ' ]'
print(s)
| 15.833333
| 32
| 0.378947
| 20
| 95
| 1.8
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.227273
| 0.305263
| 95
| 6
| 33
| 15.833333
| 0.318182
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.166667
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9206f1496082e79cf42088b8f82d47a3f038f21b
| 107
|
py
|
Python
|
general-practice/Exercises solved/w3resource/basic/Exercise78.py
|
lugabrielbueno/Projeto
|
f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0
|
[
"MIT"
] | null | null | null |
general-practice/Exercises solved/w3resource/basic/Exercise78.py
|
lugabrielbueno/Projeto
|
f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0
|
[
"MIT"
] | null | null | null |
general-practice/Exercises solved/w3resource/basic/Exercise78.py
|
lugabrielbueno/Projeto
|
f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0
|
[
"MIT"
] | null | null | null |
# Write a Python program to find the available built-in module
import sys
print(sys.builtin_module_names)
| 21.4
| 62
| 0.813084
| 18
| 107
| 4.722222
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140187
| 107
| 5
| 63
| 21.4
| 0.923913
| 0.560748
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
9208796f9f1c9571609a279e6760b17f3dd42362
| 65
|
py
|
Python
|
neurotic/gui/icons/__init__.py
|
jpgill86/neurotic
|
2f1cba4c7df4f21e32d7c29f5d80c76662372f3b
|
[
"MIT"
] | 26
|
2019-07-02T12:01:44.000Z
|
2022-03-09T04:24:12.000Z
|
neurotic/gui/icons/__init__.py
|
jpgill86/neurotic
|
2f1cba4c7df4f21e32d7c29f5d80c76662372f3b
|
[
"MIT"
] | 310
|
2019-06-22T15:54:51.000Z
|
2021-11-11T20:01:13.000Z
|
neurotic/gui/icons/__init__.py
|
jpgill86/neurotic
|
2f1cba4c7df4f21e32d7c29f5d80c76662372f3b
|
[
"MIT"
] | 7
|
2019-11-29T12:58:04.000Z
|
2021-06-25T10:01:30.000Z
|
# -*- coding: utf-8 -*-
"""
"""
from ...gui.icons import icons
| 9.285714
| 30
| 0.507692
| 8
| 65
| 4.125
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019231
| 0.2
| 65
| 6
| 31
| 10.833333
| 0.615385
| 0.323077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a6118e049339ec7c6498f14df6d191ae2b28d441
| 85
|
py
|
Python
|
kairon/shared/end_user_metrics/constants.py
|
rit1200/kairon
|
674a491f6deeae4800825ca93e0726e4fb6e0866
|
[
"Apache-2.0"
] | 9
|
2020-04-22T12:49:29.000Z
|
2020-06-13T22:23:20.000Z
|
kairon/shared/end_user_metrics/constants.py
|
rit1200/kairon
|
674a491f6deeae4800825ca93e0726e4fb6e0866
|
[
"Apache-2.0"
] | 18
|
2020-04-20T12:39:20.000Z
|
2020-05-21T05:10:51.000Z
|
kairon/shared/end_user_metrics/constants.py
|
rit1200/kairon
|
674a491f6deeae4800825ca93e0726e4fb6e0866
|
[
"Apache-2.0"
] | 13
|
2020-04-21T12:12:40.000Z
|
2020-05-13T07:27:44.000Z
|
from enum import Enum
class MetricTypes(Enum):
agent_handoff = "agent_handoff"
| 14.166667
| 35
| 0.752941
| 11
| 85
| 5.636364
| 0.636364
| 0.387097
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 85
| 5
| 36
| 17
| 0.885714
| 0
| 0
| 0
| 0
| 0
| 0.152941
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a6447308fd4f5a36b096ba81c870badea6a21516
| 184
|
py
|
Python
|
src/common/ycb/ycb_helper/__init__.py
|
JonasFrey96/RPOSE
|
7da77499ab777ce7ee37b731541982870da8d40b
|
[
"BSD-3-Clause"
] | null | null | null |
src/common/ycb/ycb_helper/__init__.py
|
JonasFrey96/RPOSE
|
7da77499ab777ce7ee37b731541982870da8d40b
|
[
"BSD-3-Clause"
] | null | null | null |
src/common/ycb/ycb_helper/__init__.py
|
JonasFrey96/RPOSE
|
7da77499ab777ce7ee37b731541982870da8d40b
|
[
"BSD-3-Clause"
] | null | null | null |
from .augmenter import Augmentation
from .bounding_box import BoundingBox, get_bb_from_depth, get_bb_real_target
from .camera import *
from .viewpoint_manager import ViewpointManager
| 30.666667
| 76
| 0.858696
| 25
| 184
| 6
| 0.64
| 0.066667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103261
| 184
| 5
| 77
| 36.8
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a685281d8adce6d18616c45467e1d7f7a4cdf6e1
| 162
|
py
|
Python
|
run.py
|
patarapolw/srs-sqlite
|
2985d7aed645b50f8a5f13acb7d7a518cf8e50cc
|
[
"MIT"
] | 2
|
2019-05-09T03:51:00.000Z
|
2021-05-24T13:24:05.000Z
|
run.py
|
patarapolw/srs-sqlite
|
2985d7aed645b50f8a5f13acb7d7a518cf8e50cc
|
[
"MIT"
] | null | null | null |
run.py
|
patarapolw/srs-sqlite
|
2985d7aed645b50f8a5f13acb7d7a518cf8e50cc
|
[
"MIT"
] | 1
|
2021-10-29T22:15:46.000Z
|
2021-10-29T22:15:46.000Z
|
from srs_sqlite import load_srs
if __name__ == '__main__':
# load_srs('user/PathoKnowledge.db', debug=True)
load_srs('user/PathoImages.db', debug=True)
| 23.142857
| 52
| 0.722222
| 23
| 162
| 4.565217
| 0.608696
| 0.2
| 0.209524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141975
| 162
| 6
| 53
| 27
| 0.755396
| 0.283951
| 0
| 0
| 0
| 0
| 0.236842
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a6917cf48892a49e089bee75d9af645f37cd4c93
| 171
|
py
|
Python
|
python/20190303/Code/flask_todo_app/application/utils/filters.py
|
Realize0917/career
|
b5d02ac53cfc3ce3a2ca38d11480c51560283e67
|
[
"MIT"
] | 3
|
2019-01-17T05:50:51.000Z
|
2019-03-15T10:10:07.000Z
|
python/20190303/Code/flask_todo_app/application/utils/filters.py
|
Realize0917/career
|
b5d02ac53cfc3ce3a2ca38d11480c51560283e67
|
[
"MIT"
] | 10
|
2019-01-17T06:07:03.000Z
|
2019-02-19T05:55:25.000Z
|
python/20190303/Code/flask_todo_app/application/utils/filters.py
|
Realize0917/career
|
b5d02ac53cfc3ce3a2ca38d11480c51560283e67
|
[
"MIT"
] | 4
|
2018-12-22T07:32:55.000Z
|
2019-03-06T09:13:48.000Z
|
from datetime import datetime
from . import utils_bp
@utils_bp.app_template_filter('human_time')
def human_time(dt):
return datetime.strftime(dt, '%a, %b %Y %H:%M:%S')
| 28.5
| 52
| 0.736842
| 29
| 171
| 4.137931
| 0.689655
| 0.116667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116959
| 171
| 6
| 52
| 28.5
| 0.794702
| 0
| 0
| 0
| 0
| 0
| 0.162791
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 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
| 1
| 1
| 1
| 0
|
0
| 5
|
a6aa81cba47b071d0249d9c14c207183e59c6cb7
| 57
|
py
|
Python
|
Stage/r_log/__init__.py
|
zuoziji/transaction
|
7a59817a699d9df32e13d43edda630520af7860d
|
[
"Apache-2.0"
] | null | null | null |
Stage/r_log/__init__.py
|
zuoziji/transaction
|
7a59817a699d9df32e13d43edda630520af7860d
|
[
"Apache-2.0"
] | 9
|
2021-02-08T20:19:53.000Z
|
2022-03-11T23:16:46.000Z
|
Stage/r_log/__init__.py
|
zuoziji/transaction
|
7a59817a699d9df32e13d43edda630520af7860d
|
[
"Apache-2.0"
] | 2
|
2019-03-03T14:27:54.000Z
|
2019-07-22T09:00:35.000Z
|
from r_log.handlers import RedisHandler, RedisListHandler
| 57
| 57
| 0.894737
| 7
| 57
| 7.142857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.070175
| 57
| 1
| 57
| 57
| 0.943396
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a6d73980d9f0437115a34bde795d1e16605ccc05
| 128
|
py
|
Python
|
lib/data/__init__.py
|
ishine/TextNormSeq2Seq
|
585b6a7f17910876c76240ff82ee811c66e23104
|
[
"MIT"
] | 36
|
2019-04-20T15:06:45.000Z
|
2022-03-03T22:42:57.000Z
|
lib/data/__init__.py
|
ishine/TextNormSeq2Seq
|
585b6a7f17910876c76240ff82ee811c66e23104
|
[
"MIT"
] | 5
|
2019-06-06T14:48:54.000Z
|
2021-06-05T15:40:09.000Z
|
lib/data/__init__.py
|
ishine/TextNormSeq2Seq
|
585b6a7f17910876c76240ff82ee811c66e23104
|
[
"MIT"
] | 13
|
2019-05-11T02:59:54.000Z
|
2022-03-23T18:24:10.000Z
|
from .Dataset import Dataset
from .constants import *
from .DataLoader import DataLoader, create_datasets
from .Dict import Dict
| 32
| 51
| 0.828125
| 17
| 128
| 6.176471
| 0.470588
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 128
| 4
| 52
| 32
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a6dc31e084cb1657b9e60d4f80884e6355106915
| 154
|
py
|
Python
|
test/drafts/2016-10-21_1954 u/a03 numpy.py
|
friedrichromstedt/upy
|
4b6b890259fb34bc69265fc400881587157b03a3
|
[
"MIT"
] | 3
|
2015-06-01T23:09:38.000Z
|
2015-10-06T13:14:23.000Z
|
test/drafts/2016-10-21_1954 u/a03 numpy.py
|
friedrichromstedt/upy
|
4b6b890259fb34bc69265fc400881587157b03a3
|
[
"MIT"
] | null | null | null |
test/drafts/2016-10-21_1954 u/a03 numpy.py
|
friedrichromstedt/upy
|
4b6b890259fb34bc69265fc400881587157b03a3
|
[
"MIT"
] | null | null | null |
import numpy
a = numpy.asarray(1)
print repr(a)
b = a + 0
print repr(b)
c = a + numpy.asarray(0)
print repr(c)
d = numpy.asarray(a + 0)
print repr(d)
| 11
| 24
| 0.636364
| 31
| 154
| 3.16129
| 0.354839
| 0.367347
| 0.306122
| 0.22449
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032787
| 0.207792
| 154
| 13
| 25
| 11.846154
| 0.770492
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.111111
| null | null | 0.444444
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
a6def61337a25c999e60906fa8d184f5e0480499
| 12,610
|
py
|
Python
|
apps/logs/tests/test_api_importbatch.py
|
techlib/czechelib-stats
|
ca132e326af0924740a525710474870b1fb5fd37
|
[
"MIT"
] | 1
|
2019-12-12T15:38:42.000Z
|
2019-12-12T15:38:42.000Z
|
apps/logs/tests/test_api_importbatch.py
|
techlib/czechelib-stats
|
ca132e326af0924740a525710474870b1fb5fd37
|
[
"MIT"
] | null | null | null |
apps/logs/tests/test_api_importbatch.py
|
techlib/czechelib-stats
|
ca132e326af0924740a525710474870b1fb5fd37
|
[
"MIT"
] | null | null | null |
import pytest
from django.urls import reverse
from logs.models import ImportBatch
from test_fixtures.entities.credentials import CredentialsFactory
from test_fixtures.entities.fetchattempts import FetchAttemptFactory
from test_fixtures.entities.logs import ManualDataUploadFactory, ImportBatchFullFactory
from test_fixtures.entities.scheduler import FetchIntentionFactory
from test_fixtures.scenarios.basic import (
users,
report_types,
counter_report_types,
organizations,
platforms,
data_sources,
clients,
identities,
credentials,
) # noqa
@pytest.mark.django_db
class TestImportBatchesAPI:
lookup_url = reverse('import-batch-lookup')
purge_url = reverse('import-batch-purge')
@pytest.fixture()
def data(
self, report_types, counter_report_types, organizations, platforms, clients, credentials
):
FetchIntentionFactory(
start_date="2020-01-01",
end_date="2020-01-31",
credentials=credentials["standalone_tr"],
counter_report=counter_report_types["tr"],
attempt=FetchAttemptFactory(
start_date="2020-01-01",
end_date="2020-01-31",
error_code="3031",
credentials=credentials["standalone_tr"],
counter_report=counter_report_types["tr"],
import_batch=None,
),
)
FetchIntentionFactory(
start_date="2020-01-01",
end_date="2020-01-31",
credentials=credentials["standalone_tr"],
counter_report=counter_report_types["tr"],
attempt=FetchAttemptFactory(
start_date="2020-01-01",
end_date="2020-01-31",
credentials=credentials["standalone_tr"],
counter_report=counter_report_types["tr"],
import_batch=ImportBatchFullFactory(
date="2020-01-01",
organization=organizations["standalone"],
platform=platforms["standalone"],
report_type=report_types["tr"],
),
),
)
FetchIntentionFactory(
start_date="2020-02-01",
end_date="2020-02-29",
credentials=credentials["standalone_tr"],
counter_report=counter_report_types["tr"],
attempt=FetchAttemptFactory(
start_date="2020-02-01",
end_date="2020-02-29",
credentials=credentials["standalone_tr"],
counter_report=counter_report_types["tr"],
import_batch=ImportBatchFullFactory(
date="2020-02-01",
organization=organizations["standalone"],
platform=platforms["standalone"],
report_type=report_types["tr"],
),
),
)
FetchIntentionFactory(
start_date="2020-02-01",
end_date="2020-02-29",
credentials=credentials["standalone_br1_jr1"],
counter_report=counter_report_types["br1"],
attempt=FetchAttemptFactory(
start_date="2020-02-01",
end_date="2020-02-29",
credentials=credentials["standalone_br1_jr1"],
counter_report=counter_report_types["br1"],
import_batch=ImportBatchFullFactory(
date="2020-02-01",
organization=organizations["standalone"],
platform=platforms["standalone"],
report_type=report_types["br1"],
),
),
)
FetchIntentionFactory(
start_date="2020-01-01",
end_date="2020-01-31",
credentials=credentials["branch_pr"],
counter_report=counter_report_types["pr"],
attempt=FetchAttemptFactory(
start_date="2020-01-01",
end_date="2020-01-31",
credentials=credentials["branch_pr"],
counter_report=counter_report_types["pr"],
import_batch=ImportBatchFullFactory(
date="2020-01-01",
organization=organizations["branch"],
platform=platforms["branch"],
report_type=report_types["pr"],
),
),
)
ManualDataUploadFactory(
organization=organizations["standalone"],
platform=platforms["standalone"],
report_type=report_types["tr"],
import_batches=(
ImportBatchFullFactory(
date="2020-03-01",
organization=organizations["standalone"],
platform=platforms["standalone"],
report_type=report_types["tr"],
),
ImportBatchFullFactory(
date="2020-04-01",
organization=organizations["standalone"],
platform=platforms["standalone"],
report_type=report_types["tr"],
),
),
)
ManualDataUploadFactory(
organization=organizations["branch"],
platform=platforms["branch"],
report_type=report_types["pr"],
import_batches=(
ImportBatchFullFactory(
date="2020-02-01",
organization=organizations["branch"],
platform=platforms["branch"],
report_type=report_types["pr"],
),
ImportBatchFullFactory(
date="2020-03-01",
organization=organizations["branch"],
platform=platforms["branch"],
report_type=report_types["pr"],
),
ImportBatchFullFactory(
date="2020-04-01",
organization=organizations["branch"],
platform=platforms["branch"],
report_type=report_types["pr"],
),
),
)
def test_lookup(self, data, clients, organizations, platforms, report_types):
# empty lookup
resp = clients["su"].post(self.lookup_url, data=[], format="json")
assert resp.status_code == 200
assert resp.data == []
resp = clients["su"].post(
f"{self.lookup_url}?order_by=date",
[
{
"organization": organizations["standalone"].pk,
"platform": platforms["standalone"].pk,
"report_type": report_types["tr"].pk,
"months": ["2020-02-01", "2020-03-01"],
}
],
format="json",
)
assert resp.status_code == 200
assert len(resp.data) == 2
assert resp.data[0]["date"] == "2020-02-01"
assert resp.data[0]["report_type"]["pk"] == report_types["tr"].pk
assert resp.data[0]["organization"]["pk"] == organizations["standalone"].pk
assert resp.data[0]["platform"]["pk"] == platforms["standalone"].pk
assert not resp.data[0]["mdu"]
assert resp.data[0]["sushifetchattempt"]
assert resp.data[1]["date"] == "2020-03-01"
assert resp.data[1]["report_type"]["pk"] == report_types["tr"].pk
assert resp.data[1]["organization"]["pk"] == organizations["standalone"].pk
assert resp.data[1]["platform"]["pk"] == platforms["standalone"].pk
assert resp.data[1]["mdu"]
assert not resp.data[1]["sushifetchattempt"]
resp = clients["su"].post(
f"{self.lookup_url}?order_by=date",
[
{
"organization": organizations["standalone"].pk,
"platform": platforms["standalone"].pk,
"report_type": report_types["br1"].pk,
"months": ["2020-01-02", "2020-02-01", "2020-03-01"],
},
{
"organization": organizations["branch"].pk,
"platform": platforms["branch"].pk,
"report_type": report_types["pr"].pk,
"months": ["2020-03-01"],
},
],
format="json",
)
assert resp.status_code == 200
assert len(resp.data) == 2
assert resp.data[0]["date"] == "2020-02-01"
assert resp.data[0]["report_type"]["pk"] == report_types["br1"].pk
assert resp.data[0]["organization"]["pk"] == organizations["standalone"].pk
assert resp.data[0]["platform"]["pk"] == platforms["standalone"].pk
assert not resp.data[0]["mdu"]
assert resp.data[0]["sushifetchattempt"]
assert resp.data[1]["date"] == "2020-03-01"
assert resp.data[1]["report_type"]["pk"] == report_types["pr"].pk
assert resp.data[1]["organization"]["pk"] == organizations["branch"].pk
assert resp.data[1]["platform"]["pk"] == platforms["branch"].pk
assert resp.data[1]["mdu"]
assert not resp.data[1]["sushifetchattempt"]
def test_purge(self, data, clients):
# simple delete
batches = list(ImportBatch.objects.all().order_by('pk').values_list("pk", flat=True))
resp = clients["su"].post(self.purge_url, {"batches": [batches[0]]}, format="json")
assert resp.status_code == 200
assert resp.data == {
'logs.AccessLog': 20,
'sushi.SushiFetchAttempt': 2,
'scheduler.FetchIntention': 2,
'logs.ImportBatch': 1,
}, "remove ib with fetch attempt (second is 3031)"
assert ImportBatch.objects.count() == len(batches) - 1
resp = clients["su"].post(self.purge_url, {"batches": [batches[0]]}, format="json")
assert resp.data == {}, "retry same request - nothing deleted"
assert ImportBatch.objects.count() == len(batches) - 1
resp = clients["su"].post(self.purge_url, {"batches": [batches[-1]]}, format="json")
assert resp.status_code == 200
assert resp.data == {
'logs.AccessLog': 20,
'logs.ImportBatch': 1,
'logs.ManualDataUploadImportBatch': 1,
}, "remove ib from mdu"
assert ImportBatch.objects.count() == len(batches) - 2
resp = clients["su"].post(self.purge_url, {"batches": batches[-3:]}, format="json")
assert resp.status_code == 200
assert resp.data == {
'logs.AccessLog': 40,
'logs.ImportBatch': 2,
'logs.ManualDataUpload': 1,
'logs.ManualDataUploadImportBatch': 2,
}, "remove last ibs from mdu"
assert ImportBatch.objects.count() == len(batches) - 4
resp = clients["su"].post(self.purge_url, {"batches": batches}, format="json")
assert resp.status_code == 200
assert resp.data == {
'logs.AccessLog': 100,
'logs.ImportBatch': 5,
'logs.ManualDataUpload': 1,
'logs.ManualDataUploadImportBatch': 2,
'scheduler.FetchIntention': 3,
'sushi.SushiFetchAttempt': 3,
}, "remove rest"
assert ImportBatch.objects.count() == 0
def test_lookup_and_purge(self, data, clients, organizations, platforms, report_types):
# lookup
resp = clients["su"].post(
f"{self.lookup_url}?order_by=date",
[
{
"organization": organizations["standalone"].pk,
"platform": platforms["standalone"].pk,
"report_type": report_types["br1"].pk,
"months": ["2020-01-01", "2020-02-01", "2020-03-01"],
},
{
"organization": organizations["branch"].pk,
"platform": platforms["branch"].pk,
"report_type": report_types["pr"].pk,
"months": ["2020-01-01", "2020-02-01", "2020-03-01"],
},
],
format="json",
)
assert resp.status_code == 200
data = resp.data
count = ImportBatch.objects.count()
resp = clients["su"].post(
self.purge_url, {"batches": [e["pk"] for e in data]}, format="json"
)
assert resp.status_code == 200
assert resp.data['logs.ImportBatch'] == len(data), "number of deleted ibs"
assert ImportBatch.objects.count() == count - len(data), "all ibs were deleted"
| 40.677419
| 96
| 0.535607
| 1,179
| 12,610
| 5.596268
| 0.111111
| 0.060018
| 0.05729
| 0.050925
| 0.80873
| 0.79903
| 0.77963
| 0.734465
| 0.691725
| 0.67187
| 0
| 0.054681
| 0.329976
| 12,610
| 309
| 97
| 40.809061
| 0.72624
| 0.003013
| 0
| 0.666667
| 0
| 0
| 0.174903
| 0.025861
| 0
| 0
| 0
| 0
| 0.166667
| 1
| 0.013889
| false
| 0
| 0.135417
| 0
| 0.159722
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
4700b96b6015fbe6202a0c9485b1510273e7943a
| 42
|
py
|
Python
|
lib/dyson/errors/__init__.py
|
luna-test/luna
|
6d94439f2747daf96e295837684bdc6607f507dc
|
[
"Apache-2.0"
] | 3
|
2018-05-21T14:35:11.000Z
|
2021-03-25T12:32:25.000Z
|
lib/dyson/errors/__init__.py
|
dyson-framework/dyson
|
e5a2e12c7bb0ba21ff274feff34c184576d08ff5
|
[
"Apache-2.0"
] | 13
|
2018-05-22T01:01:08.000Z
|
2018-09-16T22:12:10.000Z
|
lib/dyson/errors/__init__.py
|
luna-test/luna
|
6d94439f2747daf96e295837684bdc6607f507dc
|
[
"Apache-2.0"
] | 1
|
2018-05-21T14:35:17.000Z
|
2018-05-21T14:35:17.000Z
|
class DysonError(BaseException):
pass
| 14
| 32
| 0.761905
| 4
| 42
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 42
| 2
| 33
| 21
| 0.914286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
4701b992b660b4d5acb4566b5910e97efc2f1253
| 31
|
py
|
Python
|
py/desitarget/_version.py
|
jinyiY/desitarget
|
546a85a3feb9754a2406ebfb2b9890514f47b3bf
|
[
"BSD-3-Clause"
] | null | null | null |
py/desitarget/_version.py
|
jinyiY/desitarget
|
546a85a3feb9754a2406ebfb2b9890514f47b3bf
|
[
"BSD-3-Clause"
] | null | null | null |
py/desitarget/_version.py
|
jinyiY/desitarget
|
546a85a3feb9754a2406ebfb2b9890514f47b3bf
|
[
"BSD-3-Clause"
] | null | null | null |
__version__ = '0.34.0.dev3626'
| 15.5
| 30
| 0.709677
| 5
| 31
| 3.6
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 0.096774
| 31
| 1
| 31
| 31
| 0.357143
| 0
| 0
| 0
| 0
| 0
| 0.451613
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
471e7928ed3bd7396fd994d1cd9bdcb749be0f76
| 2,916
|
py
|
Python
|
tests/test_utils.py
|
gomoto/nussl
|
5ff8899d2da3c7704465d5e9ab7969657ed83263
|
[
"MIT"
] | null | null | null |
tests/test_utils.py
|
gomoto/nussl
|
5ff8899d2da3c7704465d5e9ab7969657ed83263
|
[
"MIT"
] | null | null | null |
tests/test_utils.py
|
gomoto/nussl
|
5ff8899d2da3c7704465d5e9ab7969657ed83263
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Tests for nussl/utils.py
"""
import unittest
import nussl
import numpy as np
from scipy import signal
class TestUtils(unittest.TestCase):
"""
"""
def test_find_peak_indices(self):
array = np.arange(0, 100)
peak = nussl.find_peak_indices(array, 1)[0]
assert peak == 99
array = np.arange(0, 100).reshape(10, 10)
peak = nussl.find_peak_indices(array, 3, min_dist=0)
assert peak == [[9, 9], [9, 8], [9, 7]]
def test_find_peak_values(self):
array = np.arange(0, 100)
peak = nussl.find_peak_values(array, 1)[0]
assert peak == 99
array = np.arange(0, 100).reshape(10, 10)
peak = nussl.find_peak_values(array, 3, min_dist=0)
assert peak == [99, 98, 97]
def test_add_mismatched_arrays(self):
long_array = np.ones((20,))
short_array = np.arange(10)
expected_result = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1], dtype=float)
# Test basic cases
result = nussl.add_mismatched_arrays(long_array, short_array)
assert all(np.equal(result, expected_result))
result = nussl.add_mismatched_arrays(short_array, long_array)
assert all(np.equal(result, expected_result))
expected_result = expected_result[:len(short_array)]
result = nussl.add_mismatched_arrays(long_array, short_array, truncate=True)
assert all(np.equal(result, expected_result))
result = nussl.add_mismatched_arrays(short_array, long_array, truncate=True)
assert all(np.equal(result, expected_result))
# Test complex casting
short_array = np.arange(10, dtype=complex)
expected_result = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1], dtype=complex)
result = nussl.add_mismatched_arrays(long_array, short_array)
assert all(np.equal(result, expected_result))
result = nussl.add_mismatched_arrays(short_array, long_array)
assert all(np.equal(result, expected_result))
expected_result = expected_result[:len(short_array)]
result = nussl.add_mismatched_arrays(long_array, short_array, truncate=True)
assert all(np.equal(result, expected_result))
result = nussl.add_mismatched_arrays(short_array, long_array, truncate=True)
assert all(np.equal(result, expected_result))
# Test case where arrays are equal length
short_array = np.ones((15,))
expected_result = short_array * 2
result = nussl.add_mismatched_arrays(short_array, short_array)
assert all(np.equal(result, expected_result))
result = nussl.add_mismatched_arrays(short_array, short_array, truncate=True)
assert all(np.equal(result, expected_result))
| 34.714286
| 85
| 0.637517
| 403
| 2,916
| 4.406948
| 0.186104
| 0.101351
| 0.027027
| 0.031532
| 0.796171
| 0.773649
| 0.759009
| 0.731982
| 0.731982
| 0.712275
| 0
| 0.045537
| 0.246914
| 2,916
| 83
| 86
| 35.13253
| 0.763206
| 0.049726
| 0
| 0.54902
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.27451
| 1
| 0.058824
| false
| 0
| 0.078431
| 0
| 0.156863
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5b7a653648bb19c0385a141b70961eb540cba61f
| 130
|
py
|
Python
|
plasTeX/Packages/rotating.py
|
perfectbark/LaTex2Docx
|
e32f9dcc59cce7bea4e7b114687b2300c623d8c0
|
[
"MIT"
] | 23
|
2019-06-16T06:00:39.000Z
|
2022-03-29T14:44:32.000Z
|
plasTeX/Packages/rotating.py
|
hao-han/LaTex2Docx
|
e32f9dcc59cce7bea4e7b114687b2300c623d8c0
|
[
"MIT"
] | null | null | null |
plasTeX/Packages/rotating.py
|
hao-han/LaTex2Docx
|
e32f9dcc59cce7bea4e7b114687b2300c623d8c0
|
[
"MIT"
] | 12
|
2019-05-27T06:32:06.000Z
|
2022-03-15T10:22:07.000Z
|
#!/usr/bin/env python
from plasTeX import Environment
class sideways(Environment):
def invoke(self, tex):
return []
| 16.25
| 31
| 0.684615
| 16
| 130
| 5.5625
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.207692
| 130
| 7
| 32
| 18.571429
| 0.864078
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
5b7dae6190608c869c59e1366d9287c6431875eb
| 609
|
py
|
Python
|
fcl/__init__.py
|
drewsherlock/python-fcl
|
e0d094d8b4b53dc7fece48ad125cacd19c8f2e83
|
[
"BSD-3-Clause"
] | null | null | null |
fcl/__init__.py
|
drewsherlock/python-fcl
|
e0d094d8b4b53dc7fece48ad125cacd19c8f2e83
|
[
"BSD-3-Clause"
] | null | null | null |
fcl/__init__.py
|
drewsherlock/python-fcl
|
e0d094d8b4b53dc7fece48ad125cacd19c8f2e83
|
[
"BSD-3-Clause"
] | null | null | null |
from .fcl import CollisionObject, CollisionGeometry, Transform, TriangleP, Box, Sphere, Ellipsoid, Capsule, Cone, Cylinder, Halfspace, Plane, BVHModel, DynamicAABBTreeCollisionManager, collide, continuousCollide, distance, defaultCollisionCallback, defaultDistanceCallback #,OcTree AS remove for windows
from .collision_data import OBJECT_TYPE, NODE_TYPE, CCDMotionType, CCDSolverType, GJKSolverType, Contact, CostSource, CollisionRequest, CollisionResult, ContinuousCollisionRequest, ContinuousCollisionResult, DistanceRequest, DistanceResult, CollisionData, DistanceData
from .version import __version__
| 101.5
| 304
| 0.853859
| 52
| 609
| 9.865385
| 0.884615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085386
| 609
| 5
| 305
| 121.8
| 0.921005
| 0.049261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5ba5d7e55736e4a408b38073aba3d9f576aa02f5
| 106
|
py
|
Python
|
backend/qaa/apps/answer/admin.py
|
rosscdh/qaa
|
ef17f8ea7918746dcc43735d49c6229f3e25eba8
|
[
"MIT"
] | null | null | null |
backend/qaa/apps/answer/admin.py
|
rosscdh/qaa
|
ef17f8ea7918746dcc43735d49c6229f3e25eba8
|
[
"MIT"
] | null | null | null |
backend/qaa/apps/answer/admin.py
|
rosscdh/qaa
|
ef17f8ea7918746dcc43735d49c6229f3e25eba8
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from qaa.apps.answer.models import Answer
admin.site.register([Answer])
| 21.2
| 41
| 0.811321
| 16
| 106
| 5.375
| 0.6875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09434
| 106
| 5
| 42
| 21.2
| 0.895833
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5bf60add54226813b480375245fcb822d68f3e26
| 149
|
py
|
Python
|
drl_grasping/envs/models/primitives/__init__.py
|
Tiamat-Tech/drl_grasping
|
e67efee1cdbeeb3cb1e4d028890bbfc601e7840c
|
[
"BSD-3-Clause"
] | 126
|
2020-11-02T11:08:07.000Z
|
2022-03-31T16:25:06.000Z
|
drl_grasping/envs/models/primitives/__init__.py
|
Tiamat-Tech/drl_grasping
|
e67efee1cdbeeb3cb1e4d028890bbfc601e7840c
|
[
"BSD-3-Clause"
] | 68
|
2020-11-02T13:18:29.000Z
|
2022-02-27T17:38:50.000Z
|
drl_grasping/envs/models/primitives/__init__.py
|
Tiamat-Tech/drl_grasping
|
e67efee1cdbeeb3cb1e4d028890bbfc601e7840c
|
[
"BSD-3-Clause"
] | 27
|
2021-01-20T16:15:41.000Z
|
2022-03-15T10:44:43.000Z
|
from .box import Box
from .cylinder import Cylinder
from .sphere import Sphere
from .random_primitive import RandomPrimitive
from .plane import Plane
| 29.8
| 45
| 0.838926
| 21
| 149
| 5.904762
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127517
| 149
| 5
| 46
| 29.8
| 0.953846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f32caf7989b7b8cbebeabb423ad0eaa95c37f0aa
| 42
|
py
|
Python
|
metasort/exceptions.py
|
Phelimb/genome-sort
|
a6343eab0717820e070f51997fcc8481e6af1deb
|
[
"MIT"
] | 4
|
2015-04-10T18:45:20.000Z
|
2020-07-20T15:52:31.000Z
|
metasort/exceptions.py
|
Phelimb/genome-sort
|
a6343eab0717820e070f51997fcc8481e6af1deb
|
[
"MIT"
] | 4
|
2015-04-09T22:48:11.000Z
|
2015-04-10T19:13:20.000Z
|
metasort/exceptions.py
|
Phelimb/genome-sort
|
a6343eab0717820e070f51997fcc8481e6af1deb
|
[
"MIT"
] | 2
|
2015-04-10T18:53:23.000Z
|
2017-11-28T12:26:18.000Z
|
def AnalysisNotFound(Exception):
pass
| 14
| 32
| 0.761905
| 4
| 42
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 42
| 2
| 33
| 21
| 0.914286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
f364a6eac50b79d1a61a8edcd362e72289ee8175
| 179
|
py
|
Python
|
fem/utilities/mrsignal/__init__.py
|
mjredmond/FEMApp
|
dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8
|
[
"MIT"
] | 1
|
2019-08-03T21:40:26.000Z
|
2019-08-03T21:40:26.000Z
|
fem/utilities/mrsignal/__init__.py
|
mjredmond/FEMApp
|
dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8
|
[
"MIT"
] | null | null | null |
fem/utilities/mrsignal/__init__.py
|
mjredmond/FEMApp
|
dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8
|
[
"MIT"
] | null | null | null |
"""
mrsignal
Drop in replacement for pyqt signals (mostly).
author: Michael Redmond
"""
from __future__ import print_function, absolute_import
from .mrsignal import MrSignal
| 13.769231
| 54
| 0.782123
| 22
| 179
| 6.090909
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150838
| 179
| 12
| 55
| 14.916667
| 0.881579
| 0.452514
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0.5
| 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
| 1
|
0
| 5
|
f3b43abd2c03502593dadd4d667fed2950337653
| 15
|
py
|
Python
|
test-data/python/editor/codeCompletion/noTextOverlap.py
|
kiteco/intellij-plugin
|
dc1361bb3da33f4cc2e2b7ea8aeb9fa4c3b6e0ab
|
[
"BSD-3-Clause"
] | 3
|
2021-11-16T17:01:23.000Z
|
2021-12-03T21:18:37.000Z
|
test-data/python/editor/codeCompletion/noTextOverlap.py
|
kiteco/intellij-plugin
|
dc1361bb3da33f4cc2e2b7ea8aeb9fa4c3b6e0ab
|
[
"BSD-3-Clause"
] | null | null | null |
test-data/python/editor/codeCompletion/noTextOverlap.py
|
kiteco/intellij-plugin
|
dc1361bb3da33f4cc2e2b7ea8aeb9fa4c3b6e0ab
|
[
"BSD-3-Clause"
] | 2
|
2022-01-18T20:41:13.000Z
|
2022-02-23T08:17:04.000Z
|
print(f<caret>)
| 15
| 15
| 0.733333
| 3
| 15
| 3.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 15
| 1
| 15
| 15
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
f3b658bb71706e2d2929983972774c99147f530e
| 32
|
py
|
Python
|
mydea/posts/decorators/__init__.py
|
AlvaroRubioGomez/mydea
|
286bae9bc87f894b30fa3398ab1bf1f1cd8f1929
|
[
"MIT"
] | null | null | null |
mydea/posts/decorators/__init__.py
|
AlvaroRubioGomez/mydea
|
286bae9bc87f894b30fa3398ab1bf1f1cd8f1929
|
[
"MIT"
] | null | null | null |
mydea/posts/decorators/__init__.py
|
AlvaroRubioGomez/mydea
|
286bae9bc87f894b30fa3398ab1bf1f1cd8f1929
|
[
"MIT"
] | null | null | null |
from .posts import is_post_owner
| 32
| 32
| 0.875
| 6
| 32
| 4.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 32
| 1
| 32
| 32
| 0.896552
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
341ac048ddd76142b896a425c04b446148370821
| 43
|
py
|
Python
|
flask/demos/run.py
|
known/python-practice
|
76bf3bdf749eb46d4f7ae29e88d792e92f7af5e1
|
[
"MIT"
] | null | null | null |
flask/demos/run.py
|
known/python-practice
|
76bf3bdf749eb46d4f7ae29e88d792e92f7af5e1
|
[
"MIT"
] | null | null | null |
flask/demos/run.py
|
known/python-practice
|
76bf3bdf749eb46d4f7ae29e88d792e92f7af5e1
|
[
"MIT"
] | null | null | null |
from flaskr import app
app.run(debug=True)
| 14.333333
| 22
| 0.790698
| 8
| 43
| 4.25
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116279
| 43
| 2
| 23
| 21.5
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
34310645187541b55f20bc0d63ac59440b05391e
| 237
|
py
|
Python
|
customizing_sphinx/node.py
|
pauleveritt/customizing_sphinx
|
186de825a3dafbbac69c2b8d60b085dc3a98c659
|
[
"MIT"
] | 5
|
2019-05-07T16:55:43.000Z
|
2021-08-14T19:48:14.000Z
|
customizing_sphinx/node.py
|
pauleveritt/customizing_sphinx
|
186de825a3dafbbac69c2b8d60b085dc3a98c659
|
[
"MIT"
] | 6
|
2020-12-04T17:16:23.000Z
|
2022-03-02T22:43:40.000Z
|
customizing_sphinx/node.py
|
pauleveritt/customizing_sphinx
|
186de825a3dafbbac69c2b8d60b085dc3a98c659
|
[
"MIT"
] | null | null | null |
from docutils import nodes
class helloworld(nodes.Admonition, nodes.Element):
pass
def visit_helloworld_node(self, node):
self.visit_admonition(node)
def depart_helloworld_node(self, node):
self.depart_admonition(node)
| 16.928571
| 50
| 0.772152
| 31
| 237
| 5.709677
| 0.451613
| 0.180791
| 0.20339
| 0.248588
| 0.293785
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14346
| 237
| 13
| 51
| 18.230769
| 0.871921
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.142857
| 0.142857
| 0
| 0.571429
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
34593a0d28f4ca336177e608cb1920e808b6a0f3
| 27
|
py
|
Python
|
quick_poll/models/__init__.py
|
Muthaias/quick-poll
|
a3de0e4b8bb276e56de812f10679188d6e7062b2
|
[
"MIT"
] | 2
|
2020-08-08T23:05:19.000Z
|
2022-03-05T13:31:19.000Z
|
quick_poll/models/__init__.py
|
Muthaias/quick-poll
|
a3de0e4b8bb276e56de812f10679188d6e7062b2
|
[
"MIT"
] | null | null | null |
quick_poll/models/__init__.py
|
Muthaias/quick-poll
|
a3de0e4b8bb276e56de812f10679188d6e7062b2
|
[
"MIT"
] | null | null | null |
from .poll_model import db
| 13.5
| 26
| 0.814815
| 5
| 27
| 4.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 27
| 1
| 27
| 27
| 0.913043
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
346d4cf8d212b772626c9c5e85a2ed0cc3d56ee8
| 223
|
py
|
Python
|
Lista PythonBrasil/exer11.py
|
GlauberGoncalves/Python
|
cdea025a3b8a0304455e1f8561c1d13e00040d8e
|
[
"MIT"
] | 3
|
2017-01-29T00:39:31.000Z
|
2017-06-16T18:53:36.000Z
|
Lista PythonBrasil/exer11.py
|
GlauberGoncalves/Python
|
cdea025a3b8a0304455e1f8561c1d13e00040d8e
|
[
"MIT"
] | null | null | null |
Lista PythonBrasil/exer11.py
|
GlauberGoncalves/Python
|
cdea025a3b8a0304455e1f8561c1d13e00040d8e
|
[
"MIT"
] | null | null | null |
int1 = int(input('informe o inteiro 1 '))
int2 = int(input('informe o inteiro 2 '))
real = float(input('informe o real '))
print('a %2.f' %((int1*2)*(int2/2)))
print('b %2.f' %((int1*3)+(real)))
print('c %2.f' %(real**3))
| 27.875
| 41
| 0.58296
| 41
| 223
| 3.170732
| 0.414634
| 0.276923
| 0.3
| 0.246154
| 0.353846
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072539
| 0.134529
| 223
| 7
| 42
| 31.857143
| 0.601036
| 0
| 0
| 0
| 0
| 0
| 0.327354
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
cab653ed0062a304b7e91bd38dc136ae320ecfcc
| 2,926
|
py
|
Python
|
xndtools/kernel_generator/tests/test_test_mixed.py
|
costrouc/xndtools
|
b2c050db3a01f221195f47e6125bec6e1240d5ea
|
[
"BSD-3-Clause"
] | null | null | null |
xndtools/kernel_generator/tests/test_test_mixed.py
|
costrouc/xndtools
|
b2c050db3a01f221195f47e6125bec6e1240d5ea
|
[
"BSD-3-Clause"
] | null | null | null |
xndtools/kernel_generator/tests/test_test_mixed.py
|
costrouc/xndtools
|
b2c050db3a01f221195f47e6125bec6e1240d5ea
|
[
"BSD-3-Clause"
] | null | null | null |
import pytest
from xndtools.kernel_generator.utils import NormalizedTypeMap
long_t = NormalizedTypeMap()('long')
from xnd import xnd
try:
import test_mixed as m
skip_reason = None
except Exception as msg:
m = None
skip_reason = f'Failed to import test_mixed: {msg}'
print(skip_reason)
print(dir(m))
def unpack(x):
if isinstance(x, xnd):
return str(x.type), x.value
if isinstance(x, tuple):
return tuple(map(unpack, x))
return x
def assert_equal(x, y):
assert unpack(x) == unpack(y)
@pytest.mark.skipif(m is None,
reason=skip_reason)
def test_mixed_matrices_CF_inout():
a = xnd([[10,20],
[30,40]], type=f'2 * 2 * {long_t}')
b = xnd([[5,6],
[7,8]], type=f'!2 * 2 * {long_t}')
r = m.test_mixed_matrices_inout_CF(a, b)
assert_equal(r, xnd(26, type=long_t))
a = xnd([[10,20],
[30,40]], type=f'!2 * 2 * {long_t}')
b = xnd([[5,6],
[7,8]], type=f'2 * 2 * {long_t}')
with pytest.raises(ValueError, match=r'.* must be C-contiguous .*'):
r = m.test_mixed_matrices_inout_CF(a, b)
a = xnd([[10,20],
[30,40]], type=f'2 * 2 * {long_t}')
b = xnd([[5,6],
[7,8]], type=f'2 * 2 * {long_t}')
with pytest.raises(ValueError, match=r'.* must be F-contiguous .*'):
r = m.test_mixed_matrices_inout_CF(a, b)
@pytest.mark.skipif(m is None,
reason=skip_reason)
def test_mixed_matrices_FC_inout():
a = xnd([[10,20],
[30,40]], type=f'!2 * 2 * {long_t}')
b = xnd([[5,6],
[7,8]], type=f'2 * 2 * {long_t}')
r = m.test_mixed_matrices_inout_FC(a, b)
assert_equal(r, xnd(37, type=long_t))
@pytest.mark.skipif(m is None, reason=skip_reason)
def test_mixed_matrices_CC_inout():
a = xnd([[10,20],
[30,40]], type=f'2 * 2 * {long_t}')
b = xnd([[5,6],
[7,8]], type=f'2 * 2 * {long_t}')
r = m.test_mixed_matrices_inout_CC(a, b)
assert_equal(r, xnd(27, type=long_t))
a = xnd([[10,20],
[30,40]], type=f'!2 * 2 * {long_t}')
b = xnd([[5,6],
[7,8]], type=f'!2 * 2 * {long_t}')
with pytest.raises(ValueError, match=r'.* must be C-contiguous .*'):
r = m.test_mixed_matrices_inout_CC(a, b)
@pytest.mark.skipif(m is None,
reason=skip_reason)
def test_mixed_matrices_FF_inout():
a = xnd([[10,20],
[30,40]], type=f'!2 * 2 * {long_t}')
b = xnd([[5,6],
[7,8]], type=f'!2 * 2 * {long_t}')
r = m.test_mixed_matrices_inout_FF(a, b)
assert_equal(r, xnd(36, type=long_t))
a = xnd([[10,20],
[30,40]], type=f'2 * 2 * {long_t}')
b = xnd([[5,6],
[7,8]], type=f'2 * 2 * {long_t}')
with pytest.raises(ValueError, match=r'.* must be F-contiguous .*'):
r = m.test_mixed_matrices_inout_FF(a, b)
| 30.164948
| 72
| 0.54067
| 477
| 2,926
| 3.140461
| 0.155136
| 0.070093
| 0.064085
| 0.074766
| 0.742991
| 0.742991
| 0.701602
| 0.701602
| 0.701602
| 0.689586
| 0
| 0.064
| 0.273753
| 2,926
| 96
| 73
| 30.479167
| 0.640941
| 0
| 0
| 0.620253
| 0
| 0
| 0.138414
| 0
| 0
| 0
| 0
| 0
| 0.075949
| 1
| 0.075949
| false
| 0
| 0.063291
| 0
| 0.177215
| 0.025316
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1b0f6d8d5ff136cbb04901554a9b8bec5218e3df
| 198
|
py
|
Python
|
DGaze/models/__init__.py
|
CraneHzm/DGaze
|
1f547256724f0c0ff7c68baac384b510176222a0
|
[
"MIT"
] | 15
|
2020-02-26T14:09:48.000Z
|
2022-02-24T09:45:11.000Z
|
DGaze/models/__init__.py
|
yangjing628/DGaze
|
1f547256724f0c0ff7c68baac384b510176222a0
|
[
"MIT"
] | null | null | null |
DGaze/models/__init__.py
|
yangjing628/DGaze
|
1f547256724f0c0ff7c68baac384b510176222a0
|
[
"MIT"
] | 7
|
2020-06-11T02:56:08.000Z
|
2021-08-20T05:12:46.000Z
|
__all__ = ['DGazeModels', 'LossFunction', 'weight_init']
from .DGazeModels import DGaze
from .LossFunction import HuberLoss
from .LossFunction import CustomLoss
from .weight_init import weight_init
| 33
| 56
| 0.818182
| 23
| 198
| 6.73913
| 0.434783
| 0.193548
| 0.283871
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106061
| 198
| 6
| 57
| 33
| 0.875706
| 0
| 0
| 0
| 0
| 0
| 0.170854
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1b4f580335d9547f82af86e025348b1521b55a12
| 267
|
py
|
Python
|
corefunctions/helpers.py
|
shahoob/downdatube
|
ed8969b22a10e52bfc7c3c4f8623713fc84a29fc
|
[
"MIT"
] | null | null | null |
corefunctions/helpers.py
|
shahoob/downdatube
|
ed8969b22a10e52bfc7c3c4f8623713fc84a29fc
|
[
"MIT"
] | 1
|
2021-04-12T16:54:59.000Z
|
2021-04-12T16:54:59.000Z
|
corefunctions/helpers.py
|
shahoob/downdatube
|
ed8969b22a10e52bfc7c3c4f8623713fc84a29fc
|
[
"MIT"
] | null | null | null |
from humanfriendly import format_size
from pytube import Stream
def map_stream(stream: Stream):
return f'{stream.title} | itag: {stream.itag} | {stream.resolution} | {stream.mime_type} | {format_size(stream.filesize)} | is_progressive: {stream.is_progressive}'
| 38.142857
| 168
| 0.7603
| 35
| 267
| 5.628571
| 0.542857
| 0.101523
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116105
| 267
| 6
| 169
| 44.5
| 0.834746
| 0
| 0
| 0
| 0
| 0.25
| 0.576779
| 0.198502
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.5
| 0.25
| 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
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
|
0
| 5
|
1b753f29ec62eb9352056f9d13f54e14d80ca63b
| 62
|
py
|
Python
|
testNode.py
|
saikrishnaakula/DHT
|
5c6eac6802562537ffd0c472a3b0c33b89d62d35
|
[
"MIT"
] | null | null | null |
testNode.py
|
saikrishnaakula/DHT
|
5c6eac6802562537ffd0c472a3b0c33b89d62d35
|
[
"MIT"
] | null | null | null |
testNode.py
|
saikrishnaakula/DHT
|
5c6eac6802562537ffd0c472a3b0c33b89d62d35
|
[
"MIT"
] | null | null | null |
from node import Node
import sys
client = Node(sys.argv[1],0)
| 15.5
| 28
| 0.741935
| 12
| 62
| 3.833333
| 0.666667
| 0.434783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037736
| 0.145161
| 62
| 4
| 28
| 15.5
| 0.830189
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1b909183e33161918099dea357d82d29f739994e
| 88
|
py
|
Python
|
moto/core/__init__.py
|
EvaSDK/moto
|
8095f31772fb144f2045c0991f4c8ed17f324b91
|
[
"Apache-2.0"
] | 1
|
2021-03-06T22:01:41.000Z
|
2021-03-06T22:01:41.000Z
|
moto/core/__init__.py
|
EvaSDK/moto
|
8095f31772fb144f2045c0991f4c8ed17f324b91
|
[
"Apache-2.0"
] | 2
|
2016-07-01T03:43:37.000Z
|
2016-07-18T19:38:06.000Z
|
moto/core/__init__.py
|
EvaSDK/moto
|
8095f31772fb144f2045c0991f4c8ed17f324b91
|
[
"Apache-2.0"
] | 1
|
2017-10-19T00:53:28.000Z
|
2017-10-19T00:53:28.000Z
|
from __future__ import unicode_literals
from .models import BaseBackend # flake8: noqa
| 29.333333
| 47
| 0.829545
| 11
| 88
| 6.181818
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013158
| 0.136364
| 88
| 2
| 48
| 44
| 0.881579
| 0.136364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
59fb4c759f445d585ae85b9cd104103d08b8953d
| 26
|
py
|
Python
|
neuron/modules/testplugin.py
|
tomforge/Neuron
|
21278d125c9c507319ea01366eb44e46646e0926
|
[
"Apache-2.0"
] | null | null | null |
neuron/modules/testplugin.py
|
tomforge/Neuron
|
21278d125c9c507319ea01366eb44e46646e0926
|
[
"Apache-2.0"
] | 21
|
2018-05-14T15:32:42.000Z
|
2018-07-22T06:36:38.000Z
|
neuron/modules/testplugin.py
|
tomforge/Neuron
|
21278d125c9c507319ea01366eb44e46646e0926
|
[
"Apache-2.0"
] | null | null | null |
class TestPlugin:
pass
| 13
| 17
| 0.730769
| 3
| 26
| 6.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 26
| 2
| 18
| 13
| 0.95
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
94032e9c7979098b779b0b6d4bbd1615ce4a873e
| 1,902
|
py
|
Python
|
setup.py
|
KaiyanD/Data_Generator
|
6262b1e3632d7438c041f2ee29464f76b8fb2c05
|
[
"MIT"
] | null | null | null |
setup.py
|
KaiyanD/Data_Generator
|
6262b1e3632d7438c041f2ee29464f76b8fb2c05
|
[
"MIT"
] | null | null | null |
setup.py
|
KaiyanD/Data_Generator
|
6262b1e3632d7438c041f2ee29464f76b8fb2c05
|
[
"MIT"
] | null | null | null |
import os
from setuptools import setup
def path():
return os.path.dirname(__file__)
#return os.getcwd()
'''setup(
name='TestDataGenerator',
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='1.0',
description='A python project to create test data',
long_description='A python project to create test data',
# The project's main homepage.
url='https://bitbucket.coke.com/projects/NSR/repos/testdatageneration/browse',
# Author details
author='Capgemini Americas Inc.',
author_email='@capgemini.com',
# Choose your license
license='Capgemini Americas Inc',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 3 - Alpha',
# Indicate who your project is intended for
'Intended Audience :: Developers and Ops team',
'Topic :: Software Development :: Build Tools',
# Pick your license as you wish (should match "license" above)
'License :: Approved :: Capgemini Americas Inc',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 3.5',
],
# What does your project relate to?
keywords='sample test data generator',
# To provide executable scripts, use entry points in preference to the
# "scripts" keyword. Entry points provide cross-platform support and allow
# pip to create the appropriate form of executable for the target platform.
scripts = ['src/main'],
)'''
| 32.237288
| 82
| 0.670873
| 238
| 1,902
| 5.323529
| 0.60084
| 0.018942
| 0.047356
| 0.039463
| 0.06472
| 0.06472
| 0.06472
| 0.06472
| 0
| 0
| 0
| 0.009642
| 0.236593
| 1,902
| 59
| 83
| 32.237288
| 0.862948
| 0.009464
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.5
| 0.25
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
944178932042aac7994f78391014ad8984dc8805
| 141
|
py
|
Python
|
genesis/deepgenesis/visualization/visualization.py
|
EmersonAlvaro/genesis
|
7e4b32320c45ee48983a9869fba3bc75686a4e76
|
[
"MIT"
] | null | null | null |
genesis/deepgenesis/visualization/visualization.py
|
EmersonAlvaro/genesis
|
7e4b32320c45ee48983a9869fba3bc75686a4e76
|
[
"MIT"
] | null | null | null |
genesis/deepgenesis/visualization/visualization.py
|
EmersonAlvaro/genesis
|
7e4b32320c45ee48983a9869fba3bc75686a4e76
|
[
"MIT"
] | null | null | null |
from matplotlib import pyplot as plt
from dataset.dataset import DataSet
class Visualization(DataSet):
def __init__(self):
pass
| 20.142857
| 36
| 0.751773
| 18
| 141
| 5.666667
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.198582
| 141
| 7
| 37
| 20.142857
| 0.902655
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
946c0e7d08c29f4110dae8f5626c64ddfb0312de
| 116
|
py
|
Python
|
my_notes/ex127/setup.py
|
ivalderrama/packt_python_workshop
|
48ba82eb9d16c59565a392d515b2cf1c9ec95058
|
[
"MIT"
] | null | null | null |
my_notes/ex127/setup.py
|
ivalderrama/packt_python_workshop
|
48ba82eb9d16c59565a392d515b2cf1c9ec95058
|
[
"MIT"
] | null | null | null |
my_notes/ex127/setup.py
|
ivalderrama/packt_python_workshop
|
48ba82eb9d16c59565a392d515b2cf1c9ec95058
|
[
"MIT"
] | null | null | null |
from distutils.core import setup
from Cython.Build import cythonize
setup(ext_modules=cythonize("sieve_module.py"))
| 29
| 47
| 0.836207
| 17
| 116
| 5.588235
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.077586
| 116
| 4
| 47
| 29
| 0.88785
| 0
| 0
| 0
| 0
| 0
| 0.128205
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9477504e5766f6a6b9ce5234b3863b8b8da9d90b
| 28
|
py
|
Python
|
appinsights_telemetry_logger/__init__.py
|
chaosmail/appinsights-telemetry-python
|
88f7b9cdf95e9702a52c89b90b7b1d551814e9f6
|
[
"MIT"
] | 1
|
2020-11-23T10:27:36.000Z
|
2020-11-23T10:27:36.000Z
|
appinsights_telemetry_logger/__init__.py
|
chaosmail/appinsights-telemetry-python
|
88f7b9cdf95e9702a52c89b90b7b1d551814e9f6
|
[
"MIT"
] | null | null | null |
appinsights_telemetry_logger/__init__.py
|
chaosmail/appinsights-telemetry-python
|
88f7b9cdf95e9702a52c89b90b7b1d551814e9f6
|
[
"MIT"
] | null | null | null |
from .command_line import *
| 14
| 27
| 0.785714
| 4
| 28
| 5.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 28
| 1
| 28
| 28
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
846779782373eba84c7df94e4e9808ecd275377e
| 3,634
|
py
|
Python
|
src/projects/workers/readability.py
|
firewut/data-transform-pipelines-api
|
c62a7aa5fd57102fa67cf715dc78c3365b739925
|
[
"MIT"
] | 2
|
2019-01-09T07:42:17.000Z
|
2021-08-25T02:43:47.000Z
|
src/projects/workers/readability.py
|
firewut/data-transform-pipelines-api
|
c62a7aa5fd57102fa67cf715dc78c3365b739925
|
[
"MIT"
] | null | null | null |
src/projects/workers/readability.py
|
firewut/data-transform-pipelines-api
|
c62a7aa5fd57102fa67cf715dc78c3365b739925
|
[
"MIT"
] | null | null | null |
from readability import Document
from projects.workers.base import Worker
class Readability(Worker):
id = 'readability'
name = 'readability'
image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAe1BMVEX///8AAAC1tbXCwsKfn59ERETo6Oimpqb8/PzZ2dn5+fn29vYbGxuioqJSUlLy8vLIyMgjIyMyMjKSkpKKiopMTEzj4+Nzc3NjY2OYmJh5eXm2traBgYFpaWldXV1ubm7S0tI6Ojo1NTUrKysPDw8dHR1HR0cTExNXV1eCn/DOAAAGwklEQVR4nO2daXuqTAyGBWzFfaPuVax2+f+/8NV6qijMkmSYgG/uT+fDuSCPwMwzk2TaaAiCIAiCIAiCIAiCIAiCUDdm6+b8ZzDYrvrRK3csJRDtvoMM403KHZFThtMgz3efOyxnxEmBvl9a3KG5IVLpO3Foc0fngJVG4Ikld3xUOnu9wCBYcIdIo9szCQyCL+4gKXQsBNZbovEVvbDjjhONYZC5UdeZUTdNPDDjjhVFx15gMOEOFsUGoDAIuaNFMIQIDI7c4SIAPcI6PsQYJjDYcwcMZg1UGNTOg2+hCqfcEQOBTBUXXrhDBtIGKwy63DHDaMEVptwxw1BuXKhZc8cMAzzQBEGTO2YYb3CFG+6YYSAUzrljhiEKC6jZW/r8I03RNr6Bms0WiBm/Ztb7+V3b8zvvxgKqsHYJDPAKuHYbis+/iwFdXdRvJ+p/sJsIe4g1fISwL7GGX+GZp8/MALJr9a3JeLETWN8MaaMzthE44A6TQtdCYq0Fnp6i8UWtebVJwzjc1GxlX4hu0hjXbNmr4tkr904MizT2mh3uuFwSR+/Hu9dzNeIOyT3xbD3dLbbbxby5fsYqaEEQBAFAN0q2n3ovqmCyW6bc0ZuJflDibqyq7VTXB6K+Mz/V1TgcONB3JuFWoiB1pO/EpJKZttCdwKCS24tuBVZQosNX9MJnxRaPXdcCK7cFhyguMVKpZA044WvFkFvWjddSBFYpIbUvR2F1Zn5EtawlFdmtGpUmsCJVRCVMFDd+uNWdcWW3i6lAZ2LzXyj7ozZSKB9/i2h293at0Gs1RtZJbROHabvx9e/fn9wKr63Mv1kyFyLHy9/Hds07MqfA36+B/eUBU2BX3j2T5d9becussrq3zJIpk+lME9xO1L6f+egyuWPGJEfWrd3nctsJdMfmrXUvJKOQ0b19KBWeaE/tRQ5aOZedzf+zubc7t1aUj58tbapNBmHRIuKuwoHJvd27NUXFwaz5Eej4CRXG7L6Gg8W9Pbg1dU3FrL9XyNuu1ZHfK2RZ8D+4NW3VyGsr30PzHmkfzAvg8uXQDGAhDFvZn2QXxYb//1hp5H0jPNdPYfEjD8OLyLnNwPGosGf6SVyT89l2r1E33FiOi7lqsXdCtAh2uc/K9YeSr4fz6t4KNrjLV+jTvRXtrXlQ+OH4FhqKJnEPCv31YBauj3wo9OXeivfWvCj0sw2u2Fvzo/DN8V0KUeyt+VHoo4fv0a15Vli+e1N2v/pSeCzZvcXKYwJ9KSzbvb2r7utPYbnuTVOO4E9hme5Nlwn1qPDg+FYZJtVQWJ570+5mnxV22ut+kjRDZDalk4bLZNq6HPat7SaKHKrKoG+YbHXCmxf43sBFjm4d/OP5yHA4SinuzdC5/Lj9O4dV/LQfntn4O9BRinsDnzgDcR996MVLcG9LaAyQ48kQtQ72F7cEcVaJff4W/ATPOHZvsf6zUGA5caF+PdedmWq3psXua7Hsh37EaWsfunjUZkBF1+M4LGKYYWOw+p3RdY0O3ZvOremxyRmhLx6sXAmk1B6Yr06pLnbk3kh1a+ZvBXEq2A0n7g12zswjqfH6iJPdbjj5owOI8wFBCmm1mw5OH0a4tSxmc0q8gfknNIDzGzfMEyLgFJsiyJlTpN+43t98B2qROHGVQW0Usan1sTrhRQNNIdKPXrExVqiVRQbamZnEm1v5f+jZdY+QyjOp44zdzia1KYyikDjO2a5vwKdIulNIclSAkkLaiE3ZAycNAhC7QTJOFIWUji2Y76d4N0rhIn46XEFdfxv/GAkC0f0wCebFSZGTL213GNNff8T3ucwxCmm2DTfUHKeYbDu2WYOWTkS3bY1hImN8Lwq1+ct2Bb7Nf0QHW5HxqODt3Owt70wuzrBw/ofNqFNsDsaJ+f5F8oLzDswwtBl66NlS017pIrx8Byr709M+SYW84O/rai8NdsdFt4lmq20yTa//TWfwFCLV8oLM+NGNVurGv7GTcwmKp/3e7v7QNb2Fzb2ucWSYGe4u3u4X15q9OEpADXP77m/N3FMxmvTDTWQnyldRaxWe6I6S3Na7wz/zNcpYqs9NYaOEzTLk90nGFvIKFJ55DbPrrJXbuprX1u7kb44L5UlOlgutnq01U4QfR5vzr/21Wns/GYS2lLRWyIgoFIWikB9RKApFIT+iUBSKQn6eXyE1k1t9hbPILZU45UsQBEEQBKEuRLQiaB/05pR6dtcnrZcEQSJ36JbgD+WjVl/6At+UQOu18McWrbDkQ4KdQTiZp/Nlvjw/tLMA0rDqrCt0/r4gCIIgCIIgCIIgCIIgCIIglMh/TjxefE/I+XUAAAAASUVORK5CYII='
description = 'Makes an html readable'
schema = {
"type": "object",
"properties": {
"in": {
"type": "string",
"description": "html to make readable"
},
"out": {
"type": "object",
"description": "output data",
"properties": {
"title": {
"type": "string",
"description": "cleaned title"
},
"content": {
"type": "string",
"description": "cleaned content"
}
}
}
}
}
def process(self, data):
doc = Document(data)
return {
'title': doc.short_title(),
'content': doc.summary()
}
| 88.634146
| 2,600
| 0.79967
| 157
| 3,634
| 18.503185
| 0.789809
| 0.010327
| 0.021687
| 0.019277
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127639
| 0.139791
| 3,634
| 40
| 2,601
| 90.85
| 0.801663
| 0
| 0
| 0.194444
| 0
| 0.027778
| 0.779582
| 0.711613
| 0
| 1
| 0
| 0
| 0
| 1
| 0.027778
| false
| 0
| 0.055556
| 0
| 0.277778
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
84a8ac381ee40e3aa3177cb8a68bd6d69cb711ee
| 36
|
py
|
Python
|
tests/test_plugboard/__init__.py
|
axevalley/enigma
|
fdfa5a85dbd4675f195e00e4b7e22d976a3d9015
|
[
"MIT"
] | null | null | null |
tests/test_plugboard/__init__.py
|
axevalley/enigma
|
fdfa5a85dbd4675f195e00e4b7e22d976a3d9015
|
[
"MIT"
] | 28
|
2019-07-30T16:15:52.000Z
|
2022-03-14T19:14:25.000Z
|
tests/test_plugboard/__init__.py
|
lukeshiner/enigma
|
917066c8f33f67b43f092800ba46220d107f622b
|
[
"MIT"
] | null | null | null |
"""Tests for Enigma's plugboard."""
| 18
| 35
| 0.666667
| 5
| 36
| 4.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 36
| 1
| 36
| 36
| 0.75
| 0.805556
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
84cd9cc43de91ba016be1ff1a6043bb1d8aa1c58
| 62
|
py
|
Python
|
nettowel/cli/_output.py
|
InfrastructureAsCode-ch/nettowel
|
1b14ae7d253d1c9435a3c18a65078122fb4965dd
|
[
"Apache-2.0"
] | 1
|
2022-02-22T12:05:42.000Z
|
2022-02-22T12:05:42.000Z
|
nettowel/cli/_output.py
|
InfrastructureAsCode-ch/nettowel
|
1b14ae7d253d1c9435a3c18a65078122fb4965dd
|
[
"Apache-2.0"
] | null | null | null |
nettowel/cli/_output.py
|
InfrastructureAsCode-ch/nettowel
|
1b14ae7d253d1c9435a3c18a65078122fb4965dd
|
[
"Apache-2.0"
] | null | null | null |
from rich.columns import Columns
from rich.panel import Panel
| 20.666667
| 32
| 0.83871
| 10
| 62
| 5.2
| 0.5
| 0.307692
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 62
| 2
| 33
| 31
| 0.962963
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
84e6687763d363aa51d0c1f333e2e65ef3b9a677
| 2,468
|
py
|
Python
|
hpe_networking/comware_7_netconf/comware_netconf.py
|
net-auto/automation-tools
|
0c6b902d3133ac01bbe879bfae893e84b7123d4b
|
[
"MIT"
] | null | null | null |
hpe_networking/comware_7_netconf/comware_netconf.py
|
net-auto/automation-tools
|
0c6b902d3133ac01bbe879bfae893e84b7123d4b
|
[
"MIT"
] | null | null | null |
hpe_networking/comware_7_netconf/comware_netconf.py
|
net-auto/automation-tools
|
0c6b902d3133ac01bbe879bfae893e84b7123d4b
|
[
"MIT"
] | null | null | null |
"""
netconf functions for use with comware 7 devices
"""
# imports:
import xmltodict
def get_irf_members(ncclient_manager_ref):
"""
:param ncclient_manager_ref: ncclient manager reference:
:return: Current IRF members
"""
filter_criteria = '''
<top
xmlns="http://www.hp.com/netconf/config:1.0">
<IRF>
<Members></Members>
</IRF>
</top>
'''
# get-config RPC against the running datastore using a subtree filter
reply = ncclient_manager_ref.get_config('running', filter=('subtree', filter_criteria))
data = xmltodict.parse(reply.data_xml)
if data.get('data').get('top'):
return data.get('data')['top']['IRF']['Members']['Member']
else:
return f'no IRF members data found!'
def get_irf_interfaces(ncclient_manager_ref):
"""
:param ncclient_manager_ref: ncclient manager reference
:return: Current IRF interfaces
"""
filter_criteria = '''
<top
xmlns="http://www.hp.com/netconf/config:1.0">
<IRF>
<IRFPorts></IRFPorts>
</IRF>
</top>
'''
# get-config RPC against the running datastore using a subtree filter
reply = ncclient_manager_ref.get_config('running', filter=('subtree', filter_criteria))
data = xmltodict.parse(reply.data_xml)
if data.get('data').get('top'):
return data.get('data')['top']['IRF']['IRFPorts']['IRFPort']
else:
return f'no IRF interfaces data found!'
def get_vlans(ncclient_manager_ref):
"""
:param ncclient_manager_ref: ncclient manager reference
:return: Current VLANs configured
"""
filter_criteria = '''
<top
xmlns="http://www.hp.com/netconf/config:1.0">
<VLAN>
<VLANs></VLANs>
</VLAN>
</top>
'''
# get-config RPC against the running datastore using a subtree filter
reply = ncclient_manager_ref.get_config('running', filter=('subtree', filter_criteria))
# reply = ncclient_manager_ref.action(filter_criteria)
data = xmltodict.parse(reply.data_xml)
if data.get('data').get('top'):
return data.get('data')['top']['VLAN']['VLANs']
else:
return f'no VLANs data found!'
| 31.240506
| 91
| 0.563614
| 270
| 2,468
| 5.011111
| 0.214815
| 0.144124
| 0.133038
| 0.067997
| 0.765706
| 0.742055
| 0.742055
| 0.742055
| 0.742055
| 0.742055
| 0
| 0.004094
| 0.307131
| 2,468
| 78
| 92
| 31.641026
| 0.787135
| 0.234603
| 0
| 0.673913
| 0
| 0
| 0.482113
| 0.011558
| 0
| 0
| 0
| 0
| 0
| 1
| 0.065217
| false
| 0
| 0.021739
| 0
| 0.217391
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1702ec4726305e4e18d3f9124c49c98e4cb75d1a
| 20
|
py
|
Python
|
Codes/LoadSave.py
|
SotirisSapakos/Text-Based-RPG
|
44e474effba29493873acbbff85eef2bf24d5160
|
[
"MIT"
] | null | null | null |
Codes/LoadSave.py
|
SotirisSapakos/Text-Based-RPG
|
44e474effba29493873acbbff85eef2bf24d5160
|
[
"MIT"
] | 1
|
2018-07-13T11:36:41.000Z
|
2018-07-13T11:36:41.000Z
|
Codes/LoadSave.py
|
SotirisSapakos/Text-Based-RPG
|
44e474effba29493873acbbff85eef2bf24d5160
|
[
"MIT"
] | 14
|
2018-07-01T14:11:05.000Z
|
2021-06-26T01:03:43.000Z
|
# Save and load fuct
| 20
| 20
| 0.75
| 4
| 20
| 3.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 20
| 1
| 20
| 20
| 0.9375
| 0.9
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ca057e9455e6f1b71a26b909ae5af7c54bc72ad1
| 33
|
py
|
Python
|
project/api/common/__init__.py
|
hernan0216/flask-base-api
|
bc020e6880575fb6fea4cd1de30114ce1403b84e
|
[
"MIT"
] | 46
|
2018-05-28T13:21:09.000Z
|
2022-03-01T09:15:52.000Z
|
project/api/common/__init__.py
|
hernan0216/flask-base-api
|
bc020e6880575fb6fea4cd1de30114ce1403b84e
|
[
"MIT"
] | 7
|
2019-03-20T10:12:23.000Z
|
2021-09-04T01:12:53.000Z
|
project/api/common/__init__.py
|
hernan0216/flask-base-api
|
bc020e6880575fb6fea4cd1de30114ce1403b84e
|
[
"MIT"
] | 21
|
2018-09-26T08:04:28.000Z
|
2022-03-28T00:38:29.000Z
|
# project/api/common/__init__.py
| 16.5
| 32
| 0.787879
| 5
| 33
| 4.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060606
| 33
| 1
| 33
| 33
| 0.709677
| 0.909091
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ca1a66e823bca39ef07b7177bd411bd2f3b6c199
| 47
|
py
|
Python
|
skbonus/pandas/tests/__init__.py
|
Garve/scikit-bonus
|
46c985c6f2c0b371b031977592b23cf0e28c46e3
|
[
"BSD-3-Clause"
] | 8
|
2021-02-04T13:54:43.000Z
|
2021-12-26T16:50:31.000Z
|
skbonus/pandas/tests/__init__.py
|
JoshuaC3/scikit-bonus
|
3300427e7ada4c03937b4714dd1bc3033d1c1fff
|
[
"BSD-3-Clause"
] | 3
|
2021-03-01T15:27:21.000Z
|
2021-07-31T16:14:27.000Z
|
skbonus/pandas/tests/__init__.py
|
JoshuaC3/scikit-bonus
|
3300427e7ada4c03937b4714dd1bc3033d1c1fff
|
[
"BSD-3-Clause"
] | 2
|
2021-02-13T20:16:48.000Z
|
2021-04-07T07:29:06.000Z
|
"""Module for testing the pandas submodule."""
| 23.5
| 46
| 0.723404
| 6
| 47
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12766
| 47
| 1
| 47
| 47
| 0.829268
| 0.851064
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ca3b9235f7705e4fe8c68ddc24b8bbc2842d264d
| 278
|
py
|
Python
|
memser/test_classes.py
|
mrbahrani/memser
|
f5a8f671e71e98cadb0e65da49c8de2f98099ade
|
[
"MIT"
] | null | null | null |
memser/test_classes.py
|
mrbahrani/memser
|
f5a8f671e71e98cadb0e65da49c8de2f98099ade
|
[
"MIT"
] | null | null | null |
memser/test_classes.py
|
mrbahrani/memser
|
f5a8f671e71e98cadb0e65da49c8de2f98099ade
|
[
"MIT"
] | null | null | null |
class Simple(object):
def __init__(self, x):
self.x = x
self.y = 6
def get_x(self):
return self.x
class WithCollection(object):
def __init__(self):
self.l = list()
self.d = dict()
def get_l(self):
return self.l
| 17.375
| 29
| 0.535971
| 39
| 278
| 3.564103
| 0.410256
| 0.107914
| 0.18705
| 0.244604
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005495
| 0.345324
| 278
| 16
| 30
| 17.375
| 0.758242
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.166667
| 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
| 1
| 1
| 0
|
0
| 5
|
ca75b0fad6c795f0545cbbe56a2773ce8ec97f88
| 5,212
|
py
|
Python
|
sovtokenfees/sovtokenfees/test/view_change/test_vc_reverting_different_batches.py
|
cam-parra/token-plugin
|
0919e02f62f56a81ff14ca5838a62bc776d96813
|
[
"Apache-2.0"
] | null | null | null |
sovtokenfees/sovtokenfees/test/view_change/test_vc_reverting_different_batches.py
|
cam-parra/token-plugin
|
0919e02f62f56a81ff14ca5838a62bc776d96813
|
[
"Apache-2.0"
] | null | null | null |
sovtokenfees/sovtokenfees/test/view_change/test_vc_reverting_different_batches.py
|
cam-parra/token-plugin
|
0919e02f62f56a81ff14ca5838a62bc776d96813
|
[
"Apache-2.0"
] | null | null | null |
import pytest
from sovtoken.constants import ADDRESS, AMOUNT
from plenum.common.txn_util import get_seq_no
from plenum.test import waits
from plenum.test.stasher import delay_rules, delay_rules_without_processing
from plenum.test.delayers import cDelay
from sovtokenfees.test.helper import get_amount_from_token_txn, send_and_check_nym_with_fees, send_and_check_transfer, \
ensure_all_nodes_have_same_data
from stp_core.loop.eventually import eventually
from plenum.test.helper import assertExp, sdk_get_and_check_replies
from plenum.test.view_change.helper import ensure_view_change
from plenum.common.startable import Mode
@pytest.fixture()
def addresses(helpers):
return helpers.wallet.create_new_addresses(2)
@pytest.fixture()
def mint_tokens(helpers, addresses):
outputs = [{ADDRESS: addresses[0], AMOUNT: 1000}]
return helpers.general.do_mint(outputs)
@pytest.mark.skip(reason="ST-537")
def test_revert_works_for_fees_after_view_change(looper, helpers,
nodeSetWithIntegratedTokenPlugin,
sdk_pool_handle,
fees_set,
mint_tokens, addresses, fees):
node_set = nodeSetWithIntegratedTokenPlugin
current_amount = get_amount_from_token_txn(mint_tokens)
seq_no = get_seq_no(mint_tokens)
reverted_node = nodeSetWithIntegratedTokenPlugin[-1]
current_amount, seq_no, _ = send_and_check_nym_with_fees(helpers, fees_set, seq_no, looper, addresses,
current_amount)
current_amount, seq_no, _ = send_and_check_transfer(helpers, addresses, fees, looper, current_amount, seq_no)
with delay_rules_without_processing(reverted_node.nodeIbStasher, cDelay()):
len_batches_before = len(reverted_node.master_replica.batches)
current_amount, seq_no, _ = send_and_check_transfer(helpers, addresses, fees, looper, current_amount, seq_no)
current_amount, seq_no, _ = send_and_check_nym_with_fees(helpers, fees_set, seq_no, looper, addresses,
current_amount)
looper.runFor(waits.expectedPrePrepareTime(len(nodeSetWithIntegratedTokenPlugin)))
len_batches_after = len(reverted_node.master_replica.batches)
"""
Checks, that we have a 2 new batches
"""
assert len_batches_after - len_batches_before == 2
for n in node_set:
n.view_changer.on_master_degradation()
ensure_view_change(looper, nodeSetWithIntegratedTokenPlugin)
looper.run(eventually(lambda: assertExp(reverted_node.mode == Mode.participating)))
ensure_all_nodes_have_same_data(looper, node_set)
send_and_check_nym_with_fees(helpers, fees_set, seq_no, looper, addresses, current_amount)
ensure_all_nodes_have_same_data(looper, node_set)
@pytest.mark.skip(reason="ST-537")
def test_revert_for_all_after_view_change(looper, helpers,
nodeSetWithIntegratedTokenPlugin,
sdk_pool_handle,
fees_set,
mint_tokens, addresses, fees):
node_set = nodeSetWithIntegratedTokenPlugin
current_amount = get_amount_from_token_txn(mint_tokens)
seq_no = get_seq_no(mint_tokens)
reverted_node = nodeSetWithIntegratedTokenPlugin[-1]
current_amount, seq_no, _ = send_and_check_nym_with_fees(helpers, fees_set, seq_no, looper, addresses,
current_amount)
current_amount, seq_no, _ = send_and_check_transfer(helpers, addresses, fees, looper, current_amount, seq_no)
with delay_rules([n.nodeIbStasher for n in node_set], cDelay()):
len_batches_before = len(reverted_node.master_replica.batches)
current_amount, seq_no, resp1 = send_and_check_transfer(helpers, addresses, fees, looper, current_amount,
seq_no, check_reply=False)
current_amount, seq_no, resp2 = send_and_check_nym_with_fees(helpers, fees_set, seq_no, looper, addresses,
current_amount, check_reply=False)
looper.runFor(waits.expectedPrePrepareTime(len(nodeSetWithIntegratedTokenPlugin)))
len_batches_after = len(reverted_node.master_replica.batches)
"""
Checks, that we have a 2 new batches
"""
assert len_batches_after - len_batches_before == 2
for n in node_set:
n.view_changer.on_master_degradation()
ensure_view_change(looper, nodeSetWithIntegratedTokenPlugin)
looper.run(eventually(lambda: assertExp(reverted_node.mode == Mode.participating)))
ensure_all_nodes_have_same_data(looper, node_set)
sdk_get_and_check_replies(looper, resp1)
sdk_get_and_check_replies(looper, resp2)
send_and_check_nym_with_fees(helpers, fees_set, seq_no, looper, addresses, current_amount)
ensure_all_nodes_have_same_data(looper, node_set)
| 50.601942
| 120
| 0.680929
| 609
| 5,212
| 5.418719
| 0.178982
| 0.034848
| 0.043636
| 0.065455
| 0.776364
| 0.759697
| 0.728485
| 0.728485
| 0.728485
| 0.705455
| 0
| 0.005647
| 0.252494
| 5,212
| 102
| 121
| 51.098039
| 0.841376
| 0
| 0
| 0.653846
| 0
| 0
| 0.002357
| 0
| 0
| 0
| 0
| 0
| 0.064103
| 1
| 0.051282
| false
| 0
| 0.141026
| 0.012821
| 0.217949
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ca85cc5644f8b81c713392cb57a5c53d34a65f26
| 37,904
|
py
|
Python
|
tests/orders/generic_test.py
|
aero-nerd/tda-api
|
e84d8f0d3b7ef54878f4f1d6926238b53e15f3c7
|
[
"MIT"
] | null | null | null |
tests/orders/generic_test.py
|
aero-nerd/tda-api
|
e84d8f0d3b7ef54878f4f1d6926238b53e15f3c7
|
[
"MIT"
] | null | null | null |
tests/orders/generic_test.py
|
aero-nerd/tda-api
|
e84d8f0d3b7ef54878f4f1d6926238b53e15f3c7
|
[
"MIT"
] | null | null | null |
import unittest
from tda.orders.generic import *
from tda.orders.common import *
from tests.test_utils import has_diff, no_duplicates
class OrderBuilderTest(unittest.TestCase):
def setUp(self):
self.maxDiff = None
self.order_builder = OrderBuilder()
##########################################################################
# Session
@no_duplicates
def test_session_success(self):
self.order_builder.set_session(Session.NORMAL)
self.assertFalse(has_diff({
'session': 'NORMAL'
}, self.order_builder.build()))
self.order_builder.clear_session()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_session_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.set_session('NORMAL')
@no_duplicates
def test_session_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_session('NORMAL')
self.assertFalse(has_diff({
'session': 'NORMAL'
}, self.order_builder.build()))
##########################################################################
# Duration
@no_duplicates
def test_duration_success(self):
self.order_builder.set_duration(Duration.DAY)
self.assertFalse(has_diff({
'duration': 'DAY'
}, self.order_builder.build()))
self.order_builder.clear_duration()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_duration_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.set_duration('DAY')
@no_duplicates
def test_duration_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_duration('DAY')
self.assertFalse(has_diff({
'duration': 'DAY'
}, self.order_builder.build()))
##########################################################################
# OrderType
@no_duplicates
def test_order_type_success(self):
self.order_builder.set_order_type(OrderType.MARKET)
self.assertFalse(has_diff({
'orderType': 'MARKET'
}, self.order_builder.build()))
self.order_builder.clear_order_type()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_order_type_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.set_order_type('MARKET')
@no_duplicates
def test_order_type_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_order_type('MARKET')
self.assertFalse(has_diff({
'orderType': 'MARKET'
}, self.order_builder.build()))
##########################################################################
# ComplexOrderStrategyType
@no_duplicates
def test_complex_order_strategy_type_success(self):
self.order_builder.set_complex_order_strategy_type(
ComplexOrderStrategyType.IRON_CONDOR)
self.assertFalse(has_diff({
'complexOrderStrategyType': 'IRON_CONDOR'
}, self.order_builder.build()))
self.order_builder.clear_complex_order_strategy_type()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test__wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.set_complex_order_strategy_type('IRON_CONDOR')
@no_duplicates
def test__wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_complex_order_strategy_type('IRON_CONDOR')
self.assertFalse(has_diff({
'complexOrderStrategyType': 'IRON_CONDOR'
}, self.order_builder.build()))
##########################################################################
# Quantity
@no_duplicates
def test_quantity_success(self):
self.order_builder.set_quantity(12)
self.assertFalse(has_diff({
'quantity': 12
}, self.order_builder.build()))
self.order_builder.clear_quantity()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_quantity_negative(self):
with self.assertRaises(ValueError):
self.order_builder.set_quantity(-12)
@no_duplicates
def test_quantity_zero(self):
with self.assertRaises(ValueError):
self.order_builder.set_quantity(0)
##########################################################################
# RequestedDestination
@no_duplicates
def test_requested_destination_success(self):
self.order_builder.set_requested_destination(Destination.INET)
self.assertFalse(has_diff({
'requestedDestination': 'INET'
}, self.order_builder.build()))
self.order_builder.clear_requested_destination()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_requested_destination_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.set_requested_destination('INET')
@no_duplicates
def test_requested_destination_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_requested_destination('INET')
self.assertFalse(has_diff({
'requestedDestination': 'INET'
}, self.order_builder.build()))
##########################################################################
# StopPrice
@no_duplicates
def test_stop_price_success(self):
self.order_builder.set_stop_price(42.90)
self.assertFalse(has_diff({
'stopPrice': '42.90'
}, self.order_builder.build()))
self.order_builder.clear_stop_price()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_stop_price_negative(self):
self.order_builder.set_stop_price(-1.31)
self.assertFalse(has_diff({
'stopPrice': '-1.31'
}, self.order_builder.build()))
@no_duplicates
def test_stop_price_zero(self):
self.order_builder.set_stop_price(0)
self.assertFalse(has_diff({
'stopPrice': '0.00'
}, self.order_builder.build()))
@no_duplicates
def test_stop_price_do_not_round_up(self):
self.order_builder.set_stop_price(1.99999)
self.assertFalse(has_diff({
'stopPrice': '1.99'
}, self.order_builder.build()))
@no_duplicates
def test_stop_price_do_round_down(self):
self.order_builder.set_stop_price(2.00001)
self.assertFalse(has_diff({
'stopPrice': '2.00'
}, self.order_builder.build()))
##########################################################################
# StopPriceLinkBasis
@no_duplicates
def test_stop_price_link_basis_success(self):
self.order_builder.set_stop_price_link_basis(StopPriceLinkBasis.ASK)
self.assertFalse(has_diff({
'stopPriceLinkBasis': 'ASK'
}, self.order_builder.build()))
self.order_builder.clear_stop_price_link_basis()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_stop_price_link_basis_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.set_stop_price_link_basis('ASK')
@no_duplicates
def test_stop_price_link_basis_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_stop_price_link_basis('ASK')
self.assertFalse(has_diff({
'stopPriceLinkBasis': 'ASK'
}, self.order_builder.build()))
##########################################################################
# StopPriceLinkType
@no_duplicates
def test_stop_price_link_type_success(self):
self.order_builder.set_stop_price_link_type(StopPriceLinkType.VALUE)
self.assertFalse(has_diff({
'stopPriceLinkType': 'VALUE'
}, self.order_builder.build()))
self.order_builder.clear_stop_price_link_type()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_stop_price_link_type_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.set_stop_price_link_type('VALUE')
@no_duplicates
def test_stop_price_link_type_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_stop_price_link_type('VALUE')
self.assertFalse(has_diff({
'stopPriceLinkType': 'VALUE'
}, self.order_builder.build()))
##########################################################################
# StopPriceOffset
@no_duplicates
def test_stop_price_offset_success(self):
self.order_builder.set_stop_price_offset(12.98)
self.assertFalse(has_diff({
'stopPriceOffset': 12.98
}, self.order_builder.build()))
self.order_builder.clear_stop_price_offset()
self.assertFalse(has_diff({}, self.order_builder.build()))
##########################################################################
# StopType
@no_duplicates
def test_stop_type_success(self):
self.order_builder.set_stop_type(StopType.MARK)
self.assertFalse(has_diff({
'stopType': 'MARK'
}, self.order_builder.build()))
self.order_builder.clear_stop_type()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_stop_type_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.set_stop_type('MARK')
@no_duplicates
def test_stop_type_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_stop_type('MARK')
self.assertFalse(has_diff({
'stopType': 'MARK'
}, self.order_builder.build()))
##########################################################################
# PriceLinkBasis
@no_duplicates
def test_price_link_basis_success(self):
self.order_builder.set_price_link_basis(PriceLinkBasis.AVERAGE)
self.assertFalse(has_diff({
'priceLinkBasis': 'AVERAGE'
}, self.order_builder.build()))
self.order_builder.clear_price_link_basis()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_price_link_basis_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.set_price_link_basis('AVERAGE')
@no_duplicates
def test_price_link_basis_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_price_link_basis('AVERAGE')
self.assertFalse(has_diff({
'priceLinkBasis': 'AVERAGE'
}, self.order_builder.build()))
##########################################################################
# PriceLinkType
@no_duplicates
def test_price_link_type_success(self):
self.order_builder.set_price_link_type(PriceLinkType.PERCENT)
self.assertFalse(has_diff({
'priceLinkType': 'PERCENT'
}, self.order_builder.build()))
self.order_builder.clear_price_link_type()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_price_link_type_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.set_price_link_type('PERCENT')
@no_duplicates
def test_price_link_type_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_price_link_type('PERCENT')
self.assertFalse(has_diff({
'priceLinkType': 'PERCENT'
}, self.order_builder.build()))
##########################################################################
# Price
@no_duplicates
def test_price_success(self):
self.order_builder.set_price(23.49)
self.assertFalse(has_diff({
'price': '23.49'
}, self.order_builder.build()))
self.order_builder.clear_price()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_price_negative(self):
self.order_builder.set_price(-1.23)
self.assertFalse(has_diff({
'price': '-1.23'
}, self.order_builder.build()))
@no_duplicates
def test_price_zero(self):
self.order_builder.set_price(0.0)
self.assertFalse(has_diff({
'price': '0.00'
}, self.order_builder.build()))
@no_duplicates
def test_price_do_not_round_up(self):
self.order_builder.set_price(19.9999999)
self.assertFalse(has_diff({
'price': '19.99'
}, self.order_builder.build()))
@no_duplicates
def test_price_do_not_round_down(self):
self.order_builder.set_price(20.00000001)
self.assertFalse(has_diff({
'price': '20.00'
}, self.order_builder.build()))
##########################################################################
# ActivationPrice
@no_duplicates
def test_activation_price_success(self):
self.order_builder.set_activation_price(54.03)
self.assertFalse(has_diff({
'activationPrice': 54.03
}, self.order_builder.build()))
self.order_builder.clear_activation_price()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_activation_price_negative(self):
with self.assertRaises(ValueError):
self.order_builder.set_activation_price(-3.94)
@no_duplicates
def test_activation_price_zero(self):
with self.assertRaises(ValueError):
self.order_builder.set_activation_price(0.0)
##########################################################################
# SpecialInstruction
@no_duplicates
def test_special_instruction_success(self):
self.order_builder.set_special_instruction(
SpecialInstruction.DO_NOT_REDUCE)
self.assertFalse(has_diff({
'specialInstruction': 'DO_NOT_REDUCE'
}, self.order_builder.build()))
self.order_builder.clear_special_instruction()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_special_instruction_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.set_special_instruction('DO_NOT_REDUCE')
@no_duplicates
def test_special_instruction_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_special_instruction('DO_NOT_REDUCE')
self.assertFalse(has_diff({
'specialInstruction': 'DO_NOT_REDUCE'
}, self.order_builder.build()))
##########################################################################
# OrderStrategyType
@no_duplicates
def test_order_strategy_type_success(self):
self.order_builder.set_order_strategy_type(OrderStrategyType.OCO)
self.assertFalse(has_diff({
'orderStrategyType': 'OCO'
}, self.order_builder.build()))
self.order_builder.clear_order_strategy_type()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_order_strategy_type_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.set_order_strategy_type('OCO')
@no_duplicates
def test_order_strategy_type_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_order_strategy_type('OCO')
self.assertFalse(has_diff({
'orderStrategyType': 'OCO'
}, self.order_builder.build()))
##########################################################################
# ChildOrderStrategies
@no_duplicates
def test_add_child_order_strategy_success(self):
self.order_builder.add_child_order_strategy(
OrderBuilder().set_session(Session.NORMAL))
self.assertFalse(has_diff({
'childOrderStrategies': [{'session': 'NORMAL'}]
}, self.order_builder.build()))
self.order_builder.clear_child_order_strategies()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_add_child_order_strategy_dict(self):
self.order_builder.add_child_order_strategy(
{'session': 'NORMAL'})
self.assertFalse(has_diff({
'childOrderStrategies': [{'session': 'NORMAL'}]
}, self.order_builder.build()))
@no_duplicates
def test_add_child_order_strategy_invalid_type(self):
with self.assertRaises(ValueError):
self.order_builder.add_child_order_strategy(10)
##########################################################################
# OrderLegCollection
@no_duplicates
def test_add_equity_leg_success(self):
self.order_builder.add_equity_leg(EquityInstruction.BUY, 'GOOG', 10)
self.order_builder.add_equity_leg(
EquityInstruction.SELL_SHORT, 'MSFT', 1)
self.assertFalse(has_diff({
'orderLegCollection': [{
'instruction': 'BUY',
'instrument': {
'symbol': 'GOOG',
'assetType': 'EQUITY'
},
'quantity': 10,
}, {
'instruction': 'SELL_SHORT',
'instrument': {
'symbol': 'MSFT',
'assetType': 'EQUITY'
},
'quantity': 1,
}]
}, self.order_builder.build()))
self.order_builder.clear_order_legs()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_add_equity_leg_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.add_equity_leg('BUY', 'GOOG', 10)
@no_duplicates
def test_add_equity_leg_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.add_equity_leg('BUY', 'GOOG', 10)
self.order_builder.add_equity_leg('SELL_TO_CLOSE', 'MSFT', 1)
self.assertFalse(has_diff({
'orderLegCollection': [{
'instruction': 'BUY',
'instrument': {
'symbol': 'GOOG',
'assetType': 'EQUITY'
},
'quantity': 10,
}, {
'instruction': 'SELL_TO_CLOSE',
'instrument': {
'symbol': 'MSFT',
'assetType': 'EQUITY'
},
'quantity': 1,
}]
}, self.order_builder.build()))
@no_duplicates
def test_add_equity_leg_negative_quantity(self):
with self.assertRaises(ValueError):
self.order_builder.add_equity_leg(
EquityInstruction.BUY, 'GOOG', -1)
@no_duplicates
def test_add_equity_leg_zero_quantity(self):
with self.assertRaises(ValueError):
self.order_builder.add_equity_leg(
EquityInstruction.BUY, 'GOOG', 0)
@no_duplicates
def test_add_option_leg_success(self):
self.order_builder.add_option_leg(
OptionInstruction.BUY_TO_OPEN, 'GOOG31433C1342', 10)
self.order_builder.add_option_leg(
OptionInstruction.BUY_TO_CLOSE, 'MSFT439132P35', 1)
self.assertFalse(has_diff({
'orderLegCollection': [{
'instruction': 'BUY_TO_OPEN',
'instrument': {
'symbol': 'GOOG31433C1342',
'assetType': 'OPTION'
},
'quantity': 10,
}, {
'instruction': 'BUY_TO_CLOSE',
'instrument': {
'symbol': 'MSFT439132P35',
'assetType': 'OPTION'
},
'quantity': 1,
}]
}, self.order_builder.build()))
self.order_builder.clear_order_legs()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_add_option_leg_wrong_type(self):
with self.assertRaises(ValueError):
self.order_builder.add_option_leg(
'BUY_TO_OPEN', 'GOOG31433C1342', 10)
@no_duplicates
def test_add_option_leg_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.add_option_leg('BUY_TO_OPEN', 'GOOG31433C1342', 10)
self.order_builder.add_option_leg('BUY_TO_CLOSE', 'MSFT439132P35', 1)
self.assertFalse(has_diff({
'orderLegCollection': [{
'instruction': 'BUY_TO_OPEN',
'instrument': {
'symbol': 'GOOG31433C1342',
'assetType': 'OPTION'
},
'quantity': 10,
}, {
'instruction': 'BUY_TO_CLOSE',
'instrument': {
'symbol': 'MSFT439132P35',
'assetType': 'OPTION'
},
'quantity': 1,
}]
}, self.order_builder.build()))
self.order_builder.clear_order_legs()
self.assertFalse(has_diff({}, self.order_builder.build()))
@no_duplicates
def test_add_option_leg_negative_quantity(self):
with self.assertRaises(ValueError):
self.order_builder.add_option_leg(
OptionInstruction.BUY_TO_OPEN, 'GOOG31433C1342', -1)
@no_duplicates
def test_add_option_leg_zero_quantity(self):
with self.assertRaises(ValueError):
self.order_builder.add_option_leg(
OptionInstruction.BUY_TO_OPEN, 'GOOG31433C1342', 0)
class OrderBuilderExamplesTest(unittest.TestCase):
def setUp(self):
self.maxDiff = None
##########################################################################
# Functional tests from here:
# https://developer.tdameritrade.com/content/place-order-samples
@no_duplicates
def test_quantity_negative(self):
with self.assertRaises(ValueError):
self.order_builder.set_quantity(-12)
@no_duplicates
def test_quantity_wrong_type_no_check(self):
self.order_builder = OrderBuilder(enforce_enums=False)
self.order_builder.set_quantity('')
self.assertFalse(has_diff({
'quantity': ''
}, self.order_builder.build()))
class OrderBuilderExamplesTest(unittest.TestCase):
@no_duplicates
def setUp(self):
self.maxDiff = None
##########################################################################
# Functional tests from here:
# https://developer.tdameritrade.com/content/place-order-samples
@no_duplicates
def test_buy_market_stock(self):
builder = (
OrderBuilder()
.set_order_type(OrderType.MARKET)
.set_session(Session.NORMAL)
.set_duration(Duration.DAY)
.set_order_strategy_type(OrderStrategyType.SINGLE)
.add_equity_leg(EquityInstruction.BUY, 'XYZ', 15))
expected = {
'orderType': 'MARKET',
'session': 'NORMAL',
'duration': 'DAY',
'orderStrategyType': 'SINGLE',
'orderLegCollection': [
{
'instruction': 'BUY', # The original says 'Buy'
'quantity': 15,
'instrument': {
'symbol': 'XYZ',
'assetType': 'EQUITY'
}
}
]
}
self.assertFalse(has_diff(expected, builder.build()))
@no_duplicates
def test_buy_limit_single_option(self):
builder = (
OrderBuilder()
.set_complex_order_strategy_type(ComplexOrderStrategyType.NONE)
.set_order_type(OrderType.LIMIT)
.set_session(Session.NORMAL)
.set_price(6.45)
.set_duration(Duration.DAY)
.set_order_strategy_type(OrderStrategyType.SINGLE)
.add_option_leg(OptionInstruction.BUY_TO_OPEN, 'XYZ_032015C49', 10))
expected = {
'complexOrderStrategyType': 'NONE',
'orderType': 'LIMIT',
'session': 'NORMAL',
'price': '6.45',
'duration': 'DAY',
'orderStrategyType': 'SINGLE',
'orderLegCollection': [
{
'instruction': 'BUY_TO_OPEN',
'quantity': 10,
'instrument': {
'symbol': 'XYZ_032015C49',
'assetType': 'OPTION'
}
}
]
}
self.assertFalse(has_diff(expected, builder.build()))
@no_duplicates
def test_buy_limit_vertical_call_spread(self):
builder = (
OrderBuilder()
.set_order_type(OrderType.NET_DEBIT)
.set_session(Session.NORMAL)
.set_price(1.20)
.set_duration(Duration.DAY)
.set_order_strategy_type(OrderStrategyType.SINGLE)
.add_option_leg(OptionInstruction.BUY_TO_OPEN, 'XYZ_011516C40', 10)
.add_option_leg(
OptionInstruction.SELL_TO_OPEN, 'XYZ_011516C42.5', 10))
expected = {
'orderType': 'NET_DEBIT',
'session': 'NORMAL',
'price': '1.20',
'duration': 'DAY',
'orderStrategyType': 'SINGLE',
'orderLegCollection': [
{
'instruction': 'BUY_TO_OPEN',
'quantity': 10,
'instrument': {
'symbol': 'XYZ_011516C40',
'assetType': 'OPTION'
}
},
{
'instruction': 'SELL_TO_OPEN',
'quantity': 10,
'instrument': {
'symbol': 'XYZ_011516C42.5',
'assetType': 'OPTION'
}
}
]
}
self.assertFalse(has_diff(expected, builder.build()))
@no_duplicates
def test_custom_option_spread(self):
builder = (
OrderBuilder()
.set_order_strategy_type(OrderStrategyType.SINGLE)
.set_order_type(OrderType.MARKET)
.add_option_leg(OptionInstruction.SELL_TO_OPEN, 'XYZ_011819P45', 1)
.add_option_leg(OptionInstruction.BUY_TO_OPEN, 'XYZ_011720P43', 2)
.set_complex_order_strategy_type(ComplexOrderStrategyType.CUSTOM)
.set_duration(Duration.DAY)
.set_session(Session.NORMAL))
expected = {
'orderStrategyType': 'SINGLE',
'orderType': 'MARKET',
'orderLegCollection': [
{
'instrument': {
'assetType': 'OPTION',
'symbol': 'XYZ_011819P45'
},
'instruction': 'SELL_TO_OPEN',
'quantity': 1
},
{
'instrument': {
'assetType': 'OPTION',
'symbol': 'XYZ_011720P43'
},
'instruction': 'BUY_TO_OPEN',
'quantity': 2
}
],
'complexOrderStrategyType': 'CUSTOM',
'duration': 'DAY',
'session': 'NORMAL'
}
self.assertFalse(has_diff(expected, builder.build()))
@no_duplicates
def test_conditional_order_one_triggers_another(self):
builder = (
OrderBuilder()
.set_order_type(OrderType.LIMIT)
.set_session(Session.NORMAL)
.set_price(34.97)
.set_duration(Duration.DAY)
.set_order_strategy_type(OrderStrategyType.TRIGGER)
.add_equity_leg(EquityInstruction.BUY, 'XYZ', 10)
.add_child_order_strategy(
OrderBuilder()
.set_order_type(OrderType.LIMIT)
.set_session(Session.NORMAL)
.set_price(42.03)
.set_duration(Duration.DAY)
.set_order_strategy_type(OrderStrategyType.SINGLE)
.add_equity_leg(EquityInstruction.SELL, 'XYZ', 10)))
expected = {
'orderType': 'LIMIT',
'session': 'NORMAL',
'price': '34.97',
'duration': 'DAY',
'orderStrategyType': 'TRIGGER',
'orderLegCollection': [
{
'instruction': 'BUY',
'quantity': 10,
'instrument': {
'symbol': 'XYZ',
'assetType': 'EQUITY'
}
}
],
'childOrderStrategies': [
{
'orderType': 'LIMIT',
'session': 'NORMAL',
'price': '42.03',
'duration': 'DAY',
'orderStrategyType': 'SINGLE',
'orderLegCollection': [
{
'instruction': 'SELL',
'quantity': 10,
'instrument': {
'symbol': 'XYZ',
'assetType': 'EQUITY'
}
}
]
}
]
}
self.assertFalse(has_diff(expected, builder.build()))
@no_duplicates
def test_conditional_order_one_cancels_another(self):
builder = (
OrderBuilder()
.set_order_strategy_type(OrderStrategyType.OCO)
.add_child_order_strategy(
OrderBuilder()
.set_order_type(OrderType.LIMIT)
.set_session(Session.NORMAL)
.set_price(45.97)
.set_duration(Duration.DAY)
.set_order_strategy_type(OrderStrategyType.SINGLE)
.add_equity_leg(EquityInstruction.SELL, 'XYZ', 2)
)
.add_child_order_strategy(
OrderBuilder()
.set_order_type(OrderType.STOP_LIMIT)
.set_session(Session.NORMAL)
.set_price(37.00)
.set_stop_price(37.03)
.set_duration(Duration.DAY)
.set_order_strategy_type(OrderStrategyType.SINGLE)
.add_equity_leg(EquityInstruction.SELL, 'XYZ', 2)))
expected = {
'orderStrategyType': 'OCO',
'childOrderStrategies': [
{
'orderType': 'LIMIT',
'session': 'NORMAL',
'price': '45.97',
'duration': 'DAY',
'orderStrategyType': 'SINGLE',
'orderLegCollection': [
{
'instruction': 'SELL',
'quantity': 2,
'instrument': {
'symbol': 'XYZ',
'assetType': 'EQUITY'
}
}
]
},
{
'orderType': 'STOP_LIMIT',
'session': 'NORMAL',
'price': '37.00',
'stopPrice': '37.03',
'duration': 'DAY',
'orderStrategyType': 'SINGLE',
'orderLegCollection': [
{
'instruction': 'SELL',
'quantity': 2,
'instrument': {
'symbol': 'XYZ',
'assetType': 'EQUITY'
}
}
]
}
]
}
self.assertFalse(has_diff(expected, builder.build()))
@no_duplicates
def test_conditional_order_one_triggers_a_one_cancels_other(self):
builder = (
OrderBuilder()
.set_order_strategy_type(OrderStrategyType.TRIGGER)
.set_session(Session.NORMAL)
.set_duration(Duration.DAY)
.set_order_type(OrderType.LIMIT)
.set_price(14.97)
.add_equity_leg(EquityInstruction.BUY, 'XYZ', 5)
.add_child_order_strategy(
OrderBuilder()
.set_order_strategy_type(OrderStrategyType.OCO)
.add_child_order_strategy(
OrderBuilder()
.set_order_strategy_type(OrderStrategyType.SINGLE)
.set_session(Session.NORMAL)
.set_duration(Duration.GOOD_TILL_CANCEL)
.set_order_type(OrderType.LIMIT)
.set_price(15.27)
.add_equity_leg(EquityInstruction.SELL, 'XYZ', 5))
.add_child_order_strategy(
OrderBuilder()
.set_order_strategy_type(OrderStrategyType.SINGLE)
.set_session(Session.NORMAL)
.set_duration(Duration.GOOD_TILL_CANCEL)
.set_order_type(OrderType.STOP)
.set_stop_price(11.27)
.add_equity_leg(EquityInstruction.SELL, 'XYZ', 5))))
expected = {
'orderStrategyType': 'TRIGGER',
'session': 'NORMAL',
'duration': 'DAY',
'orderType': 'LIMIT',
'price': '14.97',
'orderLegCollection': [
{
'instruction': 'BUY',
'quantity': 5,
'instrument': {
'assetType': 'EQUITY',
'symbol': 'XYZ'
}
}
],
'childOrderStrategies': [
{
'orderStrategyType': 'OCO',
'childOrderStrategies': [
{
'orderStrategyType': 'SINGLE',
'session': 'NORMAL',
'duration': 'GOOD_TILL_CANCEL',
'orderType': 'LIMIT',
'price': '15.27',
'orderLegCollection': [
{
'instruction': 'SELL',
'quantity': 5,
'instrument': {
'assetType': 'EQUITY',
'symbol': 'XYZ'
}
}
]
},
{
'orderStrategyType': 'SINGLE',
'session': 'NORMAL',
'duration': 'GOOD_TILL_CANCEL',
'orderType': 'STOP',
'stopPrice': '11.27',
'orderLegCollection': [
{
'instruction': 'SELL',
'quantity': 5,
'instrument': {
'assetType': 'EQUITY',
'symbol': 'XYZ'
}
}
]
}
]
}
]
}
self.assertFalse(has_diff(expected, builder.build()))
@no_duplicates
def test_sell_trailing_stop_stock(self):
builder = (
OrderBuilder()
.set_complex_order_strategy_type(ComplexOrderStrategyType.NONE)
.set_order_type(OrderType.TRAILING_STOP)
.set_session(Session.NORMAL)
.set_stop_price_link_basis(StopPriceLinkBasis.BID)
.set_stop_price_link_type(StopPriceLinkType.VALUE)
.set_stop_price_offset(10)
.set_duration(Duration.DAY)
.set_order_strategy_type(OrderStrategyType.SINGLE)
.add_equity_leg(EquityInstruction.SELL, 'XYZ', 10))
expected = {
'complexOrderStrategyType': 'NONE',
'orderType': 'TRAILING_STOP',
'session': 'NORMAL',
'stopPriceLinkBasis': 'BID',
'stopPriceLinkType': 'VALUE',
'stopPriceOffset': 10,
'duration': 'DAY',
'orderStrategyType': 'SINGLE',
'orderLegCollection': [
{
'instruction': 'SELL',
'quantity': 10,
'instrument': {
'symbol': 'XYZ',
'assetType': 'EQUITY'
}
}
]
}
self.assertFalse(has_diff(expected, builder.build()))
| 35.523899
| 80
| 0.533004
| 3,330
| 37,904
| 5.722523
| 0.056456
| 0.082179
| 0.146096
| 0.075777
| 0.901606
| 0.856056
| 0.80211
| 0.746956
| 0.680258
| 0.627257
| 0
| 0.017413
| 0.32577
| 37,904
| 1,066
| 81
| 35.557223
| 0.728244
| 0.012848
| 0
| 0.652968
| 0
| 0
| 0.11192
| 0.003348
| 0
| 0
| 0
| 0
| 0.110731
| 1
| 0.090183
| false
| 0
| 0.004566
| 0
| 0.098174
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ca9a2724297f6c73c5dc7499dfbc9717e46774ff
| 28
|
py
|
Python
|
exercises/alphametics/alphametics.py
|
kishankj/python
|
82042de746128127502e109111e6c4e8ab002af6
|
[
"MIT"
] | 1,177
|
2017-06-21T20:24:06.000Z
|
2022-03-29T02:30:55.000Z
|
exercises/alphametics/alphametics.py
|
kishankj/python
|
82042de746128127502e109111e6c4e8ab002af6
|
[
"MIT"
] | 1,890
|
2017-06-18T20:06:10.000Z
|
2022-03-31T18:35:51.000Z
|
exercises/alphametics/alphametics.py
|
kishankj/python
|
82042de746128127502e109111e6c4e8ab002af6
|
[
"MIT"
] | 1,095
|
2017-06-26T23:06:19.000Z
|
2022-03-29T03:25:38.000Z
|
def solve(puzzle):
pass
| 9.333333
| 18
| 0.642857
| 4
| 28
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 28
| 2
| 19
| 14
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
04bfad673378b616fa428027034f26350a5b9fbb
| 43
|
py
|
Python
|
tests/__init__.py
|
paul-armstrong-dev/the_movie_api
|
b225da5103eb721db0dce9b4946f6b8f250f6b78
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
paul-armstrong-dev/the_movie_api
|
b225da5103eb721db0dce9b4946f6b8f250f6b78
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
paul-armstrong-dev/the_movie_api
|
b225da5103eb721db0dce9b4946f6b8f250f6b78
|
[
"MIT"
] | null | null | null |
"""Unit test package for the_movie_api."""
| 21.5
| 42
| 0.72093
| 7
| 43
| 4.142857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116279
| 43
| 1
| 43
| 43
| 0.763158
| 0.837209
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b6d647e6f81637a0580fe5f045b8ff4998c92ccb
| 20
|
py
|
Python
|
__version__.py
|
shutterstock/shutterstock-cli
|
736a6f0ee1c3fd9cf02095820be79b1a8bbc5f86
|
[
"MIT"
] | 3
|
2021-08-12T23:41:33.000Z
|
2022-03-14T18:52:31.000Z
|
__version__.py
|
shutterstock/shutterstock-cli
|
736a6f0ee1c3fd9cf02095820be79b1a8bbc5f86
|
[
"MIT"
] | 2
|
2017-09-05T11:26:55.000Z
|
2021-05-08T17:28:45.000Z
|
__version__.py
|
shutterstock/shutterstock-cli
|
736a6f0ee1c3fd9cf02095820be79b1a8bbc5f86
|
[
"MIT"
] | 2
|
2021-03-25T20:58:52.000Z
|
2022-03-22T08:41:15.000Z
|
__version__ = 1.1.4
| 10
| 19
| 0.7
| 4
| 20
| 2.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 0.15
| 20
| 1
| 20
| 20
| 0.411765
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8e11aa634228f040864d1e959e65188c03164940
| 227
|
py
|
Python
|
python/generated/swaggeraem/apis/__init__.py
|
mbloch1986/swagger-aem
|
599baa705dd4db5ae2b30a637e5bcd7d3f886e85
|
[
"Apache-2.0"
] | null | null | null |
python/generated/swaggeraem/apis/__init__.py
|
mbloch1986/swagger-aem
|
599baa705dd4db5ae2b30a637e5bcd7d3f886e85
|
[
"Apache-2.0"
] | null | null | null |
python/generated/swaggeraem/apis/__init__.py
|
mbloch1986/swagger-aem
|
599baa705dd4db5ae2b30a637e5bcd7d3f886e85
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import
# import apis into api package
from .console_api import ConsoleApi
from .cq_api import CqApi
from .crx_api import CrxApi
from .custom_api import CustomApi
from .sling_api import SlingApi
| 25.222222
| 38
| 0.837004
| 35
| 227
| 5.142857
| 0.514286
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136564
| 227
| 8
| 39
| 28.375
| 0.918367
| 0.123348
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8e19e2bce2d80dcfc8779e9e108b2c241fe3191b
| 60
|
py
|
Python
|
sales_register/domain/entities/value_objects/__init__.py
|
tamercuba/purchase-system
|
cfd3e4fecbd96c130f620d11491fa14979c0d996
|
[
"MIT"
] | null | null | null |
sales_register/domain/entities/value_objects/__init__.py
|
tamercuba/purchase-system
|
cfd3e4fecbd96c130f620d11491fa14979c0d996
|
[
"MIT"
] | 6
|
2021-05-15T21:44:19.000Z
|
2021-05-23T22:20:13.000Z
|
sales_register/domain/entities/value_objects/__init__.py
|
tamercuba/sales-register
|
cfd3e4fecbd96c130f620d11491fa14979c0d996
|
[
"MIT"
] | null | null | null |
from domain.entities.value_objects.cashback import Cashback
| 30
| 59
| 0.883333
| 8
| 60
| 6.5
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 60
| 1
| 60
| 60
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8e2f8415a5c24b05522ffb9d76cabe80770fcf76
| 1,409
|
py
|
Python
|
nutellaAgent/nutella_hpo/nu_hpo_utils.py
|
Nutella-duck/nutella_agent
|
f9b28dcf4a97ad316732f6ce891037f4391da18d
|
[
"MIT"
] | null | null | null |
nutellaAgent/nutella_hpo/nu_hpo_utils.py
|
Nutella-duck/nutella_agent
|
f9b28dcf4a97ad316732f6ce891037f4391da18d
|
[
"MIT"
] | null | null | null |
nutellaAgent/nutella_hpo/nu_hpo_utils.py
|
Nutella-duck/nutella_agent
|
f9b28dcf4a97ad316732f6ce891037f4391da18d
|
[
"MIT"
] | null | null | null |
from hyperopt import hp, fmin, tpe, space_eval, Trials
def hpchoice(label, p_options):
return hp.pchoice(label, p_options)
def choice(label, options):
return hp.choice(label, options)
def randint(label, *args, **kwargs):
return hp.randint(label, *args, **kwargs)
def uniform(label, *args, **kwargs):
return hp.uniform(label, *args, **kwargs)
def uniformint(label, *args, **kwargs):
return hp.uniformint(label, *args, **kwargs)
def quniform(label, *args, **kwargs):
return hp.quniform(label, *args, **kwargs)
def loguniform(label, *args, **kwargs):
return hp.loguniform(label, *args, **kwargs)
def qloguniform(label, *args, **kwargs):
return hp.qloguniform(label, *args, **kwargs)
def normal(label, *args, **kwargs):
return hp.normal(label, *args, **kwargs)
def qnormal(label, *args, **kwargs):
return hp.qnormal(label, *args, **kwargs)
def lognormal(label, *args, **kwargs):
return hp.lognormal(label, *args, **kwargs)
def qlognormal(label, *args, **kwargs):
return hp.qlognormal(label, *args, **kwargs)
def hpo(objective, space, algo = tpe.suggest, max_evals = 100):
best = fmin(objective, space, algo, max_evals)
return best
# def hpo(objective, space, algo = tpe.suggest, max_evals = 100, trials = Trials()):
# best = fmin(objective, space, algo = tpe.suggest, max_evals = 100, trials = Trials())
# return best
| 23.881356
| 91
| 0.669269
| 184
| 1,409
| 5.086957
| 0.201087
| 0.192308
| 0.320513
| 0.224359
| 0.445513
| 0.163462
| 0.163462
| 0.163462
| 0.163462
| 0.163462
| 0
| 0.007712
| 0.171753
| 1,409
| 58
| 92
| 24.293103
| 0.794344
| 0.133428
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.464286
| false
| 0
| 0.035714
| 0.428571
| 0.964286
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
f3d3654ae9b0776bb0130ec15acc9cc5db8e97aa
| 162
|
py
|
Python
|
moonleap/resource/prop.py
|
mnieber/gen
|
65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9
|
[
"MIT"
] | null | null | null |
moonleap/resource/prop.py
|
mnieber/gen
|
65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9
|
[
"MIT"
] | null | null | null |
moonleap/resource/prop.py
|
mnieber/gen
|
65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9
|
[
"MIT"
] | null | null | null |
import typing as T
from dataclasses import dataclass
@dataclass(frozen=True)
class Prop:
get_value: T.Callable
set_value: T.Optional[T.Callable] = None
| 18
| 44
| 0.753086
| 24
| 162
| 5
| 0.708333
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 162
| 8
| 45
| 20.25
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f3ec486dfcc86f0333d9a97bd67e5efad8ef5724
| 148
|
py
|
Python
|
spotify_stats/__init__.py
|
smwa/playlist_data
|
01cd656eecc891dc8dc43dd1b8cc3f67a14bb9de
|
[
"MIT"
] | null | null | null |
spotify_stats/__init__.py
|
smwa/playlist_data
|
01cd656eecc891dc8dc43dd1b8cc3f67a14bb9de
|
[
"MIT"
] | null | null | null |
spotify_stats/__init__.py
|
smwa/playlist_data
|
01cd656eecc891dc8dc43dd1b8cc3f67a14bb9de
|
[
"MIT"
] | null | null | null |
"""
libraries
"""
from .track_details import TrackDetails
from .library import playlist_url_to_id, playlist_id_to_track_list, track_list_to_details
| 24.666667
| 89
| 0.844595
| 22
| 148
| 5.181818
| 0.545455
| 0.157895
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.087838
| 148
| 5
| 90
| 29.6
| 0.844444
| 0.060811
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f3f8d55be4f89432e2fd1209d6be8fe234c820da
| 145
|
py
|
Python
|
workon/views/__init__.py
|
dalou/django-workon
|
ef63c0a81c00ef560ed693e435cf3825f5170126
|
[
"BSD-3-Clause"
] | null | null | null |
workon/views/__init__.py
|
dalou/django-workon
|
ef63c0a81c00ef560ed693e435cf3825f5170126
|
[
"BSD-3-Clause"
] | null | null | null |
workon/views/__init__.py
|
dalou/django-workon
|
ef63c0a81c00ef560ed693e435cf3825f5170126
|
[
"BSD-3-Clause"
] | null | null | null |
from .update import FlexibleUpdate, Save
from .delete import MultipleDelete
from .textimage import TextImage
from ..contrib.auth.views import *
| 24.166667
| 40
| 0.813793
| 18
| 145
| 6.555556
| 0.611111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.124138
| 145
| 6
| 41
| 24.166667
| 0.929134
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
6d246d2bd9b2a78905065915f026b12403e072c0
| 36
|
py
|
Python
|
Settings.py
|
NCBI-Hackathons/Complex_Phenogeno
|
bb3e8f095c5c5a768355fe2ebdf456f4d89e16c3
|
[
"MIT"
] | 6
|
2017-10-25T10:17:24.000Z
|
2022-02-01T21:06:41.000Z
|
Settings.py
|
NCBI-Hackathons/Complex_Phenogeno
|
bb3e8f095c5c5a768355fe2ebdf456f4d89e16c3
|
[
"MIT"
] | 2
|
2017-10-31T15:08:09.000Z
|
2017-11-02T15:54:41.000Z
|
Settings.py
|
NCBI-Hackathons/Complex_Phenogeno
|
bb3e8f095c5c5a768355fe2ebdf456f4d89e16c3
|
[
"MIT"
] | null | null | null |
EMAIL = 'niki.athanasiadou@ncbi.gov'
| 36
| 36
| 0.777778
| 5
| 36
| 5.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 36
| 1
| 36
| 36
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0.702703
| 0.702703
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
6d54252785bb76975363e6954710f6770b56d78d
| 70
|
py
|
Python
|
src/aijack/collaborative/secureboost/__init__.py
|
Koukyosyumei/AIJack
|
9545d3828907b54965ede85e0e12cb32eef54294
|
[
"MIT"
] | 24
|
2021-11-17T02:16:47.000Z
|
2022-03-27T01:04:08.000Z
|
src/aijack/collaborative/secureboost/__init__.py
|
Koukyosyumei/AIJack
|
9545d3828907b54965ede85e0e12cb32eef54294
|
[
"MIT"
] | 9
|
2021-12-03T06:09:27.000Z
|
2022-03-29T06:33:53.000Z
|
src/aijack/collaborative/secureboost/__init__.py
|
Koukyosyumei/AIJack
|
9545d3828907b54965ede85e0e12cb32eef54294
|
[
"MIT"
] | 5
|
2022-01-12T09:58:04.000Z
|
2022-03-17T09:29:04.000Z
|
from .wrapper import Node, Party, SecureBoostClassifier # noqa :F401
| 35
| 69
| 0.785714
| 8
| 70
| 6.875
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.05
| 0.142857
| 70
| 1
| 70
| 70
| 0.866667
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
6d571df02df4e9d312369b04001444c620298d1f
| 75
|
py
|
Python
|
pyscrabble/utils.py
|
agedroics/pyscrabble
|
953d8d0021b7a7b73858c175d47e6b7634fdc2af
|
[
"MIT"
] | 2
|
2020-04-08T20:23:20.000Z
|
2022-01-02T05:01:43.000Z
|
pyscrabble/utils.py
|
armands3312/pyscrabble
|
953d8d0021b7a7b73858c175d47e6b7634fdc2af
|
[
"MIT"
] | null | null | null |
pyscrabble/utils.py
|
armands3312/pyscrabble
|
953d8d0021b7a7b73858c175d47e6b7634fdc2af
|
[
"MIT"
] | 1
|
2019-09-27T11:26:07.000Z
|
2019-09-27T11:26:07.000Z
|
def int_to_byte(n: int) -> bytes:
return n.to_bytes(1, byteorder='big')
| 37.5
| 41
| 0.68
| 14
| 75
| 3.428571
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015625
| 0.146667
| 75
| 2
| 41
| 37.5
| 0.734375
| 0
| 0
| 0
| 0
| 0
| 0.039474
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
edc736d20e86473b78731040eccff72f266b67fe
| 692
|
py
|
Python
|
baseParser.py
|
shamrickus/D2Parser
|
1bb249ffbb813c6bea029625e9269e0ddfdec178
|
[
"Apache-2.0"
] | null | null | null |
baseParser.py
|
shamrickus/D2Parser
|
1bb249ffbb813c6bea029625e9269e0ddfdec178
|
[
"Apache-2.0"
] | null | null | null |
baseParser.py
|
shamrickus/D2Parser
|
1bb249ffbb813c6bea029625e9269e0ddfdec178
|
[
"Apache-2.0"
] | null | null | null |
from utils import headerParse
class BaseParser:
def __init__(self, line):
self.raw = {}
for prop in line:
self.raw[headerParse(prop)] = line[prop]
def setMod(self, modName: str, version: str):
self.modName = modName
self.version = version
@staticmethod
def getName():
raise NotImplementedError()
def verify(self):
raise NotImplementedError()
def getOutputName(self):
raise NotImplementedError()
def json(self):
raise NotImplementedError()
def parse(self, parser):
raise NotImplementedError()
def format(self, list):
return "[\"" + "\",\"".join(x for x in list) + "\"]"
def formatObj(self, listObj):
return "[" + ', '.join(x for x in listObj) + "]"
| 20.352941
| 54
| 0.676301
| 83
| 692
| 5.590361
| 0.409639
| 0.258621
| 0.290948
| 0.200431
| 0.073276
| 0.073276
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179191
| 692
| 33
| 55
| 20.969697
| 0.816901
| 0
| 0
| 0.208333
| 0
| 0
| 0.053468
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0.041667
| 0.083333
| 0.541667
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
6109fe27ee1ad6aaff067000c9498b8ab5c43a00
| 234
|
py
|
Python
|
spinta/backends/fs/commands/bootstrap.py
|
atviriduomenys/spinta
|
77a10e201f8cdc63143fce7996fd0898acb1ff58
|
[
"MIT"
] | 2
|
2019-03-14T06:41:14.000Z
|
2019-03-26T11:48:14.000Z
|
spinta/backends/fs/commands/bootstrap.py
|
sirex/spinta
|
77a10e201f8cdc63143fce7996fd0898acb1ff58
|
[
"MIT"
] | 44
|
2019-04-05T15:52:45.000Z
|
2022-03-30T07:41:33.000Z
|
spinta/backends/fs/commands/bootstrap.py
|
sirex/spinta
|
77a10e201f8cdc63143fce7996fd0898acb1ff58
|
[
"MIT"
] | 1
|
2019-04-01T09:54:27.000Z
|
2019-04-01T09:54:27.000Z
|
from spinta import commands
from spinta.components import Context
from spinta.backends.fs.components import FileSystem
@commands.bootstrap.register(Context, FileSystem)
def bootstrap(context: Context, backend: FileSystem):
pass
| 26
| 53
| 0.820513
| 28
| 234
| 6.857143
| 0.5
| 0.15625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 234
| 8
| 54
| 29.25
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0.166667
| 0.5
| 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
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
611c921da3ac3ca2dbc223f9244808e2874c5fa5
| 79
|
py
|
Python
|
abc/abc078/abc078c.py
|
c-yan/atcoder
|
940e49d576e6a2d734288fadaf368e486480a948
|
[
"MIT"
] | 1
|
2019-08-21T00:49:34.000Z
|
2019-08-21T00:49:34.000Z
|
abc/abc078/abc078c.py
|
c-yan/atcoder
|
940e49d576e6a2d734288fadaf368e486480a948
|
[
"MIT"
] | null | null | null |
abc/abc078/abc078c.py
|
c-yan/atcoder
|
940e49d576e6a2d734288fadaf368e486480a948
|
[
"MIT"
] | null | null | null |
N, M = map(int, input().split())
print((1900 * M + 100 * (N - M)) * (2 ** M))
| 19.75
| 44
| 0.443038
| 14
| 79
| 2.5
| 0.714286
| 0.114286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 0.240506
| 79
| 3
| 45
| 26.333333
| 0.45
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 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
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
b69353bb346e8a72204c72ac7aab2cc3a9552432
| 30
|
py
|
Python
|
find lenth.py
|
svpaah/siva
|
ce04e7d012d1c604b8234281b29206698133c989
|
[
"bzip2-1.0.6",
"Unlicense"
] | null | null | null |
find lenth.py
|
svpaah/siva
|
ce04e7d012d1c604b8234281b29206698133c989
|
[
"bzip2-1.0.6",
"Unlicense"
] | null | null | null |
find lenth.py
|
svpaah/siva
|
ce04e7d012d1c604b8234281b29206698133c989
|
[
"bzip2-1.0.6",
"Unlicense"
] | null | null | null |
n='programmer'
print len(n)
| 10
| 15
| 0.666667
| 5
| 30
| 4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 30
| 2
| 16
| 15
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.357143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
fcaba11da60884a67909ae16ad381fb35667c644
| 92
|
py
|
Python
|
footle/game/__init__.py
|
SupImDos/footle
|
ff9178e52d1577c96a8b6ec00883ead9317f8b46
|
[
"MIT"
] | 1
|
2022-03-25T15:28:57.000Z
|
2022-03-25T15:28:57.000Z
|
footle/game/__init__.py
|
SupImDos/footle
|
ff9178e52d1577c96a8b6ec00883ead9317f8b46
|
[
"MIT"
] | null | null | null |
footle/game/__init__.py
|
SupImDos/footle
|
ff9178e52d1577c96a8b6ec00883ead9317f8b46
|
[
"MIT"
] | null | null | null |
"""Exports Package Interface"""
# Local
from .logic import Game
from .server import Server
| 15.333333
| 31
| 0.75
| 12
| 92
| 5.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152174
| 92
| 5
| 32
| 18.4
| 0.884615
| 0.347826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
fcd8b5cde9ff8987e66dbec11d40f0b0f6a78f22
| 240
|
py
|
Python
|
tests/conftest.py
|
girish946/supertokens-python
|
ce0e7f6035941b3a8d3d1f7ae867224fd9c41c3c
|
[
"Apache-2.0"
] | 36
|
2021-10-05T17:06:07.000Z
|
2022-03-29T14:11:39.000Z
|
tests/conftest.py
|
girish946/supertokens-python
|
ce0e7f6035941b3a8d3d1f7ae867224fd9c41c3c
|
[
"Apache-2.0"
] | 56
|
2021-09-02T08:24:29.000Z
|
2022-03-30T07:29:07.000Z
|
tests/conftest.py
|
SKOOTUK/supertokens-python
|
c0751dd5af911835199223efbe5a91e7c1f1f954
|
[
"Apache-2.0"
] | 8
|
2022-01-28T14:49:55.000Z
|
2022-03-26T01:28:38.000Z
|
def pytest_configure():
import os
os.environ.setdefault('SUPERTOKENS_ENV', 'testing')
os.environ.setdefault('SUPERTOKENS_PATH', '../supertokens-root')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.Django.settings')
| 40
| 76
| 0.741667
| 27
| 240
| 6.407407
| 0.592593
| 0.156069
| 0.32948
| 0.346821
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108333
| 240
| 5
| 77
| 48
| 0.808411
| 0
| 0
| 0
| 0
| 0
| 0.416667
| 0.179167
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.2
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
fcec04e9e8126ef36024b1b371d05352627ae301
| 125
|
py
|
Python
|
apps/home/admin.py
|
ricardomvp/motoclassifier
|
1a4941da80fb5c89d161f3e7e902930207a3bf96
|
[
"MIT"
] | 6
|
2020-11-05T22:54:56.000Z
|
2021-10-04T16:56:44.000Z
|
apps/home/admin.py
|
ricardomvp/motoclassifier
|
1a4941da80fb5c89d161f3e7e902930207a3bf96
|
[
"MIT"
] | null | null | null |
apps/home/admin.py
|
ricardomvp/motoclassifier
|
1a4941da80fb5c89d161f3e7e902930207a3bf96
|
[
"MIT"
] | 3
|
2021-01-02T04:27:08.000Z
|
2021-10-04T21:01:23.000Z
|
from django.contrib import admin
from apps.home.models import Image
# Register your models here.
admin.site.register(Image)
| 20.833333
| 34
| 0.808
| 19
| 125
| 5.315789
| 0.684211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 125
| 5
| 35
| 25
| 0.918182
| 0.208
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
fcf383eddce8312a395a8087484fa7eb1cb064ba
| 200
|
py
|
Python
|
output/models/ms_data/datatypes/facets/unsigned_long/unsigned_long_min_exclusive005_xsd/__init__.py
|
tefra/xsdata-w3c-tests
|
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
|
[
"MIT"
] | 1
|
2021-08-14T17:59:21.000Z
|
2021-08-14T17:59:21.000Z
|
output/models/ms_data/datatypes/facets/unsigned_long/unsigned_long_min_exclusive005_xsd/__init__.py
|
tefra/xsdata-w3c-tests
|
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
|
[
"MIT"
] | 4
|
2020-02-12T21:30:44.000Z
|
2020-04-15T20:06:46.000Z
|
output/models/ms_data/datatypes/facets/unsigned_long/unsigned_long_min_exclusive005_xsd/__init__.py
|
tefra/xsdata-w3c-tests
|
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
|
[
"MIT"
] | null | null | null |
from output.models.ms_data.datatypes.facets.unsigned_long.unsigned_long_min_exclusive005_xsd.unsigned_long_min_exclusive005 import (
FooType,
Test,
)
__all__ = [
"FooType",
"Test",
]
| 20
| 132
| 0.75
| 24
| 200
| 5.708333
| 0.666667
| 0.262774
| 0.218978
| 0.394161
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035294
| 0.15
| 200
| 9
| 133
| 22.222222
| 0.770588
| 0
| 0
| 0
| 0
| 0
| 0.055
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.125
| 0
| 0.125
| 0
| 1
| 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
| 5
|
1e050fda1266dcb503cce49f1810bca30ebe7388
| 200
|
py
|
Python
|
user_profile/admin.py
|
takuyakubo/skill_profiler
|
78cbf27a91c6fcd2b1118830b10bc5c42f70452d
|
[
"MIT"
] | null | null | null |
user_profile/admin.py
|
takuyakubo/skill_profiler
|
78cbf27a91c6fcd2b1118830b10bc5c42f70452d
|
[
"MIT"
] | null | null | null |
user_profile/admin.py
|
takuyakubo/skill_profiler
|
78cbf27a91c6fcd2b1118830b10bc5c42f70452d
|
[
"MIT"
] | 1
|
2022-01-05T07:28:09.000Z
|
2022-01-05T07:28:09.000Z
|
from django.contrib import admin
from user_profile.models import UProfile
# Register your models here.
class UProfileAdmin(admin.ModelAdmin):
pass
admin.site.register(UProfile, UProfileAdmin)
| 18.181818
| 44
| 0.805
| 25
| 200
| 6.4
| 0.68
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13
| 200
| 10
| 45
| 20
| 0.91954
| 0.13
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.2
| 0.4
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
1e5d362158e1f28ad958007132f7706d00b1bdf1
| 232
|
py
|
Python
|
pylint_absolute_imports/__init__.py
|
QuentinN42/pylint-relative-imports
|
42440ad2eba79890fb0e42d7aa1b1a4daf44a7fd
|
[
"MIT"
] | null | null | null |
pylint_absolute_imports/__init__.py
|
QuentinN42/pylint-relative-imports
|
42440ad2eba79890fb0e42d7aa1b1a4daf44a7fd
|
[
"MIT"
] | null | null | null |
pylint_absolute_imports/__init__.py
|
QuentinN42/pylint-relative-imports
|
42440ad2eba79890fb0e42d7aa1b1a4daf44a7fd
|
[
"MIT"
] | null | null | null |
"""Pylint import checking module."""
from pylint_absolute_imports.checker import AbsoluteImportChecker
def register(linter):
"""Add the current checker to pylint."""
linter.register_checker(AbsoluteImportChecker(linter))
| 25.777778
| 65
| 0.780172
| 25
| 232
| 7.12
| 0.64
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12069
| 232
| 8
| 66
| 29
| 0.872549
| 0.280172
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.666667
| 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
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1e623d7d6b93be981821cbf0d49a6349691382a7
| 158
|
py
|
Python
|
pydantic/__init__.py
|
graingert/pydantic
|
12820bad158c4529597b66e16bf2f797f27a29c1
|
[
"MIT"
] | null | null | null |
pydantic/__init__.py
|
graingert/pydantic
|
12820bad158c4529597b66e16bf2f797f27a29c1
|
[
"MIT"
] | null | null | null |
pydantic/__init__.py
|
graingert/pydantic
|
12820bad158c4529597b66e16bf2f797f27a29c1
|
[
"MIT"
] | null | null | null |
# flake8: noqa
from .env_settings import BaseSettings
from .exceptions import *
from .main import BaseModel
from .types import *
from .version import VERSION
| 22.571429
| 38
| 0.797468
| 21
| 158
| 5.952381
| 0.571429
| 0.16
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007407
| 0.14557
| 158
| 6
| 39
| 26.333333
| 0.918519
| 0.075949
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.