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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11464aa8829710e66cf406fd30113f9437b45a7e
| 56
|
py
|
Python
|
canvasdataathenaloader/services/__init__.py
|
aaronlangford31/canvas-data-athena-loader
|
1867fce26f0a51145d14cfba1c34fb87851133e2
|
[
"MIT"
] | null | null | null |
canvasdataathenaloader/services/__init__.py
|
aaronlangford31/canvas-data-athena-loader
|
1867fce26f0a51145d14cfba1c34fb87851133e2
|
[
"MIT"
] | null | null | null |
canvasdataathenaloader/services/__init__.py
|
aaronlangford31/canvas-data-athena-loader
|
1867fce26f0a51145d14cfba1c34fb87851133e2
|
[
"MIT"
] | 1
|
2018-12-16T01:01:59.000Z
|
2018-12-16T01:01:59.000Z
|
from .canvasdata import CanvasData
from .files import *
| 18.666667
| 34
| 0.803571
| 7
| 56
| 6.428571
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 56
| 2
| 35
| 28
| 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
| 0
| 0
|
0
| 4
|
116791c84d5db949e20f7e6ddd698a5910ed7b35
| 3,689
|
py
|
Python
|
tests/testlibraries/parametrizer/file_path_state_handlers.py
|
yukihiko-shinoda/fixture-file-handler
|
f0b4ae1920922af107a8aaff317e5949b296d375
|
[
"MIT"
] | null | null | null |
tests/testlibraries/parametrizer/file_path_state_handlers.py
|
yukihiko-shinoda/fixture-file-handler
|
f0b4ae1920922af107a8aaff317e5949b296d375
|
[
"MIT"
] | 4
|
2020-03-24T17:35:37.000Z
|
2020-08-11T18:49:40.000Z
|
tests/testlibraries/parametrizer/file_path_state_handlers.py
|
yukihiko-shinoda/fixture-file-handler
|
f0b4ae1920922af107a8aaff317e5949b296d375
|
[
"MIT"
] | null | null | null |
"""This module implements file state dependencies."""
from abc import abstractmethod
from pathlib import Path
from fixturefilehandler.file_paths import RelativeDeployFilePath
from tests.testlibraries.parametrizer.checkers import ContentChecker, NotExistChecker
class FilePathStateHandler:
"""This class implements abstract file state dependency."""
FILE_NAME_IN_DIRECTORY: Path = Path("file.txt")
@classmethod
@abstractmethod
def create_checker(cls, path: Path):
"""This method returns checker."""
@classmethod
@abstractmethod
def create_file(cls, file_path: RelativeDeployFilePath):
"""This method returns checker."""
@classmethod
@abstractmethod
def create_directory(cls, file_path: RelativeDeployFilePath):
"""This method returns checker."""
@classmethod
def assert_file_state(cls, path: Path):
"""This method checks file state."""
checker = cls.create_checker(path)
checker.do_assertion()
@classmethod
def assert_directory_state(cls, path: Path):
"""This method checks file state."""
checker = cls.create_checker(path / cls.FILE_NAME_IN_DIRECTORY)
checker.do_assertion()
class NoExistHandler(FilePathStateHandler):
"""This class implements abstract file state dependency on case when not exist."""
@classmethod
def create_checker(cls, path: Path):
return NotExistChecker(path)
@classmethod
def create_file(cls, file_path: RelativeDeployFilePath):
pass
@classmethod
def create_directory(cls, file_path: RelativeDeployFilePath):
pass
@classmethod
def assert_directory_state(cls, path: Path):
"""This method checks file state."""
checker = cls.create_checker(path)
checker.do_assertion()
class ContentExistingHandler(FilePathStateHandler):
"""This class implements abstract file state dependency on case when existing content."""
CONTENT = "Content in existing file"
@classmethod
def create_checker(cls, path: Path):
return ContentChecker(path, cls.CONTENT)
@classmethod
def create_file(cls, file_path: RelativeDeployFilePath):
file_path.target.write_text(cls.CONTENT)
@classmethod
def create_directory(cls, file_path: RelativeDeployFilePath):
file_path.target.mkdir()
(file_path.target / cls.FILE_NAME_IN_DIRECTORY).write_text(cls.CONTENT)
class ContentBackupHandler(FilePathStateHandler):
"""This class implements abstract file state dependency on case when backup content."""
CONTENT = "Content in backup file"
@classmethod
def create_checker(cls, path: Path):
return ContentChecker(path, cls.CONTENT)
@classmethod
def create_file(cls, file_path: RelativeDeployFilePath):
file_path.backup.write_text(cls.CONTENT)
@classmethod
def create_directory(cls, file_path: RelativeDeployFilePath):
file_path.backup.mkdir()
(file_path.backup / cls.FILE_NAME_IN_DIRECTORY).write_text(cls.CONTENT)
class ContentResourceHandler(FilePathStateHandler):
"""This class implements abstract file state dependency on case when resource content."""
CONTENT = "Content in resource file"
@classmethod
def create_checker(cls, path: Path):
return ContentChecker(path, cls.CONTENT)
@classmethod
def create_file(cls, file_path: RelativeDeployFilePath):
file_path.resource.write_text(cls.CONTENT)
@classmethod
def create_directory(cls, file_path: RelativeDeployFilePath):
file_path.resource.mkdir()
(file_path.resource / cls.FILE_NAME_IN_DIRECTORY).write_text(cls.CONTENT)
| 31
| 93
| 0.719978
| 407
| 3,689
| 6.358722
| 0.144963
| 0.058733
| 0.092736
| 0.127512
| 0.765456
| 0.756955
| 0.746522
| 0.722952
| 0.603168
| 0.534776
| 0
| 0
| 0.193277
| 3,689
| 118
| 94
| 31.262712
| 0.869624
| 0.164814
| 0
| 0.657534
| 0
| 0
| 0.025828
| 0
| 0
| 0
| 0
| 0
| 0.082192
| 1
| 0.246575
| false
| 0.027397
| 0.054795
| 0.054795
| 0.479452
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fecac54369cc29882248e4681721410e875639a0
| 252
|
py
|
Python
|
spikey/games/__init__.py
|
SpikeyCNS/spikey
|
03a49073491974eff01bc017fd8eadb822e13f0d
|
[
"MIT"
] | 4
|
2021-02-25T20:53:41.000Z
|
2022-01-18T15:27:07.000Z
|
spikey/games/__init__.py
|
SpikeyCNS/spikey
|
03a49073491974eff01bc017fd8eadb822e13f0d
|
[
"MIT"
] | 5
|
2021-03-06T05:35:10.000Z
|
2021-03-31T09:27:57.000Z
|
spikey/games/__init__.py
|
SpikeyCNS/spikey
|
03a49073491974eff01bc017fd8eadb822e13f0d
|
[
"MIT"
] | null | null | null |
"""
Games __init__.
"""
try:
from spikey.games.gym_wrapper import gym_wrapper
from spikey.games.CartPole import CartPole
from spikey.games.Logic import Logic
except ImportError as e:
raise ImportError(f"games/__init__.py failed: {e}")
| 22.909091
| 55
| 0.738095
| 35
| 252
| 5.028571
| 0.514286
| 0.170455
| 0.255682
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 252
| 10
| 56
| 25.2
| 0.838095
| 0.059524
| 0
| 0
| 0
| 0
| 0.126638
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.833333
| 0
| 0.833333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
fef97f0092f942ddbb0d42e44c034a174b2f8c6b
| 267
|
py
|
Python
|
python/1.2.py
|
01remi/network_programs
|
90591cd309e48f9a56cb6e6052bd32bcd17ee775
|
[
"Apache-2.0"
] | null | null | null |
python/1.2.py
|
01remi/network_programs
|
90591cd309e48f9a56cb6e6052bd32bcd17ee775
|
[
"Apache-2.0"
] | null | null | null |
python/1.2.py
|
01remi/network_programs
|
90591cd309e48f9a56cb6e6052bd32bcd17ee775
|
[
"Apache-2.0"
] | null | null | null |
import socket
def get_remote_machine_ip():
remote_host= "www.facebook.com"
try:
print "remote_host_id: %s" %socket.gethostbyname(remote_host)
except socket.error, err_msg:
print "%s: %s" %(remote_host,err_msg)
if __name__=='__main__':
get_remote_machine_ip()
| 29.666667
| 63
| 0.756554
| 41
| 267
| 4.414634
| 0.560976
| 0.220994
| 0.176796
| 0.198895
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108614
| 267
| 9
| 64
| 29.666667
| 0.760504
| 0
| 0
| 0
| 0
| 0
| 0.179104
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.111111
| null | null | 0.222222
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3a022afde99af47bec6034d4657fb31da4d00a1c
| 76
|
py
|
Python
|
CodeForces/208A Dubstep/Dubstep.py
|
tameemalaa/Solved-Problems
|
9e8bc96eb60f200787f2682e974ec6509a7c1734
|
[
"MIT"
] | null | null | null |
CodeForces/208A Dubstep/Dubstep.py
|
tameemalaa/Solved-Problems
|
9e8bc96eb60f200787f2682e974ec6509a7c1734
|
[
"MIT"
] | null | null | null |
CodeForces/208A Dubstep/Dubstep.py
|
tameemalaa/Solved-Problems
|
9e8bc96eb60f200787f2682e974ec6509a7c1734
|
[
"MIT"
] | null | null | null |
# Solution by: Abdelrahman Nawar
print(input().replace("WUB", " ").strip())
| 25.333333
| 42
| 0.671053
| 9
| 76
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 76
| 2
| 43
| 38
| 0.75
| 0.394737
| 0
| 0
| 0
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
3a11b11bc6810c71922d18682e34f7e14cb0b9c1
| 396
|
py
|
Python
|
tests/basic/class2.py
|
MoonStarCZW/py2rb
|
89b247717d33d780fbf143e1583bfe9252984da4
|
[
"MIT"
] | 124
|
2017-08-19T05:37:16.000Z
|
2022-03-08T18:24:18.000Z
|
tests/basic/class2.py
|
MoonStarCZW/py2rb
|
89b247717d33d780fbf143e1583bfe9252984da4
|
[
"MIT"
] | 15
|
2017-12-16T05:59:31.000Z
|
2022-02-08T02:51:17.000Z
|
tests/basic/class2.py
|
MoonStarCZW/py2rb
|
89b247717d33d780fbf143e1583bfe9252984da4
|
[
"MIT"
] | 18
|
2017-09-25T11:57:04.000Z
|
2022-02-19T17:33:48.000Z
|
class Class1(object):
def __init__(self):
pass
def test1(self):
return 5
class Class2(object):
def test1(self):
return 6
class Class3(object):
def test1(self, x):
return self.test2(x)-1
def test2(self, x):
return 2*x
a = Class1()
print(a.test1())
a = Class2()
print(a.test1())
a = Class3()
print(a.test1(3))
print(a.test2(3))
| 12.774194
| 30
| 0.570707
| 59
| 396
| 3.762712
| 0.338983
| 0.108108
| 0.162162
| 0.162162
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073427
| 0.277778
| 396
| 30
| 31
| 13.2
| 0.702797
| 0
| 0
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.05
| 0
| 0.2
| 0.6
| 0.2
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
3a33a99c78567c6522cecaf609496af391f34b95
| 239
|
py
|
Python
|
sphinxpapyrus/__init__.py
|
amarin/sphinxpapyrus-docxbuilder
|
0fd00a0c5467554d0a2b5ad9cd93ab780511f1a3
|
[
"MIT"
] | null | null | null |
sphinxpapyrus/__init__.py
|
amarin/sphinxpapyrus-docxbuilder
|
0fd00a0c5467554d0a2b5ad9cd93ab780511f1a3
|
[
"MIT"
] | null | null | null |
sphinxpapyrus/__init__.py
|
amarin/sphinxpapyrus-docxbuilder
|
0fd00a0c5467554d0a2b5ad9cd93ab780511f1a3
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
sphinxpapyrus
~~~~~~~~~~~~~
Sphinx extensions.
:copyright: Copyright 2018 by nakandev.
:license: MIT, see LICENSE for details.
"""
__import__('pkg_resources').declare_namespace(__name__)
| 17.071429
| 55
| 0.623431
| 23
| 239
| 6.043478
| 0.913043
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.026042
| 0.196653
| 239
| 13
| 56
| 18.384615
| 0.697917
| 0.631799
| 0
| 0
| 0
| 0
| 0.220339
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3a43bdd052fdaa23010443a40e8c921fab4ee13f
| 57
|
py
|
Python
|
logic/main_data.py
|
Mr-JZ/AktivityTracker
|
a27105f0fe7e1e53d3de2154f73e9a360326ce4c
|
[
"MIT"
] | null | null | null |
logic/main_data.py
|
Mr-JZ/AktivityTracker
|
a27105f0fe7e1e53d3de2154f73e9a360326ce4c
|
[
"MIT"
] | null | null | null |
logic/main_data.py
|
Mr-JZ/AktivityTracker
|
a27105f0fe7e1e53d3de2154f73e9a360326ce4c
|
[
"MIT"
] | null | null | null |
'''
This is all the calculation for the main window
'''
| 11.4
| 47
| 0.684211
| 9
| 57
| 4.333333
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.210526
| 57
| 4
| 48
| 14.25
| 0.866667
| 0.824561
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
28d7d7b583b38212e8406b65ad0f244d6764c877
| 51
|
py
|
Python
|
__init__.py
|
kesmarag/single-planar-fault
|
7584e9bcd50b771402c17969c4af13908780bb80
|
[
"MIT"
] | null | null | null |
__init__.py
|
kesmarag/single-planar-fault
|
7584e9bcd50b771402c17969c4af13908780bb80
|
[
"MIT"
] | null | null | null |
__init__.py
|
kesmarag/single-planar-fault
|
7584e9bcd50b771402c17969c4af13908780bb80
|
[
"MIT"
] | null | null | null |
from .single_planar_fault import SinglePlanarFault
| 25.5
| 50
| 0.901961
| 6
| 51
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078431
| 51
| 1
| 51
| 51
| 0.93617
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
28ec4525a2987cab01c9e6ea2a1cdd83148a744f
| 119
|
py
|
Python
|
tasks/helloworld.py
|
biandoucheng/bd-py-crontab
|
5c9723b75b715d927665793c957d9e07adba3745
|
[
"MIT"
] | null | null | null |
tasks/helloworld.py
|
biandoucheng/bd-py-crontab
|
5c9723b75b715d927665793c957d9e07adba3745
|
[
"MIT"
] | null | null | null |
tasks/helloworld.py
|
biandoucheng/bd-py-crontab
|
5c9723b75b715d927665793c957d9e07adba3745
|
[
"MIT"
] | null | null | null |
class helloworld:
def hello(self):
print("This is my first task !")
def run():
helloworld().hello()
| 13.222222
| 40
| 0.588235
| 15
| 119
| 4.666667
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.268908
| 119
| 8
| 41
| 14.875
| 0.804598
| 0
| 0
| 0
| 0
| 0
| 0.193277
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0
| 0.6
| 0.2
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
28fbe41dd2281013fbc45b2612204ad1143f0c3b
| 91
|
py
|
Python
|
sshock/apps.py
|
eieste/SSHock
|
04bcbb2593e104c0ecb1b5dc9b79b19b4681c96b
|
[
"MIT"
] | null | null | null |
sshock/apps.py
|
eieste/SSHock
|
04bcbb2593e104c0ecb1b5dc9b79b19b4681c96b
|
[
"MIT"
] | 2
|
2019-12-13T08:06:34.000Z
|
2020-06-05T19:46:47.000Z
|
sshock/apps.py
|
eieste/SSHock
|
04bcbb2593e104c0ecb1b5dc9b79b19b4681c96b
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class SSHManagerConfig(AppConfig):
name = 'sshock'
| 15.166667
| 34
| 0.758242
| 10
| 91
| 6.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164835
| 91
| 5
| 35
| 18.2
| 0.907895
| 0
| 0
| 0
| 0
| 0
| 0.065934
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3a6fc066fa2f81989187983911057320c41d8ed5
| 63
|
py
|
Python
|
stackspy/detection/__init__.py
|
akx/stackspy
|
3c8d03901d16c4d026012a82399770651332c2d7
|
[
"MIT"
] | 3
|
2016-10-26T19:21:05.000Z
|
2016-10-27T08:18:55.000Z
|
stackspy/detectors/frameworks/__init__.py
|
akx/stackspy
|
3c8d03901d16c4d026012a82399770651332c2d7
|
[
"MIT"
] | null | null | null |
stackspy/detectors/frameworks/__init__.py
|
akx/stackspy
|
3c8d03901d16c4d026012a82399770651332c2d7
|
[
"MIT"
] | null | null | null |
# -- encoding: utf-8 --
from __future__ import with_statement
| 15.75
| 37
| 0.730159
| 8
| 63
| 5.125
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018868
| 0.15873
| 63
| 3
| 38
| 21
| 0.754717
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
3a82f6a6a36dbdeb4d3ab500bc85b52db2afa866
| 19
|
py
|
Python
|
tests/pyboard.py
|
learnforpractice/micropython-cpp
|
004bc8382f74899e7b876cc29bfa6a9cc976ba10
|
[
"MIT"
] | 692
|
2016-12-19T23:25:35.000Z
|
2022-03-31T14:20:48.000Z
|
tests/pyboard.py
|
learnforpractice/micropython-cpp
|
004bc8382f74899e7b876cc29bfa6a9cc976ba10
|
[
"MIT"
] | 509
|
2017-03-28T19:37:18.000Z
|
2022-03-31T20:31:43.000Z
|
tests/pyboard.py
|
learnforpractice/micropython-cpp
|
004bc8382f74899e7b876cc29bfa6a9cc976ba10
|
[
"MIT"
] | 228
|
2016-12-19T05:03:30.000Z
|
2022-03-22T18:13:00.000Z
|
../tools/pyboard.py
| 19
| 19
| 0.736842
| 3
| 19
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 19
| 1
| 19
| 19
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3ab2d878cc4f46451a0716849c9c716c38b73970
| 845
|
py
|
Python
|
webmux/auth.py
|
ronreiter/webmux
|
0419949a7e574c689694c767504a5baefde88172
|
[
"MIT"
] | 63
|
2015-02-10T06:55:41.000Z
|
2021-11-14T17:42:45.000Z
|
webmux/auth.py
|
ronreiter/webmux
|
0419949a7e574c689694c767504a5baefde88172
|
[
"MIT"
] | 8
|
2015-04-11T06:04:52.000Z
|
2019-05-14T13:49:13.000Z
|
webmux/auth.py
|
ronreiter/webmux
|
0419949a7e574c689694c767504a5baefde88172
|
[
"MIT"
] | 23
|
2015-03-19T07:07:59.000Z
|
2021-08-07T10:09:48.000Z
|
from twisted.conch.ssh import keys, userauth
from twisted.internet import defer
class AuthClient(userauth.SSHUserAuthClient):
def __init__(self, options, *args):
userauth.SSHUserAuthClient.__init__(self, str(options["user"]), *args)
self.options = options
def serviceStarted(self):
userauth.SSHUserAuthClient.serviceStarted(self)
def serviceStopped(self):
pass
def getPassword(self, prompt = None):
return defer.succeed(str(self.options["password"]))
def getPublicKey(self):
return defer.succeed(keys.Key.fromString(self.options["privkey"]))
def signData(self, publicKey, signData):
return userauth.SSHUserAuthClient.signData(self, publicKey, signData)
def getPrivateKey(self):
return defer.succeed(keys.Key.fromString(self.options["privkey"]))
| 31.296296
| 78
| 0.710059
| 91
| 845
| 6.505495
| 0.384615
| 0.092905
| 0.091216
| 0.074324
| 0.192568
| 0.192568
| 0.192568
| 0.192568
| 0.192568
| 0.192568
| 0
| 0
| 0.177515
| 845
| 26
| 79
| 32.5
| 0.851799
| 0
| 0
| 0.111111
| 0
| 0
| 0.030769
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.388889
| false
| 0.166667
| 0.111111
| 0.222222
| 0.777778
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
3ad65e114ae7b4438ce73db78be78276279f3ee2
| 411
|
py
|
Python
|
openpype/tools/settings/settings/images/__init__.py
|
jonclothcat/OpenPype
|
d1208cbebc0a7f378de0062ccd653295c6399195
|
[
"MIT"
] | 87
|
2021-05-07T08:40:46.000Z
|
2022-03-19T00:36:25.000Z
|
openpype/tools/settings/settings/images/__init__.py
|
zafrs/OpenPype
|
4b8e7e1ed002fc55b31307efdea70b0feaed474f
|
[
"MIT"
] | 1,019
|
2021-04-26T06:22:56.000Z
|
2022-03-31T16:30:43.000Z
|
openpype/tools/settings/settings/images/__init__.py
|
zafrs/OpenPype
|
4b8e7e1ed002fc55b31307efdea70b0feaed474f
|
[
"MIT"
] | 33
|
2021-04-29T12:35:54.000Z
|
2022-03-25T14:48:42.000Z
|
import os
from Qt import QtGui
def get_image_path(image_filename):
return os.path.join(
os.path.dirname(os.path.abspath(__file__)),
image_filename
)
def get_image(image_filename):
image_path = get_image_path(image_filename)
return QtGui.QImage(image_path)
def get_pixmap(image_filename):
image_path = get_image_path(image_filename)
return QtGui.QPixmap(image_path)
| 20.55
| 51
| 0.739659
| 59
| 411
| 4.779661
| 0.305085
| 0.223404
| 0.12766
| 0.180851
| 0.521277
| 0.521277
| 0.411348
| 0.411348
| 0.411348
| 0.411348
| 0
| 0
| 0.177616
| 411
| 19
| 52
| 21.631579
| 0.83432
| 0
| 0
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0
| 0.153846
| 0.076923
| 0.615385
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
3ae5fc21afa13b04068dc4581d023ac632af4d82
| 233
|
py
|
Python
|
unet/params.py
|
hunglvfimo/pytorch-unet-segmentation
|
553a5d869f494f088344017442fcd8d87b120b7c
|
[
"MIT"
] | null | null | null |
unet/params.py
|
hunglvfimo/pytorch-unet-segmentation
|
553a5d869f494f088344017442fcd8d87b120b7c
|
[
"MIT"
] | null | null | null |
unet/params.py
|
hunglvfimo/pytorch-unet-segmentation
|
553a5d869f494f088344017442fcd8d87b120b7c
|
[
"MIT"
] | null | null | null |
MEAN = [95.3836, 112.1309, 115.8169, 110.1158, 103.1075, 116.6861, 119.3152, 168.4803, 82.3842, 44.4294, 116.3769]
STD = [64.2249, 67.5880, 69.6713, 67.6941, 64.7541, 70.2139, 72.7345, 87.6724, 66.4714, 44.0236, 83.1800]
| 116.5
| 117
| 0.630901
| 46
| 233
| 3.195652
| 0.913043
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.717949
| 0.16309
| 233
| 2
| 118
| 116.5
| 0.035897
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c94f60c5b3a7f7e6630f7268a9af2b8e9d65b65a
| 6,278
|
gyp
|
Python
|
binding.gyp
|
cdax/node-discount
|
94b30422ac3abf61da00df1718dd19488cf18967
|
[
"MIT"
] | null | null | null |
binding.gyp
|
cdax/node-discount
|
94b30422ac3abf61da00df1718dd19488cf18967
|
[
"MIT"
] | null | null | null |
binding.gyp
|
cdax/node-discount
|
94b30422ac3abf61da00df1718dd19488cf18967
|
[
"MIT"
] | null | null | null |
{
'targets': [
{
'target_name': 'discount',
'dependencies': [ 'libmarkdown' ],
'sources': [
'src/discount.cc'
],
'include_dirs': [
'deps/discount'
],
'libraries': [
'deps/discount/libmarkdown.a'
]
},
{
'target_name': 'libmarkdown',
'type': 'none',
'actions': [
{
'action_name': 'build_libmarkdown',
'inputs': [
'deps/discount/Csio.c',
'deps/discount/Makefile.in',
'deps/discount/Plan9/markdown.1',
'deps/discount/Plan9/markdown.2',
'deps/discount/Plan9/markdown.6',
'deps/discount/Plan9/mkfile',
'deps/discount/amalloc.c',
'deps/discount/amalloc.h',
'deps/discount/basename.c',
'deps/discount/configure.inc',
'deps/discount/configure.sh',
'deps/discount/css.c',
'deps/discount/cstring.h',
'deps/discount/docheader.c',
'deps/discount/dumptree.c',
'deps/discount/emmatch.c',
'deps/discount/flags.c',
'deps/discount/generate.c',
'deps/discount/github_flavoured.c',
'deps/discount/html5.c',
'deps/discount/main.c',
'deps/discount/makepage.1',
'deps/discount/makepage.c',
'deps/discount/markdown.1',
'deps/discount/markdown.3',
'deps/discount/markdown.7',
'deps/discount/markdown.c',
'deps/discount/markdown.h',
'deps/discount/mkd-callbacks.3',
'deps/discount/mkd-extensions.7',
'deps/discount/mkd-functions.3',
'deps/discount/mkd-line.3',
'deps/discount/mkd2html.1',
'deps/discount/mkd2html.c',
'deps/discount/mkdio.c',
'deps/discount/mkdio.h.in',
'deps/discount/mktags.c',
'deps/discount/pgm_options.c',
'deps/discount/pgm_options.h',
'deps/discount/resource.c',
'deps/discount/setup.c',
'deps/discount/tags.c',
'deps/discount/tags.h',
'deps/discount/tests/autolink.t',
'deps/discount/tests/automatic.t',
'deps/discount/tests/backslash.t',
'deps/discount/tests/callbacks.t',
'deps/discount/tests/chrome.text',
'deps/discount/tests/code.t',
'deps/discount/tests/compat.t',
'deps/discount/tests/crash.t',
'deps/discount/tests/defects.t',
'deps/discount/tests/div.t',
'deps/discount/tests/dl.t',
'deps/discount/tests/embedlinks.text',
'deps/discount/tests/emphasis.t',
'deps/discount/tests/extrafootnotes.t',
'deps/discount/tests/flow.t',
'deps/discount/tests/footnotes.t',
'deps/discount/tests/functions.sh',
'deps/discount/tests/githubtags.t',
'deps/discount/tests/header.t',
'deps/discount/tests/html.t',
'deps/discount/tests/html5.t',
'deps/discount/tests/links.text',
'deps/discount/tests/linkylinky.t',
'deps/discount/tests/linkypix.t',
'deps/discount/tests/list.t',
'deps/discount/tests/list3deep.t',
'deps/discount/tests/misc.t',
'deps/discount/tests/pandoc.t',
'deps/discount/tests/para.t',
'deps/discount/tests/paranoia.t',
'deps/discount/tests/peculiarities.t',
'deps/discount/tests/pseudo.t',
'deps/discount/tests/reddit.t',
'deps/discount/tests/reparse.t',
'deps/discount/tests/schiraldi.t',
'deps/discount/tests/smarty.t',
'deps/discount/tests/snakepit.t',
'deps/discount/tests/strikethrough.t',
'deps/discount/tests/style.t',
'deps/discount/tests/superscript.t',
'deps/discount/tests/syntax.text',
'deps/discount/tests/tables.t',
'deps/discount/tests/tabstop.t',
'deps/discount/tests/toc.t',
'deps/discount/tests/xml.t',
'deps/discount/theme.1',
'deps/discount/theme.c',
'deps/discount/toc.c',
'deps/discount/tools/checkbits.sh',
'deps/discount/tools/cols.c',
'deps/discount/tools/echo.c',
'deps/discount/version.c.in',
'deps/discount/xml.c',
'deps/discount/xmlpage.c'
],
'outputs': [
'deps/discount/libmarkdown.a'
],
'action': [
'eval',
'cd deps/discount && ./configure.sh && make libmarkdown'
],
'message': 'Building libmarkdown...'
}
]
}
]
}
| 46.850746
| 80
| 0.40395
| 495
| 6,278
| 5.107071
| 0.244444
| 0.47943
| 0.302611
| 0.27769
| 0.018196
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006671
| 0.474673
| 6,278
| 133
| 81
| 47.203008
| 0.759854
| 0
| 0
| 0.052632
| 0
| 0
| 0.463683
| 0.397738
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c9652d0fdd90a15c68cb2fe3f1436ec8ed5b69c6
| 117
|
py
|
Python
|
01 Fundamental/Session 03/homework/ex2-1.py
|
culee/c4e
|
775c53fa92a31696431760f58a79a52889bfb46f
|
[
"MIT"
] | null | null | null |
01 Fundamental/Session 03/homework/ex2-1.py
|
culee/c4e
|
775c53fa92a31696431760f58a79a52889bfb46f
|
[
"MIT"
] | null | null | null |
01 Fundamental/Session 03/homework/ex2-1.py
|
culee/c4e
|
775c53fa92a31696431760f58a79a52889bfb46f
|
[
"MIT"
] | null | null | null |
sheep_size = [5,7,300,90,24,50,75]
print("Hello, my name is Duy Anh and these are my sheep sizes")
print(sheep_size)
| 29.25
| 63
| 0.726496
| 25
| 117
| 3.32
| 0.8
| 0.216867
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128713
| 0.136752
| 117
| 3
| 64
| 39
| 0.693069
| 0
| 0
| 0
| 0
| 0
| 0.461538
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
c96afbedecc815902a4ae7c3e24be75c907986e4
| 57
|
py
|
Python
|
pywick/models/segmentation/testnets/mixnet/__init__.py
|
achaiah/pywick
|
9d663faf0c1660a9b8359a6472c164f658dfc8cb
|
[
"MIT"
] | 408
|
2019-05-16T16:12:41.000Z
|
2022-03-26T17:27:12.000Z
|
pywick/models/segmentation/testnets/mixnet/__init__.py
|
ashishpatel26/pywick
|
1afffd1c21c2b188836d3599e802146182757bb5
|
[
"MIT"
] | 13
|
2019-05-17T05:47:06.000Z
|
2021-06-21T19:02:30.000Z
|
pywick/models/segmentation/testnets/mixnet/__init__.py
|
ashishpatel26/pywick
|
1afffd1c21c2b188836d3599e802146182757bb5
|
[
"MIT"
] | 42
|
2019-05-16T19:57:12.000Z
|
2022-03-06T15:23:18.000Z
|
"""
Source: https://github.com/zsef123/MixNet-PyTorch
"""
| 19
| 49
| 0.701754
| 7
| 57
| 5.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 0.052632
| 57
| 3
| 50
| 19
| 0.685185
| 0.859649
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c972d2dd77fc198ba2b13d64fdbada44fe14211c
| 164
|
py
|
Python
|
trainingW3C/6_module_use.py
|
jgaffuri/pyEx
|
3e62612f5bba59c6d421e2fa544ab77c7af85658
|
[
"MIT"
] | 1
|
2020-06-11T16:26:59.000Z
|
2020-06-11T16:26:59.000Z
|
trainingW3C/6_module_use.py
|
jgaffuri/pyEx
|
3e62612f5bba59c6d421e2fa544ab77c7af85658
|
[
"MIT"
] | null | null | null |
trainingW3C/6_module_use.py
|
jgaffuri/pyEx
|
3e62612f5bba59c6d421e2fa544ab77c7af85658
|
[
"MIT"
] | null | null | null |
import mymodule as mod
#from mymodule import person1
import platform
mod.greeting("Jonathan")
print(mod.person1)
print(platform.system())
print(dir(platform))
| 12.615385
| 29
| 0.77439
| 22
| 164
| 5.772727
| 0.545455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013793
| 0.115854
| 164
| 12
| 30
| 13.666667
| 0.862069
| 0.170732
| 0
| 0
| 0
| 0
| 0.06015
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 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
| 0
| 1
|
0
| 4
|
c97d80c63b288a83c491118de4a7788e0b182bf5
| 35
|
py
|
Python
|
arxiv/mail/tests/__init__.py
|
ibnesayeed/arxiv-base
|
9f49302370272792a0afc78debd039d249844c6c
|
[
"MIT"
] | 23
|
2019-01-10T22:01:18.000Z
|
2022-02-02T10:28:25.000Z
|
arxiv/mail/tests/__init__.py
|
ibnesayeed/arxiv-base
|
9f49302370272792a0afc78debd039d249844c6c
|
[
"MIT"
] | 57
|
2018-12-17T16:45:38.000Z
|
2021-12-14T14:20:58.000Z
|
arxiv/mail/tests/__init__.py
|
cul-it/arxiv-base-ui
|
a5beadf44c24f72e21313299bfafc1ffb9d28ac7
|
[
"MIT"
] | 5
|
2019-01-10T22:01:28.000Z
|
2021-11-05T12:25:31.000Z
|
"""Tests for :mod:`arxiv.mail`."""
| 17.5
| 34
| 0.571429
| 5
| 35
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085714
| 35
| 1
| 35
| 35
| 0.625
| 0.8
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a321a5a96bc338c077185a0cd228d6c55f076a1c
| 38
|
py
|
Python
|
poe/base.py
|
gotdzellal/poe-paw
|
4708bd9ad36503e0fe2503b1335aff8bb2194ea9
|
[
"MIT"
] | 1
|
2019-09-26T18:15:18.000Z
|
2019-09-26T18:15:18.000Z
|
poe/base.py
|
gotdzellal/poe-paw
|
4708bd9ad36503e0fe2503b1335aff8bb2194ea9
|
[
"MIT"
] | null | null | null |
poe/base.py
|
gotdzellal/poe-paw
|
4708bd9ad36503e0fe2503b1335aff8bb2194ea9
|
[
"MIT"
] | null | null | null |
base = 'http://api.pathofexile.com/'
| 19
| 37
| 0.657895
| 5
| 38
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 38
| 1
| 38
| 38
| 0.735294
| 0
| 0
| 0
| 0
| 0
| 0.72973
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a326483b454bd47615cda736b3127d1e12ae05df
| 1,042
|
py
|
Python
|
py/sudoku/_sudoku.py
|
gtvfx/sudoku_solver
|
942f636318d1f273ed918d346568ca5f7c9ec200
|
[
"MIT"
] | null | null | null |
py/sudoku/_sudoku.py
|
gtvfx/sudoku_solver
|
942f636318d1f273ed918d346568ca5f7c9ec200
|
[
"MIT"
] | null | null | null |
py/sudoku/_sudoku.py
|
gtvfx/sudoku_solver
|
942f636318d1f273ed918d346568ca5f7c9ec200
|
[
"MIT"
] | null | null | null |
def generate_board():
# Generate full, randomized sudoku board
pass
def generate_section():
# generate a randomized, 3x3 seciont of the board
pass
class SudokuBoard(object):
"""
"""
def __init__(self, difficulty):
super().__init__()
self._base_size = 3
self._board_length = self._base_size ** 2
self._difficulty = None
self.difficulty = difficulty
self._max_solves = None
@property
def difficulty(self):
"""(int) Higher levels will provide fewer numbers on the board"""
return self._difficulty
@difficulty.setter
def difficulty(self, difficulty):
if difficulty < 0 or difficulty > 10:
raise ValueError("difficulty must be an integer between 0 and 10")
# TODO: This is no good
max_grids = self._board_length ** 2
min_provided = 17 # The theoretical minimum to solve the board
self._max_solves = int((max_grids - min_provided) * .01 * difficulty)
self._difficulty
| 24.809524
| 78
| 0.634357
| 124
| 1,042
| 5.096774
| 0.524194
| 0.132911
| 0.037975
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02008
| 0.283109
| 1,042
| 41
| 79
| 25.414634
| 0.825971
| 0.203455
| 0
| 0.086957
| 1
| 0
| 0.057285
| 0
| 0
| 0
| 0
| 0.02439
| 0
| 1
| 0.217391
| false
| 0.086957
| 0
| 0
| 0.304348
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
a32753dfaff484da62994671fc33b14b4b6857b5
| 21
|
py
|
Python
|
pydisalexi/__init__.py
|
Yun1/projectMAS
|
fb25dc50f2c70a62aa0854aca9c4295d4221b843
|
[
"BSD-3-Clause"
] | 2
|
2021-02-24T19:44:43.000Z
|
2021-03-08T16:10:17.000Z
|
pydisalexi/__init__.py
|
Yun1/projectMAS
|
fb25dc50f2c70a62aa0854aca9c4295d4221b843
|
[
"BSD-3-Clause"
] | null | null | null |
pydisalexi/__init__.py
|
Yun1/projectMAS
|
fb25dc50f2c70a62aa0854aca9c4295d4221b843
|
[
"BSD-3-Clause"
] | 4
|
2018-09-20T12:54:19.000Z
|
2018-11-08T17:47:09.000Z
|
__version__='0.4.1'
| 7
| 19
| 0.666667
| 4
| 21
| 2.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 0.095238
| 21
| 2
| 20
| 10.5
| 0.368421
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a32ed5cc203215a70a441359fb052618e378ddca
| 29
|
py
|
Python
|
lib/python3.4/keyword.py
|
caiocsalvador/whats_the_craic
|
c49ef62f1acd7379f6fd90c2b93aa1fa00c8661d
|
[
"MIT"
] | 7
|
2017-04-26T12:28:22.000Z
|
2021-02-09T18:59:50.000Z
|
django-ng/lib/python3.4/keyword.py
|
Arsalen/BusinessStrategies
|
209e57340359af3ea063c064982198848dc36c5f
|
[
"MIT"
] | 13
|
2015-12-04T03:38:37.000Z
|
2015-12-12T00:15:46.000Z
|
django-ng/lib/python3.4/keyword.py
|
Arsalen/BusinessStrategies
|
209e57340359af3ea063c064982198848dc36c5f
|
[
"MIT"
] | 8
|
2017-06-01T08:42:16.000Z
|
2020-07-23T12:30:19.000Z
|
/usr/lib/python3.4/keyword.py
| 29
| 29
| 0.793103
| 6
| 29
| 3.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 0
| 29
| 1
| 29
| 29
| 0.724138
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a335afd4f70030f79fc1cecff685454e628d7164
| 83
|
py
|
Python
|
regressor.py
|
omkarpbankar/ML_Live_Class_01
|
09e01c0d909814be327ff916829c926254c255c2
|
[
"MIT"
] | null | null | null |
regressor.py
|
omkarpbankar/ML_Live_Class_01
|
09e01c0d909814be327ff916829c926254c255c2
|
[
"MIT"
] | null | null | null |
regressor.py
|
omkarpbankar/ML_Live_Class_01
|
09e01c0d909814be327ff916829c926254c255c2
|
[
"MIT"
] | null | null | null |
"""
Author: Omkar Pandit Bankar
Date: 10/10/2019
Email: omkarpbankar@gmail.com
"""
| 13.833333
| 29
| 0.722892
| 12
| 83
| 5
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109589
| 0.120482
| 83
| 6
| 30
| 13.833333
| 0.712329
| 0.891566
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a3527a11651c842e5a0a99c6f93f6a8084d00b4f
| 490
|
py
|
Python
|
src/python3/base_test/BaseSet.py
|
cyxm/PythonTest
|
4e747142ad7e65634d3a4916603f53ad7bc667fd
|
[
"BSD-2-Clause"
] | null | null | null |
src/python3/base_test/BaseSet.py
|
cyxm/PythonTest
|
4e747142ad7e65634d3a4916603f53ad7bc667fd
|
[
"BSD-2-Clause"
] | null | null | null |
src/python3/base_test/BaseSet.py
|
cyxm/PythonTest
|
4e747142ad7e65634d3a4916603f53ad7bc667fd
|
[
"BSD-2-Clause"
] | null | null | null |
# !/usr/bin/python3
# 集合类型
# 包含的元素不可重复
# 可以进行集合运算
# 集合为无序
varTypeSet = {"0", "1", "2", "3"}
varTypeSet1 = {"2", "3", "4", "5"}
print(varTypeSet, varTypeSet1)
# 差集
print("差集", end=" ")
print(varTypeSet - varTypeSet1, end=" ")
print(varTypeSet1 - varTypeSet)
# 并集
# 错误示例,不能使用+
# print(varTypeSet + varTypeSet1)
print("并集", end=" ")
print(varTypeSet | varTypeSet1)
# 交集
print("交集", end=" ")
print(varTypeSet & varTypeSet1)
# 差集的并集
print("差集的并集", end=" ")
print(varTypeSet ^ varTypeSet1)
| 16.333333
| 40
| 0.642857
| 57
| 490
| 5.526316
| 0.403509
| 0.285714
| 0.495238
| 0.368254
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.040767
| 0.14898
| 490
| 29
| 41
| 16.896552
| 0.714628
| 0.214286
| 0
| 0
| 0
| 0
| 0.064343
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.833333
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
a35899abbf80eb96221a53ba897e5480cd944182
| 430
|
py
|
Python
|
extract_bottleneck_features.py
|
mhoenick/dogapp
|
c084c84bf988a45ba41746f94d2e0680f4b5a433
|
[
"FTL",
"CNRI-Python"
] | null | null | null |
extract_bottleneck_features.py
|
mhoenick/dogapp
|
c084c84bf988a45ba41746f94d2e0680f4b5a433
|
[
"FTL",
"CNRI-Python"
] | null | null | null |
extract_bottleneck_features.py
|
mhoenick/dogapp
|
c084c84bf988a45ba41746f94d2e0680f4b5a433
|
[
"FTL",
"CNRI-Python"
] | null | null | null |
def extract_Resnet50(tensor):
'''
Image tensor taken and preprocessed to be used with keras ResNet50 Model
Input: np.array (1, 224, 224, 3), image tensor
Output: np.array (1, 2048), tensor passed trough ResNet50 base model
'''
from keras.applications.resnet50 import ResNet50, preprocess_input
return ResNet50(weights='imagenet', include_top=False, pooling='max').predict(preprocess_input(tensor))
| 47.777778
| 107
| 0.727907
| 57
| 430
| 5.421053
| 0.666667
| 0.071197
| 0.05178
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.070423
| 0.174419
| 430
| 9
| 107
| 47.777778
| 0.8
| 0.439535
| 0
| 0
| 0
| 0
| 0.051402
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a35aa8b0d83e6581dca9c2e5b470a026d0b7eecb
| 180
|
py
|
Python
|
materi/pertemuan_4/python/hitung_volume.py
|
nadiadebbie/dasar-pemrograman
|
a5adc330451be12d9af9609b66e102ad7b622883
|
[
"MIT"
] | null | null | null |
materi/pertemuan_4/python/hitung_volume.py
|
nadiadebbie/dasar-pemrograman
|
a5adc330451be12d9af9609b66e102ad7b622883
|
[
"MIT"
] | null | null | null |
materi/pertemuan_4/python/hitung_volume.py
|
nadiadebbie/dasar-pemrograman
|
a5adc330451be12d9af9609b66e102ad7b622883
|
[
"MIT"
] | null | null | null |
panjang = int(raw_input("masukan panjang: "))
lebar = int(raw_input("masukan lebar: "))
tinggi = int(raw_input("masukan tinggi: "))
volume = panjang * lebar * tinggi
print(volume)
| 30
| 45
| 0.711111
| 24
| 180
| 5.208333
| 0.375
| 0.144
| 0.264
| 0.432
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127778
| 180
| 5
| 46
| 36
| 0.796178
| 0
| 0
| 0
| 0
| 0
| 0.266667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.2
| 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
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a38d4df0085d2ba368818439c60c9853b71c3a87
| 48
|
py
|
Python
|
BossSpider/proxy_pool/test.py
|
tjhlp/SmallSpider
|
5518fbd14d66d3b0aca5ac8871839b7e1de49d47
|
[
"MIT"
] | null | null | null |
BossSpider/proxy_pool/test.py
|
tjhlp/SmallSpider
|
5518fbd14d66d3b0aca5ac8871839b7e1de49d47
|
[
"MIT"
] | null | null | null |
BossSpider/proxy_pool/test.py
|
tjhlp/SmallSpider
|
5518fbd14d66d3b0aca5ac8871839b7e1de49d47
|
[
"MIT"
] | null | null | null |
with open('1.txt','w')as f:
f.write('1231')
| 16
| 27
| 0.541667
| 10
| 48
| 2.6
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 0.166667
| 48
| 2
| 28
| 24
| 0.525
| 0
| 0
| 0
| 0
| 0
| 0.208333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a397143376acd28b8d20f57b47b81229db16ed2c
| 37
|
py
|
Python
|
boa3_test/test_sc/arithmetic_test/ConcatenationAugmentedAssignment.py
|
hal0x2328/neo3-boa
|
6825a3533384cb01660773050719402a9703065b
|
[
"Apache-2.0"
] | 25
|
2020-07-22T19:37:43.000Z
|
2022-03-08T03:23:55.000Z
|
boa3_test/test_sc/arithmetic_test/ConcatenationAugmentedAssignment.py
|
hal0x2328/neo3-boa
|
6825a3533384cb01660773050719402a9703065b
|
[
"Apache-2.0"
] | 419
|
2020-04-23T17:48:14.000Z
|
2022-03-31T13:17:45.000Z
|
boa3_test/test_sc/arithmetic_test/ConcatenationAugmentedAssignment.py
|
hal0x2328/neo3-boa
|
6825a3533384cb01660773050719402a9703065b
|
[
"Apache-2.0"
] | 15
|
2020-05-21T21:54:24.000Z
|
2021-11-18T06:17:24.000Z
|
def Main(a: str, b: str):
a += b
| 12.333333
| 25
| 0.459459
| 8
| 37
| 2.125
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.324324
| 37
| 2
| 26
| 18.5
| 0.68
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a399975990c26a4cc95eb44571f92d296cb42500
| 67
|
py
|
Python
|
src/wshop/apps/catalogue/__init__.py
|
vituocgia/wshop-core
|
5f6d1ec9e9158f13aab136c5bd901c41e69a1dba
|
[
"BSD-3-Clause"
] | null | null | null |
src/wshop/apps/catalogue/__init__.py
|
vituocgia/wshop-core
|
5f6d1ec9e9158f13aab136c5bd901c41e69a1dba
|
[
"BSD-3-Clause"
] | null | null | null |
src/wshop/apps/catalogue/__init__.py
|
vituocgia/wshop-core
|
5f6d1ec9e9158f13aab136c5bd901c41e69a1dba
|
[
"BSD-3-Clause"
] | null | null | null |
default_app_config = 'wshop.apps.catalogue.config.CatalogueConfig'
| 33.5
| 66
| 0.850746
| 8
| 67
| 6.875
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044776
| 67
| 1
| 67
| 67
| 0.859375
| 0
| 0
| 0
| 0
| 0
| 0.641791
| 0.641791
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6e57f0993b205347fe67a5e2e8eb691f582188c4
| 54
|
py
|
Python
|
atcoder/abc/a005.py
|
tomato-300yen/coding
|
db6f440a96d8c83f486005c650461a69f27e3926
|
[
"MIT"
] | null | null | null |
atcoder/abc/a005.py
|
tomato-300yen/coding
|
db6f440a96d8c83f486005c650461a69f27e3926
|
[
"MIT"
] | null | null | null |
atcoder/abc/a005.py
|
tomato-300yen/coding
|
db6f440a96d8c83f486005c650461a69f27e3926
|
[
"MIT"
] | null | null | null |
x, y = tuple(map(int, input().split()))
print(y // x)
| 18
| 39
| 0.555556
| 10
| 54
| 3
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 54
| 2
| 40
| 27
| 0.652174
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
6e76ab059b9093cdfcfa5909dfbc94471ab81732
| 91
|
py
|
Python
|
Calenderation/Calender/apps.py
|
bees1114/Calenderation
|
f000387165f25c5f56778171749ba7a698cd40d8
|
[
"MIT"
] | null | null | null |
Calenderation/Calender/apps.py
|
bees1114/Calenderation
|
f000387165f25c5f56778171749ba7a698cd40d8
|
[
"MIT"
] | null | null | null |
Calenderation/Calender/apps.py
|
bees1114/Calenderation
|
f000387165f25c5f56778171749ba7a698cd40d8
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class CalenderConfig(AppConfig):
name = 'Calender'
| 15.166667
| 33
| 0.758242
| 10
| 91
| 6.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164835
| 91
| 5
| 34
| 18.2
| 0.907895
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6e7fbcfea5c9e5b031c6e172e7db2ef0a6b393ad
| 132
|
py
|
Python
|
src/config.py
|
nedlrichards/td_surface
|
d88433b544b8fd3990cd7e61d33ceea89006dada
|
[
"MIT"
] | null | null | null |
src/config.py
|
nedlrichards/td_surface
|
d88433b544b8fd3990cd7e61d33ceea89006dada
|
[
"MIT"
] | null | null | null |
src/config.py
|
nedlrichards/td_surface
|
d88433b544b8fd3990cd7e61d33ceea89006dada
|
[
"MIT"
] | null | null | null |
import copy
class Config:
"""Common experimental parameters"""
def __init__(self):
self.save_dir = 'data/canope'
| 14.666667
| 40
| 0.651515
| 15
| 132
| 5.4
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.234848
| 132
| 8
| 41
| 16.5
| 0.80198
| 0.227273
| 0
| 0
| 0
| 0
| 0.115789
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
6eb8bfba83b0249608afae1913f567f69a2fca90
| 461
|
py
|
Python
|
integration_tests/test.py
|
SaveTheAles/cyber.py
|
69211d4f9e861e3c64990725a4a483d2cbee0be1
|
[
"MIT"
] | null | null | null |
integration_tests/test.py
|
SaveTheAles/cyber.py
|
69211d4f9e861e3c64990725a4a483d2cbee0be1
|
[
"MIT"
] | null | null | null |
integration_tests/test.py
|
SaveTheAles/cyber.py
|
69211d4f9e861e3c64990725a4a483d2cbee0be1
|
[
"MIT"
] | null | null | null |
"""
from cyber_sdk.client.lcd.api.tx import CreateTxOptions
from cyber_sdk.client.localbostrom import LocalBostrom
from cyber_sdk.core import Coin, Coins
from cyber_sdk.core.authz import MsgGrantAuthorization, MsgExecAuthorized, MsgRevokeAuthorization
"""
""" untested
import lcd_gov
"""
########
# list done
# import tx_send
# import tx_market
# import tx_wasm
import lcd_tx
# list to be done
# import tx_authz
# import tx_distribution - after staking
| 17.730769
| 97
| 0.776573
| 62
| 461
| 5.596774
| 0.467742
| 0.115274
| 0.138329
| 0.103746
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136659
| 461
| 25
| 98
| 18.44
| 0.871859
| 0.819957
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6ebb7b3846a655f8c6e950b7b284c8f75ec95f8f
| 178
|
py
|
Python
|
lumopt/optimizers/placeholder.py
|
sbyrnes321/lumopt
|
b7cf1ae837d4d84678bfd7707882c4432b781db3
|
[
"MIT"
] | null | null | null |
lumopt/optimizers/placeholder.py
|
sbyrnes321/lumopt
|
b7cf1ae837d4d84678bfd7707882c4432b781db3
|
[
"MIT"
] | null | null | null |
lumopt/optimizers/placeholder.py
|
sbyrnes321/lumopt
|
b7cf1ae837d4d84678bfd7707882c4432b781db3
|
[
"MIT"
] | null | null | null |
class placeholder_optimizer(object):
done=False
self_managing=False
def __init__(self,max_iter):
self.max_iter=max_iter
def update(self):
pass
| 16.181818
| 36
| 0.668539
| 23
| 178
| 4.782609
| 0.608696
| 0.190909
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.252809
| 178
| 11
| 37
| 16.181818
| 0.827068
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.142857
| 0
| 0
| 0.714286
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
6ed802128de4cf1d5f9ba3eefd2f44a366fae821
| 867
|
py
|
Python
|
tests/test_parse_ripestat_errors.py
|
pawel-slowik/ipset-country
|
e14994eb44d977c59c147a81fabc4c3f3cd8c392
|
[
"MIT"
] | null | null | null |
tests/test_parse_ripestat_errors.py
|
pawel-slowik/ipset-country
|
e14994eb44d977c59c147a81fabc4c3f3cd8c392
|
[
"MIT"
] | null | null | null |
tests/test_parse_ripestat_errors.py
|
pawel-slowik/ipset-country
|
e14994eb44d977c59c147a81fabc4c3f3cd8c392
|
[
"MIT"
] | null | null | null |
import pytest
from ipset import parse_ripestat
from .util import open_test_file
def test_error_on_status_code() -> None:
with open_test_file("ripestat/error_status_code.json") as json_input:
with pytest.raises(ValueError):
parse_ripestat(json_input)
def test_error_on_status() -> None:
with open_test_file("ripestat/error_status.json") as json_input:
with pytest.raises(ValueError):
parse_ripestat(json_input)
def test_error_on_data_call_status() -> None:
with open_test_file("ripestat/error_data_call_status.json") as json_input:
with pytest.raises(ValueError):
parse_ripestat(json_input)
def test_error_on_invalid_data() -> None:
with open_test_file("ripestat/error_in_list.json") as json_input:
with pytest.raises(ValueError):
list(parse_ripestat(json_input))
| 30.964286
| 78
| 0.731257
| 122
| 867
| 4.811475
| 0.221311
| 0.122658
| 0.102215
| 0.0954
| 0.773424
| 0.739353
| 0.739353
| 0.683135
| 0.413969
| 0.413969
| 0
| 0
| 0.182238
| 867
| 27
| 79
| 32.111111
| 0.827927
| 0
| 0
| 0.368421
| 0
| 0
| 0.138408
| 0.138408
| 0
| 0
| 0
| 0
| 0
| 1
| 0.210526
| true
| 0
| 0.157895
| 0
| 0.368421
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6ee4ec28479a53e950e67541ebb3765e38de3255
| 288
|
py
|
Python
|
Mundo 1/ex008.py
|
erickeloi/ExerciciosTreino
|
f5ac02f45e2eb27d5a8af87fca1227b5c88f523f
|
[
"MIT"
] | null | null | null |
Mundo 1/ex008.py
|
erickeloi/ExerciciosTreino
|
f5ac02f45e2eb27d5a8af87fca1227b5c88f523f
|
[
"MIT"
] | null | null | null |
Mundo 1/ex008.py
|
erickeloi/ExerciciosTreino
|
f5ac02f45e2eb27d5a8af87fca1227b5c88f523f
|
[
"MIT"
] | null | null | null |
#Desafio 8
#Programa Conversor de Unidades
# (Dá para aprimorar mais tarde)
medida = float(input("Digite aqui uma medida em metros para obtê-la em centímetros e milímetros: "))
print(f"Sobre a medida {medida} metros, ela possui:\n {medida*100} centímetros,\n {medida*1000} milímetros ")
| 41.142857
| 109
| 0.753472
| 44
| 288
| 4.931818
| 0.75
| 0.064516
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032258
| 0.138889
| 288
| 6
| 110
| 48
| 0.842742
| 0.243056
| 0
| 0
| 0
| 0.5
| 0.813084
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
6eeb57b7aa3c1889ee2d1098cc4853263b959353
| 1,480
|
py
|
Python
|
naas/requests/email_notification_deliveries.py
|
quicksprout/naas-api-client-python
|
dcd5b63e730ad8830bbf16ceac4cc3dafff3062a
|
[
"MIT"
] | null | null | null |
naas/requests/email_notification_deliveries.py
|
quicksprout/naas-api-client-python
|
dcd5b63e730ad8830bbf16ceac4cc3dafff3062a
|
[
"MIT"
] | 13
|
2019-04-04T21:04:30.000Z
|
2020-03-05T17:24:18.000Z
|
naas/requests/email_notification_deliveries.py
|
notification-service/naas-api-client-python
|
dcd5b63e730ad8830bbf16ceac4cc3dafff3062a
|
[
"MIT"
] | null | null | null |
from naas.client import Client
class EmailNotificationDeliveries:
@staticmethod
def list_by_email_notification_id(email_notification_id, params=None):
"""
Retrieve the list of deliveries by the email notification
:param email_notification_id: int
:param params: dict
:return: Response
"""
if params is None:
params = {}
rel = Client.rel_for(
'rels/email-notification-email-notification-deliveries'
)
route = Client.routes().route_for(rel)
url = route.url_for(args={
**params, **{'email_notification_id': email_notification_id}})
request = Client.get(url)
return request
@staticmethod
def retrieve_by_email_notification_id(
email_notification_id, _id, params=None):
"""
Retrieve the instance of an email notification delivery by
email notification
:param email_notification_id: int
:param _id: int
:param params: dict
:return: Response
"""
if params is None:
params = {}
rel = Client.rel_for(
'rels/email-notification-email-notification-delivery'
)
route = Client.routes().route_for(rel)
url = route.url_for(args={
**params,
**{'email_notification_id': email_notification_id, 'id': _id}
})
request = Client.get(url)
return request
| 29.6
| 74
| 0.597973
| 155
| 1,480
| 5.496774
| 0.245161
| 0.339202
| 0.223005
| 0.112676
| 0.79108
| 0.741784
| 0.741784
| 0.565728
| 0.462441
| 0.462441
| 0
| 0
| 0.313514
| 1,480
| 49
| 75
| 30.204082
| 0.838583
| 0.200676
| 0
| 0.551724
| 0
| 0
| 0.13806
| 0.136194
| 0
| 0
| 0
| 0
| 0
| 1
| 0.068966
| false
| 0
| 0.034483
| 0
| 0.206897
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
42b3e74853d4125159bbb997bcd6609ba27a64cb
| 160
|
py
|
Python
|
users.py
|
eli173/star
|
1dc6bd57f66e01f8a8b8d7c19454405ac9da02af
|
[
"MIT"
] | null | null | null |
users.py
|
eli173/star
|
1dc6bd57f66e01f8a8b8d7c19454405ac9da02af
|
[
"MIT"
] | null | null | null |
users.py
|
eli173/star
|
1dc6bd57f66e01f8a8b8d7c19454405ac9da02af
|
[
"MIT"
] | null | null | null |
class User:
def __init__(self,username,password):
self.is_authenticated = False
self.username = username
self.password = password
| 20
| 41
| 0.65625
| 17
| 160
| 5.882353
| 0.588235
| 0.24
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.26875
| 160
| 7
| 42
| 22.857143
| 0.854701
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.4
| 0
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
42bd2e5ac640a0afe63ceea1505b523334470b05
| 348
|
py
|
Python
|
pyplan/pyplan/dashboard/serializers/nodeDimensionValue.py
|
jorgedouglas71/pyplan-ide
|
5ad0e4a2592b5f2716ff680018f717c65de140f5
|
[
"MIT"
] | 17
|
2019-12-04T19:22:19.000Z
|
2021-07-28T11:17:05.000Z
|
pyplan/pyplan/dashboard/serializers/nodeDimensionValue.py
|
jorgedouglas71/pyplan-ide
|
5ad0e4a2592b5f2716ff680018f717c65de140f5
|
[
"MIT"
] | 9
|
2019-12-13T15:34:43.000Z
|
2022-02-10T11:43:00.000Z
|
pyplan/pyplan/dashboard/serializers/nodeDimensionValue.py
|
jorgedouglas71/pyplan-ide
|
5ad0e4a2592b5f2716ff680018f717c65de140f5
|
[
"MIT"
] | 5
|
2019-12-04T15:57:06.000Z
|
2021-08-20T19:59:26.000Z
|
from rest_framework import serializers
class NodeDimensionValueSerializer(serializers.Serializer):
type = serializers.CharField(default="", allow_blank=True, allow_null=True)
value = serializers.CharField(default="")
selected = serializers.BooleanField(default=False)
geoDef = serializers.CharField(default=None, allow_null=True)
| 38.666667
| 79
| 0.79023
| 36
| 348
| 7.527778
| 0.583333
| 0.221402
| 0.298893
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112069
| 348
| 8
| 80
| 43.5
| 0.877023
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
6e0e506e07c3a8e7ec3405cadb72982f2ccef88b
| 257
|
py
|
Python
|
Curso em video/Desafios1-20/Desafio11.py
|
Ry18-2003/Python-Journey
|
c926a733a578f3686767a1189bdccb4df137856d
|
[
"MIT"
] | null | null | null |
Curso em video/Desafios1-20/Desafio11.py
|
Ry18-2003/Python-Journey
|
c926a733a578f3686767a1189bdccb4df137856d
|
[
"MIT"
] | null | null | null |
Curso em video/Desafios1-20/Desafio11.py
|
Ry18-2003/Python-Journey
|
c926a733a578f3686767a1189bdccb4df137856d
|
[
"MIT"
] | null | null | null |
aut = float(input('Digite a autura da parede em Metros: '))
lar = float(input('Digite a largura da parede em Metros: '))
are = aut * lar
print(f'A área da parede é {are}², considerando que cada litro de tinta pinta 2m² vc vai usar {are/2} Litros de tinta')
| 51.4
| 119
| 0.712062
| 48
| 257
| 3.8125
| 0.625
| 0.131148
| 0.174863
| 0.185792
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018957
| 0.178988
| 257
| 5
| 119
| 51.4
| 0.848341
| 0
| 0
| 0
| 0
| 0.25
| 0.713178
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 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
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6e1b9332e37d6a206c54bc6bfd920b258de40c12
| 66
|
py
|
Python
|
pro_rabbitmq/xianchunceshi/__init__.py
|
yongfang117/pro_useful_code
|
63ae6891d3be243c5c46329e65fcf47133c5890f
|
[
"MIT"
] | null | null | null |
pro_rabbitmq/xianchunceshi/__init__.py
|
yongfang117/pro_useful_code
|
63ae6891d3be243c5c46329e65fcf47133c5890f
|
[
"MIT"
] | null | null | null |
pro_rabbitmq/xianchunceshi/__init__.py
|
yongfang117/pro_useful_code
|
63ae6891d3be243c5c46329e65fcf47133c5890f
|
[
"MIT"
] | null | null | null |
"""
时间: 2019/12/31
作者: liyongfang@cyai.com
更改记录:
重要说明:
"""
| 7.333333
| 23
| 0.560606
| 10
| 66
| 3.7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.156863
| 0.227273
| 66
| 9
| 24
| 7.333333
| 0.568627
| 0.863636
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6e1e3efa4df7e2d2effcf8485635f4bccd96ce09
| 1,213
|
py
|
Python
|
py3canvas/tests/admins.py
|
tylerclair/py3canvas
|
7485d458606b65200f0ffa5bbe597a9d0bee189f
|
[
"MIT"
] | null | null | null |
py3canvas/tests/admins.py
|
tylerclair/py3canvas
|
7485d458606b65200f0ffa5bbe597a9d0bee189f
|
[
"MIT"
] | null | null | null |
py3canvas/tests/admins.py
|
tylerclair/py3canvas
|
7485d458606b65200f0ffa5bbe597a9d0bee189f
|
[
"MIT"
] | null | null | null |
"""Admins API Tests for Version 1.0.
This is a testing template for the generated AdminsAPI Class.
"""
import unittest
import requests
import secrets
from py3canvas.apis.admins import AdminsAPI
from py3canvas.apis.admins import Admin
class TestAdminsAPI(unittest.TestCase):
"""Tests for the AdminsAPI."""
def setUp(self):
self.client = AdminsAPI(secrets.instance_address, secrets.access_token)
def test_make_account_admin(self):
"""Integration test for the AdminsAPI.make_account_admin method."""
# This method utilises the POST request method and will make changes to the Canvas instance. This needs consideration.
pass
def test_remove_account_admin(self):
"""Integration test for the AdminsAPI.remove_account_admin method."""
account_id = None # Change me!!
user_id = None # Change me!!
r = self.client.remove_account_admin(
account_id, user_id, role=None, role_id=None
)
def test_list_account_admins(self):
"""Integration test for the AdminsAPI.list_account_admins method."""
account_id = None # Change me!!
r = self.client.list_account_admins(account_id, user_id=None)
| 32.783784
| 126
| 0.706513
| 160
| 1,213
| 5.175
| 0.36875
| 0.036232
| 0.072464
| 0.07971
| 0.330918
| 0.26087
| 0.171498
| 0.111111
| 0
| 0
| 0
| 0.004184
| 0.211871
| 1,213
| 36
| 127
| 33.694444
| 0.861925
| 0.382523
| 0
| 0.105263
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.210526
| false
| 0.052632
| 0.263158
| 0
| 0.526316
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
280cf73078140e621fedcb5916b619e4c01ab2e3
| 89
|
py
|
Python
|
autogl/utils/__init__.py
|
general502570/AutoGL
|
cbac7954db8555af576692384b09d305a4ef67c2
|
[
"MIT"
] | 1
|
2021-05-13T08:53:28.000Z
|
2021-05-13T08:53:28.000Z
|
autogl/utils/__init__.py
|
lucylow/AutoGL
|
e560ca7ef3b35a8b85d9b89063ce5ce7afaed52f
|
[
"MIT"
] | null | null | null |
autogl/utils/__init__.py
|
lucylow/AutoGL
|
e560ca7ef3b35a8b85d9b89063ce5ce7afaed52f
|
[
"MIT"
] | null | null | null |
"""
Some utils used by AutoGL
"""
from .log import get_logger
__all__ = ["get_logger"]
| 11.125
| 27
| 0.685393
| 13
| 89
| 4.230769
| 0.846154
| 0.327273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179775
| 89
| 7
| 28
| 12.714286
| 0.753425
| 0.280899
| 0
| 0
| 0
| 0
| 0.178571
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
2829f115b5b4f77be52f109e462015a4f356c24a
| 64
|
py
|
Python
|
mcm/error.py
|
b3ni/pymcm
|
0700f2dd2582c7524c25f9130f2039b7e4146141
|
[
"MIT"
] | 2
|
2015-06-30T12:16:54.000Z
|
2019-05-12T13:44:35.000Z
|
mcm/error.py
|
b3ni/pymcm
|
0700f2dd2582c7524c25f9130f2039b7e4146141
|
[
"MIT"
] | null | null | null |
mcm/error.py
|
b3ni/pymcm
|
0700f2dd2582c7524c25f9130f2039b7e4146141
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
class LoginError(Exception):
pass
| 10.666667
| 28
| 0.59375
| 7
| 64
| 5.428571
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02
| 0.21875
| 64
| 5
| 29
| 12.8
| 0.74
| 0.328125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
2836b3388aa04dcdd6d80e50b8cb2971f7e9e4af
| 1,102
|
py
|
Python
|
tests/test_providers_package.py
|
xkortex/ulid
|
96bdb1daad7ce96f6db8c91ac0410b66d2e1c4c1
|
[
"Apache-2.0"
] | 303
|
2017-06-15T14:41:41.000Z
|
2022-03-28T11:46:50.000Z
|
tests/test_providers_package.py
|
xkortex/ulid
|
96bdb1daad7ce96f6db8c91ac0410b66d2e1c4c1
|
[
"Apache-2.0"
] | 387
|
2017-06-16T14:47:31.000Z
|
2022-03-24T05:55:44.000Z
|
tests/test_providers_package.py
|
xkortex/ulid
|
96bdb1daad7ce96f6db8c91ac0410b66d2e1c4c1
|
[
"Apache-2.0"
] | 21
|
2017-06-16T20:00:33.000Z
|
2022-03-23T04:14:04.000Z
|
"""
test_providers_package
~~~~~~~~~~~~~~~~~~~~~~
Tests for the :mod:`~ulid.providers` package.
"""
from ulid import providers
from ulid.providers import default, monotonic
def test_package_has_dunder_all():
"""
Assert that :pkg:`~ulid.providers` exposes the :attr:`~ulid.providers.__all__` attribute as a list.
"""
assert hasattr(providers, '__all__')
assert isinstance(providers.__all__, list)
def test_package_exposes_expected_interface():
"""
Assert that :attr:`~ulid.providers.__all__` exposes expected interface.
"""
assert providers.__all__ == ['Provider', 'DEFAULT', 'MICROSECOND', 'MONOTONIC']
def test_package_has_default_provider():
"""
Assert :attr:`~ulid.providers.DEFAULT` is a :class:`~ulid.providers.default.Provider` instance.
"""
assert isinstance(providers.DEFAULT, default.Provider)
def test_package_has_monotonic_provider():
"""
Assert :attr:`~ulid.providers.MONOTONIC` is a :class:`~ulid.providers.monotonic.Provider` instance.
"""
assert isinstance(providers.MONOTONIC, monotonic.Provider)
| 29
| 103
| 0.69873
| 122
| 1,102
| 6
| 0.278689
| 0.159836
| 0.076503
| 0.069672
| 0.325137
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154265
| 1,102
| 37
| 104
| 29.783784
| 0.785408
| 0.417423
| 0
| 0
| 0
| 0
| 0.074733
| 0
| 0
| 0
| 0
| 0
| 0.454545
| 1
| 0.363636
| true
| 0
| 0.181818
| 0
| 0.545455
| 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
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
283b201cf69eaea01b0c3653b9de523247eea51d
| 206
|
py
|
Python
|
data/scripts/data_util.py
|
pekingPow/us-congress-pizza-flag-tracker
|
9e23f4082a83a63c5ed71658cc8aab7d99ad2f01
|
[
"CC0-1.0"
] | null | null | null |
data/scripts/data_util.py
|
pekingPow/us-congress-pizza-flag-tracker
|
9e23f4082a83a63c5ed71658cc8aab7d99ad2f01
|
[
"CC0-1.0"
] | null | null | null |
data/scripts/data_util.py
|
pekingPow/us-congress-pizza-flag-tracker
|
9e23f4082a83a63c5ed71658cc8aab7d99ad2f01
|
[
"CC0-1.0"
] | null | null | null |
import json
def get_office_codes_list():
with open(
"data/office_codes.json",
) as office_codes_json:
office_codes_list = json.load(office_codes_json)
return office_codes_list
| 20.6
| 56
| 0.708738
| 29
| 206
| 4.62069
| 0.448276
| 0.492537
| 0.335821
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.218447
| 206
| 9
| 57
| 22.888889
| 0.832298
| 0
| 0
| 0
| 0
| 0
| 0.106796
| 0.106796
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.142857
| 0
| 0.428571
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
286ee1aa5131d3ee6383c16db36b353ad8a968d4
| 30
|
py
|
Python
|
tests/a_unit/io/__init__.py
|
jonathan-winn-geo/cmatools
|
ae044de4bd8f1f86814b07498e46b5a03837e679
|
[
"BSD-3-Clause"
] | null | null | null |
tests/a_unit/io/__init__.py
|
jonathan-winn-geo/cmatools
|
ae044de4bd8f1f86814b07498e46b5a03837e679
|
[
"BSD-3-Clause"
] | 3
|
2020-05-13T10:30:38.000Z
|
2020-05-13T10:32:30.000Z
|
tests/a_unit/io/__init__.py
|
jonathan-winn-geo/cmatools
|
ae044de4bd8f1f86814b07498e46b5a03837e679
|
[
"BSD-3-Clause"
] | 1
|
2020-07-02T16:58:06.000Z
|
2020-07-02T16:58:06.000Z
|
"""Test for io subpackage."""
| 15
| 29
| 0.633333
| 4
| 30
| 4.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 30
| 1
| 30
| 30
| 0.730769
| 0.766667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
28988ee9db0ee4576d06cba4b0fc6a52095ee017
| 461
|
py
|
Python
|
tests/integration/scenario_simulators_integration_test.py
|
gocardless/gocardless-pro-python
|
e6763fba5326ff56f4ba417ddd7828c03e059be5
|
[
"MIT"
] | 30
|
2015-07-08T21:10:10.000Z
|
2022-02-17T10:08:55.000Z
|
tests/integration/scenario_simulators_integration_test.py
|
gocardless/gocardless-pro-python
|
e6763fba5326ff56f4ba417ddd7828c03e059be5
|
[
"MIT"
] | 21
|
2015-12-14T02:24:52.000Z
|
2022-02-05T15:56:00.000Z
|
tests/integration/scenario_simulators_integration_test.py
|
gocardless/gocardless-pro-python
|
e6763fba5326ff56f4ba417ddd7828c03e059be5
|
[
"MIT"
] | 19
|
2016-02-10T15:57:42.000Z
|
2022-02-05T10:21:05.000Z
|
# WARNING: Do not edit by hand, this file was generated by Crank:
#
# https://github.com/gocardless/crank
#
import json
import requests
import responses
from nose.tools import (
assert_equal,
assert_is_instance,
assert_is_none,
assert_is_not_none,
assert_not_equal,
assert_raises
)
from gocardless_pro.errors import MalformedResponseError
from gocardless_pro import resources
from gocardless_pro import list_response
from .. import helpers
| 18.44
| 65
| 0.793926
| 64
| 461
| 5.484375
| 0.546875
| 0.068376
| 0.145299
| 0.131054
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154013
| 461
| 24
| 66
| 19.208333
| 0.9
| 0.219089
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.4
| 1
| 0
| true
| 0
| 0.533333
| 0
| 0.533333
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
9562bbd388b5c12833507facb0cef87cc9715fa6
| 110
|
bzl
|
Python
|
tools/build_defs/fb_python_library.bzl
|
tjzhou23/profilo
|
baeea045a00d2403cc3f45778bf9cb69d33801da
|
[
"Apache-2.0"
] | 1,466
|
2018-03-13T17:13:49.000Z
|
2022-03-31T07:08:51.000Z
|
tools/build_defs/fb_python_library.bzl
|
tjzhou23/profilo
|
baeea045a00d2403cc3f45778bf9cb69d33801da
|
[
"Apache-2.0"
] | 101
|
2018-03-13T18:43:34.000Z
|
2022-03-15T00:44:52.000Z
|
tools/build_defs/fb_python_library.bzl
|
tjzhou23/profilo
|
baeea045a00d2403cc3f45778bf9cb69d33801da
|
[
"Apache-2.0"
] | 160
|
2018-03-13T18:08:21.000Z
|
2022-03-14T00:46:34.000Z
|
def fb_python_library(name, **kwargs):
native.python_library(
name = name,
**kwargs
)
| 18.333333
| 38
| 0.581818
| 12
| 110
| 5.083333
| 0.583333
| 0.42623
| 0.557377
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.3
| 110
| 5
| 39
| 22
| 0.792208
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.2
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
25269c067068bbf512c8c9f94e0b5f3e6423b29c
| 189
|
py
|
Python
|
src/services/backend/apps/heeds/api/serializers.py
|
AmeizT/maricho
|
6614fc00f7fed7a1be428a672aa42ad4f6e598e8
|
[
"MIT"
] | 1
|
2021-12-12T19:36:18.000Z
|
2021-12-12T19:36:18.000Z
|
src/services/backend/apps/heeds/api/serializers.py
|
AmeizT/maricho
|
6614fc00f7fed7a1be428a672aa42ad4f6e598e8
|
[
"MIT"
] | null | null | null |
src/services/backend/apps/heeds/api/serializers.py
|
AmeizT/maricho
|
6614fc00f7fed7a1be428a672aa42ad4f6e598e8
|
[
"MIT"
] | null | null | null |
from apps.heeds.models import Heed
from rest_framework import serializers
class HeedSerializer(serializers.ModelSerializer):
class Meta:
model = Heed
fields = '__all__'
| 27
| 50
| 0.740741
| 21
| 189
| 6.428571
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.201058
| 189
| 7
| 51
| 27
| 0.89404
| 0
| 0
| 0
| 0
| 0
| 0.036842
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
252d2a4efdcc93ccee8c7cc43c36d861a32c17a1
| 125
|
py
|
Python
|
articles/models.py
|
NikolaFloki/DjangoTutorial
|
cf522d60ef94d2e85e7408e3e4d3d3757d2a5946
|
[
"MIT"
] | null | null | null |
articles/models.py
|
NikolaFloki/DjangoTutorial
|
cf522d60ef94d2e85e7408e3e4d3d3757d2a5946
|
[
"MIT"
] | null | null | null |
articles/models.py
|
NikolaFloki/DjangoTutorial
|
cf522d60ef94d2e85e7408e3e4d3d3757d2a5946
|
[
"MIT"
] | null | null | null |
from django.db import models
class Article(models.Model):
title = models.TextField()
content = models.TextField()
| 15.625
| 32
| 0.712
| 15
| 125
| 5.933333
| 0.733333
| 0.337079
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.184
| 125
| 7
| 33
| 17.857143
| 0.872549
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
25483eb927227144432fca281d946b4d885d617f
| 3,324
|
py
|
Python
|
model.py
|
stratosphereips/model_extraction_malware
|
045984e592c94888a5967ca72bee21db9b8c5400
|
[
"MIT"
] | null | null | null |
model.py
|
stratosphereips/model_extraction_malware
|
045984e592c94888a5967ca72bee21db9b8c5400
|
[
"MIT"
] | null | null | null |
model.py
|
stratosphereips/model_extraction_malware
|
045984e592c94888a5967ca72bee21db9b8c5400
|
[
"MIT"
] | null | null | null |
import tensorflow as tf
from tensorflow.python.keras.engine import training
def create_dnn(seed=42, input_shape=(2381), mc=False):
"""
This function compiles and returns a Keras model.
"""
initializer = tf.keras.initializers.GlorotNormal(seed=seed)
# model = tf.keras.models.Sequential()
inputs = tf.keras.Input(shape=input_shape)
x = tf.keras.layers.Dense(2381, activation='elu', kernel_initializer=initializer)(inputs)
x = tf.keras.layers.LayerNormalization() (x)
x = tf.keras.layers.Dropout(0.3)(x, training=mc)
x = tf.keras.layers.Dense(1024, activation='elu', kernel_initializer=initializer)(x)
x = tf.keras.layers.LayerNormalization() (x)
x = tf.keras.layers.Dropout(0.3)(x, training=mc)
x = tf.keras.layers.Dense(512, activation='elu', kernel_initializer=initializer)(x)
x = tf.keras.layers.LayerNormalization() (x)
x = tf.keras.layers.Dropout(0.3)(x, training=mc)
x = tf.keras.layers.Dense(128, activation='elu', kernel_initializer=initializer)(x)
x = tf.keras.layers.LayerNormalization() (x)
x = tf.keras.layers.Dropout(0.3)(x, training=mc)
outputs = tf.keras.layers.Dense(1, activation="sigmoid")(x)
model = tf.keras.Model(inputs, outputs)
bce = tf.keras.losses.BinaryCrossentropy(from_logits=False)
# optim = tf.keras.optimizers.RMSprop(lr=1e-3, momentum=0.9)
optim = tf.keras.optimizers.Adam()
model.compile(optimizer=optim, loss=bce,
metrics=['accuracy'])
# metrics=['accuracy',
# tf.keras.metrics.SensitivityAtSpecificity(0.99, name="TPR_01")])
return model
def create_dnn2(seed=42, mc=False):
"""
This function compiles and returns a Keras model.
"""
initializer = tf.keras.initializers.GlorotNormal(seed=seed)
# model = tf.keras.models.Sequential()
input1 = tf.keras.Input(shape=(2381, ))
input2 = tf.keras.Input(shape=(1, ))
x = tf.keras.layers.concatenate([input1, input2])
x = tf.keras.layers.Dense(2382, activation='elu', kernel_initializer=initializer)(x)
x = tf.keras.layers.LayerNormalization()(x)
x = tf.keras.layers.Dropout(0.3)(x, training=mc)
x = tf.keras.layers.Dense(1024, activation='elu', kernel_initializer=initializer)(x)
x = tf.keras.layers.LayerNormalization()(x)
x = tf.keras.layers.Dropout(0.3)(x, training=mc)
x = tf.keras.layers.Dense(512, activation='elu', kernel_initializer=initializer)(x)
x = tf.keras.layers.LayerNormalization()(x)
x = tf.keras.layers.Dropout(0.3)(x, training=mc)
x = tf.keras.layers.Dense(128, activation='elu', kernel_initializer=initializer)(x)
x = tf.keras.layers.LayerNormalization()(x)
x = tf.keras.layers.Dropout(0.3)(x, training=mc)
outputs = tf.keras.layers.Dense(1)(x)
out = tf.add(outputs, input2)
# out = tf.clip_by_value(out, 0, 1)
out = tf.sigmoid(out)
model = tf.keras.Model((input1, input2), out)
bce = tf.keras.losses.BinaryCrossentropy(from_logits=False)
# mae = tf.keras.losses.MeanAbsoluteError()
# mse = tf.keras.losses.MeanSquaredError()
optim = tf.keras.optimizers.Adam()
model.compile(optimizer=optim, loss=bce,
metrics=['accuracy'])
# metrics=['accuracy',
# tf.keras.metrics.SensitivityAtSpecificity(0.99, name="TPR_01")])
return model
| 36.527473
| 93
| 0.680205
| 453
| 3,324
| 4.951435
| 0.187638
| 0.140437
| 0.156487
| 0.156041
| 0.777976
| 0.742755
| 0.742755
| 0.742755
| 0.699064
| 0.699064
| 0
| 0.029813
| 0.162455
| 3,324
| 90
| 94
| 36.933333
| 0.775862
| 0.166667
| 0
| 0.68
| 0
| 0
| 0.017216
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.04
| false
| 0
| 0.04
| 0
| 0.12
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c2a3d82f5d97a30b3813918c93cc5448d83e5960
| 758
|
py
|
Python
|
amquery/core/storage/_metric_storage.py
|
nromashchenko/nir
|
4b0c91d670462ca33a9b224740a2977e99546440
|
[
"MIT"
] | 3
|
2016-09-13T16:31:05.000Z
|
2016-09-14T06:36:44.000Z
|
amquery/core/storage/_metric_storage.py
|
nromashchenko/nir
|
4b0c91d670462ca33a9b224740a2977e99546440
|
[
"MIT"
] | 36
|
2016-09-14T06:26:20.000Z
|
2017-05-04T19:11:30.000Z
|
amquery/core/storage/_metric_storage.py
|
nromashchenko/amquery
|
4b0c91d670462ca33a9b224740a2977e99546440
|
[
"MIT"
] | null | null | null |
import abc
class Storage:
@abc.abstractmethod
def build(self, collection):
"""
:param collection: SampleCollection
:return: Boolean
"""
raise NotImplementedError
@abc.abstractmethod
def find(self, sample_ref, k):
"""
:param sample_ref: SampleReference
:param k: int
:return: Sequence[SampleReference]
"""
raise NotImplementedError
@abc.abstractstaticmethod
def create(self, config):
"""
:param config: Config
:return: MetricIndexStorage
"""
raise NotImplementedError
@abc.abstractstaticmethod
def __len__(self):
"""
:return: int
"""
raise NotImplementedError
| 21.657143
| 44
| 0.575198
| 59
| 758
| 7.288136
| 0.457627
| 0.223256
| 0.188372
| 0.218605
| 0.232558
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.336412
| 758
| 35
| 45
| 21.657143
| 0.854871
| 0.266491
| 0
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.071429
| 0
| 0.428571
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c2e914584b5aa9cfaf25301ea06a058112aa9c18
| 14,037
|
py
|
Python
|
gym_gridverse/grid_object.py
|
DavidSlayback/gym-gridverse
|
b8916576a92489c030fb2c2060598c7f473f19f2
|
[
"MIT"
] | 6
|
2020-10-15T14:45:11.000Z
|
2021-02-20T12:11:32.000Z
|
gym_gridverse/grid_object.py
|
DavidSlayback/gym-gridverse
|
b8916576a92489c030fb2c2060598c7f473f19f2
|
[
"MIT"
] | 5
|
2021-01-20T15:34:29.000Z
|
2022-03-18T18:52:53.000Z
|
gym_gridverse/grid_object.py
|
DavidSlayback/gym-gridverse
|
b8916576a92489c030fb2c2060598c7f473f19f2
|
[
"MIT"
] | 2
|
2021-01-11T18:48:49.000Z
|
2021-01-26T15:45:38.000Z
|
""" Every cell in the grid is represented by a grid objects """
from __future__ import annotations
import abc
import enum
from typing import Callable, List, Type
class Color(enum.Enum):
"""Color of grid objects"""
NONE = 0
RED = enum.auto()
GREEN = enum.auto()
BLUE = enum.auto()
YELLOW = enum.auto()
class GridObject(metaclass=abc.ABCMeta):
"""A cell in the grid"""
# registry as list/mapping int -> GridObject
object_types: List[GridObject] = []
type_index: int
def __init_subclass__(cls, *, register=True, **kwargs):
super().__init_subclass__(**kwargs)
if register:
cls.type_index = len(GridObject.object_types)
GridObject.object_types.append(cls)
@classmethod
@abc.abstractmethod
def can_be_represented_in_state(cls) -> bool:
"""Returns whether the state_index fully represents the object state"""
@property
@abc.abstractmethod
def state_index(self) -> int:
"""Returns the state index of the object"""
@classmethod
@abc.abstractmethod
def num_states(cls) -> int:
"""Number of states this class can take on"""
@property
@abc.abstractmethod
def color(self) -> Color:
"""returns the color of the object"""
@property
@abc.abstractmethod
def transparent(self) -> bool:
"""Whether the agent can see _through_ the object"""
@property
@abc.abstractmethod
def can_be_picked_up(self) -> bool:
"""Whether the agent can see pick up the object"""
@property
@abc.abstractmethod
def blocks(self) -> bool:
"""Whether the object blocks the agent"""
def __eq__(self, other) -> bool:
if not isinstance(other, GridObject):
return NotImplemented
return (
self.type_index == other.type_index
and self.state_index == other.state_index
and self.color == other.color
)
def __hash__(self):
return hash((self.type_index, self.state_index, self.color))
class NoneGridObject(GridObject):
"""object representing the absence of an object"""
type_index: int
@classmethod
def can_be_represented_in_state(cls) -> bool:
return True
@property
def state_index(self) -> int:
return 0
@property
def color(self) -> Color:
return Color.NONE
@classmethod
def num_states(cls) -> int:
return 1
@property
def transparent(self) -> bool:
assert False
@property
def can_be_picked_up(self) -> bool:
assert False
@property
def blocks(self) -> bool:
assert False
def __repr__(self):
return f'{self.__class__.__name__}()'
class Hidden(GridObject):
"""object representing an unobservable cell"""
type_index: int
@classmethod
def can_be_represented_in_state(cls) -> bool:
return False
@property
def state_index(self) -> int:
return 0
@property
def color(self) -> Color:
return Color.NONE
@classmethod
def num_states(cls) -> int:
return 1
@property
def transparent(self) -> bool:
return False
@property
def can_be_picked_up(self) -> bool:
assert False
@property
def blocks(self) -> bool:
assert False
def __repr__(self):
return f'{self.__class__.__name__}()'
class Floor(GridObject):
"""Most basic object in the grid, represents empty cell"""
type_index: int
@classmethod
def can_be_represented_in_state(cls) -> bool:
return True
@property
def state_index(self) -> int:
return 0
@property
def color(self) -> Color:
return Color.NONE
@classmethod
def num_states(cls) -> int:
return 1
@property
def transparent(self) -> bool:
return True
@property
def can_be_picked_up(self) -> bool:
return False
@property
def blocks(self) -> bool:
return False
def __repr__(self):
return f'{self.__class__.__name__}()'
class Wall(GridObject):
"""The (second) most basic object in the grid: blocking cell"""
type_index: int
@classmethod
def can_be_represented_in_state(cls) -> bool:
return True
@property
def state_index(self) -> int:
return 0
@property
def color(self) -> Color:
return Color.NONE
@classmethod
def num_states(cls) -> int:
return 1
@property
def transparent(self) -> bool:
return False
@property
def can_be_picked_up(self) -> bool:
return False
@property
def blocks(self) -> bool:
return True
def __repr__(self):
return f'{self.__class__.__name__}()'
class Exit(GridObject):
"""The (second) most basic object in the grid: blocking cell"""
type_index: int
def __init__(self, color: Color = Color.NONE):
self._color = color
@classmethod
def can_be_represented_in_state(cls) -> bool:
return True
@property
def state_index(self) -> int:
return 0
@property
def color(self) -> Color:
return self._color
@classmethod
def num_states(cls) -> int:
return 1
@property
def transparent(self) -> bool:
return True
@property
def can_be_picked_up(self) -> bool:
return False
@property
def blocks(self) -> bool:
return False
def __repr__(self):
return f'{self.__class__.__name__}()'
class Door(GridObject):
"""A door is a grid
Can be `open`, `closed` or `locked`.
The following dynamics (upon actuation) occur:
When not holding correct key with correct color:
`open` or `closed` -> `open`
`locked` -> `locked`
When holding correct key:
any state -> `open`
"""
type_index: int
class Status(enum.Enum):
"""open, closed or locked"""
OPEN = 0
CLOSED = enum.auto()
LOCKED = enum.auto()
def __init__(self, state: Door.Status, color: Color):
self._color = color
self._state = state
@property
def state(self) -> Door.Status:
return self._state
@state.setter
def state(self, value: Door.Status):
if not isinstance(value, Door.Status):
raise TypeError('value ({value}) must be of type Door.Status')
self._state = value
@classmethod
def can_be_represented_in_state(cls) -> bool:
return True
@property
def state_index(self) -> int:
return self._state.value
@classmethod
def num_states(cls) -> int:
return len(Door.Status)
@property
def color(self) -> Color:
return self._color
@property
def transparent(self) -> bool:
return self._state == self.Status.OPEN
@property
def can_be_picked_up(self) -> bool:
return False
@property
def blocks(self) -> bool:
return self._state != self.Status.OPEN
@property
def is_open(self) -> bool:
"""returns whether the door is opened"""
return self._state == self.Status.OPEN
@property
def locked(self) -> bool:
"""returns whether the door is locked"""
return self._state == self.Status.LOCKED
def __repr__(self):
return f'{self.__class__.__name__}({self.state!s}, {self.color!s})'
class Key(GridObject):
"""A key opens a door with the same color"""
type_index: int
def __init__(self, c: Color):
"""Creates a key of color `c`"""
self._color = c
@classmethod
def can_be_represented_in_state(cls) -> bool:
return True
@property
def state_index(self) -> int:
return 0
@property
def color(self) -> Color:
return self._color
@classmethod
def num_states(cls) -> int:
return 1
@property
def transparent(self) -> bool:
return True
@property
def can_be_picked_up(self) -> bool:
return True
@property
def blocks(self) -> bool:
return False
def __repr__(self):
return f'{self.__class__.__name__}({self.color!s})'
class MovingObstacle(GridObject):
"""An obstacle to be avoided that moves in the grid"""
type_index: int
def __init__(self):
"""Moving obstacles have no special status or color"""
@classmethod
def can_be_represented_in_state(cls) -> bool:
return True
@property
def state_index(self) -> int:
return 0
@property
def color(self) -> Color:
return Color.NONE
@classmethod
def num_states(cls) -> int:
return 1
@property
def transparent(self) -> bool:
return True
@property
def can_be_picked_up(self) -> bool:
return False
@property
def blocks(self) -> bool:
return False
def __repr__(self):
return f'{self.__class__.__name__}()'
class Box(GridObject):
"""A box which can be broken and may contain another object"""
type_index: int
def __init__(self, content: GridObject):
"""Boxes have no special status or color"""
if isinstance(content, (NoneGridObject, Hidden)):
raise ValueError('Box cannot contain NoneGridObject or Hidden')
self.content = content
@classmethod
def can_be_represented_in_state(cls) -> bool:
return False
@property
def state_index(self) -> int:
return 0
@property
def color(self) -> Color:
return Color.NONE
@classmethod
def num_states(cls) -> int:
return 1
@property
def transparent(self) -> bool:
return True
@property
def can_be_picked_up(self) -> bool:
return False
@property
def blocks(self) -> bool:
return True
def __repr__(self):
return f'{self.__class__.__name__}({self.content!r})'
class Telepod(GridObject):
"""A teleportation pod"""
type_index: int
def __init__(self, color: Color):
self._color = color
@classmethod
def can_be_represented_in_state(cls) -> bool:
return True
@property
def state_index(self) -> int:
return 0
@property
def color(self) -> Color:
return self._color
@classmethod
def num_states(cls) -> int:
return 1
@property
def transparent(self) -> bool:
return True
@property
def can_be_picked_up(self) -> bool:
return False
@property
def blocks(self) -> bool:
return False
def __repr__(self):
return f'{self.__class__.__name__}({self.color!s})'
class Beacon(GridObject):
"""A beacon to attract attention"""
type_index: int
def __init__(self, color: Color):
self._color = color
@classmethod
def can_be_represented_in_state(cls) -> bool:
return True
@property
def state_index(self) -> int:
return 0
@property
def color(self) -> Color:
return self._color
@classmethod
def num_states(cls) -> int:
return 1
@property
def transparent(self) -> bool:
return True
@property
def can_be_picked_up(self) -> bool:
return False
@property
def blocks(self) -> bool:
return False
def __repr__(self):
return f'{self.__class__.__name__}({self.color!s})'
def factory(name: str, **kwargs) -> GridObject:
if name in ['none_grid_object', 'NoneGridObject']:
return NoneGridObject()
if name in ['hidden', 'Hidden']:
return Hidden()
if name in ['floor', 'Floor']:
return Floor()
if name in ['wall', 'Wall']:
return Wall()
if name in ['exit', 'Exit']:
return Exit()
if name in ['door', 'Door']:
status = kwargs.get('status')
color = kwargs.get('color')
if status is None or color is None:
raise ValueError(f'invalid inputs for {name}')
status = Door.Status[status]
color = Color[color]
return Door(status, color)
if name in ['key', 'Key']:
color = kwargs.get('color')
if color is None:
raise ValueError(f'invalid inputs for {name}')
color = Color[color]
return Key(color)
if name in ['moving_obstacle', 'MovingObstacle']:
return MovingObstacle()
if name in ['box', 'Box']:
obj = kwargs.get('obj')
if obj is None:
raise ValueError(f'invalid inputs for {name}')
return Box(obj)
if name in ['telepod', 'Telepod']:
color = kwargs.get('color')
if color is None:
raise ValueError(f'invalid inputs for {name}')
color = Color[color]
return Telepod(color)
if name in ['beacon', 'Beacon']:
color = kwargs.get('color')
if color is None:
raise ValueError(f'invalid inputs for {name}')
color = Color[color]
return Beacon(color)
raise ValueError(f'invalid grid-object name {name}')
def factory_type(name: str) -> Type[GridObject]:
# TODO: test
if name in ['none_grid_object', 'NoneGridObject']:
return NoneGridObject
if name in ['hidden', 'Hidden']:
return Hidden
if name in ['floor', 'Floor']:
return Floor
if name in ['wall', 'Wall']:
return Wall
if name in ['exit', 'Exit']:
return Exit
if name in ['door', 'Door']:
return Door
if name in ['key', 'Key']:
return Key
if name in ['moving_obstacle', 'MovingObstacle']:
return MovingObstacle
if name in ['box', 'Box']:
return Box
if name in ['telepod', 'Telepod']:
return Telepod
if name in ['beacon', 'Beacon']:
return Beacon
raise ValueError(f'invalid grid-object type name {name}')
GridObjectFactory = Callable[[], GridObject]
"""Signature for a function that instantiates grid objects on call"""
| 21.076577
| 79
| 0.599273
| 1,691
| 14,037
| 4.772915
| 0.103489
| 0.079048
| 0.048569
| 0.046339
| 0.690869
| 0.655681
| 0.612811
| 0.591624
| 0.575022
| 0.564366
| 0
| 0.00222
| 0.293866
| 14,037
| 665
| 80
| 21.108271
| 0.812046
| 0.097955
| 0
| 0.768692
| 0
| 0
| 0.078738
| 0.029708
| 0
| 0
| 0
| 0.001504
| 0.011682
| 1
| 0.259346
| false
| 0
| 0.009346
| 0.198598
| 0.602804
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
6c0544234d16a38f101b11dd30a682578f0fffe9
| 618
|
py
|
Python
|
src/lobster_json.py
|
gdifiore/lobster
|
ca556ee70ad579b95ac78d525233e0b851cbeb53
|
[
"MIT"
] | null | null | null |
src/lobster_json.py
|
gdifiore/lobster
|
ca556ee70ad579b95ac78d525233e0b851cbeb53
|
[
"MIT"
] | null | null | null |
src/lobster_json.py
|
gdifiore/lobster
|
ca556ee70ad579b95ac78d525233e0b851cbeb53
|
[
"MIT"
] | null | null | null |
#
# lobster.py - lobster
#
# (c) gdifiore 2018 <difioregabe@gmail.com>
#
import json
def readJSON(file):
with open(file, 'r') as f:
lobster_data = json.load(f)
return lobster_data
def getTitle(lobster_data):
title = lobster_data["title"]
return title
def getHeader(lobster_data):
header = lobster_data["header"]
return header
def getContent(lobster_data):
content = lobster_data["content"]
return content
def getAuthor(lobster_data):
content = lobster_data["author"]
return content
def getDate(lobster_data):
content = lobster_data["date"]
return content
| 19.3125
| 43
| 0.692557
| 78
| 618
| 5.333333
| 0.397436
| 0.317308
| 0.173077
| 0.180288
| 0.209135
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008097
| 0.200647
| 618
| 32
| 44
| 19.3125
| 0.834008
| 0.100324
| 0
| 0.15
| 0
| 0
| 0.052632
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0
| 0.05
| 0
| 0.65
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
6c4133286fab945ba034a77cd3f9c8f06f551b69
| 133
|
py
|
Python
|
gitlab_runner/datadog_checks/gitlab_runner/__init__.py
|
dvanderveer/integrations-core
|
41dd9950296455457c9b7342584153678503d5aa
|
[
"BSD-3-Clause"
] | 2
|
2019-04-03T17:21:38.000Z
|
2020-02-04T16:28:05.000Z
|
gitlab_runner/datadog_checks/gitlab_runner/__init__.py
|
dvanderveer/integrations-core
|
41dd9950296455457c9b7342584153678503d5aa
|
[
"BSD-3-Clause"
] | 10
|
2018-02-27T19:06:07.000Z
|
2021-08-30T03:23:26.000Z
|
gitlab_runner/datadog_checks/gitlab_runner/__init__.py
|
dvanderveer/integrations-core
|
41dd9950296455457c9b7342584153678503d5aa
|
[
"BSD-3-Clause"
] | 6
|
2018-01-09T21:37:20.000Z
|
2020-05-26T09:28:09.000Z
|
from . import gitlab_runner
GitlabRunnerCheck = gitlab_runner.GitlabRunnerCheck
__version__ = "1.1.0"
__all__ = ['gitlab_runner']
| 16.625
| 51
| 0.781955
| 15
| 133
| 6.2
| 0.6
| 0.387097
| 0.623656
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025641
| 0.120301
| 133
| 7
| 52
| 19
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0.135338
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6c47d29b2e299f629e96df32c7500ac316a11277
| 154
|
py
|
Python
|
python/prac1x3.py
|
sourabh48/python
|
5fbda23133dad1ca0b73d4600b4e00cb6b5e3331
|
[
"Unlicense"
] | null | null | null |
python/prac1x3.py
|
sourabh48/python
|
5fbda23133dad1ca0b73d4600b4e00cb6b5e3331
|
[
"Unlicense"
] | null | null | null |
python/prac1x3.py
|
sourabh48/python
|
5fbda23133dad1ca0b73d4600b4e00cb6b5e3331
|
[
"Unlicense"
] | null | null | null |
a = int(input("Enter a number1: "))
b = int(input("Enter a number2: "))
temp = b
b = a
a = temp
print("Value of number1: ", a , " Value of number2: ",b)
| 25.666667
| 57
| 0.590909
| 27
| 154
| 3.37037
| 0.407407
| 0.175824
| 0.285714
| 0.307692
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033058
| 0.214286
| 154
| 6
| 57
| 25.666667
| 0.719008
| 0
| 0
| 0
| 0
| 0
| 0.458065
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.166667
| 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
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6c4a5a3956bc0a481905a429e920838971196b9f
| 397
|
py
|
Python
|
src/text_utils/adjustments/__init__.py
|
stefantaubert/text-utils
|
8fc52df37b6cbc5409695f16b7295be61107052c
|
[
"MIT"
] | null | null | null |
src/text_utils/adjustments/__init__.py
|
stefantaubert/text-utils
|
8fc52df37b6cbc5409695f16b7295be61107052c
|
[
"MIT"
] | 22
|
2020-12-19T18:54:03.000Z
|
2021-11-08T15:24:39.000Z
|
src/text_utils/adjustments/__init__.py
|
stefantaubert/text-utils
|
8fc52df37b6cbc5409695f16b7295be61107052c
|
[
"MIT"
] | null | null | null |
from text_utils.adjustments.abbreviations import (
expand_abbreviations, expand_units_of_measure,
replace_big_letter_abbreviations)
from text_utils.adjustments.emails import (replace_at_symbols,
replace_mail_addresses)
from text_utils.adjustments.numbers import normalize_numbers
from text_utils.adjustments.whitespace import collapse_whitespace
| 49.625
| 66
| 0.783375
| 44
| 397
| 6.681818
| 0.5
| 0.108844
| 0.176871
| 0.326531
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178841
| 397
| 7
| 67
| 56.714286
| 0.90184
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.571429
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6c4f53293398d881426b304d8c9495513dbc1655
| 63
|
py
|
Python
|
declare_qml/__init__.py
|
Likianta/pyml
|
b0005b36aa94958a7d3e306a9df65fea46669d18
|
[
"MIT"
] | 1
|
2021-04-11T00:32:52.000Z
|
2021-04-11T00:32:52.000Z
|
declare_qml/__init__.py
|
Likianta/pyml
|
b0005b36aa94958a7d3e306a9df65fea46669d18
|
[
"MIT"
] | null | null | null |
declare_qml/__init__.py
|
Likianta/pyml
|
b0005b36aa94958a7d3e306a9df65fea46669d18
|
[
"MIT"
] | null | null | null |
# from .application import Application
# from . import widgets
| 21
| 38
| 0.777778
| 7
| 63
| 7
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15873
| 63
| 2
| 39
| 31.5
| 0.924528
| 0.920635
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6c52a58ac4bd476c3efb22c290990c8be8c92d63
| 46
|
py
|
Python
|
capstoneproject/helpers/view_helpers/__init__.py
|
athrun22/content-rating
|
25ccdb02edd18d0118d60fce609b60baadef257b
|
[
"Apache-2.0"
] | 1
|
2018-02-08T01:50:37.000Z
|
2018-02-08T01:50:37.000Z
|
capstoneproject/helpers/view_helpers/__init__.py
|
jwillikers/content-rating
|
25ccdb02edd18d0118d60fce609b60baadef257b
|
[
"Apache-2.0"
] | null | null | null |
capstoneproject/helpers/view_helpers/__init__.py
|
jwillikers/content-rating
|
25ccdb02edd18d0118d60fce609b60baadef257b
|
[
"Apache-2.0"
] | null | null | null |
"""
Initializes the view_helpers package
"""
| 9.2
| 36
| 0.717391
| 5
| 46
| 6.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152174
| 46
| 4
| 37
| 11.5
| 0.820513
| 0.782609
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
66677b95bba1859921bb5f8aabf1cd8083170d33
| 88
|
py
|
Python
|
pyvo/tools/__init__.py
|
kernsuite-debian/pyvo
|
ee85c50c5c520ac7bede2d6f18de225c57dedc33
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null |
pyvo/tools/__init__.py
|
kernsuite-debian/pyvo
|
ee85c50c5c520ac7bede2d6f18de225c57dedc33
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null |
pyvo/tools/__init__.py
|
kernsuite-debian/pyvo
|
ee85c50c5c520ac7bede2d6f18de225c57dedc33
|
[
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from . import uws, vosi
| 29.333333
| 63
| 0.75
| 15
| 88
| 4.4
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013889
| 0.181818
| 88
| 2
| 64
| 44
| 0.902778
| 0.693182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6686aa41d431ffd95399bbf7ce4597cca9ec73ae
| 24,402
|
py
|
Python
|
venv/lib/python3.6/site-packages/ansible_collections/vyos/vyos/plugins/modules/vyos_ntp_global.py
|
usegalaxy-no/usegalaxy
|
75dad095769fe918eb39677f2c887e681a747f3a
|
[
"MIT"
] | 1
|
2020-01-22T13:11:23.000Z
|
2020-01-22T13:11:23.000Z
|
venv/lib/python3.6/site-packages/ansible_collections/vyos/vyos/plugins/modules/vyos_ntp_global.py
|
usegalaxy-no/usegalaxy
|
75dad095769fe918eb39677f2c887e681a747f3a
|
[
"MIT"
] | 12
|
2020-02-21T07:24:52.000Z
|
2020-04-14T09:54:32.000Z
|
venv/lib/python3.6/site-packages/ansible_collections/vyos/vyos/plugins/modules/vyos_ntp_global.py
|
usegalaxy-no/usegalaxy
|
75dad095769fe918eb39677f2c887e681a747f3a
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2021 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The module file for vyos_ntp_global
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = """
module: vyos_ntp_global
version_added: 2.4.0
short_description: Manages ntp modules of Vyos network devices
description:
- This module manages ntp configuration on devices running Vyos
author: Varshitha Yataluru (@YVarshitha)
notes:
- Tested against vyos 1.3
- This module works with connection C(network_cli).
options:
config:
description: List of configurations for ntp module
type: dict
suboptions:
allow_clients:
description: Network Time Protocol (NTP) server options
type: list
elements: str
listen_addresses:
description: local IP addresses for service to listen on
type: list
elements: str
servers:
description: Network Time Protocol (NTP) server
type: list
elements: dict
suboptions:
server:
description: server name for NTP
type: str
options:
description: server options for NTP
type: list
elements: str
choices:
- noselect
- dynamic
- preempt
- prefer
running_config:
description:
- This option is used only with state I(parsed).
- The value of this option should be the output received from the VYOS device by
executing the command B(show configuration commands | grep ntp).
- The states I(replaced) and I(overridden) have identical
behaviour for this module.
- The state I(parsed) reads the configuration from C(show configuration commands | grep ntp) option and
transforms it into Ansible structured data as per the resource module's argspec
and the value is then returned in the I(parsed) key within the result.
type: str
state:
description:
- The state the configuration should be left in.
type: str
choices:
- deleted
- merged
- overridden
- replaced
- gathered
- rendered
- parsed
default: merged
"""
EXAMPLES = """
# # -------------------
# # 1. Using merged
# # -------------------
# # Before state:
# # -------------
# vyos@vyos:~$ show configuration commands | grep ntp
# set system ntp server time1.vyos.net
# set system ntp server time2.vyos.net
# set system ntp server time3.vyos.net
# vyos@vyos:~$
# # Task
# # -------------
- name: Replace the existing ntp config with the new config
vyos.vyos.vyos_ntp_global:
config:
allow_clients:
- 10.6.6.0/24
listen_addresses:
- 10.1.3.1
servers:
- server: 203.0.113.0
options:
- prefer
# # Task output:
# # -------------
# "after": {
# "allow_clients": [
# "10.6.6.0/24"
# ],
# "listen_addresses": [
# "10.1.3.1"
# ],
# "servers": [
# {
# "server": "ser",
# "options": [
# "prefer"
# ]
# },
# {
# "server": "time1.vyos.net"
# },
# {
# "server": "time2.vyos.net"
# },
# {
# "server": "time3.vyos.net"
# }
# ]
# },
# "before": {
# },
# "changed": true,
# "commands": [
# "set system ntp allow-clients address 10.6.6.0/24",
# "set system ntp listen-address 10.1.3.1",
# "set system ntp server 203.0.113.0 prefer"
# ]
# After state:
# # -------------
# vyos@vyos:~$ show configuration commands | grep ntp
# set system ntp allow-clients address '10.6.6.0/24'
# set system ntp listen-address '10.1.3.1'
# set system ntp server 203.0.113.0 prefer,
# set system ntp server time1.vyos.net
# set system ntp server time2.vyos.net
# set system ntp server time3.vyos.net
# vyos@vyos:~$
# # -------------------
# # 2. Using replaced
# # -------------------
# # Before state:
# # -------------
# vyos@vyos:~$ show configuration commands | grep ntp
# set system ntp allow-clients address '10.4.9.0/24'
# set system ntp allow-clients address '10.4.7.0/24'
# set system ntp allow-clients address '10.1.2.0/24'
# set system ntp allow-clients address '10.2.3.0/24'
# set system ntp listen-address '10.1.9.16'
# set system ntp listen-address '10.5.3.2'
# set system ntp listen-address '10.7.9.21'
# set system ntp listen-address '10.8.9.4'
# set system ntp listen-address '10.4.5.1'
# set system ntp server 10.3.6.5 noselect
# set system ntp server 10.3.6.5 dynamic
# set system ntp server 10.3.6.5 preempt
# set system ntp server 10.3.6.5 prefer
# set system ntp server server4 noselect
# set system ntp server server4 dynamic
# set system ntp server server5
# set system ntp server time1.vyos.net
# set system ntp server time2.vyos.net
# set system ntp server time3.vyos.net
# vyos@vyos:~$
# # Task
# # -------------
- name: Replace the existing ntp config with the new config
vyos.vyos.vyos_ntp_global:
config:
allow_clients:
- 10.6.6.0/24
listen_addresses:
- 10.1.3.1
servers:
- server: 203.0.113.0
options:
- prefer
state: replaced
# # Task output:
# # -------------
# "after": {
# "allow_clients": [
# "10.6.6.0/24"
# ],
# "listen_addresses": [
# "10.1.3.1"
# ],
# "servers": [
# {
# "server": "ser",
# "options": [
# "prefer"
# ]
# },
# {
# "server": "time1.vyos.net"
# },
# {
# "server": "time2.vyos.net"
# },
# {
# "server": "time3.vyos.net"
# }
# ]
# },
# "before": {
# "allow_clients": [
# "10.4.7.0/24",
# "10.2.3.0/24",
# "10.1.2.0/24",
# "10.4.9.0/24"
# ],
# "listen_addresses": [
# "10.7.9.21",
# "10.4.5.1",
# "10.5.3.2",
# "10.8.9.4",
# "10.1.9.16"
# ],
# "servers": [
# {
# "server": "10.3.6.5",
# "options": [
# "noselect",
# "dynamic",
# "preempt",
# "prefer"
# ]
# },
# {
# "server": "server4",
# "options": [
# "noselect",
# "dynamic"
# ]
# },
# {
# "server": "server5"
# },
# {
# "server": "time1.vyos.net"
# },
# {
# "server": "time2.vyos.net"
# },
# {
# "server": "time3.vyos.net"
# }
# ]
# },
# "changed": true,
# "commands": [
# "delete system ntp allow-clients address 10.4.7.0/24",
# "delete system ntp allow-clients address 10.2.3.0/24",
# "delete system ntp allow-clients address 10.1.2.0/24",
# "delete system ntp allow-clients address 10.4.9.0/24",
# "delete system ntp listen-address 10.7.9.21",
# "delete system ntp listen-address 10.4.5.1",
# "delete system ntp listen-address 10.5.3.2",
# "delete system ntp listen-address 10.8.9.4",
# "delete system ntp listen-address 10.1.9.16",
# "delete system ntp server 10.3.6.5",
# "delete system ntp server server4",
# "delete system ntp server server5",
# "set system ntp allow-clients address 10.6.6.0/24",
# "set system ntp listen-address 10.1.3.1",
# "set system ntp server 203.0.113.0 prefer"
# ]
# After state:
# # -------------
# vyos@vyos:~$ show configuration commands | grep ntp
# set system ntp allow-clients address '10.6.6.0/24'
# set system ntp listen-address '10.1.3.1'
# set system ntp server 203.0.113.0 prefer,
# set system ntp server time1.vyos.net
# set system ntp server time2.vyos.net
# set system ntp server time3.vyos.net
# vyos@vyos:~$
# # -------------------
# # 3. Using overridden
# # -------------------
# # Before state:
# # -------------
# vyos@vyos:~$ show configuration commands | grep ntp
# set system ntp allow-clients address '10.6.6.0/24'
# set system ntp listen-address '10.1.3.1'
# set system ntp server 203.0.113.0 prefer,
# set system ntp server time1.vyos.net
# set system ntp server time2.vyos.net
# set system ntp server time3.vyos.net
# vyos@vyos:~$
# # Task
# # -------------
- name: Override ntp config
vyos.vyos.vyos_ntp_global:
config:
allow_clients:
- 10.3.3.0/24
listen_addresses:
- 10.7.8.1
servers:
- server: server1
options:
- dynamic
- prefer
- server: server2
options:
- noselect
- preempt
- server: serv
state: overridden
# # Task output:
# # -------------
# "after": {
# "allow_clients": [
# "10.3.3.0/24"
# ],
# "listen_addresses": [
# "10.7.8.1"
# ],
# "servers": [
# {
# "server": "serv"
# },
# {
# "server": "server1",
# "options": [
# "dynamic",
# "prefer"
# ]
# },
# {
# "server": "server2",
# "options": [
# "noselect",
# "preempt"
# ]
# },
# {
# "server": "time1.vyos.net"
# },
# {
# "server": "time2.vyos.net"
# },
# {
# "server": "time3.vyos.net"
# }
# ]
# },
# "before": {
# "allow_clients": [
# "10.6.6.0/24"
# ],
# "listen_addresses": [
# "10.1.3.1"
# ],
# "servers": [
# {
# "server": "ser",
# "options": [
# "prefer"
# ]
# },
# {
# "server": "time1.vyos.net"
# },
# {
# "server": "time2.vyos.net"
# },
# {
# "server": "time3.vyos.net"
# }
# ]
# },
# "changed": true,
# "commands": [
# "delete system ntp allow-clients address 10.6.6.0/24",
# "delete system ntp listen-address 10.1.3.1",
# "delete system ntp server ser",
# "set system ntp allow-clients address 10.3.3.0/24",
# "set system ntp listen-address 10.7.8.1",
# "set system ntp server server1 dynamic",
# "set system ntp server server1 prefer",
# "set system ntp server server2 noselect",
# "set system ntp server server2 preempt",
# "set system ntp server serv"
# ]
# After state:
# # -------------
# vyos@vyos:~$ show configuration commands | grep ntp
# set system ntp allow-clients address '10.3.3.0/24'
# set system ntp listen-address '10.7.8.1'
# set system ntp server serv
# set system ntp server server1 dynamic
# set system ntp server server1 prefer
# set system ntp server server2 noselect
# set system ntp server server2 preempt
# set system ntp server time1.vyos.net
# set system ntp server time2.vyos.net
# set system ntp server time3.vyos.net
# vyos@vyos:~$
# # -------------------
# # 4. Using gathered
# # -------------------
# # Before state:
# # -------------
# vyos@vyos:~$ show configuration commands | grep ntp
# set system ntp allow-clients address '10.3.3.0/24'
# set system ntp listen-address '10.7.8.1'
# set system ntp server serv
# set system ntp server server1 dynamic
# set system ntp server server1 prefer
# set system ntp server server2 noselect
# set system ntp server server2 preempt
# set system ntp server time1.vyos.net
# set system ntp server time2.vyos.net
# set system ntp server time3.vyos.net
# vyos@vyos:~$
# # Task
# # -------------
- name: Gather ntp config
vyos.vyos.vyos_ntp_global:
state: gathered
# # Task output:
# # -------------
# "gathered": {
# "allow_clients": [
# "10.3.3.0/24"
# ],
# "listen_addresses": [
# "10.7.8.1"
# ],
# "servers": [
# {
# "server": "serv"
# },
# {
# "server": "server1",
# "options": [
# "dynamic",
# "prefer"
# ]
# },
# {
# "server": "server2",
# "options": [
# "noselect",
# "preempt"
# ]
# },
# {
# "server": "time1.vyos.net"
# },
# {
# "server": "time2.vyos.net"
# },
# {
# "server": "time3.vyos.net"
# }
# ]
# }
# After state:
# # -------------
# vyos@vyos:~$ show configuration commands | grep ntp
# set system ntp allow-clients address '10.3.3.0/24'
# set system ntp listen-address '10.7.8.1'
# set system ntp server serv
# set system ntp server server1 dynamic
# set system ntp server server1 prefer
# set system ntp server server2 noselect
# set system ntp server server2 preempt
# set system ntp server time1.vyos.net
# set system ntp server time2.vyos.net
# set system ntp server time3.vyos.net
# vyos@vyos:~$
# # -------------------
# # 5. Using deleted
# # -------------------
# # Before state:
# # -------------
# vyos@vyos:~$ show configuration commands | grep ntp
# set system ntp allow-clients address '10.3.3.0/24'
# set system ntp listen-address '10.7.8.1'
# set system ntp server serv
# set system ntp server server1 dynamic
# set system ntp server server1 prefer
# set system ntp server server2 noselect
# set system ntp server server2 preempt
# set system ntp server time1.vyos.net
# set system ntp server time2.vyos.net
# set system ntp server time3.vyos.net
# vyos@vyos:~$
# # Task
# # -------------
- name: Delete ntp config
vyos.vyos.vyos_ntp_global:
state: deleted
# # Task output:
# # -------------
# "after": {
# "servers": [
# {
# "server": "time1.vyos.net"
# },
# {
# "server": "time2.vyos.net"
# },
# {
# "server": "time3.vyos.net"
# }
# ]
# },
# "before": {
# "allow_clients": [
# "10.3.3.0/24"
# ],
# "listen_addresses": [
# "10.7.8.1"
# ],
# "servers": [
# {
# "server": "serv"
# },
# {
# "server": "server1",
# "options": [
# "dynamic",
# "prefer"
# ]
# },
# {
# "server": "server2",
# "options": [
# "noselect",
# "preempt"
# ]
# },
# {
# "server": "time1.vyos.net"
# },
# {
# "server": "time2.vyos.net"
# },
# {
# "server": "time3.vyos.net"
# }
# ]
# },
# "changed": true,
# "commands": [
# "delete system ntp allow-clients",
# "delete system ntp listen-address",
# "delete system ntp server serv",
# "delete system ntp server server1",
# "delete system ntp server server2"
#
# ]
# After state:
# # -------------
# vyos@vyos:~$ show configuration commands | grep ntp
# set system ntp server time1.vyos.net
# set system ntp server time2.vyos.net
# set system ntp server time3.vyos.net
# vyos@vyos:~$
# # -------------------
# # 6. Using rendered
# # -------------------
# # Before state:
# # -------------
# vyos@vyos:~$ show configuration commands | grep ntp
# set system ntp server time1.vyos.net
# set system ntp server time2.vyos.net
# set system ntp server time3.vyos.net
# vyos@vyos:~$
# # Task
# # -------------
- name: Gather ntp config
vyos.vyos.vyos_ntp_global:
config:
allow_clients:
- 10.7.7.0/24
- 10.8.8.0/24
listen_addresses:
- 10.7.9.1
servers:
- server: server7
- server: server45
options:
- noselect
- prefer
- server: time1.vyos.net
- server: time2.vyos.net
- server: time3.vyos.net
state: rendered
# # Task output:
# # -------------
# "rendered": [
# "set system ntp allow-clients address 10.7.7.0/24",
# "set system ntp allow-clients address 10.8.8.0/24",
# "set system ntp listen-address 10.7.9.1",
# "set system ntp server server7",
# "set system ntp server server45 noselect",
# "set system ntp server server45 prefer",
# "set system ntp server time1.vyos.net",
# "set system ntp server time2.vyos.net",
# "set system ntp server time3.vyos.net"
# ]
# # -------------------
# # 7. Using parsed
# # -------------------
# # sample_config.cfg:
# # -------------
# "set system ntp allow-clients address 10.7.7.0/24",
# "set system ntp listen-address 10.7.9.1",
# "set system ntp server server45 noselect",
# "set system ntp allow-clients addres 10.8.6.0/24",
# "set system ntp listen-address 10.5.4.1",
# "set system ntp server server45 dynamic",
# "set system ntp server time1.vyos.net",
# "set system ntp server time2.vyos.net",
# "set system ntp server time3.vyos.net"
# # Task:
# # -------------
- name: Parse externally provided ntp configuration
vyos.vyos.vyos_ntp_global:
running_config: "{{ lookup('file', './sample_config.cfg') }}"
state: parsed
# # Task output:
# # -------------
# parsed = {
# "allow_clients": [
# "10.7.7.0/24",
# "10.8.6.0/24
# ],
# "listen_addresses": [
# "10.5.4.1",
# "10.7.9.1"
# ],
# "servers": [
# {
# "server": "server45",
# "options": [
# "noselect",
# "dynamic"
#
# ]
# },
# {
# "server": "time1.vyos.net"
# },
# {
# "server": "time2.vyos.net"
# },
# {
# "server": "time3.vyos.net"
# }
#
# ]
# }
"""
RETURN = """
before:
description: The configuration prior to the module execution.
returned: when I(state) is C(merged), C(replaced), C(overridden), C(deleted) or C(purged)
type: dict
sample: >
This output will always be in the same format as the
module argspec.
after:
description: The resulting configuration after module execution.
returned: when changed
type: dict
sample: >
This output will always be in the same format as the
module argspec.
commands:
description: The set of commands pushed to the remote device.
returned: when I(state) is C(merged), C(replaced), C(overridden), C(deleted) or C(purged)
type: list
sample:
- set system ntp server server1 dynamic
- set system ntp server server1 prefer
- set system ntp server server2 noselect
- set system ntp server server2 preempt
- set system ntp server server_add preempt
rendered:
description: The provided configuration in the task rendered in device-native format (offline).
returned: when I(state) is C(rendered)
type: list
sample:
- set system ntp server server1 dynamic
- set system ntp server server1 prefer
- set system ntp server server2 noselect
- set system ntp server server2 preempt
- set system ntp server server_add preempt
gathered:
description: Facts about the network resource gathered from the remote device as structured data.
returned: when I(state) is C(gathered)
type: list
sample: >
This output will always be in the same format as the
module argspec.
parsed:
description: The device native config provided in I(running_config) option parsed into structured data as per module argspec.
returned: when I(state) is C(parsed)
type: list
sample: >
This output will always be in the same format as the
module argspec.
"""
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.argspec.ntp_global.ntp_global import (
Ntp_globalArgs,
)
from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.config.ntp_global.ntp_global import (
Ntp_global,
)
def main():
"""
Main entry point for module execution
:returns: the result form module invocation
"""
module = AnsibleModule(
argument_spec=Ntp_globalArgs.argument_spec,
mutually_exclusive=[["config", "running_config"]],
required_if=[
["state", "merged", ["config"]],
["state", "replaced", ["config"]],
["state", "overridden", ["config"]],
["state", "rendered", ["config"]],
["state", "parsed", ["running_config"]],
],
supports_check_mode=True,
)
result = Ntp_global(module).execute_module()
module.exit_json(**result)
if __name__ == "__main__":
main()
| 30.01476
| 127
| 0.455782
| 2,444
| 24,402
| 4.511866
| 0.096154
| 0.119978
| 0.138206
| 0.148544
| 0.725945
| 0.700009
| 0.671534
| 0.660833
| 0.622472
| 0.605514
| 0
| 0.050343
| 0.409024
| 24,402
| 812
| 128
| 30.051724
| 0.714306
| 0.011106
| 0
| 0.747268
| 0
| 0.005464
| 0.961494
| 0.008465
| 0
| 0
| 0
| 0
| 0
| 1
| 0.001366
| false
| 0
| 0.005464
| 0
| 0.006831
| 0.001366
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
668e18eda2ea18a041281003420fe51ecc873720
| 18
|
py
|
Python
|
lightroom_export_organizer/version.py
|
aagnone3/lightroom-export-organizer
|
9d8da754c6048b585153b3a0b8e23b8ad3f486e1
|
[
"Apache-2.0"
] | null | null | null |
lightroom_export_organizer/version.py
|
aagnone3/lightroom-export-organizer
|
9d8da754c6048b585153b3a0b8e23b8ad3f486e1
|
[
"Apache-2.0"
] | null | null | null |
lightroom_export_organizer/version.py
|
aagnone3/lightroom-export-organizer
|
9d8da754c6048b585153b3a0b8e23b8ad3f486e1
|
[
"Apache-2.0"
] | null | null | null |
__version__ = 0.12
| 18
| 18
| 0.777778
| 3
| 18
| 3.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 0.111111
| 18
| 1
| 18
| 18
| 0.4375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
66a3c8cc63364cb14cd95bc472a1e20c6401beb6
| 122
|
py
|
Python
|
hooks/post_gen_project.py
|
awiddersheim/cookiecutter-pypackage
|
28cf9ea889a01f0d7e4aa2c7bb872afde868b019
|
[
"MIT"
] | 1
|
2018-08-05T18:58:07.000Z
|
2018-08-05T18:58:07.000Z
|
hooks/post_gen_project.py
|
awiddersheim/cookiecutter-pypackage
|
28cf9ea889a01f0d7e4aa2c7bb872afde868b019
|
[
"MIT"
] | null | null | null |
hooks/post_gen_project.py
|
awiddersheim/cookiecutter-pypackage
|
28cf9ea889a01f0d7e4aa2c7bb872afde868b019
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
import subprocess
if __name__ == '__main__':
subprocess.check_output('git init', shell=True)
| 15.25
| 51
| 0.713115
| 16
| 122
| 4.875
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147541
| 122
| 7
| 52
| 17.428571
| 0.75
| 0.163934
| 0
| 0
| 0
| 0
| 0.158416
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
66abadfc782610ed05a5fa11ef93b65f7248400a
| 128
|
py
|
Python
|
HackerRank Solutions/Tutorials/30 Days of Code/Day 9 Recursion.py
|
UtkarshPathrabe/Competitive-Coding
|
ba322fbb1b88682d56a9b80bdd92a853f1caa84e
|
[
"MIT"
] | 13
|
2021-09-02T07:30:02.000Z
|
2022-03-22T19:32:03.000Z
|
HackerRank Solutions/Tutorials/30 Days of Code/Day 9 Recursion.py
|
UtkarshPathrabe/Competitive-Coding
|
ba322fbb1b88682d56a9b80bdd92a853f1caa84e
|
[
"MIT"
] | null | null | null |
HackerRank Solutions/Tutorials/30 Days of Code/Day 9 Recursion.py
|
UtkarshPathrabe/Competitive-Coding
|
ba322fbb1b88682d56a9b80bdd92a853f1caa84e
|
[
"MIT"
] | 3
|
2021-08-24T16:06:22.000Z
|
2021-09-17T15:39:53.000Z
|
def factorial(N):
if N <= 1:
return 1
else:
return N * factorial(N-1)
print factorial(int(raw_input()))
| 18.285714
| 33
| 0.5625
| 19
| 128
| 3.736842
| 0.578947
| 0.28169
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033708
| 0.304688
| 128
| 7
| 34
| 18.285714
| 0.764045
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.166667
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
66d86080c19e2ad76d15af5b3d1c18428c10741f
| 141
|
py
|
Python
|
foundation/letters/utils.py
|
pilnujemy/foundation-manager
|
1f1d6afcbb408c87a171bcbe3f9e58570eb478b6
|
[
"BSD-3-Clause"
] | 1
|
2016-01-04T06:30:24.000Z
|
2016-01-04T06:30:24.000Z
|
foundation/letters/utils.py
|
pilnujemy/foundation-manager
|
1f1d6afcbb408c87a171bcbe3f9e58570eb478b6
|
[
"BSD-3-Clause"
] | 36
|
2015-11-27T14:17:34.000Z
|
2016-07-14T10:23:52.000Z
|
foundation/letters/utils.py
|
pilnujemy/foundation-manager
|
1f1d6afcbb408c87a171bcbe3f9e58570eb478b6
|
[
"BSD-3-Clause"
] | 1
|
2016-05-14T01:11:28.000Z
|
2016-05-14T01:11:28.000Z
|
def can_send(user, case):
return user.is_superuser or user == case.created_by
def nl2br(text):
return text.replace("\n", "\n<br>")
| 20.142857
| 55
| 0.666667
| 23
| 141
| 3.956522
| 0.695652
| 0.175824
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008547
| 0.170213
| 141
| 6
| 56
| 23.5
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0.056738
| 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
| 0
| 0
|
0
| 4
|
66e3eafceb97681e392104c45b20b87612f67c04
| 128
|
py
|
Python
|
app/eduquate/settings/third_party/crispy.py
|
sashis/eduquate
|
9157d59d428e8bbd272d14f8b09c07c957dacdb7
|
[
"MIT"
] | null | null | null |
app/eduquate/settings/third_party/crispy.py
|
sashis/eduquate
|
9157d59d428e8bbd272d14f8b09c07c957dacdb7
|
[
"MIT"
] | null | null | null |
app/eduquate/settings/third_party/crispy.py
|
sashis/eduquate
|
9157d59d428e8bbd272d14f8b09c07c957dacdb7
|
[
"MIT"
] | null | null | null |
from eduquate.settings.django import INSTALLED_APPS
INSTALLED_APPS.append('crispy_forms')
CRISPY_TEMPLATE_PACK = 'bootstrap4'
| 21.333333
| 51
| 0.84375
| 16
| 128
| 6.4375
| 0.8125
| 0.252427
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008475
| 0.078125
| 128
| 5
| 52
| 25.6
| 0.864407
| 0
| 0
| 0
| 0
| 0
| 0.171875
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
66f131b23d148175046a9910553fbf2c965de7a2
| 178
|
py
|
Python
|
vaurien/tests/test_util.py
|
mozilla-libs/vaurien
|
dd53074fc3a01cf554c8f628423b5623f8d6e45d
|
[
"Apache-2.0"
] | 131
|
2015-01-04T06:11:22.000Z
|
2017-12-01T14:39:26.000Z
|
vaurien/tests/test_util.py
|
leandromoreira/vaurien
|
5e734a4280280e2763d0fca3ab3fef9c70484dc0
|
[
"Apache-2.0"
] | 13
|
2015-01-29T02:10:33.000Z
|
2017-07-31T17:34:11.000Z
|
vaurien/tests/test_util.py
|
leandromoreira/vaurien
|
5e734a4280280e2763d0fca3ab3fef9c70484dc0
|
[
"Apache-2.0"
] | 18
|
2015-02-02T13:09:18.000Z
|
2017-07-07T09:04:37.000Z
|
import unittest
from vaurien.util import chunked
class TestUtil(unittest.TestCase):
def test_chunked(self):
self.assertEqual(sum(list(chunked(7634, 2049))), 7634)
| 19.777778
| 62
| 0.735955
| 23
| 178
| 5.652174
| 0.73913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 0.157303
| 178
| 8
| 63
| 22.25
| 0.786667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
dd2d72880431cd8804a77dc979891ff398496953
| 624
|
py
|
Python
|
torch/jit/_ir_utils.py
|
ljhOfGithub/pytorch
|
c568f7b16f2a98d72ff5b7c6c6161b67b2c27514
|
[
"Intel"
] | 2
|
2020-03-13T06:57:49.000Z
|
2020-05-17T04:18:14.000Z
|
torch/jit/_ir_utils.py
|
ellhe-blaster/pytorch
|
e5282c3cb8bf6ad8c5161f9d0cc271edb9abed25
|
[
"Intel"
] | 1
|
2019-07-23T15:23:32.000Z
|
2019-07-23T15:32:23.000Z
|
torch/jit/_ir_utils.py
|
ellhe-blaster/pytorch
|
e5282c3cb8bf6ad8c5161f9d0cc271edb9abed25
|
[
"Intel"
] | 2
|
2019-07-23T14:37:31.000Z
|
2019-07-23T14:47:13.000Z
|
import torch
from typing import Union
class _InsertPoint(object):
def __init__(self, insert_point_graph: torch._C.Graph, insert_point: Union[torch._C.Node, torch._C.Block]):
self.insert_point = insert_point
self.g = insert_point_graph
self.guard = None
def __enter__(self):
self.prev_insert_point = self.g.insertPoint()
self.g.setInsertPoint(self.insert_point)
def __exit__(self, *args):
self.g.setInsertPoint(self.prev_insert_point)
def insert_point_guard(self, insert_point: Union[torch._C.Node, torch._C.Block]):
return _InsertPoint(self, insert_point)
| 32.842105
| 111
| 0.721154
| 86
| 624
| 4.825581
| 0.302326
| 0.291566
| 0.180723
| 0.101205
| 0.178313
| 0.178313
| 0.178313
| 0.178313
| 0.178313
| 0
| 0
| 0
| 0.176282
| 624
| 18
| 112
| 34.666667
| 0.807393
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.142857
| 0.071429
| 0.571429
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
dd971dbf85ee4f0045c75a6891f82588ce1d7ef9
| 247
|
py
|
Python
|
code/Telescope_SR/telescope_spectral_response.py
|
claudiavr/AIS
|
5a9b9db8377efbfba3e8bfc8bf126845ef6e9aea
|
[
"MIT"
] | null | null | null |
code/Telescope_SR/telescope_spectral_response.py
|
claudiavr/AIS
|
5a9b9db8377efbfba3e8bfc8bf126845ef6e9aea
|
[
"MIT"
] | null | null | null |
code/Telescope_SR/telescope_spectral_response.py
|
claudiavr/AIS
|
5a9b9db8377efbfba3e8bfc8bf126845ef6e9aea
|
[
"MIT"
] | null | null | null |
"""
Telescope Spectral Response Class
===================================
This class calculates the output flux of an astronomical object as a funtion
of the 1.6 m Perkin-Elmer spectral response.
"""
class Telescope_Spectral_Response:
pass
| 20.583333
| 76
| 0.668016
| 31
| 247
| 5.258065
| 0.709677
| 0.294479
| 0.306748
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009524
| 0.149798
| 247
| 11
| 77
| 22.454545
| 0.766667
| 0.777328
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
dd972bef0eb8c7c30f43a821a47eed54eed66bf1
| 222
|
py
|
Python
|
mods/mcpython/Item/iron_block.py
|
uuk0/mcpython-a-minecraft-clone-in-python
|
c16cd66f319efdeec4130e1a43f5a857caf1ea13
|
[
"MIT"
] | 2
|
2020-04-23T16:25:51.000Z
|
2020-08-27T17:56:16.000Z
|
mods/mcpython/Item/iron_block.py
|
uuk0/mcpython-a-minecraft-clone-in-python
|
c16cd66f319efdeec4130e1a43f5a857caf1ea13
|
[
"MIT"
] | null | null | null |
mods/mcpython/Item/iron_block.py
|
uuk0/mcpython-a-minecraft-clone-in-python
|
c16cd66f319efdeec4130e1a43f5a857caf1ea13
|
[
"MIT"
] | null | null | null |
from .Item import *
class IronBlock(Item):
def getName(self):
return "minecraft:iron_block"
def getTexturFile(self):
return "./assets/textures/items/iron_block.png"
handler.register(IronBlock)
| 17.076923
| 55
| 0.689189
| 26
| 222
| 5.807692
| 0.730769
| 0.13245
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.198198
| 222
| 12
| 56
| 18.5
| 0.848315
| 0
| 0
| 0
| 0
| 0
| 0.261261
| 0.171171
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.142857
| 0.285714
| 0.857143
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
06c653212f2d23679d3b4ad413038142ffa67ff0
| 114
|
py
|
Python
|
code/answer_5-6-2.py
|
KoyanagiHitoshi/AtCoder-Python-Introduction
|
6d014e333a873f545b4d32d438e57cf428b10b96
|
[
"MIT"
] | 1
|
2022-03-29T13:50:12.000Z
|
2022-03-29T13:50:12.000Z
|
code/answer_5-6-2.py
|
KoyanagiHitoshi/AtCoder-Python-Introduction
|
6d014e333a873f545b4d32d438e57cf428b10b96
|
[
"MIT"
] | null | null | null |
code/answer_5-6-2.py
|
KoyanagiHitoshi/AtCoder-Python-Introduction
|
6d014e333a873f545b4d32d438e57cf428b10b96
|
[
"MIT"
] | null | null | null |
a, b, c, d = map(int, input().split())
print("Yes" if abs(c-a) <= d or abs(b-a) <= d and abs(c-b) <= d else "No")
| 38
| 74
| 0.517544
| 27
| 114
| 2.185185
| 0.592593
| 0.135593
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.192982
| 114
| 2
| 75
| 57
| 0.641304
| 0
| 0
| 0
| 0
| 0
| 0.04386
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
06c6574e91eb76880e73445ef8a78f48f3d403f1
| 124
|
py
|
Python
|
_old_/source/_chapters/src/toPDF.py
|
JorgeDeLosSantos/ppi
|
8737e08c2a029ec8411fa0a9a29597c88f7d8297
|
[
"MIT"
] | null | null | null |
_old_/source/_chapters/src/toPDF.py
|
JorgeDeLosSantos/ppi
|
8737e08c2a029ec8411fa0a9a29597c88f7d8297
|
[
"MIT"
] | null | null | null |
_old_/source/_chapters/src/toPDF.py
|
JorgeDeLosSantos/ppi
|
8737e08c2a029ec8411fa0a9a29597c88f7d8297
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import os
os.system('rst2pdf P4E.rst -b1 -s style.txt')
os.startfile('P4E.pdf')
#os.system('pause')
| 20.666667
| 45
| 0.645161
| 21
| 124
| 3.809524
| 0.761905
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045455
| 0.112903
| 124
| 6
| 46
| 20.666667
| 0.681818
| 0.314516
| 0
| 0
| 0
| 0
| 0.46988
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
06cca3f47a1ede457d21695a5c0f2f72656efb64
| 67
|
py
|
Python
|
tests/suites/suite_2_skip/tests/test_foo.py
|
jayvdb/hammett
|
cb0682e47b689aa02a58b947dff8e882c1018c12
|
[
"BSD-3-Clause"
] | 49
|
2020-04-08T15:10:34.000Z
|
2022-02-24T03:04:20.000Z
|
tests/suites/suite_2_skip/tests/test_foo.py
|
jayvdb/hammett
|
cb0682e47b689aa02a58b947dff8e882c1018c12
|
[
"BSD-3-Clause"
] | 14
|
2020-05-19T21:51:26.000Z
|
2022-02-24T08:36:48.000Z
|
tests/suites/suite_2_skip/tests/test_foo.py
|
jayvdb/hammett
|
cb0682e47b689aa02a58b947dff8e882c1018c12
|
[
"BSD-3-Clause"
] | 8
|
2020-05-20T08:02:02.000Z
|
2022-02-25T12:37:41.000Z
|
import pytest
@pytest.mark.skip
def test_foo():
assert False
| 9.571429
| 17
| 0.716418
| 10
| 67
| 4.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.19403
| 67
| 6
| 18
| 11.166667
| 0.87037
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0.25
| true
| 0
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
06edffaa1f6f7690172169a3f8522121b51fa329
| 11,042
|
py
|
Python
|
sdk/python/pulumi_f5bigip/command.py
|
pulumi/pulumi-f5bigip
|
4bce074f8bd7cb42f359ef4814ca5b437230fd1c
|
[
"ECL-2.0",
"Apache-2.0"
] | 4
|
2018-12-21T23:30:33.000Z
|
2021-10-12T16:38:27.000Z
|
sdk/python/pulumi_f5bigip/command.py
|
pulumi/pulumi-f5bigip
|
4bce074f8bd7cb42f359ef4814ca5b437230fd1c
|
[
"ECL-2.0",
"Apache-2.0"
] | 61
|
2019-01-09T01:50:19.000Z
|
2022-03-31T15:27:17.000Z
|
sdk/python/pulumi_f5bigip/command.py
|
pulumi/pulumi-f5bigip
|
4bce074f8bd7cb42f359ef4814ca5b437230fd1c
|
[
"ECL-2.0",
"Apache-2.0"
] | 1
|
2019-10-05T10:36:30.000Z
|
2019-10-05T10:36:30.000Z
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
__all__ = ['CommandArgs', 'Command']
@pulumi.input_type
class CommandArgs:
def __init__(__self__, *,
commands: pulumi.Input[Sequence[pulumi.Input[str]]],
command_results: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
when: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a Command resource.
:param pulumi.Input[Sequence[pulumi.Input[str]]] commands: The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to `command_result`
:param pulumi.Input[Sequence[pulumi.Input[str]]] command_results: The resulting output from the `commands` executed
"""
pulumi.set(__self__, "commands", commands)
if command_results is not None:
pulumi.set(__self__, "command_results", command_results)
if when is not None:
pulumi.set(__self__, "when", when)
@property
@pulumi.getter
def commands(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
"""
The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to `command_result`
"""
return pulumi.get(self, "commands")
@commands.setter
def commands(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]):
pulumi.set(self, "commands", value)
@property
@pulumi.getter(name="commandResults")
def command_results(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
The resulting output from the `commands` executed
"""
return pulumi.get(self, "command_results")
@command_results.setter
def command_results(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "command_results", value)
@property
@pulumi.getter
def when(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "when")
@when.setter
def when(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "when", value)
@pulumi.input_type
class _CommandState:
def __init__(__self__, *,
command_results: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
commands: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
when: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering Command resources.
:param pulumi.Input[Sequence[pulumi.Input[str]]] command_results: The resulting output from the `commands` executed
:param pulumi.Input[Sequence[pulumi.Input[str]]] commands: The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to `command_result`
"""
if command_results is not None:
pulumi.set(__self__, "command_results", command_results)
if commands is not None:
pulumi.set(__self__, "commands", commands)
if when is not None:
pulumi.set(__self__, "when", when)
@property
@pulumi.getter(name="commandResults")
def command_results(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
The resulting output from the `commands` executed
"""
return pulumi.get(self, "command_results")
@command_results.setter
def command_results(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "command_results", value)
@property
@pulumi.getter
def commands(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to `command_result`
"""
return pulumi.get(self, "commands")
@commands.setter
def commands(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "commands", value)
@property
@pulumi.getter
def when(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "when")
@when.setter
def when(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "when", value)
class Command(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
command_results: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
commands: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
when: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
`Command` Run TMSH commands on F5 devices
This resource is helpful to send TMSH command to an BIG-IP node and returns the results read from the device
## Example Usage
```python
import pulumi
import pulumi_f5bigip as f5bigip
#create ltm node
test_command = f5bigip.Command("test-command",
commands=["delete ltm node 10.10.10.70"],
when="destroy")
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[Sequence[pulumi.Input[str]]] command_results: The resulting output from the `commands` executed
:param pulumi.Input[Sequence[pulumi.Input[str]]] commands: The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to `command_result`
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: CommandArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
`Command` Run TMSH commands on F5 devices
This resource is helpful to send TMSH command to an BIG-IP node and returns the results read from the device
## Example Usage
```python
import pulumi
import pulumi_f5bigip as f5bigip
#create ltm node
test_command = f5bigip.Command("test-command",
commands=["delete ltm node 10.10.10.70"],
when="destroy")
```
:param str resource_name: The name of the resource.
:param CommandArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(CommandArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
command_results: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
commands: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
when: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = CommandArgs.__new__(CommandArgs)
__props__.__dict__["command_results"] = command_results
if commands is None and not opts.urn:
raise TypeError("Missing required property 'commands'")
__props__.__dict__["commands"] = commands
__props__.__dict__["when"] = when
super(Command, __self__).__init__(
'f5bigip:index/command:Command',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
command_results: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
commands: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
when: Optional[pulumi.Input[str]] = None) -> 'Command':
"""
Get an existing Command resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[Sequence[pulumi.Input[str]]] command_results: The resulting output from the `commands` executed
:param pulumi.Input[Sequence[pulumi.Input[str]]] commands: The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to `command_result`
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _CommandState.__new__(_CommandState)
__props__.__dict__["command_results"] = command_results
__props__.__dict__["commands"] = commands
__props__.__dict__["when"] = when
return Command(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="commandResults")
def command_results(self) -> pulumi.Output[Sequence[str]]:
"""
The resulting output from the `commands` executed
"""
return pulumi.get(self, "command_results")
@property
@pulumi.getter
def commands(self) -> pulumi.Output[Sequence[str]]:
"""
The commands to send to the remote BIG-IP device over the configured provider. The resulting output from the command is returned and added to `command_result`
"""
return pulumi.get(self, "commands")
@property
@pulumi.getter
def when(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "when")
| 43.132813
| 225
| 0.650335
| 1,305
| 11,042
| 5.304215
| 0.121073
| 0.103294
| 0.074834
| 0.093904
| 0.768997
| 0.757585
| 0.722479
| 0.695753
| 0.670327
| 0.660069
| 0
| 0.003134
| 0.248687
| 11,042
| 255
| 226
| 43.301961
| 0.831244
| 0.330013
| 0
| 0.648276
| 1
| 0
| 0.077721
| 0.004237
| 0
| 0
| 0
| 0
| 0
| 1
| 0.151724
| false
| 0.006897
| 0.034483
| 0.02069
| 0.275862
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
06f16e772cdc821c664e188319f89c6249643b0b
| 2,919
|
py
|
Python
|
src/tools/ecos/cvxpy/cvxpy/atoms/__init__.py
|
riadnassiffe/Simulator
|
7d9ff09f26367d3714e3d10be3dd4a9817b8ed6b
|
[
"MIT"
] | null | null | null |
src/tools/ecos/cvxpy/cvxpy/atoms/__init__.py
|
riadnassiffe/Simulator
|
7d9ff09f26367d3714e3d10be3dd4a9817b8ed6b
|
[
"MIT"
] | 11
|
2020-06-05T17:21:59.000Z
|
2021-03-22T23:20:32.000Z
|
src/tools/ecos/cvxpy/cvxpy/atoms/__init__.py
|
riadnassiffe/Simulator
|
7d9ff09f26367d3714e3d10be3dd4a9817b8ed6b
|
[
"MIT"
] | null | null | null |
"""
Copyright 2013 Steven Diamond
This file is part of CVXPY.
CVXPY is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
CVXPY is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with CVXPY. If not, see <http://www.gnu.org/licenses/>.
"""
from cvxpy.atoms.kl_div import kl_div
from cvxpy.atoms.lambda_max import lambda_max
from cvxpy.atoms.lambda_min import lambda_min
from cvxpy.atoms.lambda_sum_largest import lambda_sum_largest
from cvxpy.atoms.lambda_sum_smallest import lambda_sum_smallest
from cvxpy.atoms.log_det import log_det
from cvxpy.atoms.log_sum_exp import log_sum_exp
from cvxpy.atoms.matrix_frac import matrix_frac
from cvxpy.atoms.max_entries import max_entries
from cvxpy.atoms.min_entries import min_entries
from cvxpy.atoms.norm import norm
from cvxpy.atoms.norm1 import norm1
from cvxpy.atoms.norm2 import norm2
from cvxpy.atoms.norm_inf import normInf
from cvxpy.atoms.norm_nuc import normNuc
from cvxpy.atoms.mixed_norm import mixed_norm
from cvxpy.atoms.quad_form import quad_form
from cvxpy.atoms.quad_over_lin import quad_over_lin
from cvxpy.atoms.sigma_max import sigma_max
from cvxpy.atoms.sum_largest import sum_largest
from cvxpy.atoms.sum_smallest import sum_smallest
from cvxpy.atoms.sum_squares import sum_squares
from cvxpy.atoms.total_variation import tv
from cvxpy.atoms.affine.conv import conv
from cvxpy.atoms.affine.diag import diag
from cvxpy.atoms.affine.hstack import hstack
from cvxpy.atoms.affine.mul_elemwise import mul_elemwise
from cvxpy.atoms.affine.reshape import reshape
from cvxpy.atoms.affine.sum_entries import sum_entries
from cvxpy.atoms.affine.trace import trace
from cvxpy.atoms.affine.upper_tri import upper_tri
from cvxpy.atoms.affine.vec import vec
from cvxpy.atoms.affine.vstack import vstack
from cvxpy.atoms.elementwise.abs import abs
from cvxpy.atoms.elementwise.entr import entr
from cvxpy.atoms.elementwise.exp import exp
from cvxpy.atoms.elementwise.geo_mean import geo_mean
from cvxpy.atoms.elementwise.huber import huber
from cvxpy.atoms.elementwise.inv_pos import inv_pos
from cvxpy.atoms.elementwise.log import log
from cvxpy.atoms.elementwise.log1p import log1p
from cvxpy.atoms.elementwise.max_elemwise import max_elemwise
from cvxpy.atoms.elementwise.min_elemwise import min_elemwise
from cvxpy.atoms.elementwise.neg import neg
from cvxpy.atoms.elementwise.pos import pos
from cvxpy.atoms.elementwise.scalene import scalene
from cvxpy.atoms.elementwise.sqrt import sqrt
from cvxpy.atoms.elementwise.square import square
| 40.541667
| 68
| 0.841727
| 483
| 2,919
| 4.964803
| 0.269151
| 0.18015
| 0.280234
| 0.15638
| 0.139283
| 0.023353
| 0
| 0
| 0
| 0
| 0
| 0.004218
| 0.106543
| 2,919
| 71
| 69
| 41.112676
| 0.915261
| 0.222679
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
663664370899c208d298680a5a4a9da3c22c5459
| 100
|
py
|
Python
|
fortune_cookie/pool/admin.py
|
jrsinel/exam2-fortune-cookie
|
171909bdf0afb28e6be547612e0113ae4f629d15
|
[
"MIT"
] | null | null | null |
fortune_cookie/pool/admin.py
|
jrsinel/exam2-fortune-cookie
|
171909bdf0afb28e6be547612e0113ae4f629d15
|
[
"MIT"
] | null | null | null |
fortune_cookie/pool/admin.py
|
jrsinel/exam2-fortune-cookie
|
171909bdf0afb28e6be547612e0113ae4f629d15
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import SeedFortune
admin.site.register(SeedFortune)
| 16.666667
| 32
| 0.83
| 13
| 100
| 6.384615
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11
| 100
| 5
| 33
| 20
| 0.932584
| 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
| 0
| 0
|
0
| 4
|
664758d4b8984b8c088fc83c61d53a5e0dfaef08
| 4,110
|
py
|
Python
|
generated/python/gapic-google-cloud-logging-v2-docs/google/api/monitored_resource_pb2.py
|
landrito/api-client-staging
|
140c312c9335af160efce5b37842c995308e0148
|
[
"BSD-3-Clause"
] | 18
|
2016-12-08T20:47:57.000Z
|
2022-01-29T19:36:04.000Z
|
generated/python/gapic-google-cloud-logging-v2-docs/google/api/monitored_resource_pb2.py
|
landrito/api-client-staging
|
140c312c9335af160efce5b37842c995308e0148
|
[
"BSD-3-Clause"
] | 252
|
2016-09-21T20:51:36.000Z
|
2021-03-25T23:02:36.000Z
|
generated/python/gapic-google-cloud-logging-v2-docs/google/api/monitored_resource_pb2.py
|
landrito/api-client-staging
|
140c312c9335af160efce5b37842c995308e0148
|
[
"BSD-3-Clause"
] | 37
|
2016-09-19T21:13:16.000Z
|
2022-01-29T19:36:07.000Z
|
# Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from google.api import label_pb2
class MonitoredResourceDescriptor(object):
"""
An object that describes the schema of a ``MonitoredResource`` object using a
type name and a set of labels. For example, the monitored resource
descriptor for Google Compute Engine VM instances has a type of
``\"gce_instance\"`` and specifies the use of the labels ``\"instance_id\"`` and
``\"zone\"`` to identify particular VM instances.
Different APIs can support different monitored resource types. APIs generally
provide a ``list`` method that returns the monitored resource descriptors used
by the API.
Attributes:
name (string): Optional. The resource name of the monitored resource descriptor:
``\"projects/{project_id}/monitoredResourceDescriptors/{type}\"`` where
{type} is the value of the ``type`` field in this object and
{project_id} is a project ID that provides API-specific context for
accessing the type. APIs that do not use project information can use the
resource name format ``\"monitoredResourceDescriptors/{type}\"``.
type (string): Required. The monitored resource type. For example, the type
``\"cloudsql_database\"`` represents databases in Google Cloud SQL.
The maximum length of this value is 256 characters.
display_name (string): Optional. A concise name for the monitored resource type that might be
displayed in user interfaces. It should be a Title Cased Noun Phrase,
without any article or other determiners. For example,
``\"Google Cloud SQL Database\"``.
description (string): Optional. A detailed description of the monitored resource type that might
be used in documentation.
labels (list[:class:`google.api.label_pb2.LabelDescriptor`]): Required. A set of labels used to describe instances of this monitored
resource type. For example, an individual Google Cloud SQL database is
identified by values for the labels ``\"database_id\"`` and ``\"zone\"``.
"""
pass
class MonitoredResource(object):
"""
An object representing a resource that can be used for monitoring, logging,
billing, or other purposes. Examples include virtual machine instances,
databases, and storage devices such as disks. The ``type`` field identifies a
``MonitoredResourceDescriptor`` object that describes the resource's
schema. Information in the ``labels`` field identifies the actual resource and
its attributes according to the schema. For example, a particular Compute
Engine VM instance could be represented by the following object, because the
``MonitoredResourceDescriptor`` for ``\"gce_instance\"`` has labels
``\"instance_id\"`` and ``\"zone\"``:
::
{ \"type\": \"gce_instance\",
\"labels\": { \"instance_id\": \"12345678901234\",
\"zone\": \"us-central1-a\" }}
Attributes:
type (string): Required. The monitored resource type. This field must match
the ``type`` field of a ``MonitoredResourceDescriptor`` object. For
example, the type of a Cloud SQL database is ``\"cloudsql_database\"``.
labels (dict[string -> :class:`google.api.monitored_resource_pb2.MonitoredResource.LabelsEntry`]): Required. Values for all of the labels listed in the associated monitored
resource descriptor. For example, Cloud SQL databases use the labels
``\"database_id\"`` and ``\"zone\"``.
"""
pass
| 50.121951
| 178
| 0.706569
| 532
| 4,110
| 5.426692
| 0.360902
| 0.064773
| 0.048493
| 0.033253
| 0.10426
| 0.074125
| 0.074125
| 0
| 0
| 0
| 0
| 0.008877
| 0.205109
| 4,110
| 81
| 179
| 50.740741
| 0.874809
| 0.896837
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.4
| 0.2
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
b078d9b25798c997839d7661f84b8426b68ef11f
| 834
|
py
|
Python
|
model/policy.py
|
AmrHendy/maze-solver
|
e58c0bff275a8b0e999f8da89671220d637e81a7
|
[
"MIT"
] | 1
|
2019-05-22T22:23:27.000Z
|
2019-05-22T22:23:27.000Z
|
model/policy.py
|
AmrHendy/maze-solver
|
e58c0bff275a8b0e999f8da89671220d637e81a7
|
[
"MIT"
] | null | null | null |
model/policy.py
|
AmrHendy/maze-solver
|
e58c0bff275a8b0e999f8da89671220d637e81a7
|
[
"MIT"
] | null | null | null |
from model.states_map import StateMap
class Policy:
def __init__(self, state_actions_map):
"""
:param state_actions_map: is dictionary where key is the state and the value is list of best possible actions
"""
self.__state_action_map = state_actions_map
def get_actions_map(self):
return self.__state_action_map
def __get_actions(self, state):
return self.__state_action_map[state]
def __set_actions(self, state, actions):
self.__state_action_map[state] = actions
def apply_policy(self, row, col):
current_state = StateMap.get_instance().get_state(row, col)
action_type = self.__state_action_map[(row, col)][0]
return current_state.get_next_state(action_type)
def __str__(self):
return str(self.__state_action_map)
| 29.785714
| 117
| 0.696643
| 115
| 834
| 4.565217
| 0.330435
| 0.154286
| 0.171429
| 0.205714
| 0.241905
| 0.140952
| 0.140952
| 0
| 0
| 0
| 0
| 0.001543
| 0.223022
| 834
| 27
| 118
| 30.888889
| 0.808642
| 0.130695
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0.0625
| 0.1875
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
b08835a150349e2face6823f5f81a7933f249710
| 244
|
py
|
Python
|
ginjinn/utils/__init__.py
|
AGOberprieler/GinJinn_development
|
e2424ccad4a1ab05f9c21c26cd177aaa8d69b2c7
|
[
"Apache-2.0"
] | 17
|
2021-07-24T20:55:58.000Z
|
2022-02-09T05:15:04.000Z
|
ginjinn/utils/__init__.py
|
AGOberprieler/GinJinn_development
|
e2424ccad4a1ab05f9c21c26cd177aaa8d69b2c7
|
[
"Apache-2.0"
] | 1
|
2021-12-21T06:33:56.000Z
|
2022-02-05T13:57:53.000Z
|
ginjinn/utils/__init__.py
|
AGOberprieler/GinJinn2
|
527feac125f476165e332277823c11016565f99d
|
[
"Apache-2.0"
] | null | null | null |
'''GinJinn utilities
'''
from .utils import \
confirmation_cancel, confirmation, \
load_coco_ann, get_image_files, get_obj_anns
from .data_prep import flatten_coco
from .dataset_cropping import crop_seg_from_coco, crop_bbox_from_coco
| 24.4
| 69
| 0.803279
| 35
| 244
| 5.142857
| 0.657143
| 0.088889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131148
| 244
| 9
| 70
| 27.111111
| 0.849057
| 0.069672
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
b0a72452b7b7edc5e487bc90db1ad747f201ee53
| 274
|
py
|
Python
|
egov_core/admin.py
|
lanfia/egov
|
9d97fef31eb9bca05cd0ceef8a4606b7c2bfceba
|
[
"MIT"
] | null | null | null |
egov_core/admin.py
|
lanfia/egov
|
9d97fef31eb9bca05cd0ceef8a4606b7c2bfceba
|
[
"MIT"
] | null | null | null |
egov_core/admin.py
|
lanfia/egov
|
9d97fef31eb9bca05cd0ceef8a4606b7c2bfceba
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Profile, Partner
admin.site.site_header = 'eGov Liberia'
admin.site.site_title = "eGov Liberia Admin Portal"
admin.site.index_title = "Welcome to EGOV Liberia"
admin.site.register(Profile)
admin.site.register(Partner)
| 24.909091
| 51
| 0.79562
| 40
| 274
| 5.375
| 0.45
| 0.209302
| 0.223256
| 0.186047
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109489
| 274
| 10
| 52
| 27.4
| 0.881148
| 0
| 0
| 0
| 0
| 0
| 0.218978
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.285714
| 0
| 0.285714
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b0b4925f0b9541ecaac41f245eca089dd652f351
| 64
|
py
|
Python
|
tests/__init__.py
|
shadowfax-chc/pycsync
|
61a9131c66e5face8d9fb1a86a51a5ccf60b7974
|
[
"ISC"
] | null | null | null |
tests/__init__.py
|
shadowfax-chc/pycsync
|
61a9131c66e5face8d9fb1a86a51a5ccf60b7974
|
[
"ISC"
] | 1
|
2018-03-04T20:25:55.000Z
|
2018-03-04T20:25:55.000Z
|
tests/__init__.py
|
shadowfax-chc/pycsync
|
61a9131c66e5face8d9fb1a86a51a5ccf60b7974
|
[
"ISC"
] | 1
|
2018-03-04T20:23:42.000Z
|
2018-03-04T20:23:42.000Z
|
# vim: set et ts=4 sw=4 fileencoding=utf-8:
'''
tests
=====
'''
| 10.666667
| 43
| 0.546875
| 11
| 64
| 3.181818
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.056604
| 0.171875
| 64
| 5
| 44
| 12.8
| 0.603774
| 0.84375
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7c0b5cbf33224c06df6cab07f0e04edd0334bb24
| 4,132
|
py
|
Python
|
1/main.py
|
jacagi/freetime
|
67dd1cd46489ada554e7c34559826812e5a55916
|
[
"MIT"
] | 1
|
2021-12-08T19:01:56.000Z
|
2021-12-08T19:01:56.000Z
|
1/main.py
|
jacagi/freetime
|
67dd1cd46489ada554e7c34559826812e5a55916
|
[
"MIT"
] | null | null | null |
1/main.py
|
jacagi/freetime
|
67dd1cd46489ada554e7c34559826812e5a55916
|
[
"MIT"
] | null | null | null |
import pygame, sys, random
WHITE = (255, 255, 255)
v = [20, 140, 260, 380]
col = 4
fil = 4
def tovectorindex(i, j):
return i * fil + j
def generatenumber(gamematrix):
gamematrix[random.choice([i for i in range(0, col * fil) if gamematrix[i] == 0])] = 2
def movedownaux(gamematrix, i, j):
if gamematrix[tovectorindex(i, j+1)] == 0:
gamematrix[tovectorindex(i, j+1)] = gamematrix[tovectorindex(i, j)]
gamematrix[tovectorindex(i, j)] = 0
if j < fil-2:
movedownaux(gamematrix, i, j+1)
elif gamematrix[tovectorindex(i, j+1)] == gamematrix[tovectorindex(i, j)]:
gamematrix[tovectorindex(i, j+1)] = gamematrix[tovectorindex(i, j+1)] * 2
gamematrix[tovectorindex(i, j)] = 0
def movedown(gamematrix):
for i in range(0,col):
for j in range(fil-2,-1,-1):
if gamematrix[tovectorindex(i, j)] != 0:
movedownaux(gamematrix, i, j)
def moveupaux(gamematrix, i, j):
if gamematrix[tovectorindex(i, j-1)] == 0:
gamematrix[tovectorindex(i, j-1)] = gamematrix[tovectorindex(i, j)]
gamematrix[tovectorindex(i, j)] = 0
if j > 1:
moveupaux(gamematrix, i, j-1)
elif gamematrix[tovectorindex(i, j-1)] == gamematrix[tovectorindex(i, j)]:
gamematrix[tovectorindex(i, j-1)] = gamematrix[tovectorindex(i, j-1)] * 2
gamematrix[tovectorindex(i, j)] = 0
def moveup(gamematrix):
for i in range(0,col):
for j in range(1,fil):
if gamematrix[tovectorindex(i, j)] != 0:
moveupaux(gamematrix, i, j)
def moverightaux(gamematrix, i, j):
if gamematrix[tovectorindex(i+1, j)] == 0:
gamematrix[tovectorindex(i+1, j)] = gamematrix[tovectorindex(i, j)]
gamematrix[tovectorindex(i, j)] = 0
if i < fil-2:
moverightaux(gamematrix, i+1, j)
elif gamematrix[tovectorindex(i+1, j)] == gamematrix[tovectorindex(i, j)]:
gamematrix[tovectorindex(i+1, j)] = gamematrix[tovectorindex(i+1, j)] * 2
gamematrix[tovectorindex(i, j)] = 0
def moveright(gamematrix):
for j in range(0,col):
for i in range(fil-2,-1,-1):
if gamematrix[tovectorindex(i, j)] != 0:
moverightaux(gamematrix, i, j)
def moveleftaux(gamematrix, i, j):
if gamematrix[tovectorindex(i-1, j)] == 0:
gamematrix[tovectorindex(i-1, j)] = gamematrix[tovectorindex(i, j)]
gamematrix[tovectorindex(i, j)] = 0
if i > 1:
moveleftaux(gamematrix, i-1, j)
elif gamematrix[tovectorindex(i-1, j)] == gamematrix[tovectorindex(i, j)]:
gamematrix[tovectorindex(i-1, j)] = gamematrix[tovectorindex(i-1, j)] * 2
gamematrix[tovectorindex(i, j)] = 0
def moveleft(gamematrix):
for j in range(0,col):
for i in range(1,fil):
if gamematrix[tovectorindex(i, j)] != 0:
moveleftaux(gamematrix, i, j)
def main():
gamematrix = [0 for i in range(0, col*fil)]
pygame.init()
size = 500, 500
screen = pygame.display.set_mode(size)
font = pygame.font.SysFont('Arial', 25)
pygame.display.set_caption("2048")
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT: running = False
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_UP:
moveup(gamematrix)
elif event.key == pygame.K_DOWN:
movedown(gamematrix)
elif event.key == pygame.K_LEFT:
moveleft(gamematrix)
elif event.key == pygame.K_RIGHT:
moveright(gamematrix)
generatenumber(gamematrix)
for i in range(0, fil):
for j in range(0, col):
rect = pygame.Rect(v[i], v[j], 100, 100)
pygame.draw.rect(screen, WHITE, rect)
vectorindex = tovectorindex(i, j)
screen.blit(font.render(str(gamematrix[vectorindex]), True, (0, 0, 0)), (v[i] + 40, v[j] + 40))
pygame.display.flip()
pygame.quit()
if __name__ == '__main__':
main()
| 36.892857
| 111
| 0.583011
| 536
| 4,132
| 4.468284
| 0.143657
| 0.245511
| 0.400835
| 0.313152
| 0.634656
| 0.634656
| 0.582881
| 0.56785
| 0.56785
| 0.56785
| 0
| 0.038076
| 0.275411
| 4,132
| 111
| 112
| 37.225225
| 0.761857
| 0
| 0
| 0.177083
| 1
| 0
| 0.004115
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.114583
| false
| 0
| 0.010417
| 0.010417
| 0.135417
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b019db7bf2a70c87e38934d6da19c0c9278cc0d9
| 73
|
py
|
Python
|
config.py
|
johnzech/self-destruct
|
72b1bdb46fb75a7756e92208a7951755299ff086
|
[
"MIT"
] | 2
|
2020-01-11T20:34:58.000Z
|
2020-01-25T17:27:21.000Z
|
config.py
|
johnzech/self-destruct
|
72b1bdb46fb75a7756e92208a7951755299ff086
|
[
"MIT"
] | 1
|
2020-04-18T00:53:38.000Z
|
2020-04-18T00:53:38.000Z
|
config.py
|
johnzech/self-destruct
|
72b1bdb46fb75a7756e92208a7951755299ff086
|
[
"MIT"
] | 3
|
2021-05-06T19:11:27.000Z
|
2021-05-07T15:51:08.000Z
|
conf = {}
conf['db_string'] = "postgresql://bento:bento@localhost/bento"
| 36.5
| 62
| 0.69863
| 9
| 73
| 5.555556
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.082192
| 73
| 2
| 62
| 36.5
| 0.746269
| 0
| 0
| 0
| 0
| 0
| 0.671233
| 0.547945
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b0239e47d3ad939ba6901a5bf660e6d8a652385e
| 1,993
|
py
|
Python
|
cosy/src/csp/cspVisitor.py
|
suguman/POPL2020Tool
|
1a7d6759812b6950b9c19f6fa85c3f893da92d8e
|
[
"MIT"
] | null | null | null |
cosy/src/csp/cspVisitor.py
|
suguman/POPL2020Tool
|
1a7d6759812b6950b9c19f6fa85c3f893da92d8e
|
[
"MIT"
] | null | null | null |
cosy/src/csp/cspVisitor.py
|
suguman/POPL2020Tool
|
1a7d6759812b6950b9c19f6fa85c3f893da92d8e
|
[
"MIT"
] | null | null | null |
# Generated from ./csp.g by ANTLR 4.7.1
from antlr4 import *
if __name__ is not None and "." in __name__:
from .cspParser import cspParser
else:
from cspParser import cspParser
# This class defines a complete generic visitor for a parse tree produced by cspParser.
class cspVisitor(ParseTreeVisitor):
# Visit a parse tree produced by cspParser#cspStream.
def visitCspStream(self, ctx:cspParser.CspStreamContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by cspParser#extMessages.
def visitExtMessages(self, ctx:cspParser.ExtMessagesContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by cspParser#extMessage.
def visitExtMessage(self, ctx:cspParser.ExtMessageContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by cspParser#domainSet.
def visitDomainSet(self, ctx:cspParser.DomainSetContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by cspParser#initialState.
def visitInitialState(self, ctx:cspParser.InitialStateContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by cspParser#procAlgebra.
def visitProcAlgebra(self, ctx:cspParser.ProcAlgebraContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by cspParser#procStmt.
def visitProcStmt(self, ctx:cspParser.ProcStmtContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by cspParser#transitionAlternatives.
def visitTransitionAlternatives(self, ctx:cspParser.TransitionAlternativesContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by cspParser#transition.
def visitTransition(self, ctx:cspParser.TransitionContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by cspParser#comment.
def visitComment(self, ctx:cspParser.CommentContext):
return self.visitChildren(ctx)
del cspParser
| 31.634921
| 87
| 0.74561
| 228
| 1,993
| 6.482456
| 0.307018
| 0.044655
| 0.074425
| 0.133965
| 0.407984
| 0.407984
| 0.388363
| 0.365359
| 0.365359
| 0.365359
| 0
| 0.002463
| 0.185148
| 1,993
| 63
| 88
| 31.634921
| 0.907635
| 0.327145
| 0
| 0.37037
| 1
| 0
| 0.000758
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.37037
| false
| 0
| 0.111111
| 0.37037
| 0.888889
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
b03d8940bcb5c9007a3fd3968f3ba8b40009987b
| 233
|
py
|
Python
|
blacklist/admin.py
|
TacticalSupremacy/allianceauth-blacklist
|
21c624b8e3d773c7a4ade8753c644f848672a13f
|
[
"MIT"
] | 1
|
2021-05-04T20:55:27.000Z
|
2021-05-04T20:55:27.000Z
|
blacklist/admin.py
|
TacticalSupremacy/allianceauth-blacklist
|
21c624b8e3d773c7a4ade8753c644f848672a13f
|
[
"MIT"
] | 3
|
2021-02-01T13:26:15.000Z
|
2021-09-09T19:41:01.000Z
|
blacklist/admin.py
|
TacticalSupremacy/allianceauth-blacklist
|
21c624b8e3d773c7a4ade8753c644f848672a13f
|
[
"MIT"
] | 4
|
2021-02-08T21:22:55.000Z
|
2021-08-12T04:28:55.000Z
|
from django.contrib import admin
from .models import EveNote
@admin.register(EveNote)
class EveNoteAdmin(admin.ModelAdmin):
search_fields = ['eve_name', ]
list_display = ('eve_name', 'blacklisted','restricted', 'added_by')
| 25.888889
| 71
| 0.742489
| 28
| 233
| 6
| 0.75
| 0.083333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128755
| 233
| 9
| 71
| 25.888889
| 0.827586
| 0
| 0
| 0
| 0
| 0
| 0.192308
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
b041b23c3910c392fe849f7b8fcf86d62029b53d
| 1,692
|
py
|
Python
|
codepack/utils/dependency.py
|
ihnokim/codepack
|
9d043b2db977de503faf7f5f1370c1424c6cb19f
|
[
"MIT"
] | 2
|
2021-04-18T17:51:49.000Z
|
2021-06-22T10:21:30.000Z
|
codepack/utils/dependency.py
|
ihnokim/codepack
|
9d043b2db977de503faf7f5f1370c1424c6cb19f
|
[
"MIT"
] | 24
|
2021-12-23T18:02:01.000Z
|
2022-03-27T03:03:38.000Z
|
codepack/utils/dependency.py
|
ihnokim/codepack
|
9d043b2db977de503faf7f5f1370c1424c6cb19f
|
[
"MIT"
] | 1
|
2021-09-13T12:56:40.000Z
|
2021-09-13T12:56:40.000Z
|
from codepack.base import CodeBase
from codepack.storage import Storable
class Dependency(Storable):
def __init__(self, code=None, id=None, serial_number=None, arg=None):
super().__init__(id=id, serial_number=serial_number)
self.code = None
self.arg = None
self.bind(code)
self.set(id=id, serial_number=serial_number, arg=arg)
def __lshift__(self, sender):
if isinstance(sender, CodeBase):
self.set(id=sender.id, serial_number=sender.serial_number, arg=self.arg)
elif isinstance(sender, dict):
self.set(id=sender['id'], serial_number=sender['serial_number'], arg=self.arg)
else:
raise TypeError(type(sender))
self.code.add_dependency(self)
def bind(self, code):
self.code = code
def set(self, id=None, serial_number=None, arg=None):
self.id = id
self.serial_number = serial_number
self.arg = arg
def __hash__(self):
return hash(self.serial_number)
def __eq__(self, other):
if isinstance(other, type(self)):
return self.serial_number == other.serial_number
elif isinstance(other, dict):
return self.serial_number == other['serial_number']
else:
return False
def __str__(self):
return '%s(arg: %s, id: %s)' % (self.__class__.__name__, self.arg, self.id)
def __repr__(self):
return self.__str__()
def to_dict(self):
return {'id': self.id, 'serial_number': self.serial_number, 'arg': self.arg}
@classmethod
def from_dict(cls, d):
return cls(id=d['id'], serial_number=d['serial_number'], arg=d['arg'])
| 31.924528
| 90
| 0.62766
| 223
| 1,692
| 4.475336
| 0.201794
| 0.252505
| 0.084168
| 0.072144
| 0.360721
| 0.306613
| 0.250501
| 0.114228
| 0.114228
| 0.114228
| 0
| 0
| 0.247045
| 1,692
| 52
| 91
| 32.538462
| 0.78336
| 0
| 0
| 0.04878
| 0
| 0
| 0.049054
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.243902
| false
| 0
| 0.04878
| 0.121951
| 0.512195
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
b04a6648768a0b6397ced79870df1f036ba9443f
| 215
|
py
|
Python
|
nadmin/adminx.py
|
A425/django-xadmin-1.8
|
9ab06192311b22ec654778935ce3e3c5ffd39a00
|
[
"MIT"
] | 1
|
2015-10-10T08:04:26.000Z
|
2015-10-10T08:04:26.000Z
|
nadmin/adminx.py
|
A425/django-xadmin-1.8
|
9ab06192311b22ec654778935ce3e3c5ffd39a00
|
[
"MIT"
] | 1
|
2016-03-25T01:41:36.000Z
|
2016-03-25T01:41:36.000Z
|
nadmin/adminx.py
|
A425/django-xadmin-1.8
|
9ab06192311b22ec654778935ce3e3c5ffd39a00
|
[
"MIT"
] | null | null | null |
import nadmin
from models import UserSettings
from nadmin.layout import *
class UserSettingsAdmin(object):
model_icon = 'fa fa-cog'
hidden_menu = True
nadmin.site.register(UserSettings, UserSettingsAdmin)
| 21.5
| 53
| 0.786047
| 26
| 215
| 6.423077
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144186
| 215
| 9
| 54
| 23.888889
| 0.907609
| 0
| 0
| 0
| 0
| 0
| 0.04186
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.428571
| 0
| 0.857143
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
b058eab2f179ab7f4cebab62a4cf29c0de11a999
| 58
|
py
|
Python
|
jlogin/__init__.py
|
williamcanin/jlogin
|
1d1edde3744096f4941c56b3d23249e90e15724c
|
[
"MIT"
] | null | null | null |
jlogin/__init__.py
|
williamcanin/jlogin
|
1d1edde3744096f4941c56b3d23249e90e15724c
|
[
"MIT"
] | null | null | null |
jlogin/__init__.py
|
williamcanin/jlogin
|
1d1edde3744096f4941c56b3d23249e90e15724c
|
[
"MIT"
] | null | null | null |
from jlogin.jlogin import JLogin
jl = JLogin()
jl.main()
| 11.6
| 32
| 0.724138
| 9
| 58
| 4.666667
| 0.555556
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155172
| 58
| 4
| 33
| 14.5
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c69b462e20709a77cb83e157dc4f3ca07328af50
| 17,852
|
py
|
Python
|
test/answer_test.py
|
ShawnHXH/QA-CivilAviationKG
|
1c39633cd96384a472f6ac4f5136811f44eec1ad
|
[
"MIT"
] | 26
|
2020-10-19T10:37:20.000Z
|
2022-03-13T12:45:11.000Z
|
test/answer_test.py
|
ShawnHXH/QA-CivilAviationKG
|
1c39633cd96384a472f6ac4f5136811f44eec1ad
|
[
"MIT"
] | 1
|
2021-03-09T05:59:50.000Z
|
2021-03-09T05:59:50.000Z
|
test/answer_test.py
|
ShawnHXH/QA-CivilAviationKG
|
1c39633cd96384a472f6ac4f5136811f44eec1ad
|
[
"MIT"
] | 12
|
2020-09-25T01:12:09.000Z
|
2022-02-20T14:11:33.000Z
|
import unittest
import os
from chatbot import CAChatBot
os.chdir(os.path.join(os.getcwd(), '..'))
class AnswerTest(unittest.TestCase):
bot = CAChatBot()
def search(self, question: str):
ans = self.bot.query(question)
return ans
def test_year_status(self):
self.assertEqual(self.search('2011年总体情况怎样?'),
'2011年,全年航空安全形势稳定,旅客运输和通用航空保持较快增长,运行质量和经济效益得到提升,基础设施建设取得新成绩,结构调整和深化改革迈出新步伐,党的建设和行业文化建设得到加强。')
self.assertEqual(self.search('2011年发展形势怎样?'),
'2011年,全年航空安全形势稳定,旅客运输和通用航空保持较快增长,运行质量和经济效益得到提升,基础设施建设取得新成绩,结构调整和深化改革迈出新步伐,党的建设和行业文化建设得到加强。')
self.assertEqual(self.search('2011年发展如何?'),
'2011年,全年航空安全形势稳定,旅客运输和通用航空保持较快增长,运行质量和经济效益得到提升,基础设施建设取得新成绩,结构调整和深化改革迈出新步伐,党的建设和行业文化建设得到加强。')
self.assertEqual(self.search('15年形势怎样?'),
'2015年,全行业深入贯彻党的十八大、十八届五中全会和中央经济工作会议精神,认真落实中央领导对民航发展作出的重要指示, 深入推进实施民航强国战略, 努力践行“发展为了人民”的理念, 坚持“飞行安全,廉政安全,真情服务”三个底线, 稳中求进, 深化改革,各项工作取得较大成绩,民航业在经济社会发展中战略作用更加显现。')
def test_catalog_status(self):
self.assertEqual(self.search('2011年运输航空总体情况怎样?'),
'2011年,民航运输发展稳中向好,实现了“十二五”时期的良好开局。')
self.assertEqual(self.search('2011年航空安全与服务质量发展形势怎样?'),
'2011年,民航绝大多数运行单位安全形势平稳。全行业没有发生空防安全事故、重大航空地面事故和特大航空器维修事故。')
self.assertEqual(self.search('2011年教育与科技发展如何?'),
'并没有关于2011年教育与科技的描述。')
self.assertEqual(self.search('2011固定资产投资和航空安全与服务质量发展形势怎样?'),
'并没有关于2011年固定资产投资的描述;2011年,民航绝大多数运行单位安全形势平稳。全行业没有发生空防安全事故、重大航空地面事故和特大航空器维修事故。')
def test_exist_catalog(self):
# 回答中的词语出现位置不固定
pass
def test_index_value(self):
self.assertEqual(self.search('2011年的货邮周转量和游客周转量是多少?'),
'货邮周转量为173.91亿吨公里;旅客周转量为403.53亿吨公里。')
self.assertEqual(self.search('2011年的货邮周转量的值是?'),
'货邮周转量为173.91亿吨公里。')
self.assertEqual(self.search('2011年的货邮周转量为?'),
'货邮周转量为173.91亿吨公里。')
self.assertEqual(self.search('2011年的货邮周转量是'),
'货邮周转量为173.91亿吨公里。')
def test_area_value(self):
self.assertEqual(self.search('11年国内的运输总周转量为?'),
'国内航线运输总周转量为380.61亿吨公里。')
self.assertEqual(self.search('11年国内的运总周转量为?'),
'国内航线运输总周转量为380.61亿吨公里。')
self.assertEqual(self.search('11年国内和国际的旅客运输量为'),
'国内航线旅客运输量为27199.0万人次;国际航线旅客运输量为2118.0万人次。')
self.assertEqual(self.search('11年国内和国际的游客运输量为'),
'国内航线旅客运输量为27199.0万人次;国际航线旅客运输量为2118.0万人次。')
self.assertEqual(self.search('11年国际方面运输总周转量是多少?'),
'国际航线运输总周转量为196.84亿吨公里。')
self.assertEqual(self.search('11年国际方面运输总周转量和货邮周转量是多少?'),
'国际航线运输总周转量为196.84亿吨公里;国际货邮周转量无数据记录。')
self.assertEqual(self.search('11年国内和国际方面运输总周转量和货邮周转量是多少?'),
'国内航线运输总周转量为380.61亿吨公里;国内货邮周转量无数据记录;国际航线运输总周转量为196.84亿吨公里;国际货邮周转量无数据记录。')
def test_index_area_overall(self):
# index
self.assertEqual(self.search('2011年的游客周转量和运输总周转量占总体多少?'),
'无运输总周转量的父级指标数据记录,无法比较;旅客周转量为403.53亿吨公里,其父级指标运输总周转量为577.44亿吨公里,前者占后者的69.88%,后者是前者的1.431倍。')
self.assertEqual(self.search('2011年的游客周转量占父指标多少份额?'),
'旅客周转量为403.53亿吨公里,其父级指标运输总周转量为577.44亿吨公里,前者占后者的69.88%,后者是前者的1.431倍。')
self.assertEqual(self.search('2017年游客周转量是其总体的几倍?'),
'旅客周转量为9513.04亿人公里,其父级指标运输总周转量为1083.08亿吨公里,两者单位不同,无法比较。')
# area
self.assertEqual(self.search('11年国际和国内的运输总周转量占总值的多少?'),
'无国际运输总周转量的父级数据记录,无法比较;无国内运输总周转量的父级数据记录,无法比较。')
self.assertEqual(self.search('11年我国西部地区的运输总周转量和货邮吞吐量是全体的多少倍?'),
'无西部地区运输总周转量的数据记录,无法比较。')
self.assertEqual(self.search('11年港澳台和国际的运输总周转量和旅客运输量是父级的多少倍?'),
'港澳台航线运输总周转量为12.64亿吨公里,其父级国内航线运输总周转量为380.61亿吨公里,前者占后者的3.32%,后者是前者的30.112倍;无港澳台旅客运输量的父级数据记录,无法比较。')
self.assertEqual(self.search('2017年港澳台旅客周转量占其总体地区的多少?'),
'港澳台航线旅客周转量为148.25亿人公里,其父级国内航线旅客周转量为7036.53亿人公里,前者占后者的2.11%,后者是前者的47.464倍。')
def test_index_area_2_overall(self):
# index
self.assertEqual(self.search('2012年游客周转量占总体的百分比比去年变化多少?'),
'2012年旅客周转量为446.43亿吨公里,其总体运输总周转量为610.32亿吨公里,约占总体的73.15%;2011年旅客周转量为403.53亿吨公里,其总体运输总周转量为577.44亿吨公里,约占总体的69.88%;前者相比后者提高3.27%。')
self.assertEqual(self.search('2017年游客周转量占总体的百分比,相比11年变化多少?'),
'2017年旅客周转量为9513.04亿人公里,其总体运输总周转量为1083.08亿吨公里,两者单位不同,无法比较;2011年旅客周转量为403.53亿吨公里,其总体运输总周转量为577.44亿吨公里,约占总体的69.88%。')
self.assertEqual(self.search('2012年相比11年,游客周转量占总体的百分比变化多少?'),
'2012年旅客周转量为446.43亿吨公里,其总体运输总周转量为610.32亿吨公里,约占总体的73.15%;2011年旅客周转量为403.53亿吨公里,其总体运输总周转量为577.44亿吨公里,约占总体的69.88%;前者相比后者提高3.27%。')
self.assertEqual(self.search('2012年的运输总周转量占父级的倍数比11年降低多少?'),
'无2012、2011这几年运输总周转量的父级数据记录,无法比较。')
# area
self.assertEqual(self.search('2012年港澳台的游客运输量占总体的百分比比去年变化多少?'),
'2012年港澳台航线旅客运输量为834.0万人次,其总体国内航线为29600.0万人次,约占总体的2.82%;2011年港澳台航线旅客运输量为760.0万人次,其总体国内航线为27199.0万人次,约占总体的2.79%;前者相比后者提高0.03%。')
self.assertEqual(self.search('2012年中部地区旅客吞吐量占总体的百分比,相比11年变化多少?'),
'无2012、2011这几年中部地区旅客吞吐量的父级数据记录,无法比较。')
self.assertEqual(self.search('2012年相比11年,港澳台游客运输量占总体的百分比变化多少?'),
'2012年港澳台航线旅客运输量为834.0万人次,其总体国内航线为29600.0万人次,约占总体的2.82%;2011年港澳台航线旅客运输量为760.0万人次,其总体国内航线为27199.0万人次,约占总体的2.79%;前者相比后者提高0.03%。')
self.assertEqual(self.search('2012年的国内游客周转量占总计比例比去年增加多少?'),
'无2012、2011这几年国内旅客周转量的数据记录,无法比较。')
def test_indexes_m_n_compare(self):
# m
self.assertEqual(self.search('2011年游客周转量是货邮周转量的几倍?'),
'货邮周转量为173.91亿吨公里,旅客周转量为403.53亿吨公里,前者是后者的0.431倍,后者是前者的2.32倍。')
self.assertEqual(self.search('11年游客周转量是旅客运输量的几倍?'),
'旅客运输量的单位(万人次)与旅客周转量的单位(亿吨公里)不同,无法比较。')
self.assertEqual(self.search('11年游客周转量是新增机场的几倍?'),
'新增机场的单位(无)与旅客周转量的单位(亿吨公里)不同,无法比较。')
self.assertEqual(self.search('2011年游客周转量是货邮周转量的百分之几?'),
'货邮周转量为173.91亿吨公里,旅客周转量为403.53亿吨公里,前者是后者的0.431倍,后者是前者的2.32倍。')
# n
self.assertEqual(self.search('11年游客周转量比货邮周转量多多少?'),
'货邮周转量为173.91亿吨公里,旅客周转量为403.53亿吨公里,前者比后者少229.62亿吨公里。')
self.assertEqual(self.search('11年游客周转量比游客运输量大?'),
'旅客周转量的单位(亿吨公里)与旅客运输量的单位(万人次)不同,无法比较。')
self.assertEqual(self.search('11年游客周转量比货邮周转量少多少?'),
'货邮周转量为173.91亿吨公里,旅客周转量为403.53亿吨公里,前者比后者少229.62亿吨公里。')
def test_indexes_2m_2n_compare(self):
# 2m
self.assertEqual(self.search('2011年游客周转量是12年的百分之几?'),
'2011年的旅客周转量为403.53亿吨公里,2012年的旅客周转量为446.43亿吨公里,前者是后者的0.904倍。')
self.assertEqual(self.search('2011年的是12年货邮周转量的百分之几?'),
'2011年的货邮周转量为173.91亿吨公里,2012年的货邮周转量为163.89亿吨公里,前者是后者的1.061倍。')
self.assertEqual(self.search('2011年旅客运输量占12的百分之?'),
'2011年的旅客运输量为29317.0万人次,2012年的旅客运输量为31936.0万人次,前者是后者的0.918倍。')
self.assertEqual(self.search('2011年游客周转量是13年的几倍?'),
'2011年的旅客周转量为403.53亿吨公里,2013年的旅客周转量为501.43亿吨公里,前者是后者的0.805倍。')
self.assertEqual(self.search('2011年游客周转量和运输总周转量为12年的多少倍?'),
'2011年的运输总周转量为577.44亿吨公里,2012年的运输总周转量为610.32亿吨公里,前者是后者的0.946倍。')
# 2n
self.assertEqual(self.search('2011年游客周转量比12年降低了?'),
'2011年的旅客周转量为403.53亿吨公里,2012年的旅客周转量为446.43亿吨公里,前者比后者减少42.9亿吨公里。')
self.assertEqual(self.search('2012年节能减排比去年多了多少?'),
'节能减排的记录为无效的值类型,无法比较。')
self.assertEqual(self.search('13年的货邮周转量同2年前相比变化了多少?'),
'2013年的货邮周转量为170.29亿吨公里,2011年的货邮周转量为173.91亿吨公里,前者比后者减少3.62亿吨公里。')
self.assertEqual(self.search('12年同去年相比,货邮周转量变化了多少?'),
'2012年的货邮周转量为163.89亿吨公里,2011年的货邮周转量为173.91亿吨公里,前者比后者减少10.02亿吨公里。')
def test_indexes_g_compare(self):
self.assertEqual(self.search('2012年游客周转量同比增长多少?'),
'2012年的旅客周转量为446.43亿吨公里,其去年的为403.53亿吨公里,同比增长10.63%。')
self.assertEqual(self.search('2012年重大运输任务同比增长多少?'),
'2012年重大运输任务的记录非数值类型,无法计算。')
self.assertEqual(self.search('2012年游客周转量同比下降百分之几?'),
'2012年的旅客周转量为446.43亿吨公里,其去年的为403.53亿吨公里,同比增长10.63%。')
self.assertEqual(self.search('2012年游客周转量和货邮周转量同比下降百分之几?'),
'2012年的货邮周转量为163.89亿吨公里,其去年的为173.91亿吨公里,同比降低5.76%;2012年的旅客周转量为446.43亿吨公里,其去年的为403.53亿吨公里,同比增长10.63%。')
def test_areas_m_n_compare(self):
# m
self.assertEqual(self.search('11年港澳台货邮周转量占国内的百分之几?'),
'无港澳台货邮周转量数据记录,无法比较。')
self.assertEqual(self.search('11年国内的运输总周转量是港澳台的几倍?'),
'国内航线运输总周转量为380.61亿吨公里,港澳台航线运输总周转量为12.64亿吨公里,前者是后者的30.112倍,后者是前者的0.033倍。')
self.assertEqual(self.search('11年国际运输总周转量是国内的多少倍?'),
'国际航线运输总周转量为196.84亿吨公里,国内航线运输总周转量为380.61亿吨公里,前者是后者的0.517倍,后者是前者的1.934倍。')
self.assertEqual(self.search('11年港澳台运输总周转量和游客周转量是国际的多少倍?'),
'港澳台航线运输总周转量为12.64亿吨公里,国际航线运输总周转量为196.84亿吨公里,前者是后者的0.064倍,后者是前者的15.573倍;无港澳台旅客周转量数据记录,无法比较。')
# n
self.assertEqual(self.search('2011年国内货邮运输量比国际多多少?'),
'国内航线货邮运输量为379.4万吨,国际航线货邮运输量为178.1万吨,前者比后者多201.3万吨。')
self.assertEqual(self.search('2011年港澳台游客运输量比国内的少多少?'),
'港澳台航线旅客运输量为760.0万人次,国内航线旅客运输量为27199.0万人次,前者比后者少26439.0万人次。')
self.assertEqual(self.search('2011年港澳台与国内的相比游客周转量降低多少?'),
'无港澳台旅客周转量数据记录,无法比较。')
self.assertEqual(self.search('11年港澳台货邮周转量和游客周转量比国际的多多少?'),
'无港澳台货邮周转量数据记录,无法比较;无港澳台旅客周转量数据记录,无法比较。')
def test_areas_2m_2n_compare(self):
# 2m
self.assertEqual(self.search('11年港澳台运输总周转量和旅客吞吐量是12年的多少倍?'),
'2011年的港澳台运输总周转量为12.64亿吨公里,2012年的港澳台运输总周转量为13.66亿吨公里,前者是后者的0.925倍。')
self.assertEqual(self.search('12年的是11年港澳台运输总周转量的多少倍?'),
'2012年的港澳台运输总周转量为13.66亿吨公里,2011年的港澳台运输总周转量为12.64亿吨公里,前者是后者的1.081倍。')
self.assertEqual(self.search('12年国内与国际货邮周转量占11年百分之几?'),
'无关于2012年的国内货邮周转量的记录;无关于2012年的国际货邮周转量的记录。')
self.assertEqual(self.search('12年国际运输总周转量是11年比例?'),
'2012年的国际运输总周转量为194.49亿吨公里,2011年的国际运输总周转量为196.84亿吨公里,前者是后者的0.988倍。')
# 2n
self.assertEqual(self.search('2011年国内运输总周转量比一二年多多少?'),
'2011年的国内运输总周转量为380.61亿吨公里,2012年的国内运输总周转量为415.83亿吨公里,前者比后者减少35.22亿吨公里。')
self.assertEqual(self.search('2011年港澳台与国内的游客周转量相比12降低多少?'),
'无关于2011年的港澳台旅客周转量的记录;无关于2011年的国内旅客周转量的记录。')
self.assertEqual(self.search('2011年港澳台的旅客运输量同2012相比降低多少?'),
'2011年的港澳台旅客运输量为760.0万人次,2012年的港澳台旅客运输量为834.0万人次,前者比后者减少74.0万人次。')
self.assertEqual(self.search('2012年的东部地区与去年相比,货邮吞吐量降低多少?'),
'2012年的东部地区货邮吞吐量为926.37万吨,2011年的东部地区货邮吞吐量为905.98万吨,前者比后者增加20.39万吨。')
self.assertEqual(self.search('2012年的北上广与一年前相比,旅客吞吐量降低多少?'),
'2012年的北上广旅客吞吐量为30.7%,2011年的北上广旅客吞吐量为31.9%,前者比后者减少1.2%。')
def test_areas_g_compare(self):
self.assertEqual(self.search('2012年国内运输总周转量同比增长了?'),
'2012年的国内运输总周转量为415.83亿吨公里,其去年的为380.61亿吨公里,同比增长9.25%。')
self.assertEqual(self.search('2012年中部地区旅客吞吐量同比下降了多少?'),
'2012年的中部地区旅客吞吐量为0.67亿人次,其去年的为0.59亿人次,同比增长13.56%。')
self.assertEqual(self.search('2012年国内游客周转量和货邮运输量同比变化了多少?'),
'2012年的国内货邮运输量为388.5万吨,其去年的为379.4万吨,同比增长2.4%;无2012年关于国内旅客周转量的数据。')
def test_index_compose(self):
self.assertEqual(self.search('2011年运输总周转量的子集有?'),
'该问题的回答已渲染为图像,详见:results/2011年运输总周转量的子集有?.html。')
self.assertEqual(self.search('2011年航空公司计划航班的组成?'),
'该问题的回答已渲染为图像,详见:results/2011年航空公司计划航班的组成?.html。')
self.assertEqual(self.search('2011年指标停用机场的组成有哪些?'),
'指标“停用机场”没有任何组成;该问题的回答已渲染为图像,详见:results/2011年指标停用机场的组成有哪些?.html。')
self.assertEqual(self.search('2011年全行业累计实现营业收入的子指标组成情况?'),
'该问题的回答已渲染为图像,详见:results/2011年全行业累计实现营业收入的子指标组成情况?.html。')
self.assertEqual(self.search('2011年运输总周转量和货邮周转量的子指标组成情况?'),
'指标“货邮周转量”没有任何组成;该问题的回答已渲染为图像,详见:results/2011年运输总周转量和货邮周转量的子指标组成情况?.html。')
self.assertEqual(self.search('2013年与其他国家或地区签订双边航空运输协定的组成如何?'),
'该问题的回答已渲染为图像,详见:results/2013年与其他国家或地区签订双边航空运输协定的组成如何?.html。')
def test_index_catalog_change(self):
# catalog
self.assertEqual(self.search('12年比11年多了哪些目录'),
'2011年与2012年相比,未统计1个目录:飞行员数量;2012年与2011年的目录相同。')
self.assertEqual(self.search('12年比去年增加了哪些目录'),
'2011年与2012年相比,未统计1个目录:飞行员数量;2012年与2011年的目录相同。')
# index 回答中的词语出现位置不固定
def test_indexes_catalogs_change(self):
# index
self.assertEqual(self.search('2011-13年指标变化情况?'),
'该问题的回答已渲染为图像,详见:results/2011-13年指标变化情况?.html。')
self.assertEqual(self.search('2011-17年指标变化趋势情况?'),
'该问题的回答已渲染为图像,详见:results/2011-17年指标变化趋势情况?.html。')
# catalogs
self.assertEqual(self.search('2011-13年目录变化情况?'),
'该问题的回答已渲染为图像,详见:results/2011-13年目录变化情况?.html。')
self.assertEqual(self.search('2011-13年规范趋势情况变化?'),
'该问题的回答已渲染为图像,详见:results/2011-13年规范趋势情况变化?.html。')
def test_indexes_areas_trend(self):
# index
self.assertEqual(self.search('2011-13年运输总周转量的变化趋势如何?'),
'该问题的回答已渲染为图像,详见:results/2011-13年运输总周转量的变化趋势如何?.html。')
self.assertEqual(self.search('2011-13年节能减排情况?'),
'指标“节能减排”无任何值记录,无法比较。')
self.assertEqual(self.search('2011-13年运输总周转量和旅客周转量情况?'),
'该问题的回答已渲染为图像,详见:results/2011-13年运输总周转量和旅客周转量情况?.html。')
self.assertEqual(self.search('2011-14年运输总周转量值分布状况?'),
'该问题的回答已渲染为图像,详见:results/2011-14年运输总周转量值分布状况?.html。')
self.assertEqual(self.search('2013年运输总周转量值与前两年相比变化状况如何?'),
'该问题的回答已渲染为图像,详见:results/2013年运输总周转量值与前两年相比变化状况如何?.html。')
self.assertEqual(self.search('2011-17年全行业取得驾驶执照飞行员和货邮周转量的变化情况?'),
'该问题的回答已渲染为图像,详见:results/2011-17年全行业取得驾驶执照飞行员和货邮周转量的变化情况?.html。')
# area
self.assertEqual(self.search('2011-13年国内运输总周转量的变化趋势如何?'),
'该问题的回答已渲染为图像,详见:results/2011-13年国内运输总周转量的变化趋势如何?.html。')
self.assertEqual(self.search('2011-13年国际运输总周转量情况?'),
'该问题的回答已渲染为图像,详见:results/2011-13年国际运输总周转量情况?.html。')
self.assertEqual(self.search('2011-13年港澳台运输总周转量值分布状况?'),
'该问题的回答已渲染为图像,详见:results/2011-13年港澳台运输总周转量值分布状况?.html。')
self.assertEqual(self.search('2011-17年我国与地区组织签订双边航空运输协定的变化情况?'),
'该问题的回答已渲染为图像,详见:results/2011-17年我国与地区组织签订双边航空运输协定的变化情况?.html。')
def test_indexes_areas_overall_trend(self):
# index
self.assertEqual(self.search('2011-13年货邮周转量占总体的比例的变化形势?'),
'该问题的回答已渲染为图像,详见:results/2011-13年货邮周转量占总体的比例的变化形势?.html。')
self.assertEqual(self.search('2011-13年货邮周转量和货邮吞吐量占总体的比例的变化形势?'),
'无关于”货邮吞吐量“的父级记录;该问题的回答已渲染为图像,详见:results/2011-13年货邮周转量和货邮吞吐量占总体的比例的变化形势?.html。')
self.assertEqual(self.search('2011-13年货邮周转量和小型飞机平均日利用率占总体的比例的变化形势?'),
'该问题的回答已渲染为图像,详见:results/2011-13年货邮周转量和小型飞机平均日利用率占总体的比例的变化形势?.html。')
self.assertEqual(self.search('2011-13年停用机场占父级指标比的情况?'),
'无关于”停用机场“的父级记录。')
self.assertEqual(self.search('2011-13年民航直属院校在校研究生占总比的分布状况?'),
'该问题的回答已渲染为图像,详见:results/2011-13年民航直属院校在校研究生占总比的分布状况?.html。')
self.assertEqual(self.search('2011-13年民航直属院校在校研究生和民航直属院校在校中专生占总比的分布状况?'),
'该问题的回答已渲染为图像,详见:results/2011-13年民航直属院校在校研究生和民航直属院校在校中专生占总比的分布状况?.html。')
# area
self.assertEqual(self.search('2011-13年国内运输总周转量占总体的比例的变化形势?'),
'无关于”国内运输总周转量“的父级记录。')
self.assertEqual(self.search('2011-13年国际货邮周转量和旅客周转量占父级指标比的情况?'),
'无关于”国际货邮周转量“的记录。')
self.assertEqual(self.search('2011-13年港澳台运输总周转量值占总比的分布状况?'),
'该问题的回答已渲染为图像,详见:results/2011-13年港澳台运输总周转量值占总比的分布状况?.html。')
def test_indexes_and_areas_max(self):
self.assertEqual(self.search('2011-13年运输总周转量最大值是?'),
'该问题的回答已渲染为图像,详见:results/2011-13年运输总周转量最大值是?.html。')
self.assertEqual(self.search('2011-13年运输总周转量最小值是哪一年?'),
'该问题的回答已渲染为图像,详见:results/2011-13年运输总周转量最小值是哪一年?.html。')
self.assertEqual(self.search('2011-13年国内运输总周转量最大值是?'),
'该问题的回答已渲染为图像,详见:results/2011-13年国内运输总周转量最大值是?.html。')
def test_begin_stats(self):
self.assertEqual(self.search('哪年统计了航空严重事故征候?'),
'指标“严重事故征候”最早于2011年开始统计;指标“事故征候”最早于2011年开始统计。')
self.assertEqual(self.search('在哪一年出现了航空公司营业收入数据?'),
'指标“航空公司实现营业收入”最早于2011年开始统计。')
self.assertEqual(self.search('航空事故征候数据统计出现在哪一年?'),
'指标“事故征候”最早于2011年开始统计。')
self.assertEqual(self.search('运输周转量数据统计出现在哪一年?'),
'指标“运输总周转量”最早于2011年开始统计。')
if __name__ == '__main__':
unittest.main()
| 58.339869
| 185
| 0.633262
| 1,423
| 17,852
| 7.896697
| 0.289529
| 0.149506
| 0.189374
| 0.249177
| 0.364065
| 0.28335
| 0.184035
| 0.152532
| 0.116935
| 0.102518
| 0
| 0.125167
| 0.24367
| 17,852
| 305
| 186
| 58.531148
| 0.70708
| 0.006722
| 0
| 0.085938
| 0
| 0.027344
| 0.478826
| 0.414568
| 0
| 0
| 0
| 0
| 0.4375
| 1
| 0.082031
| false
| 0.003906
| 0.011719
| 0
| 0.105469
| 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
| 1
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c6e7e902b230f23cd2628c7e58353b1cf8907898
| 216
|
py
|
Python
|
api/serializers.py
|
jossafossa/Project24_backend
|
bb5cc91d21c9f93034b85b3e94e829f7ab33c565
|
[
"MIT"
] | null | null | null |
api/serializers.py
|
jossafossa/Project24_backend
|
bb5cc91d21c9f93034b85b3e94e829f7ab33c565
|
[
"MIT"
] | 9
|
2019-12-04T23:15:59.000Z
|
2022-02-10T09:08:38.000Z
|
api/serializers.py
|
jossafossa/Project24_backend
|
bb5cc91d21c9f93034b85b3e94e829f7ab33c565
|
[
"MIT"
] | null | null | null |
from rest_framework import serializers
from .models import PrikmuurPost
class PrikmuurSerializer(serializers.ModelSerializer):
class Meta:
model = PrikmuurPost
fields = ('id', 'text', 'group', 'postedBy')
| 27
| 54
| 0.75463
| 22
| 216
| 7.363636
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 216
| 7
| 55
| 30.857143
| 0.880435
| 0
| 0
| 0
| 0
| 0
| 0.087963
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
059e8612ad8852eaaac392546078fd5db4e1b3d3
| 65
|
py
|
Python
|
energysim/__init__.py
|
mikkokotila/energysim
|
f37420b33ad578c7c0e17fb4f75994b0e7ef42bf
|
[
"MIT"
] | null | null | null |
energysim/__init__.py
|
mikkokotila/energysim
|
f37420b33ad578c7c0e17fb4f75994b0e7ef42bf
|
[
"MIT"
] | null | null | null |
energysim/__init__.py
|
mikkokotila/energysim
|
f37420b33ad578c7c0e17fb4f75994b0e7ef42bf
|
[
"MIT"
] | null | null | null |
from .params import *
from .uncert import *
__version__ = "0.4"
| 13
| 21
| 0.692308
| 9
| 65
| 4.555556
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037736
| 0.184615
| 65
| 4
| 22
| 16.25
| 0.735849
| 0
| 0
| 0
| 0
| 0
| 0.046154
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
05a43c5f0fb1eb5435d0e2377b073488e0f6f1c8
| 18,545
|
py
|
Python
|
calculator.py
|
RaPGoD31/Calculator31
|
7a5c4f8e473a4e6052e757c2af4c99449cebe1bd
|
[
"MIT"
] | null | null | null |
calculator.py
|
RaPGoD31/Calculator31
|
7a5c4f8e473a4e6052e757c2af4c99449cebe1bd
|
[
"MIT"
] | null | null | null |
calculator.py
|
RaPGoD31/Calculator31
|
7a5c4f8e473a4e6052e757c2af4c99449cebe1bd
|
[
"MIT"
] | null | null | null |
from graphics import *
def Yasmin():
yasmin = GraphWin("Calculator", 600, 600)
yasmin.setCoords(0.0,0.0,6.0,6.0)
result = Entry(Point(3,5.50),20)
start = Text(Point(3,5.9),"Calculator")
start.draw(yasmin)
num = "0"
result.setText(num)
result.draw(yasmin)
leia = []
layla = []
x=3
y=3
j=9
i=0
k=0
z=0
while j>=0:
leia.append(Point(x,y))
layla.append((Point(x+1.5,y+1)))
btn = Rectangle(Point(x,y),Point(x+1.5,y+1))
btn.draw(yasmin)
num = Text(Point(x+0.75,y+0.5),str(j))
num.draw(yasmin)
x -= 1.5
j -= 1
i += 1
k += 1
z += 1
if i==3:
x = 3
y = 2
i = 0
if k==6:
x = 3
y = 1
k = 0
if z==10:
x=0
y=0
leia[z-1] = (Point(x, y))
layla[z-1] = (Point(x+3, y+1))
btn = Rectangle(Point(x,y),Point(x+3,y+1))
btn.draw(yasmin)
num.undraw()
num = Text(Point(x+1.5,y+0.5),str(j+1))
num.draw(yasmin)
z = 0
ops = ["AC","+/-","%","/","x","-","+","**","="]
j = 0
x = 0
y = 4
i = 0
while j<len(ops):
leia.append(Point(x,y))
layla.append(Point(x+1.5,y+1))
btn = Rectangle(Point(x,y),Point(x+1.5,y+1))
btn.draw(yasmin)
num = Text(Point(x+0.75,y+0.5),str(ops[j]))
num.draw(yasmin)
x += 1.5
i += 1
j += 1
if i==4:
x = 4.5
y = 3
if i==5:
x = 4.5
y = 2
if i==6:
x = 4.5
y = 1
if i==7:
x=3
y=0
i=0
numa = "0"
numb = ""
numv = ""
clk = True
while clk:
try:
ab = yasmin.getMouse()
if (ab.x > leia[0].x and ab.x < layla[0].x and ab.y > leia[0].y and ab.y < layla[0].y):
if numa[-1]=="=":
numv = ""
numa += "9"
numv += "9"
numb += "9"
result.setText(numb)
else:
numa += "9"
numv += "9"
numb += "9"
result.setText(numb)
if (ab.x > leia[1].x and ab.x < layla[1].x and ab.y > leia[1].y and ab.y < layla[1].y):
if numa[-1] == "=":
numv = ""
numa += "8"
numv += "8"
numb += "8"
result.setText(numb)
else:
numa += "8"
numv += "8"
numb += "8"
result.setText(numb)
if (ab.x > leia[2].x and ab.x < layla[2].x and ab.y > leia[2].y and ab.y < layla[2].y):
if numa[-1] == "=":
numv = ""
numa += "7"
numv += "7"
numb += "7"
result.setText(numb)
else:
numa += "7"
numv += "7"
numb += "7"
result.setText(numb)
if (ab.x > leia[3].x and ab.x < layla[3].x and ab.y > leia[3].y and ab.y < layla[3].y):
if numa[-1] == "=":
numv = ""
numa += "6"
numv += "6"
numb += "6"
result.setText(numb)
else:
numa += "6"
numv += "6"
numb += "6"
result.setText(numb)
if (ab.x > leia[4].x and ab.x < layla[4].x and ab.y > leia[4].y and ab.y < layla[4].y):
if numa[-1] == "=":
numv = ""
numa += "5"
numv += "5"
numb += "5"
result.setText(numb)
else:
numa += "5"
numv += "5"
numb += "5"
result.setText(numb)
if (ab.x > leia[5].x and ab.x < layla[5].x and ab.y > leia[5].y and ab.y < layla[5].y):
if numa[-1] == "=":
numv = ""
numa += "4"
numv += "4"
numb += "4"
result.setText(numb)
else:
numa += "4"
numv += "4"
numb += "4"
result.setText(numb)
if (ab.x > leia[6].x and ab.x < layla[6].x and ab.y > leia[6].y and ab.y < layla[6].y):
if numa[-1] == "=":
numv = ""
numa += "3"
numv += "3"
numb += "3"
result.setText(numb)
else:
numa += "3"
numv += "3"
numb += "3"
result.setText(numb)
if (ab.x > leia[7].x and ab.x < layla[7].x and ab.y > leia[7].y and ab.y < layla[7].y):
if numa[-1] == "=":
numv = ""
numa += "2"
numv += "2"
numb += "2"
result.setText(numb)
else:
numa += "2"
numv += "2"
numb += "2"
result.setText(numb)
if (ab.x > leia[8].x and ab.x < layla[8].x and ab.y > leia[8].y and ab.y < layla[8].y):
if numa[-1] == "=":
numv = ""
numa += "1"
numv += "1"
numb += "1"
result.setText(numb)
else:
numa += "1"
numv += "1"
numb += "1"
result.setText(numb)
if (ab.x > leia[9].x and ab.x < layla[9].x and ab.y > leia[9].y and ab.y < layla[9].y):
if numb == "":
numb = "0"
result.setText(numb)
numb = ""
if numa[-1] == "=":
numv = ""
numa += "0"
numv += "0"
numb += "0"
result.setText(numb)
else:
if numa[-1] == "=":
numv = ""
numa += "0"
numv += "0"
numb += "0"
result.setText(numb)
else:
numa += "0"
numv += "0"
numb += "0"
result.setText(numb)
if (ab.x > leia[10].x and ab.x < layla[10].x and ab.y > leia[10].y and ab.y < layla[10].y):
numa = "0"
numv = ""
numb = "0"
result.setText(numb)
numb = ""
if (ab.x > leia[11].x and ab.x < layla[11].x and ab.y > leia[11].y and ab.y < layla[11].y):
try:
if numb=="":
if numa[-1] == "=":
numv = "-" + str(eval(numv))
numb = str(eval(numv))
result.setText(numb)
numb = str(eval(numv))
else:
numv = ""
numb = "0"
result.setText(numb)
numb = ""
elif numb[0] == "-":
result.setText(numb)
else:
numv = "-" + numv
numb = "-" + numb
result.setText(numb)
if "+" or "-" or "x" or "**" or "/" or "%" in numv[1:]:
k = 0
for j in numv[1:]:
if j=="+" or j=="-" or j=="x" or j=="**" or j=="/" or j=="%":
numv = numv[1:k+2] + "-" + numv[k+2:]
else:
k+=1
numa += "-"
except SyntaxError:
numv = "0"
numb = str(eval(numv))
result.setText(numb)
numv = ""
numb = ""
if (ab.x > leia[12].x and ab.x < layla[12].x and ab.y > leia[12].y and ab.y < layla[12].y):
if "+" or "-" or "x" or "**" or "/" or "%" in numv:
numa += "%"
try:
if float(eval(numv)) == int(eval(numv)):
numb = int(eval(numv))
result.setText(numb)
numv = str(numb) + "%"
numb = ""
else:
numb = str(eval(numv))
result.setText(numb)
numv = str(eval(numv)) + "%"
numb = ""
except SyntaxError:
numv = "0"
numb = str(eval(numv))
result.setText(numb)
numv = ""
numb = ""
else:
numv += "%"
numb = str(eval(numb))
result.setText(numb)
numb = ""
if (ab.x > leia[13].x and ab.x < layla[13].x and ab.y > leia[13].y and ab.y < layla[13].y):
if "+" or "-" or "x" or "**" or "/" or "%" in numv:
numa += "/"
try:
if float(eval(numv)) == int(eval(numv)):
numb = int(eval(numv))
result.setText(numb)
numv = str(numb) + "/"
numb = ""
else:
numb = str(eval(numv))
result.setText(numb)
numv = str(eval(numv)) + "/"
numb = ""
except SyntaxError:
numv = "0"
numb = str(eval(numv))
result.setText(numb)
numv = ""
numb = ""
else:
numv += "/"
numb = str(eval(numb))
result.setText(numb)
numb = ""
if (ab.x > leia[14].x and ab.x < layla[14].x and ab.y > leia[14].y and ab.y < layla[14].y):
if "+" or "-" or "x" or "**" or "/" or "%" in numv:
numa += "*"
try:
if float(eval(numv)) == int(eval(numv)):
numb = int(eval(numv))
result.setText(numb)
numv = str(numb) + "*"
numb = ""
else:
numb = str(eval(numv))
result.setText(numb)
numv = str(eval(numv)) + "*"
numb = ""
except SyntaxError:
numv = "0"
numb = str(eval(numv))
result.setText(numb)
numv = ""
numb = ""
else:
numv += "*"
numb = str(eval(numb))
result.setText(numb)
numb = ""
if (ab.x > leia[15].x and ab.x < layla[15].x and ab.y > leia[15].y and ab.y < layla[15].y):
if "+" or "-" or "x" or "**" or "/" or "%" in numv:
numa += "-"
try:
if float(eval(numv)) == int(eval(numv)):
numb = int(eval(numv))
result.setText(numb)
numv = str(numb) + "-"
numb = ""
else:
numb = str(eval(numv))
result.setText(numb)
numv = str(eval(numv)) + "-"
numb = ""
except SyntaxError:
numv = "0"
numb = str(eval(numv))
result.setText(numb)
numv = ""
numb = ""
else:
numv += "-"
numb = str(eval(numb))
result.setText(numb)
numb = ""
if (ab.x > leia[16].x and ab.x < layla[16].x and ab.y > leia[16].y and ab.y < layla[16].y):
if "+" or "-" or "x" or "**" or "/" or "%" in numv:
numa += "+"
try:
if float(eval(numv)) == int(eval(numv)):
numb = int(eval(numv))
result.setText(numb)
numv = str(numb) + "+"
numb = ""
else:
numb = str(eval(numv))
result.setText(numb)
numv = str(eval(numv)) + "+"
numb = ""
except SyntaxError:
numv = "0"
numb = str(eval(numv))
result.setText(numb)
numv = ""
numb = ""
else:
numv += "+"
numb = str(eval(numb))
result.setText(numb)
numb = ""
if (ab.x > leia[17].x and ab.x < layla[17].x and ab.y > leia[17].y and ab.y < layla[17].y):
if "+" or "-" or "x" or "**" or "/" or "%" in numv:
numa += "**"
try:
if float(eval(numv)) == int(eval(numv)):
numb = int(eval(numv))
result.setText(numb)
numv = str(numb) + "**"
numb = ""
else:
numb = str(eval(numv))
result.setText(numb)
numv = str(eval(numv)) + "**"
numb = ""
except SyntaxError:
numv = "0"
numb = str(eval(numv))
result.setText(numb)
numv = ""
numb = ""
else:
numv += "**"
numb = str(eval(numb))
result.setText(numb)
numb = ""
if (ab.x > leia[18].x and ab.x < layla[18].x and ab.y > leia[18].y and ab.y < layla[18].y):
try:
numa += "="
if float(eval(numv)) == int(float(eval(numv))):
if "-" and "**" in numv:
if numa[-2]=="-":
if int(numv[-1])%2==0:
numb = abs(int(eval(numv)))
z = 1 / numb
numb = str(z)
numv = numb
result.setText(numb)
numb = ""
else:
numb = abs(int(eval(numv)))
if numv[1]=="-" and numv[0]=="-":
z = -1 / numb
else:
z = 1/numb
numb = str(z)
numv = numb
result.setText(numb)
numb = ""
else:
a = str(numv)
b = a[-1]
if int(b)%2==0:
numb = abs(int(eval(numv)))
numv = str(numb)
result.setText(numb)
numb = ""
else:
numb = int(eval(numv))
numv = str(numb)
result.setText(numb)
numb = ""
else:
numb = int(eval(numv))
numv = str(numb)
result.setText(numb)
numb = ""
else:
numb = str(eval(numv))
numv = str(eval(numv))
result.setText(numb)
numb = ""
except SyntaxError:
numv = "0"
numb = str(eval(numv))
result.setText(numb)
numv = ""
numb = ""
continue
if (ab.x > 5.99 and ab.y > 5.98):
yasmin.close()
break
except GraphicsError:
yasmin.close()
break
if __name__ == '__main__':
Yasmin()
| 39.457447
| 104
| 0.273659
| 1,664
| 18,545
| 3.045072
| 0.052284
| 0.153937
| 0.197948
| 0.091178
| 0.835011
| 0.677719
| 0.646142
| 0.587527
| 0.581606
| 0.452536
| 0
| 0.045006
| 0.601025
| 18,545
| 469
| 105
| 39.541578
| 0.639816
| 0
| 0
| 0.767742
| 0
| 0
| 0.012558
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.002151
| false
| 0
| 0.002151
| 0
| 0.004301
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
05c456247c7a641c70daf524b69344c8d5cf103a
| 962
|
py
|
Python
|
src/pyxer/template/genshi/__init__.py
|
tml/pyxer
|
4e3677b3f2c7f23ebf039a9ba9733f68a8460189
|
[
"MIT"
] | 2
|
2016-01-25T06:01:14.000Z
|
2016-02-07T20:30:25.000Z
|
src/pyxer/template/genshi/__init__.py
|
tml/pyxer
|
4e3677b3f2c7f23ebf039a9ba9733f68a8460189
|
[
"MIT"
] | 2
|
2018-03-21T06:27:50.000Z
|
2018-03-22T12:57:58.000Z
|
src/pyxer/template/genshi/__init__.py
|
tml/pyxer
|
4e3677b3f2c7f23ebf039a9ba9733f68a8460189
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2008 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consists of voluntary contributions made by many
# individuals. For the exact contribution history, see the revision
# history and logs, available at http://genshi.edgewall.org/log/.
"""This package provides various means for generating and processing web markup
(XML or HTML).
The design is centered around the concept of streams of markup events (similar
in concept to SAX parsing events) which can be processed in a uniform manner
independently of where or how they are produced.
"""
from pyxer.template.genshi.core import Stream, Markup, escape, unescape, Attrs, Namespace, QName
from pyxer.template.genshi.input import ParseError, XML, HTML
| 40.083333
| 96
| 0.776507
| 143
| 962
| 5.223776
| 0.699301
| 0.032129
| 0.040161
| 0.056225
| 0.085676
| 0.085676
| 0
| 0
| 0
| 0
| 0
| 0.011002
| 0.149688
| 962
| 23
| 97
| 41.826087
| 0.9022
| 0.800416
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
05c90e0a840b8cc680d678b1c98dc64eaf8e36d2
| 129
|
py
|
Python
|
cerebralcortex/algorithms/raw_byte_decode/__init__.py
|
MD2Korg/CerebralCortex-2.0
|
8dfcef1ba96fb8653980d1cd3eee7ed3d7f28b60
|
[
"BSD-2-Clause"
] | 1
|
2020-10-19T14:36:59.000Z
|
2020-10-19T14:36:59.000Z
|
cerebralcortex/algorithms/raw_byte_decode/__init__.py
|
MD2Korg/CerebralCortex-2.0
|
8dfcef1ba96fb8653980d1cd3eee7ed3d7f28b60
|
[
"BSD-2-Clause"
] | 4
|
2019-05-16T15:41:06.000Z
|
2020-04-07T06:41:39.000Z
|
cerebralcortex/algorithms/raw_byte_decode/__init__.py
|
MD2Korg/CerebralCortex-2.0
|
8dfcef1ba96fb8653980d1cd3eee7ed3d7f28b60
|
[
"BSD-2-Clause"
] | 10
|
2019-01-25T20:16:54.000Z
|
2021-05-04T16:53:46.000Z
|
from cerebralcortex.algorithms.raw_byte_decode.motionsenseHRV import motionsenseHRV_decode
__all__ = ["motionsenseHRV_decode"]
| 25.8
| 90
| 0.868217
| 13
| 129
| 8
| 0.692308
| 0.384615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069767
| 129
| 4
| 91
| 32.25
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0.164063
| 0.164063
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
05d5ee67c57bd3cb1e6d819a892dfbde42882aef
| 143
|
py
|
Python
|
controller/__init__.py
|
cunningr/yanccm
|
2d8f891d704672f4d3a15472c7a13edf7832d53d
|
[
"MIT"
] | null | null | null |
controller/__init__.py
|
cunningr/yanccm
|
2d8f891d704672f4d3a15472c7a13edf7832d53d
|
[
"MIT"
] | null | null | null |
controller/__init__.py
|
cunningr/yanccm
|
2d8f891d704672f4d3a15472c7a13edf7832d53d
|
[
"MIT"
] | null | null | null |
from controller.job import JobFile
from controller.compliance import Compliance
model = {
'job': JobFile,
'compliance': Compliance,
}
| 17.875
| 44
| 0.734266
| 15
| 143
| 7
| 0.466667
| 0.266667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174825
| 143
| 7
| 45
| 20.428571
| 0.889831
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
05ff31f8d9ef6a29d841710bad0d0ddffb96d622
| 91
|
py
|
Python
|
tbxforms/apps.py
|
jams2/tbxforms
|
d88aabb428a5e74d67fe877eb1e74bf9d9550c9f
|
[
"BSD-2-Clause"
] | 1
|
2022-02-03T13:59:43.000Z
|
2022-02-03T13:59:43.000Z
|
tbxforms/apps.py
|
jams2/tbxforms
|
d88aabb428a5e74d67fe877eb1e74bf9d9550c9f
|
[
"BSD-2-Clause"
] | 13
|
2022-02-21T10:24:59.000Z
|
2022-03-28T11:26:58.000Z
|
tbxforms/apps.py
|
jams2/tbxforms
|
d88aabb428a5e74d67fe877eb1e74bf9d9550c9f
|
[
"BSD-2-Clause"
] | 1
|
2021-09-07T14:07:40.000Z
|
2021-09-07T14:07:40.000Z
|
from django.apps import AppConfig
class TbxFormsConfig(AppConfig):
name = "tbxforms"
| 15.166667
| 33
| 0.758242
| 10
| 91
| 6.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164835
| 91
| 5
| 34
| 18.2
| 0.907895
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.