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
74d3334ebb55121dccd40e38b5e8752128511830
145
py
Python
ocp_resources/oauth.py
kbidarkar/openshift-python-wrapper
3cd4d6d3b71c82ff87f032a51510d9c9d207f6cb
[ "Apache-2.0" ]
null
null
null
ocp_resources/oauth.py
kbidarkar/openshift-python-wrapper
3cd4d6d3b71c82ff87f032a51510d9c9d207f6cb
[ "Apache-2.0" ]
null
null
null
ocp_resources/oauth.py
kbidarkar/openshift-python-wrapper
3cd4d6d3b71c82ff87f032a51510d9c9d207f6cb
[ "Apache-2.0" ]
null
null
null
from ocp_resources.resource import Resource class OAuth(Resource): """ OAuth object. """ api_version = Resource.ApiVersion.V1
14.5
43
0.682759
16
145
6.0625
0.75
0
0
0
0
0
0
0
0
0
0
0.00885
0.22069
145
9
44
16.111111
0.849558
0.089655
0
0
0
0
0
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
2d090eea061f7bbc49ae0a3dc6987a10c83be7d2
1,736
py
Python
src/ssh_server_interface.py
ramonmeza/PythonSSHServerTutorial
f3e88792b44e59b706c71df9248b287935daa81d
[ "MIT" ]
4
2020-11-02T11:15:45.000Z
2022-03-24T03:45:02.000Z
src/ssh_server_interface.py
ramonmeza/PythonSSHServerTutorial
f3e88792b44e59b706c71df9248b287935daa81d
[ "MIT" ]
null
null
null
src/ssh_server_interface.py
ramonmeza/PythonSSHServerTutorial
f3e88792b44e59b706c71df9248b287935daa81d
[ "MIT" ]
null
null
null
import paramiko class SshServerInterface(paramiko.ServerInterface): # This will allow the SSH server to provide a # channel for the client to communicate over. # By default, this will return OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED, # so we have to override it to return OPEN_SUCCEEDED # when the kind of channel requested is "session". def check_channel_request(self, kind, chanid): if kind == "session": return paramiko.OPEN_SUCCEEDED return paramiko.OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED # AFAIK, pty (pseudo-tty (TeleTYpewriter)) will allow our # client to interact with our shell. def check_channel_pty_request(self, channel, term, width, height, pixelwidth, pixelheight, modes): return True # This allows us to provide the channel with a shell we can connect to it. def check_channel_shell_request(self, channel): return True # This let's us setup password authentication. # There are better ways to do this than using plain text, # but for ease of development for me and this tutorial # I think plain text is acceptable. # # For posterity, you could setup a database that encrypts # passwords and will grab them to decrypt here. def check_auth_password(self, username, password): if (username == 'admin') and (password == 'password'): return paramiko.AUTH_SUCCESSFUL return paramiko.AUTH_FAILED # String that will display when a client connects, # before authentication has happened. This is different # than the shell's intro property, which is displayed # after the authentication. def get_banner(self): return ('My SSH Server\r\n', 'en-US')
42.341463
102
0.707373
233
1,736
5.180258
0.515021
0.026512
0.037283
0.059652
0
0
0
0
0
0
0
0
0.230991
1,736
41
103
42.341463
0.90412
0.515553
0
0.125
0
0
0.051095
0
0
0
0
0
0
1
0.3125
false
0.125
0.0625
0.1875
0.875
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
2d4029b1efd6f46c5e42ddad5574c60c914f19b6
3,401
py
Python
application/forms.py
competencytestlvl/cs50final-myexpenses
1f089b25c2b5b88aad01bd2fd2d61e45d0e7c11d
[ "MIT" ]
null
null
null
application/forms.py
competencytestlvl/cs50final-myexpenses
1f089b25c2b5b88aad01bd2fd2d61e45d0e7c11d
[ "MIT" ]
null
null
null
application/forms.py
competencytestlvl/cs50final-myexpenses
1f089b25c2b5b88aad01bd2fd2d61e45d0e7c11d
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, SelectField, IntegerField, SubmitField, PasswordField from wtforms.validators import DataRequired, EqualTo, InputRequired, Length from wtforms.widgets import TextArea class DataForm(FlaskForm): type = SelectField(label='Type', validators=[DataRequired()], choices=[('income', 'income'), ]) category = SelectField(label='Category', validators=[DataRequired()], choices=[ ('salary', 'salary'), ('investment', 'investment'), ('other income', 'other income') ]) amount = IntegerField("Amount ($)", validators=[DataRequired()]) note = StringField("Description (optional)", validators=[Length(max=250)], default='', widget=TextArea()) submit = SubmitField("Submit") class ExpensesDataForm(FlaskForm): type = SelectField(label='Type', validators=[DataRequired()], choices=[ ('expense', 'expense') ]) category = SelectField(label='Category', validators=[DataRequired()], choices=[ ('rent', 'rent'), ('bills', 'bills'), ('other expenses', 'other expenses') ]) amount = IntegerField("Amount ($)", validators=[DataRequired()]) note = StringField("Description (optional)", validators=[Length(max=250)], default='', widget=TextArea()) submit = SubmitField("Submit") class RegistrationForm(FlaskForm): username = StringField(label='Username', validators=[Length(min=4, max=30), InputRequired()], render_kw={"placeholder": "Your username"}) password = PasswordField(label='Password', validators=[Length(min=4, max=30), InputRequired(), EqualTo('confirmation', message="Password needs to match")], render_kw={"placeholder": "Your password"}) confirmation = PasswordField(label='Confirmation Password', validators=[Length(min=4, max=30), InputRequired()], render_kw={"placeholder": "Your confirmation password"}) submit = SubmitField("Register") class LoginForm(FlaskForm): username = StringField(label='Username', validators=[Length(min=4, max=60), InputRequired()], render_kw={"placeholder": "Your username"}) password = PasswordField(label='Password', validators=[Length(min=4, max=60), InputRequired()], render_kw={"placeholder": "Your password"}) confirmation = PasswordField(label='Confirmation Password', validators=[Length(min=4, max=60), InputRequired(), EqualTo('password', message="Password needs to match")], render_kw={"placeholder": "Your confirmation Password"}) submit = SubmitField("Login") class ConfirmationForm(FlaskForm): submit = SubmitField("Accept")
49.289855
119
0.533079
250
3,401
7.224
0.252
0.070875
0.063123
0.066445
0.733112
0.733112
0.733112
0.665559
0.539313
0.496678
0
0.010719
0.341664
3,401
69
120
49.289855
0.795891
0
0
0.418182
0
0
0.163727
0
0
0
0
0
0
1
0
false
0.2
0.072727
0
0.509091
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
0
0
1
0
0
1
0
0
4
74243b7eb0d2d43c42a608d6bfd785bdfc5a41b9
124
py
Python
seller/admin.py
bayloun/liban_ex
b7438cea178976a01959e2955d1702a425e6b42c
[ "MIT" ]
null
null
null
seller/admin.py
bayloun/liban_ex
b7438cea178976a01959e2955d1702a425e6b42c
[ "MIT" ]
null
null
null
seller/admin.py
bayloun/liban_ex
b7438cea178976a01959e2955d1702a425e6b42c
[ "MIT" ]
null
null
null
from django.contrib import admin from seller.models import Seller # Register your models here. admin.site.register(Seller)
20.666667
32
0.814516
18
124
5.611111
0.611111
0
0
0
0
0
0
0
0
0
0
0
0.120968
124
5
33
24.8
0.926606
0.209677
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
74379af739788836ed13bd068752b88fb0f5a34b
224
py
Python
python_modules/dagster/dagster/core/asset_defs/__init__.py
abkfenris/dagster
7f35164535200cf904a4fdb18af207ccad09ad68
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/asset_defs/__init__.py
abkfenris/dagster
7f35164535200cf904a4fdb18af207ccad09ad68
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/asset_defs/__init__.py
abkfenris/dagster
7f35164535200cf904a4fdb18af207ccad09ad68
[ "Apache-2.0" ]
1
2019-09-11T03:02:27.000Z
2019-09-11T03:02:27.000Z
from .asset import AssetsDefinition from .asset_group import AssetGroup from .asset_in import AssetIn from .assets_job import build_assets_job from .decorators import asset, multi_asset from .source_asset import SourceAsset
32
42
0.857143
32
224
5.78125
0.46875
0.145946
0
0
0
0
0
0
0
0
0
0
0.111607
224
6
43
37.333333
0.929648
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
74522944449ee959ccc386db33d4b83c4e20eb00
810
py
Python
pypsignifit/psignierrors.py
esc/Psignifit-3.x
2a2a8a40f39d94f8fee99cb0ba4b9595ae216f88
[ "MIT" ]
6
2015-07-14T23:38:52.000Z
2018-10-12T08:15:36.000Z
pypsignifit/psignierrors.py
esc/Psignifit-3.x
2a2a8a40f39d94f8fee99cb0ba4b9595ae216f88
[ "MIT" ]
null
null
null
pypsignifit/psignierrors.py
esc/Psignifit-3.x
2a2a8a40f39d94f8fee99cb0ba4b9595ae216f88
[ "MIT" ]
5
2015-11-25T10:11:04.000Z
2018-10-12T08:17:48.000Z
#!/usr/bin/env python # vi: set ft=python sts=4 ts=4 sw=4 et: ###################################################################### # # See COPYING file distributed along with the psignifit package for # the copyright and license terms # ###################################################################### __docformat__ = "restructuredtext" class NosamplesError ( Exception ): """An exception that is raised whenever we try to use samples but there are none""" def __init__ ( self, msg ): self.msg = msg def __str__(self): return repr(self.msg) class SamplingError ( Exception ): """An exception that is raised if some thing is wrong with the sampling""" def __init__ ( self, msg ): self.msg = msg def __str__ ( self ): return repr(self.msg)
31.153846
87
0.548148
94
810
4.510638
0.617021
0.099057
0.09434
0.113208
0.391509
0.391509
0.240566
0.240566
0.240566
0.240566
0
0.004651
0.203704
810
25
88
32.4
0.652713
0.379012
0
0.727273
0
0
0.04611
0
0
0
0
0
0
1
0.363636
false
0
0
0.181818
0.727273
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
74893b2d6d401130cc7132e8609798ef551b3272
450
py
Python
Level.py
derzeiss/jump-n-run
c5b4f45a91eeea701b97ef595a11563cb774281c
[ "MIT" ]
null
null
null
Level.py
derzeiss/jump-n-run
c5b4f45a91eeea701b97ef595a11563cb774281c
[ "MIT" ]
null
null
null
Level.py
derzeiss/jump-n-run
c5b4f45a91eeea701b97ef595a11563cb774281c
[ "MIT" ]
null
null
null
import pygame class Level: def __init__(self, blocks: pygame.sprite.Group, length: int, player_spawn: (int, int)): self.__blocks = blocks self.__length = length self.__player_spawn = player_spawn def get_blocks(self) -> pygame.sprite.Group: return self.__blocks def get_length(self) -> int: return self.__length def get_player_spawn(self) -> (int, int): return self.__player_spawn
25
91
0.657778
57
450
4.77193
0.280702
0.202206
0.125
0
0
0
0
0
0
0
0
0
0.244444
450
17
92
26.470588
0.8
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.083333
0.25
0.75
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
74abb37604b1268603c7173f1c0ed41f99b7dbee
17,794
py
Python
tests/test_core.py
nicolasmesa/context-cli
2b4464b54c748d41515b53d38423d2234d74abb4
[ "MIT" ]
null
null
null
tests/test_core.py
nicolasmesa/context-cli
2b4464b54c748d41515b53d38423d2234d74abb4
[ "MIT" ]
5
2019-01-20T20:09:43.000Z
2019-01-20T20:19:32.000Z
tests/test_core.py
nicolasmesa/context-cli
2b4464b54c748d41515b53d38423d2234d74abb4
[ "MIT" ]
null
null
null
from mock import patch, mock, ANY from pathlib import Path from context_cli.core import ( start_and_end_delimiter_context_factory_creator, single_delimiter_context_factory_creator, get_context_factory_from_args, build_pipeline, construct_arg_parser, parse_args, main ) from context_cli.util import TypeArgDoesNotExistException HOME_PATH = '/my/home' @patch('context_cli.context.StartAndEndDelimiterContextFactory.__init__', return_value=None) def test_start_and_end_delimiter_context_factory_creator(mock_init_method): start_delimiter_matcher = mock.MagicMock() end_delimiter_matcher = mock.MagicMock() exclude_start = False exclude_end = True ignore_end_delimiter = True file = mock.MagicMock() factory = start_and_end_delimiter_context_factory_creator( start_delimiter_matcher=start_delimiter_matcher, end_delimiter_matcher=end_delimiter_matcher, exclude_start=exclude_start, exclude_end=exclude_end, ignore_end_delimiter=ignore_end_delimiter, ) assert callable(factory) is True context_factory = factory(file) assert context_factory is not None mock_init_method.assert_called_once_with( file, start_delimiter_matcher=start_delimiter_matcher, end_delimiter_matcher=end_delimiter_matcher, exclude_start_delimiter=exclude_start, exclude_end_delimiter=exclude_end, ignore_end_delimiter=ignore_end_delimiter, ) @patch('context_cli.context.SingleDelimiterContextFactory.__init__', return_value=None) def test_single_delimiter_context_factory_creator(mock_init_method): delimiter_matcher = mock.MagicMock() exclude_delimiter = False file = mock.MagicMock() factory = single_delimiter_context_factory_creator( delimiter_matcher=delimiter_matcher, exclude_delimiter=exclude_delimiter, ) assert callable(factory) is True context_factory = factory(file) assert context_factory is not None mock_init_method.assert_called_once_with( file, delimiter_matcher=delimiter_matcher, exclude_delimiter=exclude_delimiter, ) def test_get_context_factory_from_args_all_matchers_defined(): args = mock.MagicMock() args.start_delimiter_matcher = mock.MagicMock() args.end_delimiter_matcher = mock.MagicMock() args.delimiter_matcher = mock.MagicMock() ap = mock.MagicMock() ap.error = mock.MagicMock() get_context_factory_from_args(ap, args) ap.error.assert_called() def test_get_context_factory_from_args_no_matchers_defined(): args = mock.MagicMock() args.start_delimiter_matcher = None args.end_delimiter_matcher = None args.delimiter_matcher = None ap = mock.MagicMock() ap.error = mock.MagicMock() get_context_factory_from_args(ap, args) ap.error.assert_called() @patch('context_cli.core.start_and_end_delimiter_context_factory_creator', return_value=mock.MagicMock()) def test_get_context_factory_from_args_start_and_end_delimiter_matchers(factory_creator_mock): args = mock.MagicMock() args.start_delimiter_matcher = mock.MagicMock() args.end_delimiter_matcher = mock.MagicMock() args.exclude_start_delimiter = mock.MagicMock() args.exclude_end_delimiter = mock.MagicMock() args.ignore_end_delimiter = mock.MagicMock() ap = mock.MagicMock() context_factory_factory = get_context_factory_from_args(ap, args) assert context_factory_factory is not None factory_creator_mock.assert_called_once_with( start_delimiter_matcher=args.start_delimiter_matcher, end_delimiter_matcher=args.end_delimiter_matcher, exclude_start=args.exclude_start_delimiter, exclude_end=args.exclude_end_delimiter, ignore_end_delimiter=args.ignore_end_delimiter, ) @patch('context_cli.core.single_delimiter_context_factory_creator', return_value=mock.MagicMock()) def test_get_context_factory_from_args_delimiter_matchers(factory_creator_mock): args = mock.MagicMock() args.delimiter_matcher = mock.MagicMock() args.start_delimiter_matcher = None args.end_delimiter_matcher = None ap = mock.MagicMock() context_factory_factory = get_context_factory_from_args(ap, args) assert context_factory_factory is not None factory_creator_mock.assert_called_once_with( delimiter_matcher=args.delimiter_matcher, exclude_delimiter=True, ) @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_no_filters(not_empty_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline not_empty_filter_mock.assert_called_once_with(context_generator=context_factory) @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_no_filters(not_empty_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline not_empty_filter_mock.assert_called_once_with(context_generator=context_factory) @patch('context_cli.core.MatchesTextContextFilter') @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_matches_text_filter(not_empty_filter_mock, matches_text_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() args.matches_text = ['matches this'] pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline matches_text_filter_mock.assert_called_once_with(context_generator=context_factory, text=args.matches_text[0]) not_empty_filter_mock.assert_called_once_with(context_generator=matches_text_filter_mock.return_value) @patch('context_cli.core.NotMatchesTextContextFilter') @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_not_matches_text_filter(not_empty_filter_mock, not_matches_text_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() args.not_matches_text = ['not matches this'] pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline not_matches_text_filter_mock.assert_called_once_with(context_generator=context_factory, text=args.not_matches_text[0]) not_empty_filter_mock.assert_called_once_with(context_generator=not_matches_text_filter_mock.return_value) @patch('context_cli.core.ContainsTextContextFilter') @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_contains_text_filter(not_empty_filter_mock, contains_text_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() args.contains_text = ['contains this'] pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline contains_text_filter_mock.assert_called_once_with(context_generator=context_factory, text=args.contains_text[0]) not_empty_filter_mock.assert_called_once_with(context_generator=contains_text_filter_mock.return_value) @patch('context_cli.core.NotContainsTextContextFilter') @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_not_contains_text_filter(not_empty_filter_mock, not_contains_text_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() args.not_contains_text = ['not contains this'] pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline not_contains_text_filter_mock.assert_called_once_with(context_generator=context_factory, text=args.not_contains_text[0]) not_empty_filter_mock.assert_called_once_with(context_generator=not_contains_text_filter_mock.return_value) @patch('context_cli.core.MatchesRegexContextFilter') @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_matches_regex_filter(not_empty_filter_mock, matches_regex_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() args.matches_regex = ['regex'] pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline matches_regex_filter_mock.assert_called_once_with(context_generator=context_factory, regexp=args.matches_regex[0]) not_empty_filter_mock.assert_called_once_with(context_generator=matches_regex_filter_mock.return_value) @patch('context_cli.core.NotMatchesRegexContextFilter') @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_not_matches_regex_filter(not_empty_filter_mock, not_matches_regex_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() args.not_matches_regex = ['not regex'] pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline not_matches_regex_filter_mock.assert_called_once_with(context_generator=context_factory, regexp=args.not_matches_regex[0]) not_empty_filter_mock.assert_called_once_with(context_generator=not_matches_regex_filter_mock.return_value) @patch('context_cli.core.ContainsRegexContextFilter') @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_contains_regex_filter(not_empty_filter_mock, contains_regex_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() args.contains_regex = ['regex'] pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline contains_regex_filter_mock.assert_called_once_with(context_generator=context_factory, regexp=args.contains_regex[0]) not_empty_filter_mock.assert_called_once_with(context_generator=contains_regex_filter_mock.return_value) @patch('context_cli.core.NotContainsRegexContextFilter') @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_not_contains_regex_filter(not_empty_filter_mock, not_contains_regex_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() args.not_contains_regex = ['not regex'] pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline not_contains_regex_filter_mock.assert_called_once_with(context_generator=context_factory, regexp=args.not_contains_regex[0]) not_empty_filter_mock.assert_called_once_with(context_generator=not_contains_regex_filter_mock.return_value) @patch('context_cli.core.ContainsTextLineFilter') @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_contains_text_line_filter(not_empty_filter_mock, contains_text_line_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() args.line_contains_text = ['contains this'] pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline contains_text_line_filter_mock.assert_called_once_with(context_generator=context_factory, text=args.line_contains_text[0]) not_empty_filter_mock.assert_called_once_with(context_generator=contains_text_line_filter_mock.return_value) @patch('context_cli.core.NotContainsTextLineFilter') @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_not_contains_text_line_filter(not_empty_filter_mock, not_contains_text_line_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() args.not_line_contains_text = ['not contains this'] pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline not_contains_text_line_filter_mock.assert_called_once_with(context_generator=context_factory, text=args.not_line_contains_text[0]) not_empty_filter_mock.assert_called_once_with(context_generator=not_contains_text_line_filter_mock.return_value) @patch('context_cli.core.ContainsRegexLineFilter') @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_contains_regex_line_filter(not_empty_filter_mock, contains_regex_line_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() args.line_contains_regex = ['regex'] pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline contains_regex_line_filter_mock.assert_called_once_with(context_generator=context_factory, regexp=args.line_contains_regex[0]) not_empty_filter_mock.assert_called_once_with(context_generator=contains_regex_line_filter_mock.return_value) @patch('context_cli.core.NotContainsRegexLineFilter') @patch('context_cli.core.NotEmptyContextFilter') def test_build_pipeline_not_contains_regex_line_filter(not_empty_filter_mock, not_contains_regex_line_filter_mock): context_factory = mock.MagicMock() args = mock.MagicMock() args.not_line_contains_regex = ['not regex'] pipeline = build_pipeline(context_factory, args) assert not_empty_filter_mock.return_value is pipeline not_contains_regex_line_filter_mock.assert_called_once_with(context_generator=context_factory, regexp=args.not_line_contains_regex[0]) not_empty_filter_mock.assert_called_once_with(context_generator=not_contains_regex_line_filter_mock.return_value) def test_construct_arg_parser(): ap = construct_arg_parser() assert ap is not None def test_parse_args_no_type(): args = mock.MagicMock() ap = mock.MagicMock() ap.parse_args.return_value = args args.type = None result_args = parse_args(ap, ['ctx', 'argv']) assert result_args is args @patch('context_cli.core.Path') @patch('context_cli.core.CtxRc') def test_parse_args_write_and_files(ctxrc_cls, path_cls): ctxrc_cls.from_path.return_value = mock.MagicMock() path_cls.home.return_value = Path(HOME_PATH) args = mock.MagicMock() ap = mock.MagicMock() ap.parse_args.return_value = args args.type = 'some_type' args.write = True file = mock.MagicMock() file.name = 'not <stdin>' args.files = [ file ] parse_args(ap, ['ctx', 'argv']) ap.error.assert_called_once() @patch('context_cli.core.Path') @patch('context_cli.core.CtxRc') def test_parse_args_write_and_no_files(ctxrc_cls, path_cls): ctxrc = mock.MagicMock() ctxrc_cls.from_path.return_value = ctxrc path_cls.home.return_value = Path(HOME_PATH) args = mock.MagicMock() ap = mock.MagicMock() ap.parse_args.return_value = args args.type = 'some_type' args.write = True file = mock.MagicMock() file.name = '<stdin>' args.files = [ file ] parse_args(ap, ['ctx', 'argv']) ctxrc.add_type.assert_called_once_with('some_type', ['argv']) ctxrc.save.assert_called_once_with(Path(HOME_PATH) / '.ctxrc') ap.exit.assert_called_once_with(0) @patch('context_cli.core.Path') @patch('context_cli.core.CtxRc') def test_parse_args_arg_does_not_exist(ctxrc_cls, path_cls): type_arg = 'some_type_doesnt_exist' exception = TypeArgDoesNotExistException(missing_type=type_arg) ctxrc = mock.MagicMock() ctxrc.get_type_argv.side_effect = exception ctxrc_cls.from_path.return_value = ctxrc path_cls.home.return_value = Path(HOME_PATH) args = mock.MagicMock() args.write = False ap = mock.MagicMock() ap.parse_args.return_value = args args.type = type_arg parse_args(ap, ['ctx', 'argv']) ap.error.assert_called_once_with(str(exception)) @patch('context_cli.core.Path') @patch('context_cli.core.CtxRc') def test_parse_args_arg_exists(ctxrc_cls, path_cls): type_arg = 'some_arg' type_argv = ['some', 'argv'] argv = ['ctx', 'something', 'else'] ctxrc = mock.MagicMock() ctxrc.get_type_argv.return_value = type_argv ctxrc_cls.from_path.return_value = ctxrc path_cls.home.return_value = Path(HOME_PATH) args = mock.MagicMock() args.write = False args.files = [ mock.MagicMock(), mock.MagicMock() ] ap = mock.MagicMock() ap.parse_args.return_value = args args.type = type_arg new_args = parse_args(ap, argv) ap.parse_args.assert_called_with(type_argv + argv[1:]) ap.parse_args.assert_called_with(['some', 'argv', 'something', 'else']) assert new_args.type is None assert new_args.write is False assert new_args.files is args.files @patch('context_cli.core.sys') @patch('context_cli.core.build_pipeline') @patch('context_cli.core.get_context_factory_from_args') @patch('context_cli.core.parse_args') @patch('context_cli.core.construct_arg_parser') def test_main(construct_arg_parser_fn, parse_args_fn, get_context_factory_from_args_fn, build_pipeline_fn, sys): ap = mock.MagicMock() construct_arg_parser_fn.return_value = ap argv = ['ctx', 'something'] args = mock.MagicMock() file1 = mock.MagicMock() file2 = mock.MagicMock() args.files = [file1, file2] args.output_delimiter = 'output_delimiter' parse_args_fn.return_value = args context_factory_factory = mock.MagicMock() get_context_factory_from_args_fn.return_value = context_factory_factory context1 = mock.MagicMock() context1.__str__.return_value = 'context1' context2 = mock.MagicMock() context2.__str__.return_value = "context2\n" pipeline = [context1, context2] build_pipeline_fn.return_value = pipeline return_value = main(argv) assert 0 == return_value parse_args_fn.assert_called_once_with(ap, argv) get_context_factory_from_args_fn.assert_called_once_with(ap, args) context_factory_factory.assert_any_call(file1) context_factory_factory.assert_any_call(file2) sys.stdout.write.assert_any_call(args.output_delimiter) sys.stdout.write.assert_any_call("\n") sys.stdout.write.assert_any_call('context1') sys.stdout.write.assert_any_call("context2\n")
39.367257
138
0.789873
2,373
17,794
5.467341
0.05099
0.079158
0.049715
0.05827
0.823108
0.793741
0.754278
0.699707
0.67088
0.653692
0
0.001991
0.125155
17,794
451
139
39.454545
0.831438
0
0
0.502809
0
0
0.111342
0.091108
0
0
0
0
0.205056
1
0.075843
false
0
0.011236
0
0.087079
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
77aef8e80538b518dee2ebeb75dc913ac016f7e8
22,955
py
Python
sgfparser.py
fantianwen/IGOTools
b8f4d4b92b228ab8bceae5b7cecf7ccfef4f456d
[ "MIT" ]
null
null
null
sgfparser.py
fantianwen/IGOTools
b8f4d4b92b228ab8bceae5b7cecf7ccfef4f456d
[ "MIT" ]
null
null
null
sgfparser.py
fantianwen/IGOTools
b8f4d4b92b228ab8bceae5b7cecf7ccfef4f456d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sgf import matplotlib.pyplot as pyplot import os try: from StringIO import StringIO except ImportError: from io import StringIO def parseWinrate(filePath): winrates = [] with open(filePath) as f: collection = sgf.parse(f.read()) children = collection.children gameTree = children[0] for node in gameTree.nodes: for property in node.properties: if property == 'C': comments = node.properties[property] _comments = ''.join(comments) if _comments.strip() != '': winrate = _comments.split('::')[0] winrates.append(winrate) f.close() ii = [] winrates.pop(0) for _ in winrates: ff = float(_) ii.append(ff) return ii FATHER_FILE = '/home/fan/GoProjects/gtp/distance_data/' names = [FATHER_FILE + name for name in os.listdir(FATHER_FILE) if os.path.isfile(os.path.join(FATHER_FILE, name)) and 'W=B' in name ] # print('B' in '/home/fan/GoProjects/gtp/ex1/20190124215804W=B.sgf') print(len(names)) totalWinrates = [] totalLength = 0 maxLength = 0 for name in names: wr = parseWinrate(name) totalWinrates.append(wr) if len(wr)>maxLength: maxLength = len(wr) print(totalWinrates) averageWR = [] for index in range(0,maxLength): somelength = 0 averageOne = 0 for winrate in totalWinrates: if len(winrate)>index: averageOne+=winrate[index] somelength+=1 av = averageOne/somelength averageWR.append(av) print(averageWR) # # averageLength = 0 # for winrate in totalWinrates: # totalLength+=len(winrate) # averageLength = totalLength/28 # print(averageLength) # v2 ray wins # hhb = [0.5775593125000001, 0.56456625, 0.5652079375000001, 0.570498875, 0.5842454374999999, 0.6031345625000002, 0.6093540625, 0.6271281875000001, 0.6347387499999999, 0.673008875, 0.667450375, 0.706558125, 0.7368693125000001, 0.744022875, 0.7231482499999998, 0.7473750000000001, 0.7818960625, 0.7844019375000002, 0.808919625, 0.8035286249999999, 0.785371625, 0.8107565999999999, 0.7823051333333333, 0.7698254666666666, 0.7707268666666667, 0.7534974666666668, 0.7596864, 0.7521028666666668, 0.7370957333333333, 0.7776022142857143, 0.8041927692307691, 0.7919417692307692, 0.8547514166666667, 0.8438866666666666, 0.830531, 0.8191953333333332, 0.7640862500000001, 0.7199505833333332, 0.7744031818181818, 0.7605717272727273, 0.8381793999999999, 0.8231063000000001, 0.8299052, 0.8212946999999999, 0.7794255,0.8280825999999999, 0.8138567, 0.8004364, 0.7763981999999999, 0.7196156, 0.6757526, 0.6714967000000002, 0.6388847999999999, 0.6466603333333334, 0.5979657777777778, 0.6371911250000001, 0.692859, 0.6993034285714286, 0.5973502857142857, 0.6742401666666668, 0.6655256666666667, 0.6211963333333334, 0.5201378333333333, 0.6733849999999999, 0.5856, 0.502899, 0.6873319999999999, 0.658852, 0.6668816666666667, 0.628923, 0.6564596666666667, 0.655925, 0.621545, 0.6617455, 0.57608, 0.4945875, 0.295999, 0.239045, 0.184019, 0.195464, 0.177637, 0.162146, 0.116571] # hhc = [0.5434750689655171, 0.533838551724138, 0.5469265862068966, 0.5466511379310346, 0.5554324482758621, 0.5731461724137932, 0.5755165862068965, 0.5901477586206899, 0.6108426896551724, 0.6307502758620691, 0.6366355517241378, 0.659231793103448, 0.6682083448275864, 0.6928971379310345, 0.711429103448276, 0.7165224827586207,0.7501825172413794, 0.7438240344827587, 0.7246341724137928, 0.7424679310344829, 0.7245073793103449, 0.722314448275862, 0.7343515517241378, 0.728733551724138, 0.7000226896551723, 0.7432959642857144, 0.7296065, 0.7077935000000001, 0.6794439642857143, 0.6373862857142857, 0.6087427142857142, 0.6086458214285715, 0.5957124285714285, 0.5965104642857143, 0.63247344, 0.6141428333333333, 0.6389651666666667, 0.6005050000000001, 0.5822849583333334, 0.558670347826087, 0.5476504347826087, 0.5552760454545455, 0.5334375, 0.5644031904761905, 0.59188475, 0.5765791578947368, 0.6310573333333332, 0.6024293529411766, 0.5705632941176471, 0.5292564, 0.45612386666666677, 0.5152135833333333, 0.6051687, 0.4442858, 0.46843150000000006, 0.502202, 0.512453888888889, 0.5234963333333333, 0.3785813333333334, 0.32952312500000003, 0.3024567142857143, 0.36254379999999997, 0.34824099999999997, 0.3010888, 0.2882726, 0.23065075000000002, 0.372557, 0.2908635, 0.1341055, 0.188182] # hhd = [0.5393092307692309, 0.5302565384615385, 0.5436868461538461, 0.5518292307692307, 0.5436075384615384, 0.5395435384615384, 0.5442246538461539, 0.5517013846153845, 0.5741643846153844, 0.5819460384615384, 0.6026850384615385, 0.5896888846153845, 0.5896858076923077, 0.6130085384615385, 0.6185846153846153, 0.6386939615384615, 0.6484373076923077, 0.6295285, 0.6284303076923077, 0.6299253461538462, 0.6244776153846154, 0.654506576923077, 0.6375732307692308, 0.6497497600000003, 0.6591942000000001, 0.68291372, 0.65555252, 0.6134528800000001, 0.611192, 0.60635364, 0.5813813600000001, 0.6044710000000001, 0.6124345909090908, 0.63236945, 0.6709866315789474, 0.7009252631578948, 0.7065737368421052, 0.6835115789473684, 0.6488279473684212, 0.5903252631578946, 0.6042911111111111, 0.6552737777777778, 0.6357875000000001, 0.6281401764705883, 0.7112370666666669, 0.6588677333333334, 0.6718206428571428, 0.6831169166666666, 0.6828105833333334, 0.7464206000000001, 0.7442028, 0.762799, 0.6977016, 0.6745601000000001, 0.6629996, 0.7053958888888889, 0.6354118888888889, 0.6313773333333333, 0.5442441111111112, 0.5479594444444444, 0.5186844444444444, 0.49918037499999995, 0.505895625, 0.4646431428571428, 0.38592585714285715, 0.4351467142857143, 0.4041531666666666, 0.4166248, 0.4218558, 0.388579, 0.38249379999999994, 0.3856122, 0.3838692, 0.4183486666666667, 0.35569500000000004, 0.4375233333333333, 0.384768, 0.145502] # ray wins # hhb = [0.5759965714285714, 0.5448472857142858, 0.5425218571428571, 0.5504439999999999, 0.5651762857142858, 0.5803838571428572, 0.6040844285714285, 0.6282208571428571, 0.6404134285714286, 0.6836617142857143, 0.7011649999999999, 0.7127332857142858, 0.7236301428571429, 0.7462848571428572, 0.7603354285714286, 0.7906764285714285, 0.7813837142857143, 0.8088238571428572, 0.8246265714285715, 0.8098171428571427, 0.8339465714285714, 0.82773, 0.8849258571428571, 0.8525157142857144, 0.8390134285714286, 0.8597924285714286, 0.8535808571428571, 0.7530702857142858, 0.7654721428571428, 0.6963614285714286, 0.6590031428571429, 0.61571, 0.5506111428571429, 0.5468141428571429, 0.6000711428571428, 0.6484823333333333, 0.5993065, 0.6336472, 0.7496309999999999, 0.8037375, 0.8073187500000001, 0.7766355, 0.6750477500000001, 0.696185, 0.75660425, 0.840685, 0.8255597499999999, 0.71560325, 0.7146527500000001, 0.75564225, 0.6913265, 0.6646037499999999, 0.65055825, 0.652365, 0.58276525, 0.5146895, 0.56560025, 0.5366574999999999, 0.47338, 0.38882649999999996, 0.331675, 0.2849643333333333, 0.23054299999999997, 0.289507, 0.216808, 0.312473, 0.285789, 0.173404] # hhc = [0.5318586666666666, 0.5221309166666667, 0.52037925, 0.5187181666666666, 0.5211639166666667, 0.5269451666666667, 0.5493411666666667, 0.5450009166666666, 0.5526790833333334, 0.57061525, 0.5753754166666667, 0.5812548333333334, 0.5999649166666667, 0.6110461666666667, 0.588961, 0.5956411666666668, 0.6166089999999999, 0.5743964166666666, 0.6043224166666666, 0.6520659166666666, 0.6438545833333335, 0.6319751666666666, 0.6200535833333333, 0.6462424545454546, 0.6385646363636363, 0.6252463636363637, 0.6247699999999999, 0.605427, 0.6226680000000001, 0.571057909090909, 0.5361202727272727, 0.5268814545454545, 0.5295886363636364, 0.5370345000000001, 0.5554733333333333, 0.5008878888888889, 0.6071692857142857, 0.5573902857142857, 0.5138258571428572, 0.5645343333333334, 0.5772151666666667, 0.6853566,0.6219490000000001, 0.660458, 0.6546103999999999, 0.6312312, 0.60555, 0.6025600000000001, 0.6400203999999999, 0.6752356, 0.5729708, 0.5522452, 0.5278598, 0.39897179999999993, 0.4393876, 0.3698578, 0.3494176, 0.35769320000000004, 0.3447448, 0.48125033333333334, 0.3384213333333333, 0.2780086666666667, 0.341325, 0.398223, 0.308091, 0.127838, 0.111326, 0.114325, 0.179403, 0.175647, 0.144469, 0.150082, 0.102021, 0.176734, 0.138445, 0.302166] # hhd = [0.5314115, 0.5232428636363637, 0.5211357272727273, 0.5154027272727273, 0.5062784090909092, 0.5101283181818183, 0.5119015454545455, 0.505995590909091, 0.5178756363636364, 0.5142435454545454, 0.5248058636363635, 0.5368693181818182, 0.5318861818181819, 0.5574796818181817, 0.6022538181818182, 0.5799426363636364, 0.5945062272727273, 0.5785891818181818, 0.5898115, 0.5600774545454545, 0.5432434999999999, 0.5756011904761905, 0.5487933809523808, 0.5494473999999999, 0.5203976499999999, 0.5480515789473684, 0.6079285555555557, 0.6195662222222222, 0.5884621111111112, 0.5562018333333334, 0.5846993749999999, 0.5704143749999999, 0.6599882666666667, 0.6940446666666666, 0.7269157333333333, 0.7183842666666668, 0.7373521333333333, 0.7684110666666667, 0.7447058666666667, 0.7014152666666665, 0.6782243333333334, 0.7300414285714286, 0.6480882857142858, 0.6465781538461539, 0.645483153846154, 0.656904, 0.6448232307692306, 0.6022225384615385, 0.6204838333333333, 0.59752825, 0.5400094545454545, 0.5111498181818181, 0.5524972, 0.55449, 0.5716873333333334, 0.5217785555555555, 0.565627125, 0.6059215, 0.52874, 0.47604549999999995, 0.46534757142857147, 0.48193014285714286, 0.37503766666666666, 0.5116875, 0.47710874999999997, 0.43923875, 0.34747750000000005, 0.23827349999999997, 0.1580915, 0.169604] hhd_p = [0.5480376666666668, 0.5401401666666666, 0.5675721666666665, 0.5600565000000001, 0.559863, 0.579262, 0.576244, 0.5869045, 0.5883101666666667, 0.6181856666666666, 0.6138246666666667, 0.5911588333333334, 0.6178401666666667, 0.5894408333333333, 0.5855963333333334, 0.5894416666666666, 0.5850978333333333, 0.5529091666666667, 0.5396886666666667, 0.5591726666666667, 0.5608766666666666, 0.6742511999999999, 0.6502296000000001, 0.6377372, 0.6296348, 0.645398, 0.82363425, 0.80264775, 0.8034250000000001, 0.7687705, 0.7481295000000001, 0.743873, 0.9579023333333333, 0.9328820000000001, 0.8814653333333333, 0.8945093333333333, 0.9083783333333333, 0.9177536666666667, 0.9131336666666666, 0.8362553333333334, 0.84553, 0.8291930000000001, 0.8186166666666667, 0.8671466666666667, 0.8692163333333335, 0.8547466666666668, 0.8289176666666668, 0.7173386666666667, 0.7285043333333333, 0.7385406666666666, 0.7600176666666667, 0.7742023333333333, 0.8065103333333333, 0.8096486666666666, 0.7878063333333335, 0.7819773333333333, 0.7669016666666666, 0.7278739999999999, 0.6796726666666667, 0.6513606666666667, 0.5105246666666666, 0.4651626666666666, 0.49024333333333336, 0.49269366666666664, 0.45186433333333337, 0.619284, 0.672739, 0.5487515000000001, 0.5888375, 0.601823, 0.5577155, 0.591024, 0.36285100000000003, 0.318928, 0.249745, 0.164293, 0.159919, 0.124087, 0.10486, 0.110406] # hha = [0.5793809642857145, 0.5632121071428573, 0.5564908571428572, 0.5593121785714287, 0.5778796071428571, 0.5835904285714285, 0.5969603571428571, 0.6095315, 0.6242430357142856, 0.6653345714285714, 0.6958747142857143, 0.7138866071428573, 0.7406872142857146, 0.7719963571428572, 0.7962930357142856, 0.8072692142857142, 0.8297261785714285, 0.8502258214285715, 0.8666266428571429, 0.8727986071428572, 0.8900608571428572, 0.9017216071428571, 0.9033675714285714, 0.9152872142857144, 0.9275555357142858, 0.9412533214285713, 0.9490050357142861, 0.952499964285714, 0.9487960357142858, 0.9515366428571432, 0.9612413928571428, 0.95750525, 0.9633124285714284, 0.9676655714285715, 0.9721318518518518, 0.9733866666666668, 0.9783696538461538, 0.9795533076923076, 0.9773193749999999, 0.9775310434782609, 0.9766640499999999, 0.9775781999999997, 0.9773733684210525, 0.975649722222222, 0.9754554999999998, 0.9757021428571427, 0.9793503846153846, 0.9791898333333332, 0.9786719999999999, 0.9839314545454545, 0.9868598000000001, 0.9883824999999999, 0.9883085714285716, 0.9873341666666665, 0.9861813333333332, 0.9860150000000001, 0.9854042000000002, 0.9832609999999999, 0.9845596666666667, 0.9815193333333334, 0.977812, 0.9810266666666666, 0.9794543333333333, 0.979777, 0.9798330000000001, 0.987678,0.988982, 0.983327, 0.9837] # hhb = [0.5739667391304346, 0.544311043478261, 0.5359710869565218, 0.5460133478260868, 0.5728115652173914, 0.5829033043478261, 0.5960269130434782, 0.6062377391304347, 0.6329619999999999, 0.6347817826086957, 0.660181347826087, 0.6835653478260869, 0.7089669565217391, 0.7138852608695652, 0.7519908695652172, 0.7665332608695654, 0.7914272173913043, 0.8119542173913045, 0.8029530869565216, 0.8244440000000001, 0.8211909130434781, 0.8245742608695654, 0.8354085652173915, 0.8373964347826088, 0.8571481304347827, 0.8513666956521739, 0.8312545652173912, 0.8449679565217392, 0.8474699565217392, 0.8771474347826088, 0.8907414347826088, 0.8731165217391306, 0.8845200434782611, 0.8365324999999999, 0.836378761904762, 0.832691380952381, 0.8291973333333333, 0.8456662857142858, 0.8388898095238095, 0.8389156666666666, 0.8843914285714285, 0.8747492380952382, 0.9042732380952382, 0.9199645000000001, 0.9109447894736844, 0.9207497222222225, 0.9286159999999999, 0.9261978235294117, 0.9279694705882352, 0.9358270625000001, 0.9346272666666665, 0.9297377272727271, 0.8965906666666665, 0.8792778888888889, 0.8897282222222223, 0.8923995, 0.927870125, 0.9240704, 0.9344135999999998, 0.9373059999999999, 0.9497547500000001, 0.9531587499999999, 0.95843925, 0.9636305000000001, 0.9531035, 0.9581095, 0.960357, 0.957625,0.927325] # hhc = [0.5406244444444446, 0.5255371666666666, 0.5255462777777777, 0.5216446666666665, 0.5138836111111111, 0.5431500555555556, 0.5514494444444444, 0.5849443333333334, 0.5995293888888888, 0.6028502222222222, 0.6397224444444443, 0.647050222222222, 0.634464611111111, 0.6547321111111113, 0.6512999444444445, 0.6941818333333333, 0.706922, 0.7424321111111111, 0.7574608888888889, 0.7632736666666667, 0.7901877777777777, 0.7940358888888889, 0.7868426666666668, 0.7870485, 0.7936107222222223, 0.8010775555555555, 0.7795742777777779, 0.764699, 0.7620797777777778, 0.7613470000000002, 0.7819948333333333, 0.7583798888888887, 0.7699878888888887, 0.7516268333333334, 0.7519739444444444, 0.7743095000000001, 0.7789397777777778, 0.7835209444444444, 0.8019935555555554, 0.8299825, 0.8496603333333334, 0.8643845555555556, 0.8688054705882354, 0.8608672500000001, 0.8824585, 0.8475771249999999, 0.8468906875, 0.8832644999999999, 0.8672378571428571, 0.8894657857142857, 0.901484, 0.9137395384615385, 0.9277878333333334, 0.933115909090909, 0.9360897999999999, 0.9420567, 0.9323629999999999, 0.9429513333333335, 0.9231547777777779, 0.922705111111111, 0.91301525, 0.8973813333333333, 0.908249, 0.9382201666666666, 0.89791275, 0.895457, 0.9369675000000001, 0.933075, 0.9545363333333334] # hhd = [0.5335157500000001, 0.5198456250000001, 0.521447875, 0.514113375, 0.512982875, 0.48400200000000004, 0.515115, 0.515767875, 0.50178025, 0.527930625, 0.493718125, 0.55912625, 0.52942775, 0.5292477499999999, 0.536730375, 0.60647, 0.6048126249999999, 0.606930125, 0.55364, 0.57439825, 0.6075993749999999, 0.586392, 0.61917275, 0.60159175, 0.688754125, 0.688866375, 0.6355740000000001, 0.659611875, 0.6701824999999999, 0.7334772500000001, 0.6927976250000001, 0.7991945, 0.699114, 0.7158350000000001, 0.6947826250000001, 0.736144, 0.73195, 0.6698605, 0.6810717500000001, 0.68919, 0.780477125, 0.7789962500000001, 0.8586975, 0.882242875, 0.91013525, 0.920223375, 0.9249061428571429, 0.9176145, 0.8921475000000001, 0.9084383333333332, 0.9214538333333334, 0.924324, 0.9080268333333333, 0.8665608, 0.815264, 0.9091100000000001, 0.91391, 0.8866860000000001, 0.8703443333333333, 0.8605539999999999, 0.947699, 0.945965,0.9277878333333334, 0.933115909090909, 0.9360897999999999, 0.9420567, 0.9323629999999999, 0.9429513333333335, 0.9531547777777779] hha = [0.5793809642857145, 0.5632121071428573, 0.5564908571428572, 0.5593121785714287, 0.5778796071428571, 0.5835904285714285, 0.5969603571428571, 0.6095315, 0.6242430357142856, 0.6653345714285714, 0.6958747142857143, 0.7138866071428573, 0.7406872142857146, 0.7719963571428572, 0.7962930357142856, 0.8072692142857142, 0.8297261785714285, 0.8502258214285715, 0.8666266428571429, 0.8727986071428572, 0.8900608571428572, 0.9017216071428571, 0.9033675714285714, 0.9152872142857144, 0.9275555357142858, 0.9412533214285713, 0.9490050357142861, 0.952499964285714, 0.9487960357142858, 0.9515366428571432, 0.9612413928571428, 0.95750525, 0.9633124285714284, 0.9676655714285715, 0.9721318518518518, 0.9733866666666668, 0.9783696538461538, 0.9795533076923076, 0.9773193749999999, 0.9775310434782609, 0.9766640499999999, 0.9775781999999997, 0.9773733684210525, 0.975649722222222, 0.9754554999999998, 0.9757021428571427, 0.9793503846153846, 0.9791898333333332, 0.9786719999999999, 0.9839314545454545, 0.9868598000000001, 0.9883824999999999, 0.9883085714285716, 0.9873341666666665, 0.9861813333333332, 0.9860150000000001, 0.9854042000000002, 0.9832609999999999, 0.9845596666666667, 0.9815193333333334, 0.977812, 0.9810266666666666, 0.9794543333333333, 0.979777, 0.9798330000000001, 0.987678,0.988982, 0.983327, 0.983766, 0.988941, 0.977702, 0.985884, 0.976505, 0.985123, 0.978036, 0.966152, 0.98114] hhb = [0.5744403666666665, 0.5444361666666667, 0.5374996000000001, 0.5470471666666665, 0.57103, 0.5823154333333335, 0.597907, 0.6113671333333334, 0.6347006666666667, 0.6461871000000001, 0.6697442000000001, 0.6903712, 0.7123883666666667, 0.7214451666666667, 0.7539379333333334, 0.7721666666666669, 0.7890837333333334, 0.8112238, 0.8080102333333333, 0.8210310666666668, 0.8241672333333334, 0.8253106, 0.8469626, 0.8409242666666666, 0.8529166999999999, 0.8533326999999998, 0.8364640333333333, 0.8235251666666668, 0.8283371333333335, 0.8349640333333332, 0.8366691666666667, 0.8130550000000001, 0.8066079666666668, 0.7666004827586206, 0.7773018571428573, 0.7917560370370372, 0.7781104814814815, 0.8048933846153846, 0.8246084000000002, 0.83328716, 0.8720597999999998, 0.8590510400000001, 0.86759716, 0.8826679166666667, 0.8841029565217392, 0.9061925000000002, 0.9098785, 0.8860845714285714, 0.8873377142857143, 0.8997901, 0.883406052631579, 0.8590353333333333, 0.8208883846153845, 0.8094585384615385, 0.795278076923077, 0.7664961666666666, 0.8071135000000002, 0.751886888888889, 0.7295097777777779, 0.6935373333333332, 0.6407148750000001, 0.6667897142857143, 0.6464837142857143, 0.6747204285714286, 0.5113262000000001, 0.7428973333333332, 0.7355010000000001, 0.5655144999999999] hhc = [0.5371181333333332, 0.5241746666666666, 0.5234794666666667, 0.5204740666666665, 0.5167957333333334, 0.5366681000000001, 0.5506061333333334, 0.5689669666666667, 0.5807892666666666, 0.5899562333333335, 0.6139836333333333, 0.6207320666666667, 0.6206647333333333, 0.6372577333333334, 0.6263643666666666, 0.6547655666666666, 0.6707968, 0.6752178333333333, 0.6962054999999999, 0.7187905666666666, 0.7316544999999999, 0.7292116000000001, 0.7201270333333333, 0.7336393103448275, 0.7348001379310344, 0.7343829655172414, 0.7208554137931034, 0.7042854827586209, 0.709199448275862, 0.6891683793103446, 0.6887320689655172, 0.6705701379310344, 0.6788019655172414, 0.6749867142857141, 0.6864737407407409, 0.683168962962963, 0.7308440399999999, 0.72020436, 0.7213065999999999, 0.7636204583333331, 0.7815490416666667, 0.825465434782609, 0.8127017272727273, 0.8131507619047618, 0.8282089523809524, 0.7960661904761905, 0.7894286190476191, 0.8164300952380951, 0.8074437894736842, 0.8330894210526316, 0.8150331578947368, 0.8133244444444445, 0.8101619411764706, 0.766195875, 0.7705224000000002, 0.7513237333333332, 0.7380478666666668, 0.7339305714285714, 0.7165797857142858, 0.8123414166666666, 0.756307818181818, 0.6909237777777777, 0.8272598571428571, 0.8610777142857142, 0.7799484000000001, 0.7419332, 0.7718392, 0.7283875, 0.760753, 0.6908799999999999, 0.4137355, 0.324801, 0.347909, 0.39571999999999996, 0.406351, 0.5024165, 0.725099, 0.884469, 0.856902, 0.834031, 0.899073, 0.929087, 0.991742] hhd = [0.5319726333333334, 0.5223369333333334, 0.5212189666666666, 0.5150589, 0.5080662666666667, 0.5031613000000001, 0.5127584666666667, 0.5086015333333332, 0.5135835333333333, 0.5178934333333333, 0.5165157999999999, 0.5428045000000001, 0.5312306000000001, 0.5499511666666667, 0.5847808999999999, 0.5870166, 0.5972546000000002, 0.5861467666666667, 0.5801657666666666, 0.5638963333333333, 0.5604050666666666, 0.5785779655172414, 0.5682083793103448, 0.5643457857142857, 0.5684994999999999, 0.5897744814814815, 0.6164348461538461, 0.6318879615384615, 0.6136068461538462, 0.6107481153846154, 0.6207321250000001, 0.6466744166666668, 0.6735972173913044, 0.7016239130434782, 0.715739, 0.7245615652173913, 0.7354731304347825, 0.7341326086956521, 0.722572260869565, 0.6971630000000001, 0.7137905217391305, 0.7478431818181815, 0.7246734545454546, 0.7363551904761904, 0.7463029999999999, 0.7572161428571428, 0.74285225, 0.70182, 0.7110383888888888, 0.7011649444444445, 0.6746368823529413, 0.6569759999999999, 0.6858208125, 0.6585136000000001, 0.6325815, 0.6186114166666666, 0.6606133636363636, 0.6824936363636364, 0.6219048181818182, 0.5809114545454546, 0.5725367777777778, 0.5449345, 0.37503766666666666, 0.5116875, 0.47710874999999997, 0.43923875, 0.34747750000000005, 0.23827349999999997, 0.1580915, 0.169604] # print('the average length of match is:'+ str(totalLength/len(names))) # x = range(1,len(averageWR)+1) # # x1 = range(1, len(hha)+1) x2 = range(1, len(hhb)+1) x3 = range(1, len(hhc)+1) x4 = range(1, len(hhd)+1) # hha = hha[:68] # hhb = hhb[:68] # hhc = hhc[:68] # hhd = hhd[:68] # hhb = list(map(lambda wr:1-wr,hhb)) # hhc = list(map(lambda wr:1-wr,hhc)) # hhd = list(map(lambda wr:1-wr,hhd)) print(x1) print(x2) print(x3) print(x4) # pyplot.plot(x, averageWR , 's-', color='g') # pyplot.show() # plt.plot([1, 2, 3, 4], [1, 4, 9, 16], 'ro') # plt.axis([0, 6, 0, 20]) # plt.show() # t = np.arange(0., 5., 0.2) # plt.plot(t, t, 'r--', t, t ** 2, 'bs', t, t ** 3, 'g^') # pyplot.figure(22) # ax1 = pyplot.subplot(221) # ax1.set_title('a') # ax1.set_ylabel('wr of white') # ax1.set_xlabel('moves of white') # pyplot.plot(x1,hha,'r--',) # ax2 = pyplot.subplot(222) # ax2.set_ylabel('wr of white') # ax2.set_xlabel('moves of white') # ax2.set_title('b') # pyplot.plot(x2,hhb, 'g--') # ax3 = pyplot.subplot(223) # ax3.set_ylabel('wr of white') # ax3.set_xlabel('moves of white') # ax3.set_title('c') # pyplot.plot(x3,hhc,'b--') # ax4 = pyplot.subplot(224) # ax4.set_ylabel('wr of white') # ax4.set_xlabel('moves of white') # ax4.set_title('d') # pyplot.plot(x4,hhd, 'r--') pyplot.title('winning rate') pyplot.xlabel('move numebers') pyplot.ylabel('winning rate') pyplot.plot(x1,hha,color = 'red',label = '手加減なし') pyplot.plot(x2,hhb,color = 'green',label = '軽度手加減') pyplot.plot(x3,hhc,color = 'blue',label = '中度手加減') pyplot.plot(x4,hhd,color = 'green',label = '重度手加減') pyplot.legend() pyplot.show()
131.925287
1,484
0.793422
2,711
22,955
6.709701
0.433788
0.004948
0.002474
0.002859
0.15602
0.144585
0.141616
0.141616
0.141616
0.141616
0
0.768379
0.083293
22,955
174
1,485
131.925287
0.096041
0.606491
0
0
0
0
0.013259
0.004345
0
0
0
0
0
1
0.013158
false
0
0.078947
0
0.105263
0.092105
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
77be40d6c0efff4c19f0c90a56ea2d6baae66818
459
py
Python
max_profit/tests.py
aurelienlegrand/coding_challenges
af7da76374ed574892e66ab24d753543e3cb4c68
[ "MIT" ]
null
null
null
max_profit/tests.py
aurelienlegrand/coding_challenges
af7da76374ed574892e66ab24d753543e3cb4c68
[ "MIT" ]
null
null
null
max_profit/tests.py
aurelienlegrand/coding_challenges
af7da76374ed574892e66ab24d753543e3cb4c68
[ "MIT" ]
null
null
null
from max_profit import max_profit def test_simple(): stocks = [1, 2, 3, 4] assert (max_profit(stocks) == [1, 4]) def test_empty(): stocks = [] assert (max_profit(stocks) == []) def test_one_elt(): stocks = [1] assert (max_profit(stocks) == [1, 1]) def test_medium(): stocks = [5, 10, 2, 5] assert (max_profit(stocks) == [5, 10]) def test_medium2(): stocks = [5, 10, 2, 5, 14] assert (max_profit(stocks) == [2, 14])
21.857143
42
0.583878
69
459
3.695652
0.304348
0.247059
0.294118
0.411765
0.258824
0
0
0
0
0
0
0.079545
0.233115
459
21
43
21.857143
0.644886
0
0
0
0
0
0
0
0
0
0
0
0.3125
1
0.3125
false
0
0.0625
0
0.375
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
77ce8ed737cebe789d9a37bd92f424767f412af3
176
py
Python
src/easy/merge_sorted_array_88.py
ahmet9cengiz/leetCode
9e9a61f059072d7791dd19706b7a3e0d0a446669
[ "MIT" ]
null
null
null
src/easy/merge_sorted_array_88.py
ahmet9cengiz/leetCode
9e9a61f059072d7791dd19706b7a3e0d0a446669
[ "MIT" ]
null
null
null
src/easy/merge_sorted_array_88.py
ahmet9cengiz/leetCode
9e9a61f059072d7791dd19706b7a3e0d0a446669
[ "MIT" ]
null
null
null
class Solution(object): # Time Complexity: O(n) @staticmethod def merge_sorted_array(): if __name__ == '__main__': s = Solution() s.merge_sorted_array()
16
29
0.647727
21
176
4.857143
0.761905
0.215686
0.313725
0
0
0
0
0
0
0
0
0
0.227273
176
10
30
17.6
0.75
0.119318
0
0
0
0
0.052288
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
77f510250ee83fc0a9b85ab55a9eebe61d00c196
18
py
Python
mwnn/__init__.py
slowkow/MWNN
bf70f5cf0d33f68f9a3848e0136ecf735a9458f8
[ "MIT" ]
2
2020-11-20T14:21:53.000Z
2021-08-03T08:03:23.000Z
mwnn/__init__.py
slowkow/MWNN
bf70f5cf0d33f68f9a3848e0136ecf735a9458f8
[ "MIT" ]
null
null
null
mwnn/__init__.py
slowkow/MWNN
bf70f5cf0d33f68f9a3848e0136ecf735a9458f8
[ "MIT" ]
2
2020-12-07T01:40:18.000Z
2021-01-31T10:48:10.000Z
__all__ = ["mwnn"]
18
18
0.611111
2
18
3.5
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
18
1
18
18
0.4375
0
0
0
0
0
0.210526
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
77f8f1170b9848c633cadb1aac40dd9a2290286d
486
py
Python
util/functions.py
knjcode/mxnet-finetuner
f5947a55f704b9cfba10a6f46cf288d191c7ae15
[ "Apache-2.0" ]
112
2017-08-10T05:51:13.000Z
2022-01-10T08:22:36.000Z
util/functions.py
knjcode/mxnet-finetuner
f5947a55f704b9cfba10a6f46cf288d191c7ae15
[ "Apache-2.0" ]
7
2017-11-23T02:31:00.000Z
2018-10-15T14:32:24.000Z
util/functions.py
knjcode/mxnet-finetuner
f5947a55f704b9cfba10a6f46cf288d191c7ae15
[ "Apache-2.0" ]
12
2017-08-18T01:24:05.000Z
2021-04-19T03:07:55.000Z
#!/usr/bin/env python # coding: utf-8 # Utility functions def get_image_size(model_prefix): if 'caffenet' in model_prefix: return 227 elif 'squeezenet' in model_prefix: return 227 elif 'alexnet' in model_prefix: return 227 elif 'googlenet' in model_prefix: return 299 elif 'inception-v3' in model_prefix: return 299 elif 'inception-v4' in model_prefix: return 299 elif 'inception-resnet-v2' in model_prefix: return 299 else: return 224
21.130435
45
0.705761
71
486
4.690141
0.450704
0.264264
0.273273
0.399399
0.615616
0.54955
0.315315
0
0
0
0
0.073491
0.216049
486
22
46
22.090909
0.800525
0.106996
0
0.411765
0
0
0.178654
0
0
0
0
0
0
1
0.058824
false
0
0
0
0.529412
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
77fcb515515abf58188da08626ac118efd58f8cb
156
py
Python
tests/test_cli.py
gitter-badger/dependenpy
db411b7bbd466b79064cbb419049f17cd3bff4c1
[ "ISC" ]
null
null
null
tests/test_cli.py
gitter-badger/dependenpy
db411b7bbd466b79064cbb419049f17cd3bff4c1
[ "ISC" ]
null
null
null
tests/test_cli.py
gitter-badger/dependenpy
db411b7bbd466b79064cbb419049f17cd3bff4c1
[ "ISC" ]
null
null
null
import pytest from dependenpy import cli def test_main(): with pytest.raises(SystemExit) as exit: cli.main([]) assert exit.code == 2
15.6
43
0.647436
21
156
4.761905
0.761905
0
0
0
0
0
0
0
0
0
0
0.008621
0.25641
156
9
44
17.333333
0.853448
0
0
0
0
0
0
0
0
0
0
0
0.166667
1
0.166667
true
0
0.333333
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
7ac726d9b368153141287f4baf46701bf438f15b
163
py
Python
test/files/no_skip.py
faho/littlecheck
12cad505fa6c3c4b45e5e2a0d25b043435ed0cee
[ "CC0-1.0" ]
26
2019-06-08T22:04:46.000Z
2022-01-11T22:08:04.000Z
test/files/no_skip.py
0verk1ll/littlecheck
5f6c024fbdf6654e7851d3fd756a6d56e167476e
[ "CC0-1.0" ]
7
2019-06-24T15:36:59.000Z
2022-01-28T11:10:00.000Z
test/files/no_skip.py
0verk1ll/littlecheck
5f6c024fbdf6654e7851d3fd756a6d56e167476e
[ "CC0-1.0" ]
3
2019-06-24T15:38:18.000Z
2021-03-21T21:24:28.000Z
#!/usr/bin/python # Any system should have an sh capable of `command -v` # REQUIRES: command -v sh print("Oh, but it is!") # CHECK: This should never be compared
23.285714
54
0.699387
28
163
4.071429
0.857143
0.140351
0
0
0
0
0
0
0
0
0
0
0.177914
163
6
55
27.166667
0.850746
0.797546
0
0
0
0
0.482759
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
7ae67a1b1b96f390379d87e7cac415164a6181b2
870
py
Python
Chapter01/Exercise1.04/bookr/reviews/tests.py
PacktPublishing/Web-Development-Projects-with-Django
531bc4d58d614888cc81b7fd6f8ec859f5a65217
[ "MIT" ]
97
2021-03-01T12:54:30.000Z
2022-03-28T02:57:26.000Z
Chapter01/Exercise1.04/bookr/reviews/tests.py
PacktPublishing/Web-Development-Projects-with-Django
531bc4d58d614888cc81b7fd6f8ec859f5a65217
[ "MIT" ]
81
2020-08-27T04:56:04.000Z
2022-03-12T00:53:40.000Z
Chapter01/Exercise1.04/bookr/reviews/tests.py
PacktPublishing/Web-Development-Projects-with-Django
531bc4d58d614888cc81b7fd6f8ec859f5a65217
[ "MIT" ]
163
2020-12-25T14:38:38.000Z
2022-03-30T10:31:40.000Z
from django.test import TestCase from django.test import Client class Exercise4TestCase(TestCase): def test_template_content(self): """Test that the index view returns the set names from the paramaters, or defaults to 'world'""" c = Client() response = c.get('/') self.assertEqual(response.status_code, 200) self.assertEqual(response.content, b'Hello, world!') response = c.get('/?name=Ben') self.assertEqual(response.status_code, 200) self.assertEqual(response.content, b'Hello, Ben!') response = c.get('/?name=Ben&name=John') self.assertEqual(response.status_code, 200) self.assertEqual(response.content, b'Hello, John!') response = c.get('/?name=') self.assertEqual(response.status_code, 200) self.assertEqual(response.content, b'Hello, world!')
36.25
104
0.65977
107
870
5.308411
0.336449
0.211268
0.323944
0.204225
0.591549
0.524648
0.524648
0.524648
0.524648
0.524648
0
0.01895
0.211494
870
23
105
37.826087
0.809038
0.103448
0
0.352941
0
0
0.112403
0
0
0
0
0
0.470588
1
0.058824
false
0
0.117647
0
0.235294
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
1
0
0
0
0
0
0
0
0
0
4
bb03e10e6c323ad03f8ad0ceb54acf2170f04bad
110
py
Python
GGDBFetch/ggdbfetch/__init__.py
pdhsulab/GeneGraphDB
f2754a596d08680f7f0b092391653d9dbf477ddd
[ "MIT" ]
6
2021-08-28T07:03:07.000Z
2022-02-22T03:34:11.000Z
GGDBFetch/ggdbfetch/__init__.py
pdhsulab/GeneGraphDB
f2754a596d08680f7f0b092391653d9dbf477ddd
[ "MIT" ]
null
null
null
GGDBFetch/ggdbfetch/__init__.py
pdhsulab/GeneGraphDB
f2754a596d08680f7f0b092391653d9dbf477ddd
[ "MIT" ]
null
null
null
CLUSTERS_DB = 'complete_clusters.db' SAMPLE2PROTEIN_DB = 'sample2protein.db' SAMPLE2PATH = 'sample2path.tsv'
22
39
0.8
12
110
7.083333
0.5
0.235294
0.423529
0
0
0
0
0
0
0
0
0.04
0.090909
110
4
40
27.5
0.81
0
0
0
0
0
0.477064
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
bb0c536d5aeda0d40a3df6bbe7ad7c4f339b41a5
344
py
Python
rewards/serializer.py
zizoubrown/Awards
53af5e9706bdc18a949d49653a8abbf93fb4122d
[ "Unlicense" ]
null
null
null
rewards/serializer.py
zizoubrown/Awards
53af5e9706bdc18a949d49653a8abbf93fb4122d
[ "Unlicense" ]
null
null
null
rewards/serializer.py
zizoubrown/Awards
53af5e9706bdc18a949d49653a8abbf93fb4122d
[ "Unlicense" ]
null
null
null
from rest_framework import serializers from .models import Profile,Image,Rating class ProfileSerializer(serializers.ModelSerializer): class Meta: model=Profile fields=('user.username','bio') class ImageSerializer(serializers.ModelSerializer): class Meta: model=Image fields=('name','caption','caption')
28.666667
53
0.72093
35
344
7.057143
0.6
0.210526
0.251012
0.283401
0.323887
0
0
0
0
0
0
0
0.177326
344
12
54
28.666667
0.872792
0
0
0.2
0
0
0.098551
0
0
0
0
0
0
1
0
false
0
0.2
0
0.6
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
bb1ef0adff80f31ff5d085b0c1f3c0d4b69cae99
135
py
Python
reddit2telegram/channels/r_kratom/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
187
2016-09-20T09:15:54.000Z
2022-03-29T12:22:33.000Z
reddit2telegram/channels/r_kratom/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
84
2016-09-22T14:25:07.000Z
2022-03-19T01:26:17.000Z
reddit2telegram/channels/r_kratom/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
172
2016-09-21T15:39:39.000Z
2022-03-16T15:15:58.000Z
#encoding:utf-8 subreddit = 'kratom' t_channel = '@r_kratom' def send_post(submission, r2t): return r2t.send_simple(submission)
15
38
0.733333
19
135
5
0.789474
0
0
0
0
0
0
0
0
0
0
0.025862
0.140741
135
8
39
16.875
0.793103
0.103704
0
0
0
0
0.125
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
bb31130d736b3b8a9be2401baaa040078a44635c
5,358
py
Python
cogs/search.py
TFs-Eternal/MyAnimeList-discord-bot
ac1df931c36d03a39ef173bfdd5ed07765a7fd4d
[ "MIT" ]
9
2021-09-06T18:06:09.000Z
2022-03-25T17:05:38.000Z
cogs/search.py
TFs-Eternal/MyAnimeList-discord-bot
ac1df931c36d03a39ef173bfdd5ed07765a7fd4d
[ "MIT" ]
1
2022-01-23T14:40:02.000Z
2022-01-30T16:38:04.000Z
cogs/search.py
TFs-Eternal/MyAnimeList-discord-bot
ac1df931c36d03a39ef173bfdd5ed07765a7fd4d
[ "MIT" ]
1
2022-01-23T14:15:48.000Z
2022-01-23T14:15:48.000Z
import discord from discord.ext import commands from discord.ext.commands import MissingRequiredArgument from cogs.getjson import jikanjson from cogs.getname import getname from cogs.results import results from cogs.selection import selection prefix = '+' class Search(commands.Cog): def __init__(self, client): self.client = client description = 'Gives information about any anime via '+ '[MyAnimeList](https://myanimelist.net/).' @commands.command(name='anime',brief='Get information about an anime.',usage=f'`{prefix}anime <name>`',help=f'`{prefix}anime Hyouka`\n`{prefix}anime NHK ni Youkoso!`\n`{prefix}anime オレンジ`',description=description) async def anime(self,ctx,*,name): if ctx.guild: pass else: return query = getname(name) url = f'https://api.jikan.moe/v4/anime?q={query}&order_by=members&sort=desc&page=1' search_result = jikanjson(url) data = search_result['data'] data_len = len(search_result['data']) if data_len == 1: n = 0 elif data_len == 0: await ctx.send('No results for query.') return else: output = results(data,'title',name,'animes') output_message = await ctx.send(output) selection_result = await selection(self,ctx,output_message,data_len,'anime') if selection_result: n = selection_result - 1 else: return search = search_result["data"][n] embed=discord.Embed(title=search["title"], url=search["url"] , description=search['synopsis'], color=0xf37a12) embed.set_thumbnail(url=search["images"]['jpg']['image_url']) embed.add_field(name="Score", value=search["score"], inline=True) embed.add_field(name="Members", value=search["members"], inline=True) if search["aired"]["from"] is None: embed.add_field(name="Start Date", value='Unknown', inline=True) else: embed.add_field(name="Start Date", value=search["aired"]["from"][:-15], inline=True) if search["aired"]["to"] is None: embed.add_field(name="End Date", value="Unknown", inline=True) else: embed.add_field(name="End Date", value=search["aired"]["to"][:-15], inline=True) embed.add_field(name="Total Episodes", value=search["episodes"], inline=True) embed.add_field(name="Type", value=search["type"], inline=True) genre = search['genres'] c = [] for length in range(0,len(genre)): c.append(genre[length]['name']) string = ', '.join([str(item) for item in c]) genres = string embed.add_field(name="Genres", value=genres, inline=False) await ctx.send(embed=embed) @anime.error async def anime_error(self,ctx,error): if isinstance(error,(MissingRequiredArgument)): if ctx.guild: await ctx.send('Please provide a query.') else: return desc = 'Gives information about any manga via '+'[MyAnimeList](https://myanimelist.net/).' @commands.command(name='manga',brief='Get information about a manga.',usage=f'`{prefix}manga <name>`',description=desc,help=f'`{prefix}manga Omniscient Reader`\n`{prefix}manga attack on titan`\n`{prefix}manga 東京卍リベンジャーズ`') async def manga(self,ctx,*,name): if ctx.guild: pass else: return query = getname(name) url = f'https://api.jikan.moe/v4/manga?q={query}&order_by=members&sort=desc&page=1' search_result = jikanjson(url) data = search_result['data'] data_len = len(search_result['data']) if data_len == 1: n = 0 elif data_len == 0: await ctx.send('No results for query.') return else: output = results(data,'title',name,'mangas') output_message = await ctx.send(output) selection_result = await selection(self,ctx,output_message,data_len,'manga') if selection_result: n = selection_result - 1 else: return search = search_result["data"][n] embed=discord.Embed(title=search["title"], url=search["url"] , description=search['synopsis'], color=0xf37a12) embed.set_thumbnail(url=search["images"]['jpg']['image_url']) embed.add_field(name="Score", value=search["scored"], inline=True) embed.add_field(name="Members", value=search["members"], inline=True) if search["published"]["from"] is None: embed.add_field(name="Start Date", value='Unknown', inline=True) else: embed.add_field(name="Start Date", value=search["published"]["from"][:-15], inline=True) if search["published"]["to"] is None: embed.add_field(name="End Date", value="Unknown", inline=True) else: embed.add_field(name="End Date", value=search["published"]["to"][:-15], inline=True) embed.add_field(name="Total Chapters", value=search["chapters"], inline=True) embed.add_field(name="Type", value=search["type"], inline=True) genre = search['genres'] c = [] for length in range(0,len(genre)): c.append(genre[length]['name']) string = ', '.join([str(item) for item in c]) genres = string embed.add_field(name="Genres", value=genres, inline=False) await ctx.send(embed=embed) @manga.error async def manga_error(self,ctx,error): if isinstance(error,(MissingRequiredArgument)): if ctx.guild: await ctx.send('Please provide a query.') else: return def setup(bot): bot.add_cog(Search(bot))
35.72
224
0.656962
722
5,358
4.796399
0.186981
0.041582
0.067571
0.088363
0.751372
0.743286
0.729425
0.729425
0.699394
0.678602
0
0.007329
0.185144
5,358
149
225
35.959732
0.785845
0
0
0.666667
0
0.03252
0.210526
0.017357
0.01626
0
0.002986
0
0
1
0.01626
false
0.01626
0.056911
0
0.162602
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
bb318dd3c47d148b99963cb81e543121f21788d9
204
py
Python
medapp/deepmed/test/test.py
EmersonAlvaro/MedApp
e4203d05f69208badfda7c53b77f72ba48f45fc2
[ "Apache-2.0" ]
null
null
null
medapp/deepmed/test/test.py
EmersonAlvaro/MedApp
e4203d05f69208badfda7c53b77f72ba48f45fc2
[ "Apache-2.0" ]
null
null
null
medapp/deepmed/test/test.py
EmersonAlvaro/MedApp
e4203d05f69208badfda7c53b77f72ba48f45fc2
[ "Apache-2.0" ]
null
null
null
from dataset.dataset import DataSet from settings import model_dir from model.xception import Xception import tensorflow as tf from pathlib import Path class Test: def __init__(self): pass
18.545455
35
0.77451
29
204
5.275862
0.62069
0.183007
0
0
0
0
0
0
0
0
0
0
0.196078
204
11
36
18.545455
0.932927
0
0
0
0
0
0
0
0
0
0
0
0
1
0.125
false
0.125
0.625
0
0.875
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
4
247951633c073aeb5861afc6c64f6ac8b788a884
768
py
Python
src/face_check/settings/secrets.py
tarvitz/face-check
e468025c7a5615f4ec8ee24c06252ceeb8a2e129
[ "BSD-4-Clause" ]
null
null
null
src/face_check/settings/secrets.py
tarvitz/face-check
e468025c7a5615f4ec8ee24c06252ceeb8a2e129
[ "BSD-4-Clause" ]
7
2019-01-01T17:13:06.000Z
2021-06-10T17:42:54.000Z
src/face_check/settings/secrets.py
tarvitz/face-check
e468025c7a5615f4ec8ee24c06252ceeb8a2e129
[ "BSD-4-Clause" ]
null
null
null
#: configuration keeping secrets keys separately to keep them in strict #: form #: reduce redundant imports from . utils import get_env_string as _get_env_string SOCIAL_AUTH_TWITCH_KEY = _get_env_string('SOCIAL_AUTH_TWITCH_KEY', '') SOCIAL_AUTH_TWITCH_SECRET = _get_env_string('SOCIAL_AUTH_TWITCH_SECRET', '') SOCIAL_AUTH_GOODGAME_KEY = _get_env_string('SOCIAL_AUTH_GOODGAME_KEY', '') SOCIAL_AUTH_GOODGAME_SECRET = _get_env_string('SOCIAL_AUTH_GOODGAME_SECRET', '') SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = _get_env_string( 'SOCIAL_AUTH_GOOGLE_OAUTH2_KEY', '' ) SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = _get_env_string( 'SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET', '' ) EMAIL_HOST_PASSWORD = _get_env_string('EMAIL_HOST_PASSWORD', '')
38.4
76
0.770833
103
768
5.067961
0.31068
0.229885
0.206897
0.241379
0.565134
0.463602
0.249042
0
0
0
0
0.006107
0.147135
768
19
77
40.421053
0.79084
0.132813
0
0
0
0
0.268477
0.239819
0
0
0
0
0
1
0
false
0.076923
0.076923
0
0.076923
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
24ac49fc4d87097dd5a527f5881221618dcc8ff8
1,920
py
Python
Test_MatchStates.py
deanturpin/banter-bot
8bd4734b7701c2bb5694299884c3abd22710bd3c
[ "Apache-2.0" ]
null
null
null
Test_MatchStates.py
deanturpin/banter-bot
8bd4734b7701c2bb5694299884c3abd22710bd3c
[ "Apache-2.0" ]
2
2022-03-27T10:44:38.000Z
2022-03-28T19:24:39.000Z
Test_MatchStates.py
deanturpin/banter-bot
8bd4734b7701c2bb5694299884c3abd22710bd3c
[ "Apache-2.0" ]
1
2022-03-28T11:45:47.000Z
2022-03-28T11:45:47.000Z
from Footy.MatchStates import (MatchState, Drawing, TeamLeadByOne, TeamExtendingLead, TeamLosingLead, TeamDeficitOfOne, TeamExtendingDeficit, TeamLosingDeficit) matchState = MatchState(0, 0) matchState = matchState.FindState() print(matchState) assert(isinstance(matchState, Drawing)) matchState = matchState.GoalScored(1, 0) print(matchState) assert(isinstance(matchState, TeamLeadByOne)) matchState = matchState.GoalScored(2, 0) print(matchState) assert(isinstance(matchState, TeamExtendingLead)) matchState = matchState.GoalScored(3, 0) print(matchState) assert(isinstance(matchState, TeamExtendingLead)) matchState = matchState.GoalScored(3, 1) print(matchState) assert(isinstance(matchState, TeamLosingLead)) matchState = matchState.GoalScored(3, 2) print(matchState) assert(isinstance(matchState, TeamLosingLead)) matchState = matchState.GoalScored(3, 3) print(matchState) assert(isinstance(matchState, Drawing)) matchState = matchState.GoalScored(3, 4) print(matchState) assert(isinstance(matchState, TeamDeficitOfOne)) matchState = matchState.GoalScored(3, 5) print(matchState) assert(isinstance(matchState, TeamExtendingDeficit)) matchState = matchState.GoalScored(3, 6) print(matchState) assert(isinstance(matchState, TeamExtendingDeficit)) matchState = matchState.GoalScored(4, 6) print(matchState) assert(isinstance(matchState, TeamLosingDeficit)) matchState = matchState.GoalScored(5, 6) print(matchState) assert(isinstance(matchState, TeamLosingDeficit)) matchState = matchState.GoalScored(6, 6) print(matchState) assert(isinstance(matchState, Drawing)) matchState = matchState.GoalScored(8, 6) print(matchState) assert(isinstance(matchState, TeamExtendingLead))
28.235294
53
0.720833
168
1,920
8.238095
0.14881
0.216763
0.212428
0.313584
0.787572
0.757948
0.683526
0.683526
0.683526
0.382948
0
0.017891
0.184896
1,920
67
54
28.656716
0.866454
0
0
0.509804
0
0
0
0
0
0
0
0
0.27451
1
0
false
0
0.019608
0
0.019608
0.27451
0
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
700549bb9bd9e97688cc65823fa761deb61478b5
43
py
Python
ML-gane.py
HackerLion123/Machine-Learning
71224ea97ba4aaded13a700e07b498469299964b
[ "MIT" ]
1
2018-07-21T15:41:40.000Z
2018-07-21T15:41:40.000Z
ML-gane.py
HackerLion123/Machine-Learning
71224ea97ba4aaded13a700e07b498469299964b
[ "MIT" ]
null
null
null
ML-gane.py
HackerLion123/Machine-Learning
71224ea97ba4aaded13a700e07b498469299964b
[ "MIT" ]
null
null
null
from sklearn import tree; Test_data = [[]]
14.333333
25
0.697674
6
43
4.833333
1
0
0
0
0
0
0
0
0
0
0
0
0.162791
43
2
26
21.5
0.805556
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
702db3e36a42259ea54b51a6a77b52b8e36dbd6f
221
py
Python
dskc/clean/__init__.py
NovaSBE-DSKC/predict-campaing-sucess-rate
fec339aee7c883f55d64130eb69e490f765ee27d
[ "MIT" ]
null
null
null
dskc/clean/__init__.py
NovaSBE-DSKC/predict-campaing-sucess-rate
fec339aee7c883f55d64130eb69e490f765ee27d
[ "MIT" ]
null
null
null
dskc/clean/__init__.py
NovaSBE-DSKC/predict-campaing-sucess-rate
fec339aee7c883f55d64130eb69e490f765ee27d
[ "MIT" ]
null
null
null
from .clean import * from .dates import * from .dtype import * from .string import * from .row import * from .columns import * from .text import * from .inputations import * from .topic_modeling.topic_modeling import *
18.416667
44
0.742081
30
221
5.4
0.4
0.493827
0
0
0
0
0
0
0
0
0
0
0.171946
221
11
45
20.090909
0.885246
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
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
703f0318f80a46018f122108f121012e4b2eddc4
52
py
Python
checksum.py
DexHunter/Think-Python-book-exercise-solutions
d0abae261eda1dca99043e17e8a1e614caad2140
[ "CC-BY-4.0" ]
24
2019-05-07T15:11:28.000Z
2022-03-02T04:50:28.000Z
checksum.py
Dekzu/Think-Python-book-exercise-solutions
d0abae261eda1dca99043e17e8a1e614caad2140
[ "CC-BY-4.0" ]
null
null
null
checksum.py
Dekzu/Think-Python-book-exercise-solutions
d0abae261eda1dca99043e17e8a1e614caad2140
[ "CC-BY-4.0" ]
19
2019-08-05T20:59:04.000Z
2022-03-07T05:13:32.000Z
#This is for check duplicate file from exercise 14-3
52
52
0.807692
10
52
4.2
1
0
0
0
0
0
0
0
0
0
0
0.068182
0.153846
52
1
52
52
0.886364
0.980769
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
7054234e51d4ae1f6f2e0b8847d61725a00c8c12
768
py
Python
Level2/Lessons12911/wowo0709.py
StudyForCoding/ProgrammersLevel
dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25
[ "MIT" ]
null
null
null
Level2/Lessons12911/wowo0709.py
StudyForCoding/ProgrammersLevel
dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25
[ "MIT" ]
null
null
null
Level2/Lessons12911/wowo0709.py
StudyForCoding/ProgrammersLevel
dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25
[ "MIT" ]
1
2021-04-05T07:35:59.000Z
2021-04-05T07:35:59.000Z
# 다음 큰 숫자 def solution(n): cnt = bin(n).count('1') while True: n += 1 if bin(n).count('1') == cnt: return n ''' 정확성 테스트 테스트 1 〉 통과 (0.01ms, 10.2MB) 테스트 2 〉 통과 (0.00ms, 10.2MB) 테스트 3 〉 통과 (0.00ms, 10.2MB) 테스트 4 〉 통과 (0.00ms, 10.2MB) 테스트 5 〉 통과 (0.01ms, 10.2MB) 테스트 6 〉 통과 (0.00ms, 10.3MB) 테스트 7 〉 통과 (0.01ms, 10.2MB) 테스트 8 〉 통과 (0.00ms, 10.2MB) 테스트 9 〉 통과 (0.01ms, 10.2MB) 테스트 10 〉 통과 (0.01ms, 10.2MB) 테스트 11 〉 통과 (0.00ms, 10.2MB) 테스트 12 〉 통과 (0.00ms, 10.1MB) 테스트 13 〉 통과 (0.00ms, 10.2MB) 테스트 14 〉 통과 (0.00ms, 10.2MB) 효율성 테스트 테스트 1 〉 통과 (0.01ms, 10.2MB) 테스트 2 〉 통과 (0.00ms, 10.2MB) 테스트 3 〉 통과 (0.00ms, 10.2MB) 테스트 4 〉 통과 (0.00ms, 10.2MB) 테스트 5 〉 통과 (0.01ms, 10.2MB) 테스트 6 〉 통과 (0.00ms, 10.2MB) 채점 결과 정확성: 70.0 효율성: 30.0 합계: 100.0 / 100.0 '''
21.333333
45
0.554688
200
768
2.23
0.22
0.134529
0.179372
0.233184
0.730942
0.70852
0.672646
0.457399
0.457399
0.457399
0
0.276923
0.238281
768
36
46
21.333333
0.451282
0.009115
0
0
0
0
0.015873
0
0
0
0
0
0
1
0.2
false
0
0
0
0.2
0
0
0
0
null
0
0
1
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
70548e4dc1ad1e5b387c79f6d7919b18ab3cfbe9
190
py
Python
signaling/__init__.py
mdomke/signaling
c51d769d78b787fea5364027d7fd00b5d268ef2c
[ "MIT" ]
null
null
null
signaling/__init__.py
mdomke/signaling
c51d769d78b787fea5364027d7fd00b5d268ef2c
[ "MIT" ]
null
null
null
signaling/__init__.py
mdomke/signaling
c51d769d78b787fea5364027d7fd00b5d268ef2c
[ "MIT" ]
null
null
null
from pkg_resources import get_distribution from signaling.signal import Signal def version(): return get_distribution(__name__).version __version__ = version() __all__ = ['Signal']
15.833333
45
0.778947
22
190
6.045455
0.590909
0.225564
0
0
0
0
0
0
0
0
0
0
0.142105
190
11
46
17.272727
0.815951
0
0
0
0
0
0.031579
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0.166667
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
0
0
0
4
70599c8e1408b1053b5812530394c96fa604afc7
406
py
Python
tenants/admin.py
ibowditch/polls
1428b87bf3a83c40083b0e248c1718a89078f11f
[ "MIT" ]
null
null
null
tenants/admin.py
ibowditch/polls
1428b87bf3a83c40083b0e248c1718a89078f11f
[ "MIT" ]
1
2021-06-10T21:51:24.000Z
2021-06-10T21:51:24.000Z
tenants/admin.py
ibowditch/polls
1428b87bf3a83c40083b0e248c1718a89078f11f
[ "MIT" ]
null
null
null
from django.db import models from django.contrib import admin from django_tenants.admin import TenantAdminMixin from .models import Client, Domain @admin.register(Client) class ClientAdmin(TenantAdminMixin, admin.ModelAdmin): list_display = ('name', 'paid_until') # @admin.register(Domain) # class DomainAdmin(TenantAdminMixin, admin.ModelAdmin): # list_display = ('name', 'paid_until')
29
56
0.761084
47
406
6.468085
0.446809
0.098684
0.203947
0.230263
0.361842
0.361842
0.361842
0.361842
0
0
0
0
0.135468
406
13
57
31.230769
0.866097
0.305419
0
0
0
0
0.05036
0
0
0
0
0
0
1
0
false
0
0.571429
0
0.857143
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7065d843df85bf0ed4418f2f79cf522907214a55
144
py
Python
perfiles/apps.py
jlopez0591/SIGIA
e857e2273daa43ab64fa78df254275af2dbcc2a5
[ "MIT" ]
null
null
null
perfiles/apps.py
jlopez0591/SIGIA
e857e2273daa43ab64fa78df254275af2dbcc2a5
[ "MIT" ]
7
2020-02-12T00:42:15.000Z
2022-03-11T23:23:48.000Z
perfiles/apps.py
jlopez0591/SIGIA
e857e2273daa43ab64fa78df254275af2dbcc2a5
[ "MIT" ]
null
null
null
from django.apps import AppConfig class PerfilesConfig(AppConfig): name = 'perfiles' def ready(self): import perfiles.signals
18
33
0.708333
16
144
6.375
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.215278
144
8
34
18
0.902655
0
0
0
0
0
0.055172
0
0
0
0
0
0
1
0.2
false
0
0.4
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7067af6c6816240c3ad10cb06f83d60905f4663b
206
py
Python
zorg/buildbot/commands/__init__.py
antiagainst/llvm-zorg
a5b58cdd800d0d45b1bdd1f7fe058db6acbfd918
[ "Apache-2.0" ]
1
2019-02-10T03:05:05.000Z
2019-02-10T03:05:05.000Z
zorg/buildbot/commands/__init__.py
antiagainst/llvm-zorg
a5b58cdd800d0d45b1bdd1f7fe058db6acbfd918
[ "Apache-2.0" ]
null
null
null
zorg/buildbot/commands/__init__.py
antiagainst/llvm-zorg
a5b58cdd800d0d45b1bdd1f7fe058db6acbfd918
[ "Apache-2.0" ]
null
null
null
import AnalyzerCompareCommand import BatchFileDownload import LitTestCommand import SuppressionDejaGNUCommand import DejaGNUCommand import GTestCommand import NinjaCommand import CmakeCommand __all__ = []
18.727273
32
0.88835
17
206
10.529412
0.588235
0
0
0
0
0
0
0
0
0
0
0
0.097087
206
10
33
20.6
0.962366
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.888889
0
0.888889
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
56720c46692e1092bb40026f35c265f2e4708424
159
py
Python
teste/models.py
mhiloca/TourismApi
b9904354f2d249e996d79f7a6ad58269c68363d7
[ "MIT" ]
null
null
null
teste/models.py
mhiloca/TourismApi
b9904354f2d249e996d79f7a6ad58269c68363d7
[ "MIT" ]
null
null
null
teste/models.py
mhiloca/TourismApi
b9904354f2d249e996d79f7a6ad58269c68363d7
[ "MIT" ]
null
null
null
from django.db import models class Teste(models.Model): anything = models.CharField(max_length=100) def __str__(self): return self.anything
17.666667
47
0.710692
21
159
5.142857
0.809524
0
0
0
0
0
0
0
0
0
0
0.023622
0.201258
159
8
48
19.875
0.826772
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
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
0
1
1
0
0
4
569297f047e3d0087fb233e3631ee7b27c1de664
92
py
Python
revasbot/revas_calculations.py
iwo-strzebonski/SeleBot
885b5b9ca264d9ee59200c4f7157250c85872fbe
[ "WTFPL" ]
null
null
null
revasbot/revas_calculations.py
iwo-strzebonski/SeleBot
885b5b9ca264d9ee59200c4f7157250c85872fbe
[ "WTFPL" ]
null
null
null
revasbot/revas_calculations.py
iwo-strzebonski/SeleBot
885b5b9ca264d9ee59200c4f7157250c85872fbe
[ "WTFPL" ]
null
null
null
class RevasCalculations: '''Functions related to calculations go there ''' pass
18.4
49
0.684783
9
92
7
1
0
0
0
0
0
0
0
0
0
0
0
0.23913
92
4
50
23
0.9
0.456522
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
56a17b4efbac254af66f4eb570662a6b8ebf3e14
71
py
Python
app/grandchallenge/algorithms/__init__.py
njmhendrix/grand-challenge.org
9bc36f5e26561a78bd405e8ea5e4c0f86c95f011
[ "Apache-2.0" ]
1
2021-02-09T10:30:44.000Z
2021-02-09T10:30:44.000Z
app/grandchallenge/algorithms/__init__.py
njmhendrix/grand-challenge.org
9bc36f5e26561a78bd405e8ea5e4c0f86c95f011
[ "Apache-2.0" ]
null
null
null
app/grandchallenge/algorithms/__init__.py
njmhendrix/grand-challenge.org
9bc36f5e26561a78bd405e8ea5e4c0f86c95f011
[ "Apache-2.0" ]
null
null
null
default_app_config = "grandchallenge.algorithms.apps.AlgorithmsConfig"
35.5
70
0.873239
7
71
8.571429
1
0
0
0
0
0
0
0
0
0
0
0
0.042254
71
1
71
71
0.882353
0
0
0
0
0
0.661972
0.661972
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
3b099d71b6eefc478bf7afddcc23159ef7466de7
99
py
Python
technologies/apps.py
bemot/agritechnologies
554eec7477a14f32a6fb40d3adcc0b9494fa240f
[ "MIT" ]
null
null
null
technologies/apps.py
bemot/agritechnologies
554eec7477a14f32a6fb40d3adcc0b9494fa240f
[ "MIT" ]
2
2021-12-28T22:16:15.000Z
2022-02-14T04:59:18.000Z
technologies/apps.py
bemot/agritechnologies
554eec7477a14f32a6fb40d3adcc0b9494fa240f
[ "MIT" ]
null
null
null
from django.apps import AppConfig class TechnologiesConfig(AppConfig): name = 'technologies'
16.5
36
0.777778
10
99
7.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.151515
99
5
37
19.8
0.916667
0
0
0
0
0
0.121212
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
3b0c51436de76e236ea94ae2b3f95e7bb9069e59
326
py
Python
packaging/config/stock.py
aisenyi/packaging
6159432401c4eae890241732330f0bd6d2972384
[ "MIT" ]
null
null
null
packaging/config/stock.py
aisenyi/packaging
6159432401c4eae890241732330f0bd6d2972384
[ "MIT" ]
null
null
null
packaging/config/stock.py
aisenyi/packaging
6159432401c4eae890241732330f0bd6d2972384
[ "MIT" ]
null
null
null
from frappe import _ def get_data(): return [ { "label": _("Stock Transactions"), "items": [ { "type": "page", "name": "packing-slip", "label": _("Packing Slip") } ] }, ]
18.111111
46
0.312883
19
326
5.157895
0.842105
0.22449
0
0
0
0
0
0
0
0
0
0
0.555215
326
17
47
19.176471
0.675862
0
0
0
0
0
0.211656
0
0
0
0
0
0
1
0.071429
true
0
0.071429
0.071429
0.214286
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
1
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
3b25c93c78b2af83a6afd5fe5f7a8d8c14736f67
256
py
Python
src/htsql/tweak/inet/signature.py
sirex/htsql
52275f6a584b412c109822d2ed2a5e69ac522cdf
[ "Apache-2.0" ]
15
2020-02-11T11:24:34.000Z
2022-03-03T20:46:34.000Z
src/htsql/tweak/inet/signature.py
sirex/htsql
52275f6a584b412c109822d2ed2a5e69ac522cdf
[ "Apache-2.0" ]
1
2020-02-13T14:08:34.000Z
2020-02-13T14:16:04.000Z
src/htsql/tweak/inet/signature.py
sirex/htsql
52275f6a584b412c109822d2ed2a5e69ac522cdf
[ "Apache-2.0" ]
2
2020-02-13T14:10:06.000Z
2021-02-25T04:36:05.000Z
# # Copyright (c) 2006-2013, Prometheus Research, LLC # from ...core.tr.fn.signature import AddSig, SubtractSig class INetIncrementSig(AddSig): pass class INetDecrementSig(SubtractSig): pass class INetDifferenceSig(SubtractSig): pass
12.190476
55
0.730469
27
256
6.925926
0.740741
0.096257
0
0
0
0
0
0
0
0
0
0.037915
0.175781
256
20
56
12.8
0.848341
0.191406
0
0.428571
0
0
0
0
0
0
0
0
0
1
0
true
0.428571
0.142857
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
1
0
0
4
3b37613b90f49ed3abf76d412e43eeea0e8fa27d
66
py
Python
yggdrasil/tests/scripts/python_model.py
astro-friedel/yggdrasil
5ecbfd083240965c20c502b4795b6dc93d94b020
[ "BSD-3-Clause" ]
22
2019-02-05T15:20:07.000Z
2022-02-25T09:00:40.000Z
yggdrasil/tests/scripts/python_model.py
astro-friedel/yggdrasil
5ecbfd083240965c20c502b4795b6dc93d94b020
[ "BSD-3-Clause" ]
48
2019-02-15T20:41:24.000Z
2022-03-16T20:52:02.000Z
yggdrasil/tests/scripts/python_model.py
astro-friedel/yggdrasil
5ecbfd083240965c20c502b4795b6dc93d94b020
[ "BSD-3-Clause" ]
16
2019-04-27T03:36:40.000Z
2021-12-02T09:47:06.000Z
from yggdrasil.tools import sleep sleep(1) print('Python model')
13.2
33
0.772727
10
66
5.1
0.9
0
0
0
0
0
0
0
0
0
0
0.017241
0.121212
66
4
34
16.5
0.862069
0
0
0
0
0
0.181818
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
3b4204e2f11d17b92922c050d3555fea394bddbe
105
py
Python
kinto_portier/utils.py
dstaley/kinto-portier
14a70f3addac41aebb818fced7d6c2c0a8aab0d8
[ "Apache-2.0" ]
8
2016-12-12T22:10:51.000Z
2019-09-03T02:16:21.000Z
kinto_portier/utils.py
dstaley/kinto-portier
14a70f3addac41aebb818fced7d6c2c0a8aab0d8
[ "Apache-2.0" ]
38
2016-12-12T22:10:34.000Z
2021-05-10T06:56:27.000Z
kinto_portier/utils.py
dstaley/kinto-portier
14a70f3addac41aebb818fced7d6c2c0a8aab0d8
[ "Apache-2.0" ]
3
2018-12-23T20:04:34.000Z
2021-10-04T07:54:14.000Z
def portier_conf(request, name): key = 'portier.%s' % name return request.registry.settings[key]
26.25
41
0.695238
14
105
5.142857
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.171429
105
3
42
35
0.827586
0
0
0
0
0
0.095238
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
3b64a26cc9ea0033ebe0504ab8d52834355a22f5
93
py
Python
backend/yggdrasil/apps.py
projectpai/paipass
8b8e70b6808bf026cf957e240c7eed7bfcf4c55d
[ "MIT" ]
3
2021-04-17T10:20:26.000Z
2022-03-08T07:36:13.000Z
backend/yggdrasil/apps.py
projectpai/paipass
8b8e70b6808bf026cf957e240c7eed7bfcf4c55d
[ "MIT" ]
null
null
null
backend/yggdrasil/apps.py
projectpai/paipass
8b8e70b6808bf026cf957e240c7eed7bfcf4c55d
[ "MIT" ]
null
null
null
from django.apps import AppConfig class YggdrasilConfig(AppConfig): name = 'yggdrasil'
15.5
33
0.763441
10
93
7.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.16129
93
5
34
18.6
0.910256
0
0
0
0
0
0.096774
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
3b757804d920b7466be73449480f34458e5d86b7
117
py
Python
CodeWars/7 Kyu/Check if a triangle is an equable triangle!.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/7 Kyu/Check if a triangle is an equable triangle!.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/7 Kyu/Check if a triangle is an equable triangle!.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
def equable_triangle(a, b, c): p = a + b + c d = p / 2 return (d * (d - a) * (d - b) * (d - c))**0.5 == p
29.25
54
0.384615
24
117
1.833333
0.5
0.090909
0.136364
0
0
0
0
0
0
0
0
0.040541
0.367521
117
4
54
29.25
0.554054
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
1
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
3b75c9e21a59f06a0a71ac339b153e617a2a809f
2,228
py
Python
Store/AuthStore.py
uscope-platform/uscope_server
d8679c1aea0210ed80375a2b071b5971ce7a7232
[ "Apache-2.0" ]
null
null
null
Store/AuthStore.py
uscope-platform/uscope_server
d8679c1aea0210ed80375a2b071b5971ce7a7232
[ "Apache-2.0" ]
null
null
null
Store/AuthStore.py
uscope-platform/uscope_server
d8679c1aea0210ed80375a2b071b5971ce7a7232
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 University of Nottingham Ningbo China # Author: Filippo Savi <filssavi@gmail.com> # # 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. import datetime as dt from sqlalchemy.orm import declarative_base, sessionmaker from sqlalchemy import create_engine from .Elements import Users class AuthStore: def __init__(self, host): self.engine = create_engine(host) Base = declarative_base() Base.metadata.create_all(self.engine) self.Session = sessionmaker(bind=self.engine) self.auth_db = Users.AuthenticationDatabase(self.Session) # PERIPHERALS def get_users_list(self): return self.auth_db.get_users_list() def add_user(self, content): self.auth_db.add_user(content['username'], content['pw_hash'], content['role']) def user_exists(self, username): self.auth_db.user_exists(username) def get_password_hash(self, username): return self.auth_db.get_password_hash(username) def get_user(self, username): return self.auth_db.get_user(username) def remove_user(self, username): self.auth_db.remove_user(username) def get_token(self, selector): token = self.auth_db.get_token(selector) return {'username': token.username, 'expiry': token.expiry.timestamp(), 'validator': token.validator} def add_token(self, selector, token_obj): timestamp = dt.datetime.fromtimestamp(token_obj['expiry']) self.auth_db.add_token(token_obj['username'], timestamp, token_obj['validator'], selector) def dump(self): return self.auth_db.dump() def restore(self, data): self.auth_db.restore(data) def remove_token(self, username): pass
31.828571
109
0.714542
303
2,228
5.10231
0.40264
0.056921
0.071151
0.041397
0.096378
0.040103
0.040103
0
0
0
0
0.004432
0.189856
2,228
69
110
32.289855
0.852078
0.281867
0
0
0
0
0.041035
0
0
0
0
0
0
1
0.342857
false
0.085714
0.114286
0.114286
0.628571
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
3b7b453bef64a0a3894df227a8aac9db2fa329cd
430
py
Python
app/controllers/receipts.py
theikkila/lopputili
25842e54a272f12ae6bdafeb98c676da396cddf2
[ "MIT" ]
null
null
null
app/controllers/receipts.py
theikkila/lopputili
25842e54a272f12ae6bdafeb98c676da396cddf2
[ "MIT" ]
null
null
null
app/controllers/receipts.py
theikkila/lopputili
25842e54a272f12ae6bdafeb98c676da396cddf2
[ "MIT" ]
null
null
null
from .listview import APIListView, APIDetailView from ..models.receipt import Receipt, Commit class ReceiptsListController(APIListView): def getModel(self): return Receipt class ReceiptsDetailController(APIDetailView): def getModel(self): return Receipt class CommitsListController(APIListView): def getModel(self): return Commit class CommitsDetailController(APIDetailView): def getModel(self): return Commit
18.695652
48
0.804651
43
430
8.046512
0.395349
0.127168
0.17341
0.242775
0.485549
0.190751
0
0
0
0
0
0
0.125581
430
23
49
18.695652
0.920213
0
0
0.571429
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.285714
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
3b7d6c4b0c7dacc1bb29b9b78de8ff6c78cb6ea1
1,152
py
Python
student-feedback-app/form/models.py
karthikvg/Student-feedback-app
2cc948b08fb4fd2624093c8c7f21b8110b5c2c9e
[ "MIT" ]
null
null
null
student-feedback-app/form/models.py
karthikvg/Student-feedback-app
2cc948b08fb4fd2624093c8c7f21b8110b5c2c9e
[ "MIT" ]
6
2020-06-05T18:30:14.000Z
2021-09-07T23:56:05.000Z
student-feedback-app/form/models.py
karthikvg/Student-feedback-app
2cc948b08fb4fd2624093c8c7f21b8110b5c2c9e
[ "MIT" ]
null
null
null
from django.db import models class Student(models.Model): last_name = models.CharField(max_length=20) middle_name = models.CharField(max_length=20) first_name = models.CharField(max_length=20) roll_no = models.CharField(max_length=20) email_id = models.EmailField(max_length=30) password=models.CharField(max_length=20) picture=models.CharField(max_length=120) def __str__(self): return self.roll_no class Professor(models.Model): name = models.CharField(max_length=120) profession=models.CharField(max_length=120) roll_no=models.CharField(max_length=120) email_id=models.EmailField(max_length=120) description=models.CharField(max_length=500) picture=models.CharField(max_length=120) def __str__(self): return self.roll_no class Message(models.Model): student_roll_no=models.ForeignKey(Student,on_delete=models.CASCADE) professor_roll_no=models.ForeignKey(Professor,on_delete=models.CASCADE) date=models.DateField() title=models.CharField(max_length=120) feed_back=models.CharField(max_length=500) def __str__(self): return self.title
31.135135
75
0.751736
158
1,152
5.208861
0.272152
0.164034
0.284326
0.379101
0.648846
0.417983
0.157959
0.157959
0.157959
0.157959
0
0.039634
0.145833
1,152
36
76
32
0.796748
0
0
0.25
0
0
0
0
0
0
0
0
0
1
0.107143
false
0.035714
0.035714
0.107143
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
8e974c9abe06b801d51218dd99ade875f3ad6833
45
py
Python
inscripta/biocantor/util/__init__.py
InscriptaLabs/BioCantor
e0b240480e229c28d3e12ba629d80ae2e397fa8f
[ "MIT" ]
19
2021-04-20T04:11:30.000Z
2021-10-11T14:48:57.000Z
inscripta/biocantor/util/__init__.py
InscriptaLabs/BioCantor
e0b240480e229c28d3e12ba629d80ae2e397fa8f
[ "MIT" ]
1
2021-08-10T23:13:38.000Z
2021-08-11T18:45:45.000Z
inscripta/biocantor/util/__init__.py
InscriptaLabs/BioCantor
e0b240480e229c28d3e12ba629d80ae2e397fa8f
[ "MIT" ]
2
2021-08-02T08:14:35.000Z
2021-09-15T19:30:38.000Z
""" General utilities used by BioCantor. """
11.25
36
0.688889
5
45
6.2
1
0
0
0
0
0
0
0
0
0
0
0
0.155556
45
3
37
15
0.815789
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
8edd1b686facb631a12454e52b590a5c99a65550
209
py
Python
glueball/__init__.py
glueball-css/glueball
88ca97a9789246a86d19d2eb20838e77647f0cff
[ "MIT" ]
null
null
null
glueball/__init__.py
glueball-css/glueball
88ca97a9789246a86d19d2eb20838e77647f0cff
[ "MIT" ]
null
null
null
glueball/__init__.py
glueball-css/glueball
88ca97a9789246a86d19d2eb20838e77647f0cff
[ "MIT" ]
null
null
null
__version__ = '0.0.1' # Expose some core classes from .core.breakpoints import Breakpoints from .core.cssmodule import CssModule from .core.stylesheet import StyleSheet from .core.stylerule import StyleRule
23.222222
41
0.808612
28
209
5.892857
0.464286
0.193939
0
0
0
0
0
0
0
0
0
0.016393
0.124402
209
8
42
26.125
0.885246
0.114833
0
0
0
0
0.027473
0
0
0
0
0
0
1
0
false
0
0.8
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
d90e79a136d2efcde83b0ec195b4dc86fd1db5ca
207
py
Python
src/utils/globals.py
MarkKoz/TweetPnD
73874afc84b4a48b006ec85f6402097346f0328f
[ "MIT" ]
3
2019-04-09T07:03:41.000Z
2020-02-13T17:10:20.000Z
src/utils/globals.py
MarkKoz/tweet-pnd
e93910f14a1fe4af8c81d1d76377afde32fa0fc2
[ "MIT" ]
7
2021-06-08T18:52:05.000Z
2022-03-03T21:52:11.000Z
src/utils/globals.py
MarkKoz/tweet-pnd
e93910f14a1fe4af8c81d1d76377afde32fa0fc2
[ "MIT" ]
1
2019-04-09T07:04:28.000Z
2019-04-09T07:04:28.000Z
from typing import List import logging from exchanges.exchange import Exchange config: dict = {} log: logging.Logger = None exchanges: List[Exchange] = [] db = None # TODO: Forward reference type-hinting.
20.7
49
0.753623
27
207
5.777778
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.154589
207
9
50
23
0.891429
0.178744
0
0
0
0
0
0
0
0
0
0.111111
0
1
0
false
0
0.428571
0
0.428571
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
1
0
0
0
0
0
1
0
0
0
0
4
d933572a91848a86a49e6c66c2fdfd96540ce4fa
1,025
py
Python
looking_for_group/gamer_profiles/admin.py
andrlik/looking-for-group
0b1cecb37ef0f6d75692fd188130e2c60d09b7d2
[ "BSD-3-Clause" ]
null
null
null
looking_for_group/gamer_profiles/admin.py
andrlik/looking-for-group
0b1cecb37ef0f6d75692fd188130e2c60d09b7d2
[ "BSD-3-Clause" ]
null
null
null
looking_for_group/gamer_profiles/admin.py
andrlik/looking-for-group
0b1cecb37ef0f6d75692fd188130e2c60d09b7d2
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from . import models # Register your models here. class GamerCommunityAdmin(admin.ModelAdmin): pass class GamerProfileAdmin(admin.ModelAdmin): pass class CommunityMembershipAdmin(admin.ModelAdmin): pass class CommunityApplicationAdmin(admin.ModelAdmin): pass class KickedUserAdmin(admin.ModelAdmin): pass class BannedUserAdmin(admin.ModelAdmin): pass class MutedUserAdmin(admin.ModelAdmin): pass class BlockedUserAdmin(admin.ModelAdmin): pass admin.site.register(models.GamerCommunity, GamerCommunityAdmin) admin.site.register(models.GamerProfile, GamerProfileAdmin) admin.site.register(models.CommunityMembership, CommunityMembershipAdmin) admin.site.register(models.CommunityApplication, CommunityApplicationAdmin) admin.site.register(models.KickedUser, KickedUserAdmin) admin.site.register(models.BannedUser, BannedUserAdmin) admin.site.register(models.MutedUser, MutedUserAdmin) admin.site.register(models.BlockedUser, BlockedUserAdmin)
21.808511
75
0.816585
100
1,025
8.37
0.29
0.143369
0.181601
0.219833
0
0
0
0
0
0
0
0
0.101463
1,025
46
76
22.282609
0.908795
0.025366
0
0.307692
0
0
0
0
0
0
0
0
0
1
0
true
0.307692
0.076923
0
0.384615
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
d95d1cb5f51db48452d4a003e8a53bfe29d6f367
63
py
Python
ggongsul/agreement/__init__.py
blc-cruise/ggongsul-api
0cdfc09ea75688ffc297bc0c0f08897091896f3e
[ "MIT" ]
2
2021-05-22T07:33:34.000Z
2021-09-18T04:22:25.000Z
ggongsul/agreement/__init__.py
blc-cruise/ggongsul-api
0cdfc09ea75688ffc297bc0c0f08897091896f3e
[ "MIT" ]
null
null
null
ggongsul/agreement/__init__.py
blc-cruise/ggongsul-api
0cdfc09ea75688ffc297bc0c0f08897091896f3e
[ "MIT" ]
null
null
null
default_app_config = "ggongsul.agreement.apps.AgreementConfig"
31.5
62
0.857143
7
63
7.428571
1
0
0
0
0
0
0
0
0
0
0
0
0.047619
63
1
63
63
0.866667
0
0
0
0
0
0.619048
0.619048
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
d9704c8c7ba9b6be51294370ee6a5fd1484c1a85
996
py
Python
src/negotiating_agent/venv/lib/python3.8/site-packages/geniusweb/events/CurrentState.py
HahaBill/CollaborativeAI
f771cd2f34774c74c58e49a7e983d6244ea35eff
[ "MIT" ]
1
2022-02-17T19:14:46.000Z
2022-02-17T19:14:46.000Z
src/negotiating_agent/venv/lib/python3.8/site-packages/geniusweb/events/CurrentState.py
HahaBill/CollaborativeAI
f771cd2f34774c74c58e49a7e983d6244ea35eff
[ "MIT" ]
null
null
null
src/negotiating_agent/venv/lib/python3.8/site-packages/geniusweb/events/CurrentState.py
HahaBill/CollaborativeAI
f771cd2f34774c74c58e49a7e983d6244ea35eff
[ "MIT" ]
null
null
null
from geniusweb.events.ProtocolEvent import ProtocolEvent class CurrentState( ProtocolEvent ): ''' Reports a NegoState as the latest state of the protocol. The negoState is abstract because the state is not something that can be handled at this place in the dependency hierarchy. The "real" implementations are inside the protocol. <p> When a protocol reports this event, it indicates that this state can be logged to the loggers for output to the users (publication on the webpages and reporting to parent protocols eg a tournamentrunner). Usually protocols are updating this only after a session completes. There may be quite some overhead triggered by emission of these events, such as rewriting files and notifying end users behind websockets. Protocols MUST report this at least once to report the final isFinished() state. <p> The logged state may be used to re-start a protocol if it crashes later in an unfinished state. ''' # all should implement NegoState getState();
45.272727
78
0.791165
152
996
5.184211
0.625
0.027919
0
0
0
0
0
0
0
0
0
0
0.172691
996
21
79
47.428571
0.956311
0.876506
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
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
d982b29c6380ac7843d0fa427ba62ad9e38e47ad
1,127
py
Python
backend/youngun/youngun/apps/content/migrations/0004_auto_20200703_1702.py
aakashbajaj/Youngun-Campaign-Tracking
a3b4f283b22cefb92c72f7638ee2a9da72622de0
[ "Apache-2.0" ]
null
null
null
backend/youngun/youngun/apps/content/migrations/0004_auto_20200703_1702.py
aakashbajaj/Youngun-Campaign-Tracking
a3b4f283b22cefb92c72f7638ee2a9da72622de0
[ "Apache-2.0" ]
1
2021-09-22T19:27:06.000Z
2021-09-22T19:27:06.000Z
backend/youngun/youngun/apps/content/migrations/0004_auto_20200703_1702.py
aakashbajaj/Youngun-Campaign-Tracking
a3b4f283b22cefb92c72f7638ee2a9da72622de0
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.7 on 2020-07-03 17:02 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('content', '0003_facebookstory_instagramstory_twitterstory'), ] operations = [ migrations.AlterModelOptions( name='facebookpost', options={'verbose_name_plural': 'Facebook Posts'}, ), migrations.AlterModelOptions( name='facebookstory', options={'verbose_name_plural': 'Facebook Stories'}, ), migrations.AlterModelOptions( name='instagrampost', options={'verbose_name_plural': 'Instagram Posts'}, ), migrations.AlterModelOptions( name='instagramstory', options={'verbose_name_plural': 'Instagram Stories'}, ), migrations.AlterModelOptions( name='twitterpost', options={'verbose_name_plural': 'Twitter Posts'}, ), migrations.AlterModelOptions( name='twitterstory', options={'verbose_name_plural': 'Twitter Stories'}, ), ]
29.657895
70
0.595386
88
1,127
7.454545
0.431818
0.246951
0.283537
0.219512
0.292683
0
0
0
0
0
0
0.02381
0.291925
1,127
37
71
30.459459
0.798246
0.039929
0
0.387097
1
0
0.307407
0.042593
0
0
0
0
0
1
0
false
0
0.032258
0
0.129032
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
7964891d72b78719709b0d98b2a9a7b27e495d06
158
py
Python
tests/web_platform/CSS2/normal_flow/test_max_width_percentage.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/CSS2/normal_flow/test_max_width_percentage.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/CSS2/normal_flow/test_max_width_percentage.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
1
2020-01-16T01:56:41.000Z
2020-01-16T01:56:41.000Z
from tests.utils import W3CTestCase class TestMaxWidthPercentage(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'max-width-percentage-'))
26.333333
76
0.797468
17
158
7.117647
0.823529
0
0
0
0
0
0
0
0
0
0
0.020833
0.088608
158
5
77
31.6
0.819444
0
0
0
0
0
0.133758
0.133758
0
0
0
0
0
1
0
true
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
1
0
1
0
0
0
0
4
796668379bc38b4a8c8e986f444b104c77b336d4
121
wsgi
Python
flask.wsgi
hariharshankar/pygeo
f87b5f117dd35e8c6491d1c627cc795e416df6f9
[ "MIT" ]
1
2017-09-03T14:39:26.000Z
2017-09-03T14:39:26.000Z
flask.wsgi
hariharshankar/pygeo
f87b5f117dd35e8c6491d1c627cc795e416df6f9
[ "MIT" ]
null
null
null
flask.wsgi
hariharshankar/pygeo
f87b5f117dd35e8c6491d1c627cc795e416df6f9
[ "MIT" ]
null
null
null
import sys import os sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) from geo import app as application
20.166667
63
0.785124
21
121
4.333333
0.666667
0.131868
0
0
0
0
0
0
0
0
0
0.009259
0.107438
121
5
64
24.2
0.833333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
79a3edd509703ffffb8f3ce4d2634d81014a1874
523
py
Python
pi_control/temperature/serializers.py
mhozza/pi-control
0dce821b4702519fedc3950270ee0091ed484ef6
[ "MIT" ]
null
null
null
pi_control/temperature/serializers.py
mhozza/pi-control
0dce821b4702519fedc3950270ee0091ed484ef6
[ "MIT" ]
10
2020-03-14T21:04:36.000Z
2022-03-03T21:51:07.000Z
pi_control/temperature/serializers.py
mhozza/pi-control
0dce821b4702519fedc3950270ee0091ed484ef6
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Entry, MeasurementDevice class EntrySerializer(serializers.ModelSerializer): class Meta: model = Entry fields = ("time", "temperature", "humidity", "device") class MeasurementDeviceSerializer(serializers.ModelSerializer): class Meta: model = MeasurementDevice fields = ("id", "name") class RoomSerializer(serializers.ModelSerializer): class Meta: model = MeasurementDevice fields = ("id", "name")
23.772727
63
0.692161
45
523
8.022222
0.488889
0.216066
0.257618
0.290859
0.493075
0.382271
0.382271
0.382271
0.382271
0
0
0
0.212237
523
21
64
24.904762
0.876214
0
0
0.5
0
0
0.078394
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.571429
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
79d24eafa6745976ba25f8d0b98376a15002324e
7,864
py
Python
nyc_data/ppe/migrations/0010_auto_20200412_1539.py
nyccto-rapicastillo/nyc-ppe
e6d5ba45cf2815f7659298103d3b5bc7210ed8cf
[ "MIT" ]
3
2020-04-16T03:24:17.000Z
2020-09-11T22:12:31.000Z
nyc_data/ppe/migrations/0010_auto_20200412_1539.py
nyccto-rapicastillo/nyc-ppe
e6d5ba45cf2815f7659298103d3b5bc7210ed8cf
[ "MIT" ]
47
2020-04-10T20:02:09.000Z
2021-09-08T02:05:09.000Z
nyc_data/ppe/migrations/0010_auto_20200412_1539.py
nyccto-rapicastillo/nyc-ppe
e6d5ba45cf2815f7659298103d3b5bc7210ed8cf
[ "MIT" ]
1
2020-04-22T19:10:24.000Z
2020-04-22T19:10:24.000Z
# Generated by Django 3.0.5 on 2020-04-12 15:39 from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ("ppe", "0009_auto_20200412_1517"), ] operations = [ migrations.CreateModel( name="Facility", fields=[ ( "id", models.UUIDField( default=uuid.uuid4, editable=False, primary_key=True, serialize=False, ), ), ("created_at", models.DateTimeField(auto_now_add=True, db_index=True)), ("updated_at", models.DateTimeField(auto_now=True)), ("name", models.TextField()), ( "tpe", models.TextField( choices=[ ("government", "government"), ("hospital", "hospital"), ("ems", "ems"), ("nursing_home", "nursing_home"), ("clinic", "clinic"), ], default=None, ), ), ], options={"abstract": False,}, ), migrations.AlterField( model_name="dataimport", name="status", field=models.TextField( choices=[ ("active", "active"), ("replaced", "replaced"), ("candidate", "candidate"), ("cancelled", "cancelled"), ], default=None, ), ), migrations.AlterField( model_name="scheduleddelivery", name="purchase", field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name="deliveries", to="ppe.Purchase", ), ), migrations.CreateModel( name="InboundReceipt", fields=[ ( "id", models.UUIDField( default=uuid.uuid4, editable=False, primary_key=True, serialize=False, ), ), ("created_at", models.DateTimeField(auto_now_add=True, db_index=True)), ("updated_at", models.DateTimeField(auto_now=True)), ("date_received", models.DateTimeField()), ( "supplier", models.TextField( choices=[ ("dcas_donations", "dcas_donations"), ("dcas_procurement", "dcas_procurement"), ("other", "other"), ], default=None, ), ), ("description", models.TextField()), ("quantity", models.IntegerField()), ("inbound_id", models.TextField()), ("item_id", models.TextField()), ( "item", models.TextField( choices=[ ("faceshield", "faceshield"), ("gown", "gown"), ("gown_material", "gown_material"), ("coveralls", "coveralls"), ("n95_mask_non_surgical", "n95_mask_non_surgical"), ("n95_mask_surgical", "n95_mask_surgical"), ("kn95_mask", "kn95_mask"), ("surgical_mask", "surgical_mask"), ("mask_other", "mask_other"), ("goggles", "goggles"), ("generic_eyeware", "generic_eyeware"), ("gloves", "gloves"), ("ventilators_full_service", "ventilators_full_service"), ( "ventilators_non_full_service", "ventilators_non_full_service", ), ("bipap_machines", "bipap_machines"), ("ppe_other", "ppe_other"), ("unknown", "unknown"), ("body_bags", "body_bags"), ], default=None, ), ), ( "source", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to="ppe.DataImport" ), ), ], options={"abstract": False,}, ), migrations.CreateModel( name="FacilityDelivery", fields=[ ( "id", models.UUIDField( default=uuid.uuid4, editable=False, primary_key=True, serialize=False, ), ), ("created_at", models.DateTimeField(auto_now_add=True, db_index=True)), ("updated_at", models.DateTimeField(auto_now=True)), ("date", models.DateField()), ( "item", models.TextField( choices=[ ("faceshield", "faceshield"), ("gown", "gown"), ("gown_material", "gown_material"), ("coveralls", "coveralls"), ("n95_mask_non_surgical", "n95_mask_non_surgical"), ("n95_mask_surgical", "n95_mask_surgical"), ("kn95_mask", "kn95_mask"), ("surgical_mask", "surgical_mask"), ("mask_other", "mask_other"), ("goggles", "goggles"), ("generic_eyeware", "generic_eyeware"), ("gloves", "gloves"), ("ventilators_full_service", "ventilators_full_service"), ( "ventilators_non_full_service", "ventilators_non_full_service", ), ("bipap_machines", "bipap_machines"), ("ppe_other", "ppe_other"), ("unknown", "unknown"), ("body_bags", "body_bags"), ], default=None, ), ), ( "facility", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to="ppe.Facility" ), ), ( "source", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to="ppe.DataImport" ), ), ], options={"abstract": False,}, ), migrations.AddField( model_name="facility", name="source", field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to="ppe.DataImport" ), ), ]
38.738916
88
0.370677
470
7,864
5.959574
0.246809
0.048197
0.029989
0.047126
0.650839
0.650839
0.650839
0.650839
0.650839
0.650839
0
0.015336
0.519074
7,864
202
89
38.930693
0.725278
0.005722
0
0.704082
1
0
0.190994
0.040297
0
0
0
0
0
1
0
false
0
0.035714
0
0.05102
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
79d958b600e90d13ae0328631fda94ccbb461559
17,830
py
Python
tgen_jetstream_resources/phoenix_build_exome_capture_resources/formats/intervals/__init__.py
tgen/jetstream_containers
80c71e51cdc04df8322487328fef34f0641f5b8f
[ "MIT" ]
2
2020-03-11T20:24:08.000Z
2020-09-24T17:59:05.000Z
tgen_jetstream_resources/phoenix_build_exome_capture_resources/formats/intervals/__init__.py
tgen/jetstream_containers
80c71e51cdc04df8322487328fef34f0641f5b8f
[ "MIT" ]
32
2020-03-07T21:19:37.000Z
2021-12-27T20:32:59.000Z
tgen_jetstream_resources/phoenix_build_exome_capture_resources/formats/intervals/__init__.py
tgen/jetstream_containers
80c71e51cdc04df8322487328fef34f0641f5b8f
[ "MIT" ]
1
2020-04-27T17:44:14.000Z
2020-04-27T17:44:14.000Z
"""Intervals are a generalization of several file formats: GFF ==== All GFF formats (GFF2, GFF3 and GTF) are tabular files with 9 fields per line, separated by tabs. They all share the same structure for the first 7 fields, while differing in the definition of the eighth field and in the content and format of the ninth field. The general structure is as follows: GFFv3 ------ Amazing description of the format: https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md "Although there are many richer ways of representing genomic features via XML and in relational database schemas, the stubborn persistence of a variety of ad-hoc tab-delimited flat file formats declares the bioinformatics community's need for a simple format that can be modified with a text editor and processed with shell tools like grep. " http://gmod.org/wiki/GFF3 ~~~~~~~~~~~~~~~~~~~~~~~~~~ GFF3 Format GFF3 format is a flat tab-delimited file. The first line of the file is a comment that identifies the file format and version. This is followed by a series of data lines, each one of which corresponds to an annotation.Here is a miniature GFF3 file: :: ##gff-version 3 ctg123 . exon 1300 1500 . + . ID=exon00001 ctg123 . exon 1050 1500 . + . ID=exon00002 ctg123 . exon 3000 3902 . + . ID=exon00003 ctg123 . exon 5000 5500 . + . ID=exon00004 ctg123 . exon 7000 9000 . + . ID=exon00005 The ``##gff-version 3`` line is required and must be the first line of the file. It introduces the annotation section of the file. The 9 columns of the annotation section are as follows: Column 1: "seqid" The ID of the landmark used to establish the coordinate system for the current feature. IDs may contain any characters, but must escape any characters not in the set [a-zA-Z0-9.:^*$@!+_?-|]. In particular, IDs may not contain unescaped whitespace and must not begin with an unescaped ">". To escape a character in this, or any of the other GFF3 fields, replace it with the percent sign followed by its hexadecimal representation. For example, ">" becomes "%E3". See URL Encoding (or: 'What are those "%20" codes in URLs?') for details. Column 2: "source" The source is a free text qualifier intended to describe the algorithm or operating procedure that generated this feature. Typically this is the name of a piece of software, such as "Genescan" or a database name, such as "Genbank." In effect, the source is used to extend the feature ontology by adding a qualifier to the type creating a new composite type that is a subclass of the type in the type column. It is not necessary to specify a source. If there is no source, put a "." (a period) in this field. Column 3: "type" The type of the feature (previously called the "method"). This is constrained to be either: (a) a term from the "lite" sequence ontology, SOFA; or (b) a SOFA accession number. The latter alternative is distinguished using the syntax SO:000000. This field is required. Columns 4 & 5: "start" and "end" The start and end of the feature, in 1-based integer coordinates, relative to the landmark given in column 1. Start is always less than or equal to end. For zero-length features, such as insertion sites, start equals end and the implied site is to the right of the indicated base in the direction of the landmark. These fields are required. Column 6: "score" The score of the feature, a floating point number. As in earlier versions of the format, the semantics of the score are ill-defined. It is strongly recommended that E-values be used for sequence similarity features, and that P-values be used for ab initio gene prediction features. If there is no score, put a "." (a period) in this field. Column 7: "strand" The strand of the feature. + for positive strand (relative to the landmark), - for minus strand, and . for features that are not stranded. In addition, ? can be used for features whose strandedness is relevant, but unknown. Column 8: "phase" For features of type "CDS", the phase indicates where the feature begins with reference to the reading frame. The phase is one of the integers 0, 1, or 2, indicating the number of bases that should be removed from the beginning of this feature to reach the first base of the next codon. In other words, a phase of "0" indicates that the next codon begins at the first base of the region described by the current line, a phase of "1" indicates that the next codon begins at the second base of this region, and a phase of "2" indicates that the codon begins at the third base of this region. This is NOT to be confused with the frame, which is simply start modulo 3. If there is no phase, put a "." (a period) in this field. For forward strand features, phase is counted from the start field. For reverse strand features, phase is counted from the end field. The phase is required for all CDS features. Column 9: "attributes" A list of feature attributes in the format tag=value. Multiple tag=value pairs are separated by semicolons. URL escaping rules are used for tags or values containing the following characters: ",=;". Spaces are allowed in this field, but tabs must be replaced with the %09 URL escape. This field is not required. Column 9 Tags Column 9 tags have predefined meanings: ID Indicates the unique identifier of the feature. IDs must be unique within the scope of the GFF file. Name Display name for the feature. This is the name to be displayed to the user. Unlike IDs, there is no requirement that the Name be unique within the file. Alias A secondary name for the feature. It is suggested that this tag be used whenever a secondary identifier for the feature is needed, such as locus names and accession numbers. Unlike ID, there is no requirement that Alias be unique within the file. Parent Indicates the parent of the feature. A parent ID can be used to group exons into transcripts, transcripts into genes, and so forth. A feature may have multiple parents. Parent can *only* be used to indicate a partof relationship. Target Indicates the target of a nucleotide-to-nucleotide or protein-to-nucleotide alignment. The format of the value is "target_id start end [strand]", where strand is optional and may be "+" or "-". If the target_id contains spaces, they must be escaped as hex escape %20. Gap The alignment of the feature to the target if the two are not collinear (e.g. contain gaps). The alignment format is taken from the CIGAR format described in the Exonerate documentation. http://cvsweb.sanger.ac.uk/cgi-bin/cvsweb.cgi/exonerate?cvsroot=Ensembl). See the GFF3 specification for more information. Derives_from Used to disambiguate the relationship between one feature and another when the relationship is a temporal one rather than a purely structural "part of" one. This is needed for polycistronic genes. See the GFF3 specification for more information. Note A free text note. Dbxref A database cross reference. See the GFF3 specification for more information. Ontology_term A cross reference to an ontology term. See the GFF3 specification for more information. Multiple attributes of the same type are indicated by separating the values with the comma "," character, as in: Parent=AF2312,AB2812,abc-3 Note that attribute names are case sensitive. "Parent" is not the same as "parent". All attributes that begin with an uppercase letter are reserved for later use. Attributes that begin with a lowercase letter can be used freely by applications. You can stash any semi-structured data into the database by using one or more unreserved (lowercase) tags. GTF ---- The Gene transfer format (GTF) is a refinement of GFF Version 2 and is sometimes referred to as GFF2.5.[1] http://genome.ucsc.edu/FAQ/FAQformat.html#format4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GTF (Gene Transfer Format, GTF2.2) is an extension to, and backward compatible with, GFF2. The first eight GTF fields are the same as GFF. The feature field is the same as GFF, with the exception that it also includes the following optional values: 5UTR, 3UTR, inter, inter_CNS, and intron_CNS. The group field has been expanded into a list of attributes. Each attribute consists of a type/value pair. Attributes must end in a semi-colon, and be separated from any following attribute by exactly one space. The attribute list must begin with the two mandatory attributes: gene_id value - A globally unique identifier for the genomic source of the sequence. transcript_id value - A globally unique identifier for the predicted transcript. Example: Here is an example of the ninth field in a GTF data line: :: gene_id "Em:U62317.C22.6.mRNA"; transcript_id "Em:U62317.C22.6.mRNA"; exon_number 1 The Genome Browser groups together GTF lines that have the same transcript_id value. It only looks at features of type exon and CDS. For more information regarding the GTF2.2 UCSC supported format, see http://mblab.wustl.edu/GTF22.html. If you would like to obtain browser data in GTF format, please refer to Genes in gtf or gff format on the wiki. GFFv2 ----- There are several differing descriptions of the GFFv2 spec. Most seem to reference GMOD (http://gmod.org/wiki/GFF2) as the authoritative source: http://gmod.org/wiki/GFF2 ~~~~~~~~~~~~~~~~~~~~~~~~~~ The GFF2 File Format The GFF format is a flat tab-delimited file, each line of which corresponds to an annotation, or feature. Each line has nine columns and looks like this: :: Chr1 curated CDS 365647 365963 . + 1 Transcript "R119.7" The 9 columns are as follows: reference sequence This is the ID of the sequence that is used to establish the coordinate system of the annotation. In the example above, the reference sequence is "Chr1". source The source of the annotation. This field describes how the annotation was derived. In the example above, the source is "curated" to indicate that the feature is the result of human curation. The names and versions of software programs are often used for the source field, as in "tRNAScan-SE/1.2". method The annotation method, also known as type. This field describes the type of the annotation, such as "CDS". Together the method and source describe the annotation type. start position The start of the annotation relative to the reference sequence. stop position The stop of the annotation relative to the reference sequence. Start is always less than or equal to stop. score For annotations that are associated with a numeric score (for example, a sequence similarity), this field describes the score. The score units are completely unspecified, but for sequence similarities, it is typically percent identity. Annotations that do not have a score can use "." strand For those annotations which are strand-specific, this field is the strand on which the annotation resides. It is "+" for the forward strand, "-" for the reverse strand, or "." for annotations that are not stranded. phase For annotations that are linked to proteins, this field describes the phase of the annotation on the codons. It is a number from 0 to 2, or "." for features that have no phase. group GFF provides a simple way of generating annotation hierarchies ("is composed of" relationships) by providing a group field. The group field contains the class and ID of an annotation which is the logical parent of the current one. In the example given above, the group is the Transcript named "R119.7". The group field is also used to store information about the target of sequence similarity hits, and miscellaneous notes. See the next section for a description of how to describe similarity targets. The sequences used to establish the coordinate system for annotations can correspond to sequenced clones, clone fragments, contigs or super-contigs. In addition to a group ID, the GFF format allows annotations to have a group class. This makes sure that all groups are unique even if they happen to share the same name. For example, you can have a GenBank accession named AP001234 and a clone named AP001234 and distinguish between them by giving the first one a class of Accession and the second a class of Clone. You should use double-quotes around the group name or class if it contains white space. https://uswest.ensembl.org/info/website/upload/gff.html ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The GFF (General Feature Format) format consists of one line per feature, each containing 9 columns of data, plus optional track definition lines. The following documentation is based on the Version 2 specifications. The GTF (General Transfer Format) is identical to GFF version 2. Fields Track lines More information Fields Fields must be tab-separated. Also, all but the final field in each feature line must contain a value; "empty" columns should be denoted with a '.' seqname - name of the chromosome or scaffold; chromosome names can be given with or without the 'chr' prefix. Important note: the seqname must be one used within Ensembl, i.e. a standard chromosome name or an Ensembl identifier such as a scaffold ID, without any additional content such as species or assembly. See the example GFF output below. source - name of the program that generated this feature, or the data source (database or project name) feature - feature type name, e.g. Gene, Variation, Similarity start - Start position of the feature, with sequence numbering starting at 1. end - End position of the feature, with sequence numbering starting at 1. score - A floating point value. strand - defined as + (forward) or - (reverse). frame - One of '0', '1' or '2'. '0' indicates that the first base of the feature is the first base of a codon, '1' that the second base is the first base of a codon, and so on.. attribute - A semicolon-separated list of tag-value pairs, providing additional information about each feature. https://genome.ucsc.edu/FAQ/FAQformat.html#format3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GFF (General Feature Format) lines are based on the Sanger GFF2 specification. GFF lines have nine required fields that must be tab-separated. If the fields are separated by spaces instead of tabs, the track will not display correctly. For more information on GFF format, refer to Sanger's GFF page. Note that there is also a GFF3 specification that is not currently supported by the Browser. All GFF tracks must be formatted according to Sanger's GFF2 specification. If you would like to obtain browser data in GFF (GTF) format, please refer to Genes in gtf or gff format on the Wiki. Here is a brief description of the GFF fields: seqname - The name of the sequence. Must be a chromosome or scaffold. source - The program that generated this feature. feature - The name of this type of feature. Some examples of standard feature types are "CDS" "start_codon" "stop_codon" and "exon"li> start - The starting position of the feature in the sequence. The first base is numbered 1. end - The ending position of the feature (inclusive). score - A score between 0 and 1000. If the track line useScore attribute is set to 1 for this annotation data set, the score value will determine the level of gray in which this feature is displayed (higher numbers = darker gray). If there is no score value, enter ":.":. strand - Valid entries include "+", "-", or "." (for don't know/don't care). frame - If the feature is a coding exon, frame should be a number between 0-2 that represents the reading frame of the first base. If the feature is not a coding exon, the value should be ".". group - All lines with the same group are linked together into a single item. """ import os import gzip from . import bed, gffv2, gatk_style_intervals from .generic import IntervalFile # TODO test GTF/GFF -> BED dumps # TODO Do we want to allow for bedtools style functions on generic intervals? # or should we just convert to bedfile then do it with bedtools? # TODO GFFv3 IntervalFileFormat # TODO think about how a coerce(obj, format) function might work when we have # data that does not meet all the requirements for a format, but want it anyway def is_gzip(path, magic_number=b'\x1f\x8b'): """Returns True if the path is gzipped.""" if os.path.exists(path) and not os.path.isfile(path): raise OSError("This should only be used with regular files because" "otherwise it will lose some data.") with open(path, 'rb') as fp: if fp.read(2) == magic_number: return True else: return False def read_lines_allow_gzip(path): """Reads line-separated text files, handles gzipped files and recognizes universal newlines. This can cause bytes to be lost when reading from a pipe. """ if is_gzip(path): with gzip.open(path, 'rb') as fp: data = fp.read().decode('utf-8') else: with open(path, 'r') as fp: data = fp.read() lines = data.splitlines() return lines def _read_format(path, format): lines = [format.read(l) for l in read_lines_allow_gzip(path)] return IntervalFile(path, format, lines) def read_bed(path): return _read_format(path, bed) def read_gffv2(path): return _read_format(path, gffv2) def read_gatk_style_intervals(path): return _read_format(path, gatk_style_intervals) def _to_format(interval_file, format): lines = [] for interval in interval_file: line = format.write(interval) if line is not None: lines.append(line) return '\n'.join(lines) def to_bed(interval_file): return _to_format(interval_file, bed) def to_gffv2(interval_file): return _to_format(interval_file, gffv2) def to_gatk_style_intervals(interval_file): return _to_format(interval_file, gatk_style_intervals)
37.69556
87
0.754066
2,927
17,830
4.571233
0.240178
0.017937
0.010762
0.005232
0.141704
0.110613
0.088042
0.047235
0.020777
0.015546
0
0.017189
0.181043
17,830
472
88
37.775424
0.899123
0.909422
0
0.045455
0
0
0.065698
0
0
0
0
0.002119
0
1
0.227273
false
0
0.090909
0.136364
0.568182
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
79de87a3330b53cc1c1b948abce13c28bd7e1d5d
765
py
Python
tests/test_binary.py
nyimbi/faker_extras
37967d9101af217f7671fc2ad071b49258711c29
[ "MIT" ]
null
null
null
tests/test_binary.py
nyimbi/faker_extras
37967d9101af217f7671fc2ad071b49258711c29
[ "MIT" ]
null
null
null
tests/test_binary.py
nyimbi/faker_extras
37967d9101af217f7671fc2ad071b49258711c29
[ "MIT" ]
1
2019-05-23T16:02:45.000Z
2019-05-23T16:02:45.000Z
def test_binary_byte_str_code(fake): assert isinstance(fake.binary_byte_str(code=True), str) def test_decimal_byte_str_code(fake): assert isinstance(fake.decimal_byte_str(code=True), str) def test_binary_byte_str(fake): assert isinstance(fake.binary_byte_str(), str) def test_decimal_byte_str(fake): assert isinstance(fake.decimal_byte_str(), str) def test_nibble(fake): assert len(fake.nibble()) == 4 assert isinstance(fake.nibble(), str) def test_octet(fake): assert len(fake.octet()) == 8 assert isinstance(fake.octet(), str) def test_byte(fake): assert len(fake.byte()) == 8 assert isinstance(fake.byte(), str) def test_word(fake): assert len(fake.word()) == 16 assert isinstance(fake.word(), str)
21.25
60
0.711111
114
765
4.54386
0.157895
0.121622
0.30888
0.185328
0.530888
0.474903
0.401544
0
0
0
0
0.00774
0.155556
765
35
61
21.857143
0.794118
0
0
0
0
0
0
0
0
0
0
0
0.6
1
0.4
false
0
0
0
0.4
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
4
8dad96fdcff0c2d94cfe818564c667aa3740eeb5
46
py
Python
tests/cmods/contracts/ctest.py
Akm0d/pop
77d9f6e6de8e02aa2ee5520d0aa0052fabd53243
[ "Apache-2.0" ]
48
2019-05-21T16:10:49.000Z
2021-12-04T18:02:20.000Z
tests/cmods/contracts/ctest.py
Akm0d/pop
77d9f6e6de8e02aa2ee5520d0aa0052fabd53243
[ "Apache-2.0" ]
43
2019-05-21T22:39:44.000Z
2020-02-07T16:37:29.000Z
tests/cmods/contracts/ctest.py
Akm0d/pop
77d9f6e6de8e02aa2ee5520d0aa0052fabd53243
[ "Apache-2.0" ]
18
2019-05-21T16:10:42.000Z
2019-12-13T16:28:36.000Z
def pre_cping(hub, ctx): hub.CPING = True
15.333333
24
0.652174
8
46
3.625
0.75
0
0
0
0
0
0
0
0
0
0
0
0.217391
46
2
25
23
0.805556
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
8db0168c2bf015bf7074951ad2bc118dd4de1de7
2,717
py
Python
tests/test_models.py
jesserockz/forecast_solar
84789e65fe044c3a0d29c06ea43c929d0ba8117f
[ "MIT" ]
3
2021-06-24T20:48:41.000Z
2021-09-26T09:31:41.000Z
tests/test_models.py
jesserockz/forecast_solar
84789e65fe044c3a0d29c06ea43c929d0ba8117f
[ "MIT" ]
9
2021-07-10T12:06:21.000Z
2022-03-22T12:55:34.000Z
tests/test_models.py
jesserockz/forecast_solar
84789e65fe044c3a0d29c06ea43c929d0ba8117f
[ "MIT" ]
4
2022-02-18T20:29:54.000Z
2022-03-21T17:49:51.000Z
"""Test the models.""" from datetime import datetime from forecast_solar import models from . import PAYLOAD, patch_now, patch_previous_day, patch_near_end_today def test_estimate_previous_day(patch_previous_day): """Test estimate.""" estimate = models.Estimate.from_dict(PAYLOAD) assert estimate.timezone == "Europe/Amsterdam" assert estimate.now().date().isoformat() == "2021-07-20" assert estimate.energy_production_today == 12984 assert estimate.energy_production_tomorrow == 14679 assert estimate.power_production_now == 0 assert estimate.energy_current_hour == 0 assert estimate.power_highest_peak_time_today == datetime.fromisoformat( "2021-07-20T15:00:00+02:00" ) assert estimate.power_highest_peak_time_tomorrow == datetime.fromisoformat( "2021-07-21T14:00:00+02:00" ) assert estimate.sum_energy_production(1) == 0 assert estimate.sum_energy_production(6) == 0 assert estimate.sum_energy_production(12) == 3631 assert estimate.sum_energy_production(24) == 14679 def test_estimate_now(patch_now): """Test estimate.""" estimate = models.Estimate.from_dict(PAYLOAD) assert estimate.timezone == "Europe/Amsterdam" assert estimate.now().date().isoformat() == "2021-07-21" assert estimate.energy_production_today == 14679 assert estimate.energy_production_tomorrow == 0 assert estimate.power_production_now == 724 assert estimate.energy_current_hour == 724 assert estimate.power_highest_peak_time_today == datetime.fromisoformat( "2021-07-21T14:00:00+02:00" ) assert estimate.power_highest_peak_time_tomorrow is None assert estimate.sum_energy_production(1) == 1060 assert estimate.sum_energy_production(6) == 9044 assert estimate.sum_energy_production(12) == 13454 assert estimate.sum_energy_production(24) == 13454 def test_estimate_near_end(patch_near_end_today): """Test estimate.""" estimate = models.Estimate.from_dict(PAYLOAD) assert estimate.timezone == "Europe/Amsterdam" assert estimate.now().date().isoformat() == "2021-07-21" assert estimate.energy_production_today == 14679 assert estimate.energy_production_tomorrow == 0 assert estimate.power_production_now == 888 assert estimate.energy_current_hour == 888 assert estimate.power_highest_peak_time_today == datetime.fromisoformat( "2021-07-21T14:00:00+02:00" ) assert estimate.power_highest_peak_time_tomorrow is None assert estimate.sum_energy_production(1) == 548 assert estimate.sum_energy_production(6) == 846 assert estimate.sum_energy_production(12) == 846 assert estimate.sum_energy_production(24) == 846
33.9625
79
0.741627
348
2,717
5.514368
0.175287
0.262637
0.106305
0.143825
0.845232
0.742053
0.564878
0.564878
0.564878
0.564878
0
0.083479
0.157895
2,717
79
80
34.392405
0.755245
0.022451
0
0.377358
0
0
0.067552
0.037951
0
0
0
0
0.679245
1
0.056604
false
0
0.056604
0
0.113208
0
0
0
0
null
1
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
4
5c009c0d940a5fe1b6bf3033658a224f176da0a5
104
py
Python
CertifiableBayesianInference/BayesKeras/__init__.py
Hongchenglong/colab
9cc5c15abde536493cc3f12008e791caa1d00070
[ "Apache-2.0" ]
null
null
null
CertifiableBayesianInference/BayesKeras/__init__.py
Hongchenglong/colab
9cc5c15abde536493cc3f12008e791caa1d00070
[ "Apache-2.0" ]
null
null
null
CertifiableBayesianInference/BayesKeras/__init__.py
Hongchenglong/colab
9cc5c15abde536493cc3f12008e791caa1d00070
[ "Apache-2.0" ]
null
null
null
# Author: Mathew Wicker #import optimizers #import analyzers from .posteriormodel import PosteriorModel
20.8
42
0.836538
11
104
7.909091
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.115385
104
4
43
26
0.945652
0.519231
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
5c12fba0d4bec913ce49238d967173516b58572d
4,589
py
Python
annotation/state/States.py
jbudis/dante
90177c33825d5f9ce3fba5463092fbcf20b72fe2
[ "Apache-2.0" ]
4
2018-09-28T14:50:47.000Z
2021-08-09T12:46:12.000Z
annotation/state/States.py
jbudis/dante
90177c33825d5f9ce3fba5463092fbcf20b72fe2
[ "Apache-2.0" ]
6
2019-01-02T13:08:31.000Z
2021-03-25T21:45:40.000Z
annotation/state/States.py
jbudis/dante
90177c33825d5f9ce3fba5463092fbcf20b72fe2
[ "Apache-2.0" ]
1
2017-12-12T10:38:26.000Z
2017-12-12T10:38:26.000Z
CODE_GAP = '-' CODE_BACKGROUND = '-' class State: """ Node in the HMM architecture, with emission probability """ def __init__(self, emission, module_id, state_id): """ :param emission: Multinomial distribution of nucleotide generation, one float value for each nucleotide :param module_id: Id of the module which contains the state :param state_id: Id of the state in the ordered state sequence """ self.emission = emission self.module_id = module_id self.state_id = state_id def is_background(self): """ Specify, if state is outside primers and motifs and emits random nucleotides without preference :return: True, if state is background type """ return False def is_insert(self): """ Specify, if state is inside primers or motifs and emits random nucleotides without preference to simulate insertions between key states :return: True, if state is insert type """ return False def is_motif(self): """ Specify, if state is in motif sequence with preferred nucleotide in emission probabilities :return: True, if state is motif type """ return False def is_sequence(self): """ Specify, if state is in primer sequence with preferred nucleotide in emission probabilities :return: True, if state is sequence type """ return False def is_key(self): """ Specify, if state has specified nucleotide that is preferred in emission probabilities :return: True, if state is key type """ return False def is_last_in_module(self): """ Is this State last in the module? :return: True, if it is last - only for MotifStates relevant """ return True def is_first_in_module(self): """ Is this State last in the module? :return: True, if it is last - only for MotifStates relevant """ return True class KeyState(State): """ State with specified nucleotide that is preferred in emission probabilities """ def __init__(self, nucleotide, emission, module_id, state_id, first, last): State.__init__(self, emission, module_id, state_id) self.nucleotide = nucleotide self.first = first self.last = last def __str__(self): return self.nucleotide.lower() def is_sequence(self): return True def is_key(self): return True def is_first_in_module(self): """ Is this State last in the module? :return: True, if it is last - only for MotifStates relevant """ return self.first def is_last_in_module(self): """ Is this State last in the module? :return: True, if it is last - only for MotifStates relevant """ return self.last class MotifState(KeyState): """ State in motif sequence with preferred nucleotide in emission probabilities """ def __init__(self, nucleotide, emission, module_id, state_id, first, last): KeyState.__init__(self, nucleotide, emission, module_id, state_id, first, last) self.module_id = module_id def __str__(self): return self.nucleotide.upper() def is_motif(self): return True class SequenceState(KeyState): """ State in primer sequence with preferred nucleotide in emission probabilities """ def __init__(self, nucleotide, emission, module_id, state_id, first, last): KeyState.__init__(self, nucleotide, emission, module_id, state_id, True, True) self.module_id = module_id def __str__(self): return self.nucleotide.lower() def is_sequence(self): return True class BackgroundState(State): """ State outside primers and motifs, that emits random nucleotides without preference """ def __init__(self, emission, state_id): State.__init__(self, emission, CODE_BACKGROUND, state_id) def __str__(self): return CODE_GAP def is_background(self): return True class InsertState(State): """ State inside primers or motifs, that emits random nucleotides without preference to simulate insertions between key states """ def __init__(self, emission, module_id, state_id): State.__init__(self, emission, module_id, state_id) def __str__(self): return CODE_GAP def is_insert(self): return True
27.479042
111
0.639355
564
4,589
4.985816
0.141844
0.060455
0.032006
0.067212
0.725462
0.653627
0.629445
0.588193
0.501778
0.49111
0
0
0.286555
4,589
166
112
27.644578
0.858888
0.391371
0
0.701493
0
0
0.000843
0
0
0
0
0
0
1
0.38806
false
0
0
0.164179
0.776119
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
5c2b20f6a27fc7544fd77b0588496bf7dc87ce42
1,680
py
Python
openmdao.units/openmdao/units/test/unit_compare.py
mjfwest/OpenMDAO-Framework
a5521f47ad7686c25b203de74e1c7dff5fd7a52b
[ "Apache-2.0" ]
69
2015-01-02T19:10:08.000Z
2021-11-14T04:42:28.000Z
openmdao.units/openmdao/units/test/unit_compare.py
jcchin/OpenMDAO-Framework
038e89b06da1c74f00918f4c6fbd8bd365e25657
[ "Apache-2.0" ]
3
2015-01-15T23:08:18.000Z
2015-03-11T16:57:35.000Z
openmdao.units/openmdao/units/test/unit_compare.py
jcchin/OpenMDAO-Framework
038e89b06da1c74f00918f4c6fbd8bd365e25657
[ "Apache-2.0" ]
31
2015-09-16T00:37:35.000Z
2022-01-10T06:27:55.000Z
#Comparison between NASA units and Sicentific PhysicalQuantities in terms of speed import Scientific.Physics.PhysicalQuantities as case1 import units as case2 import time import cProfile n = 20000 #x1 = case1.PhysicalQuantity('5cm') #x2 = case2.PhysicalQuantity('5cm') t1 = time.time() for jj in xrange(n): pq = case1.PhysicalQuantity(5, 'mi/h') pq.convert_to_unit('m/s') pq2 = pq**2 pq2 = pq**2 pq2 = pq*pq pq2 = pq/pq pq2 = pq + pq pq2 = pq - pq pq2 = pq**2 pq2.sqrt() pq2 = case1.PhysicalQuantity(4,'rad') pq2.sin() pq2.cos() print "Scientific -> Elapsed time: ", time.time()-t1 print "" t2 = time.time() for jj in xrange(n): pq = case2.PhysicalQuantity(5, 'mi/h') pq.convert_to_unit('m/s') pq2 = pq**2 pq2 = pq*pq pq2 = pq/pq pq2 = pq + pq pq2 = pq - pq pq2 = pq**2 pq2.sqrt() pq2 = case2.PhysicalQuantity(4,'rad') pq2.sin() pq2.cos() print "Justin -> Elapsed time: ", time.time()-t2 stmt = """ for jj in xrange(n): pq = case1.PhysicalQuantity(5, 'mi/h') pq.convert_to_unit('m/s') pq2 = pq**2 pq2 = pq**2 pq2 = pq*pq pq2 = pq/pq pq2 = pq + pq pq2 = pq - pq pq2 = pq**2 pq2.sqrt() pq2 = case1.PhysicalQuantity(4,'rad') pq2.sin() pq2.cos() """ cProfile.run(stmt) stmt = """ for jj in xrange(n): pq = case2.PhysicalQuantity(5, 'mi/h') pq.convert_to_unit('m/s') pq2 = pq**2 pq2 = pq*pq pq2 = pq/pq pq2 = pq + pq pq2 = pq - pq pq2 = pq**2 pq2.sqrt() pq2 = case2.PhysicalQuantity(4,'rad') pq2.sin() pq2.cos() """ cProfile.run(stmt)
18.26087
82
0.565476
254
1,680
3.708661
0.200787
0.138004
0.118896
0.169851
0.696391
0.696391
0.696391
0.687898
0.660297
0.660297
0
0.070132
0.278571
1,680
92
83
18.26087
0.707096
0.08869
0
0.857143
0
0
0.432963
0.105952
0
0
0
0
0
0
null
null
0
0.057143
null
null
0.042857
0
0
0
null
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
5c2bcd4ed223afbdd65630e5455fe53aa4024792
73
py
Python
src/typhoonae/files/__init__.py
sprymak/typhoonae
fe31bcc7b21fc14f8aa97b36d66cd7671974543b
[ "Apache-2.0" ]
1
2018-12-02T10:36:07.000Z
2018-12-02T10:36:07.000Z
src/typhoonae/files/__init__.py
sprymak/typhoonae
fe31bcc7b21fc14f8aa97b36d66cd7671974543b
[ "Apache-2.0" ]
null
null
null
src/typhoonae/files/__init__.py
sprymak/typhoonae
fe31bcc7b21fc14f8aa97b36d66cd7671974543b
[ "Apache-2.0" ]
1
2018-12-02T10:36:08.000Z
2018-12-02T10:36:08.000Z
"""This package contains TyphoonAE's implementation of the Files API."""
36.5
72
0.767123
10
73
5.6
1
0
0
0
0
0
0
0
0
0
0
0
0.123288
73
1
73
73
0.875
0.90411
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
5c48ca86fc6c4920ea6acc9fd4f36d6e1d9e3ce3
125
py
Python
19/00/2/sub/Programmer.py
pylangstudy/201706
f1cc6af6b18e5bd393cda27f5166067c4645d4d3
[ "CC0-1.0" ]
null
null
null
19/00/2/sub/Programmer.py
pylangstudy/201706
f1cc6af6b18e5bd393cda27f5166067c4645d4d3
[ "CC0-1.0" ]
70
2017-06-01T11:02:51.000Z
2017-06-30T00:35:32.000Z
19/00/2/sub/Programmer.py
pylangstudy/201706
f1cc6af6b18e5bd393cda27f5166067c4645d4d3
[ "CC0-1.0" ]
null
null
null
import super.Types.Human class Programmer(super.Human.Types.Human): def programming(self): print('programming.')
25
42
0.72
15
125
6
0.666667
0.222222
0
0
0
0
0
0
0
0
0
0
0.152
125
4
43
31.25
0.849057
0
0
0
0
0
0.096
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0.25
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
a50b9d39ad26255cf3dcc5129e5a39d7001d0c79
329
py
Python
tests/unit/test_categories.py
aeskincbr/kesher-backend
57e0fd7410fc8ae6a6fe438b3633f191bb791072
[ "MIT" ]
1
2021-05-13T10:58:06.000Z
2021-05-13T10:58:06.000Z
tests/unit/test_categories.py
aeskincbr/kesher-backend
57e0fd7410fc8ae6a6fe438b3633f191bb791072
[ "MIT" ]
null
null
null
tests/unit/test_categories.py
aeskincbr/kesher-backend
57e0fd7410fc8ae6a6fe438b3633f191bb791072
[ "MIT" ]
2
2021-04-06T15:28:16.000Z
2021-05-13T23:02:59.000Z
import json from pytest_mock import MockerFixture from service import report_category_handler def test_get_report_categories_list(mocker: MockerFixture): response = report_category_handler.get_report_categories_list(mocker.MagicMock(), mocker.MagicMock()) body = json.loads(response["body"]) assert body is not None
36.555556
105
0.81459
43
329
5.953488
0.55814
0.109375
0.164063
0.179688
0.226563
0
0
0
0
0
0
0
0.115502
329
9
106
36.555556
0.879725
0
0
0
0
0
0.012121
0
0
0
0
0
0.142857
1
0.142857
false
0
0.428571
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
0
0
1
0
1
0
0
4
eb70c2b08541a0020b3387eeeb52930d4fc83663
549
py
Python
healthcheck/admin.py
rafilkmp3/healthcheck-as-a-service
a35be50ceff8ec7ab7e2c45ec49831d65807b51b
[ "BSD-3-Clause" ]
29
2015-01-23T12:37:17.000Z
2019-05-23T11:00:28.000Z
healthcheck/admin.py
rafilkmp3/healthcheck-as-a-service
a35be50ceff8ec7ab7e2c45ec49831d65807b51b
[ "BSD-3-Clause" ]
8
2015-01-09T20:21:58.000Z
2018-11-01T12:14:37.000Z
healthcheck/admin.py
rafilkmp3/healthcheck-as-a-service
a35be50ceff8ec7ab7e2c45ec49831d65807b51b
[ "BSD-3-Clause" ]
16
2015-01-02T09:39:09.000Z
2022-03-22T17:30:01.000Z
# Copyright 2014 healthcheck-as-a-service authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from flask_admin import BaseView, expose class HealthcheckAdmin(BaseView): @expose('/') def index(self): return self.render('index.html') class UrlAdmin(BaseView): @expose('/') def index(self): return self.render('index.html') class WatcherAdmin(BaseView): @expose('/') def index(self): return self.render('index.html')
22.875
71
0.681239
72
549
5.180556
0.611111
0.150134
0.136729
0.176944
0.436997
0.436997
0.436997
0.436997
0.436997
0.436997
0
0.009112
0.200364
549
23
72
23.869565
0.840547
0.304189
0
0.692308
0
0
0.087302
0
0
0
0
0
0
1
0.230769
false
0
0.076923
0.230769
0.769231
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
eb8930f1b5116d9b2a575dee3e28e6e6e0470390
110
py
Python
payments/models.py
closeair/one-eleven
392e94a75d3d036d47528d51de6c97f591de63c7
[ "MIT" ]
null
null
null
payments/models.py
closeair/one-eleven
392e94a75d3d036d47528d51de6c97f591de63c7
[ "MIT" ]
null
null
null
payments/models.py
closeair/one-eleven
392e94a75d3d036d47528d51de6c97f591de63c7
[ "MIT" ]
null
null
null
from django.db import models class Invoice(models.Model): pass class InvoveItem(models.Mode): pass
12.222222
30
0.727273
15
110
5.333333
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.190909
110
8
31
13.75
0.898876
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0
true
0.4
0.2
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
eb908f00ddb43cb12ac67dbd1701fdfe18fc0779
261
py
Python
great_expectations/cli/upgrade_helpers/__init__.py
victorcouste/great_expectations
9ee46d83feb87e13c769e2ae35b899b3f18d73a4
[ "Apache-2.0" ]
6,451
2017-09-11T16:32:53.000Z
2022-03-31T23:27:49.000Z
great_expectations/cli/upgrade_helpers/__init__.py
victorcouste/great_expectations
9ee46d83feb87e13c769e2ae35b899b3f18d73a4
[ "Apache-2.0" ]
3,892
2017-09-08T18:57:50.000Z
2022-03-31T23:15:20.000Z
great_expectations/cli/upgrade_helpers/__init__.py
victorcouste/great_expectations
9ee46d83feb87e13c769e2ae35b899b3f18d73a4
[ "Apache-2.0" ]
1,023
2017-09-08T15:22:05.000Z
2022-03-31T21:17:08.000Z
from great_expectations.cli.upgrade_helpers.upgrade_helper_v11 import UpgradeHelperV11 from great_expectations.cli.upgrade_helpers.upgrade_helper_v13 import UpgradeHelperV13 GE_UPGRADE_HELPER_VERSION_MAP = { 1: UpgradeHelperV11, 2: UpgradeHelperV13, }
32.625
86
0.854406
31
261
6.806452
0.548387
0.184834
0.199052
0.227488
0.483412
0.483412
0.483412
0.483412
0
0
0
0.059322
0.095785
261
7
87
37.285714
0.834746
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
ebbee70c7cf71e632d05ae50536d8e7d9f18f602
322
py
Python
braintree/exceptions/server_error.py
futureironman/braintree_python
26bb8a857bc29322a8bca2e8e0fe6d99cfe6a1ac
[ "MIT" ]
182
2015-01-09T05:26:46.000Z
2022-03-16T14:10:06.000Z
braintree/exceptions/server_error.py
futureironman/braintree_python
26bb8a857bc29322a8bca2e8e0fe6d99cfe6a1ac
[ "MIT" ]
95
2015-02-24T23:29:56.000Z
2022-03-13T03:27:58.000Z
braintree/exceptions/server_error.py
futureironman/braintree_python
26bb8a857bc29322a8bca2e8e0fe6d99cfe6a1ac
[ "MIT" ]
93
2015-02-19T17:59:06.000Z
2022-03-19T17:01:25.000Z
from braintree.exceptions.braintree_error import BraintreeError class ServerError(BraintreeError): """ Raised when the gateway raises an error. Please contant support at support@getbraintree.com. See https://developers.braintreepayments.com/reference/general/exceptions/python#server-error """ pass
32.2
97
0.776398
36
322
6.916667
0.805556
0
0
0
0
0
0
0
0
0
0
0
0.142857
322
9
98
35.777778
0.902174
0.583851
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
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
1
1
0
0
0
0
4
ccda0e22aa91606aa6d861b11883265f0b06f398
186
py
Python
apps/books/admin.py
michal-siedlecki/books
31c477014a1438f962c9044859621eea32be209e
[ "MIT" ]
null
null
null
apps/books/admin.py
michal-siedlecki/books
31c477014a1438f962c9044859621eea32be209e
[ "MIT" ]
2
2021-06-09T18:04:55.000Z
2021-06-10T20:04:29.000Z
apps/books/admin.py
michal-siedlecki/books
31c477014a1438f962c9044859621eea32be209e
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Book @admin.register(Book) class BookAdmin(admin.ModelAdmin): list_display = [field.name for field in Book._meta.get_fields()]
23.25
68
0.774194
27
186
5.222222
0.740741
0
0
0
0
0
0
0
0
0
0
0
0.129032
186
7
69
26.571429
0.87037
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
691b9e95be982703361b49a4230b315d8e9bd763
80
py
Python
social/apps/django_app/context_processors.py
raccoongang/python-social-auth
81c0a542d158772bd3486d31834c10af5d5f08b0
[ "BSD-3-Clause" ]
1,987
2015-01-01T16:12:45.000Z
2022-03-29T14:24:25.000Z
social/apps/django_app/context_processors.py
raccoongang/python-social-auth
81c0a542d158772bd3486d31834c10af5d5f08b0
[ "BSD-3-Clause" ]
731
2015-01-01T22:55:25.000Z
2022-03-10T15:07:51.000Z
virtual/lib/python3.6/site-packages/social/apps/django_app/context_processors.py
dennismwaniki67/awards
80ed10541f5f751aee5f8285ab1ad54cfecba95f
[ "MIT" ]
1,082
2015-01-01T16:27:26.000Z
2022-03-22T21:18:33.000Z
from social_django.context_processors import LazyDict, backends, login_redirect
40
79
0.8875
10
80
6.8
1
0
0
0
0
0
0
0
0
0
0
0
0.075
80
1
80
80
0.918919
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
692214018531c95ce5488631bfda8916319a02eb
68
py
Python
lakshmi/__init__.py
sarvjeets/lakshmi
8cd6e47f23a61c5b8c967f9fdc756df296f1e0d5
[ "MIT" ]
59
2021-09-07T05:19:30.000Z
2022-02-24T18:29:49.000Z
lakshmi/__init__.py
sarvjeets/lakshmi
8cd6e47f23a61c5b8c967f9fdc756df296f1e0d5
[ "MIT" ]
4
2021-08-01T18:32:51.000Z
2022-02-26T19:14:37.000Z
lakshmi/__init__.py
sarvjeets/lakshmi
8cd6e47f23a61c5b8c967f9fdc756df296f1e0d5
[ "MIT" ]
3
2021-08-01T04:35:07.000Z
2022-03-23T21:48:51.000Z
from .lakshmi import * # noqa: F401,F403 del lakshmi # noqa: 821
17
41
0.676471
10
68
4.6
0.8
0
0
0
0
0
0
0
0
0
0
0.169811
0.220588
68
3
42
22.666667
0.698113
0.367647
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
15c71000e76d57ad8d45942c856c701308a926d8
156
py
Python
books_library/recomendation/apps.py
Ilyes-Hammadi/books-library
cba0df1ae95c3467b8d16caca16383c0af9a98cd
[ "MIT" ]
9
2017-07-20T15:25:51.000Z
2019-08-26T22:48:01.000Z
books_library/recomendation/apps.py
Ilyes-Hammadi/bookslib
cba0df1ae95c3467b8d16caca16383c0af9a98cd
[ "MIT" ]
null
null
null
books_library/recomendation/apps.py
Ilyes-Hammadi/bookslib
cba0df1ae95c3467b8d16caca16383c0af9a98cd
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class RecomendationConfig(AppConfig): name = 'books_library.recomendation'
19.5
40
0.820513
17
156
7.176471
0.823529
0
0
0
0
0
0
0
0
0
0
0
0.128205
156
7
41
22.285714
0.897059
0
0
0
0
0
0.173077
0.173077
0
0
0
0
0
1
0
false
0
0.5
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
15d3af7ed96e93908da309aa72ded53ba043cac5
186
py
Python
yt/frontends/adaptahop/api.py
Xarthisius/yt
321643c3abff64a6f132d98d0747f3558f7552a3
[ "BSD-3-Clause-Clear" ]
360
2017-04-24T05:06:04.000Z
2022-03-31T10:47:07.000Z
yt/frontends/adaptahop/api.py
Xarthisius/yt
321643c3abff64a6f132d98d0747f3558f7552a3
[ "BSD-3-Clause-Clear" ]
2,077
2017-04-20T20:36:07.000Z
2022-03-31T16:39:43.000Z
yt/frontends/adaptahop/api.py
stonnes/yt
aad3cfa3b4ebab7838352ab467275a27c26ff363
[ "BSD-3-Clause-Clear" ]
257
2017-04-19T20:52:28.000Z
2022-03-29T12:23:52.000Z
""" API for AdaptaHOP frontend """ from . import tests from .data_structures import AdaptaHOPDataset from .fields import AdaptaHOPFieldInfo from .io import IOHandlerAdaptaHOPBinary
14.307692
45
0.801075
20
186
7.4
0.7
0
0
0
0
0
0
0
0
0
0
0
0.145161
186
12
46
15.5
0.930818
0.139785
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
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
15d748c72a01f83a2ebd8154cdfff2b4e8b8fe0d
1,493
py
Python
fastapi-master-api/app/api/models/takeuchi_tfm_adapter.py
SionAbes/fullstack-porfolio
6ca74da425a0f6e2d9b65b2aeb8d5452ff1565a9
[ "MIT" ]
1
2021-12-25T09:19:25.000Z
2021-12-25T09:19:25.000Z
fastapi-master-api/app/api/models/takeuchi_tfm_adapter.py
SionAbes/fullstack-porfolio
6ca74da425a0f6e2d9b65b2aeb8d5452ff1565a9
[ "MIT" ]
null
null
null
fastapi-master-api/app/api/models/takeuchi_tfm_adapter.py
SionAbes/fullstack-porfolio
6ca74da425a0f6e2d9b65b2aeb8d5452ff1565a9
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import annotations import re # noqa: F401 from datetime import date, datetime # noqa: F401 from typing import Any, Dict, List, Optional # noqa: F401 from app.api.models.base_adapter import BaseAdapter from app.api.models.base_takeuchi_tfm_adapter import BaseTakeuchiTfmAdapter from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401 class TakeuchiTfmAdapter(BaseModel): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. TakeuchiTfmAdapter - a model defined in OpenAPI id: The id of this TakeuchiTfmAdapter. user_id: The user_id of this TakeuchiTfmAdapter. created_at: The created_at of this TakeuchiTfmAdapter. updated_at: The updated_at of this TakeuchiTfmAdapter. adapter_name: The adapter_name of this TakeuchiTfmAdapter. cron_expression: The cron_expression of this TakeuchiTfmAdapter. data_url: The data_url of this TakeuchiTfmAdapter. client_secret: The client_secret of this TakeuchiTfmAdapter. client_id: The client_id of this TakeuchiTfmAdapter. token_url: The token_url of this TakeuchiTfmAdapter. """ id: int user_id: int created_at: datetime updated_at: datetime adapter_name: str cron_expression: str data_url: str client_secret: str client_id: str token_url: str TakeuchiTfmAdapter.update_forward_refs()
32.456522
96
0.74347
193
1,493
5.559585
0.367876
0.055918
0.223672
0.072693
0.037279
0
0
0
0
0
0
0.010952
0.204956
1,493
45
97
33.177778
0.893008
0.543202
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.368421
0
0.947368
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
15d8b90f94271b19185fc1777cca6c8eaccc7946
585
py
Python
OpenGLCffi/EGL/EXT/KHR/stream.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
OpenGLCffi/EGL/EXT/KHR/stream.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
OpenGLCffi/EGL/EXT/KHR/stream.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
from OpenGLCffi.EGL import params @params(api='egl', prms=['dpy', 'attrib_list']) def eglCreateStreamKHR(dpy, attrib_list): pass @params(api='egl', prms=['dpy', 'stream']) def eglDestroyStreamKHR(dpy, stream): pass @params(api='egl', prms=['dpy', 'stream', 'attribute', 'value']) def eglStreamAttribKHR(dpy, stream, attribute): pass @params(api='egl', prms=['dpy', 'stream', 'attribute', 'value']) def eglQueryStreamKHR(dpy, stream, attribute): pass @params(api='egl', prms=['dpy', 'stream', 'attribute', 'value']) def eglQueryStreamu64KHR(dpy, stream, attribute): pass
21.666667
64
0.692308
71
585
5.676056
0.28169
0.17866
0.26799
0.198511
0.550868
0.503722
0.503722
0.431762
0.431762
0.431762
0
0.003831
0.107692
585
26
65
22.5
0.768199
0
0
0.5
0
0
0.183533
0
0
0
0
0
0
1
0.3125
false
0.3125
0.0625
0
0.375
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
15f033aacc244949a27907736e45c38ce5995ddc
322
py
Python
integration_tests/ui/test_ui_sanity.py
yaelmi3/backslash
edf39caf97af2c926da01c340a83648f4874e97e
[ "BSD-3-Clause" ]
17
2015-11-25T13:02:38.000Z
2021-12-14T20:18:36.000Z
integration_tests/ui/test_ui_sanity.py
yaelmi3/backslash
edf39caf97af2c926da01c340a83648f4874e97e
[ "BSD-3-Clause" ]
533
2015-11-24T12:47:13.000Z
2022-02-12T07:59:08.000Z
integration_tests/ui/test_ui_sanity.py
parallelsystems/backslash
577cdd18d5f665a8b493c4b2e2a605b7e0f6e11b
[ "BSD-3-Clause" ]
15
2015-11-22T13:25:54.000Z
2022-02-16T19:23:11.000Z
def test_logout(ui): driver = ui.driver driver.find_element_by_css_selector(".user-dropdown").click() driver.find_element_by_css_selector(".logout-button").click() assert driver.find_element_by_css_selector('.login-form') def test_recorded_sessions_visible(ui_session): assert ui_session is not None
32.2
65
0.773292
47
322
4.914894
0.510638
0.12987
0.220779
0.246753
0.38961
0.38961
0
0
0
0
0
0
0.118012
322
9
66
35.777778
0.81338
0
0
0
0
0
0.121118
0
0
0
0
0
0.285714
1
0.285714
false
0
0
0
0.285714
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
c61fc6c9073a46f0b90f3db9b72060925b717e94
481
py
Python
prmaya/scripts/prObjectSetUi/__init__.py
moChen0607/prmaya
1b48f2b72b458d106752fee768846e1c172dd59a
[ "MIT" ]
1
2020-01-14T10:20:32.000Z
2020-01-14T10:20:32.000Z
prmaya/scripts/prObjectSetUi/__init__.py
moChen0607/prmaya
1b48f2b72b458d106752fee768846e1c172dd59a
[ "MIT" ]
null
null
null
prmaya/scripts/prObjectSetUi/__init__.py
moChen0607/prmaya
1b48f2b72b458d106752fee768846e1c172dd59a
[ "MIT" ]
null
null
null
""" https://github.com/parzival-roethlein/prmaya # DESCRIPTION Manage objectSet members (add, remove, reorder, export, import) # USAGE import prmaya.scripts.prObjectSetUi.utils prmaya.scripts.prObjectSetUi.utils.ui() # TODO - export / import members - avoid unwanted maya behavior (clean solutions only possible with custom node?) -- add duplicated members to set (custom sync attribute?, scriptjob?) -- delete set when last member gets deleted (lock set current workaround) """
30.0625
80
0.773389
61
481
6.098361
0.770492
0.064516
0.139785
0.166667
0
0
0
0
0
0
0
0
0.126819
481
16
81
30.0625
0.885714
0.983368
0
null
0
null
0
0
null
0
0
0.0625
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
0
0
0
0
0
4
c6304949f134dc4c65cdb201421264a50bed87ad
152
py
Python
scenarios/dispute_show/executable.py
trenton42/txbalanced
9ee1b906d75b4b2fc3d2f5424dc3bbb9886c2b14
[ "MIT" ]
null
null
null
scenarios/dispute_show/executable.py
trenton42/txbalanced
9ee1b906d75b4b2fc3d2f5424dc3bbb9886c2b14
[ "MIT" ]
null
null
null
scenarios/dispute_show/executable.py
trenton42/txbalanced
9ee1b906d75b4b2fc3d2f5424dc3bbb9886c2b14
[ "MIT" ]
null
null
null
import balanced balanced.configure('ak-test-1o9QKwUCrwstHWO5sGxICtIJdQXFTjnrV') dispute = balanced.Dispute.fetch('/disputes/DT7be1ZNkz2SkA9rhBqxynrA')
30.4
70
0.848684
13
152
9.923077
0.769231
0
0
0
0
0
0
0
0
0
0
0.048276
0.046053
152
5
70
30.4
0.841379
0
0
0
0
0
0.490196
0.490196
0
0
0
0
0
1
0
false
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
1
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
d67581f527fd496e011ca518f7f5c1cc3153b44f
359
py
Python
src/app/datastore/queries/articles/article.py
RdevJ/headquater
2da2290560b030f7ce365e1b71affd637fb9cab4
[ "MIT" ]
null
null
null
src/app/datastore/queries/articles/article.py
RdevJ/headquater
2da2290560b030f7ce365e1b71affd637fb9cab4
[ "MIT" ]
null
null
null
src/app/datastore/queries/articles/article.py
RdevJ/headquater
2da2290560b030f7ce365e1b71affd637fb9cab4
[ "MIT" ]
null
null
null
from sqlalchemy.orm.session import Session from app.models.article import Article class ArticleQuery(object): def __init__(self, article_slug: str): self.article_slug = article_slug def get_article(self, db: Session) -> Article: return db.query(Article).filter( Article.title_slug == self.article_slug ).first()
27.615385
51
0.693593
45
359
5.311111
0.511111
0.1841
0.188285
0
0
0
0
0
0
0
0
0
0.211699
359
12
52
29.916667
0.844523
0
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0.111111
0.666667
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
d69d07cd0b9c2d546d9af7b1455448296c57b961
219
py
Python
prototorch/functions/__init__.py
codacy-badger/prototorch
4158586cb93e195208fc397bda33d67385cf385f
[ "MIT" ]
null
null
null
prototorch/functions/__init__.py
codacy-badger/prototorch
4158586cb93e195208fc397bda33d67385cf385f
[ "MIT" ]
null
null
null
prototorch/functions/__init__.py
codacy-badger/prototorch
4158586cb93e195208fc397bda33d67385cf385f
[ "MIT" ]
null
null
null
"""ProtoTorch functions.""" from .activations import identity, sigmoid_beta, swish_beta from .competitions import knnc, wtac __all__ = [ 'identity', 'sigmoid_beta', 'swish_beta', 'knnc', 'wtac', ]
16.846154
59
0.6621
23
219
5.956522
0.565217
0.218978
0.277372
0.350365
0.408759
0
0
0
0
0
0
0
0.200913
219
12
60
18.25
0.782857
0.09589
0
0
0
0
0.197917
0
0
0
0
0
0
1
0
false
0
0.222222
0
0.222222
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
d6aa2b86ffa206c6141dce5d13bdb6c0cf2c89d5
283
py
Python
backend/models/event/cloudwatchevent.py
crosspower/naruko
4c524e2ef955610a711830bc86d730ffe4fc2bd8
[ "MIT" ]
17
2019-01-23T04:37:43.000Z
2019-10-15T01:42:31.000Z
backend/models/event/cloudwatchevent.py
snickerjp/naruko
4c524e2ef955610a711830bc86d730ffe4fc2bd8
[ "MIT" ]
1
2019-01-23T08:04:44.000Z
2019-01-23T08:44:33.000Z
backend/models/event/cloudwatchevent.py
snickerjp/naruko
4c524e2ef955610a711830bc86d730ffe4fc2bd8
[ "MIT" ]
6
2019-01-23T09:10:59.000Z
2020-12-02T04:15:41.000Z
class CloudWatchEvent: def __init__(self, schedule_expression: str, is_active: bool, name: str =None): self.name = name self.schedule_expression = schedule_expression self.is_active = is_active
28.3
55
0.55477
27
283
5.444444
0.481481
0.367347
0.29932
0
0
0
0
0
0
0
0
0
0.385159
283
9
56
31.444444
0.844828
0
0
0
0
0
0
0
0
0
0
0
0
1
0.125
false
0
0
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
d6bdc5953cfe68275c0d5d09c14b3f4d2c277ef9
109
py
Python
src/genome_assembly/apps.py
rbr7/compgenomics-2021-Team2_WebServer
17a15fb4ee65f80a8b59df7d0731c9e20442ee5e
[ "MIT" ]
null
null
null
src/genome_assembly/apps.py
rbr7/compgenomics-2021-Team2_WebServer
17a15fb4ee65f80a8b59df7d0731c9e20442ee5e
[ "MIT" ]
null
null
null
src/genome_assembly/apps.py
rbr7/compgenomics-2021-Team2_WebServer
17a15fb4ee65f80a8b59df7d0731c9e20442ee5e
[ "MIT" ]
null
null
null
from django.apps import AppConfig class GenomeAssemblyConfig(AppConfig): name = 'genome_assembly'
18.166667
39
0.752294
11
109
7.363636
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.183486
109
5
40
21.8
0.910112
0
0
0
0
0
0.144231
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
ba3c1db4e049989fcf495f0222679e85764ac590
371
py
Python
edm_web1/script/newlib/_signal.py
zhouli121018/nodejsgm
0ccbc8acf61badc812f684dd39253d55c99f08eb
[ "MIT" ]
null
null
null
edm_web1/script/newlib/_signal.py
zhouli121018/nodejsgm
0ccbc8acf61badc812f684dd39253d55c99f08eb
[ "MIT" ]
18
2020-06-05T18:17:40.000Z
2022-03-11T23:25:21.000Z
edm_web1/script/newlib/_signal.py
zhouli121018/nodejsgm
0ccbc8acf61badc812f684dd39253d55c99f08eb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import signal import gevent import gevent.signal # --------------信号量处理--------------- # 设置监听信号量 # 设置程序结束信号量 def init_gevent_signal(handler): gevent.signal(signal.SIGINT, handler, 'sigint') # 处理 Ctrl-C gevent.signal(signal.SIGTERM, handler, 'sigterm') # 处理 kill gevent.signal(signal.SIGALRM, handler, 'sigalrm') # 处理 signal.alarm()
28.538462
74
0.652291
44
371
5.454545
0.454545
0.25
0.225
0
0
0
0
0
0
0
0
0.003145
0.142857
371
13
74
28.538462
0.751572
0.296496
0
0
0
0
0.07874
0
0
0
0
0
0
1
0.142857
false
0
0.428571
0
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
0
0
0
1
0
1
0
0
4
ba46f48e0207de0f69fe389e0b2c6e922ca55409
52
py
Python
src/authentication/models.py
ppknUWr/backend-bbz
5ee82737d4c65be109677ec9485ec7f59aae62bf
[ "Apache-2.0" ]
1
2021-03-03T19:12:26.000Z
2021-03-03T19:12:26.000Z
src/authentication/models.py
ppknUWr/backend-bbz
5ee82737d4c65be109677ec9485ec7f59aae62bf
[ "Apache-2.0" ]
10
2021-03-01T16:11:29.000Z
2021-10-04T18:36:33.000Z
src/authentication/models.py
ppknUWr/backend-bbz
5ee82737d4c65be109677ec9485ec7f59aae62bf
[ "Apache-2.0" ]
null
null
null
from django.db import models # Create models here
10.4
28
0.769231
8
52
5
0.875
0
0
0
0
0
0
0
0
0
0
0
0.192308
52
4
29
13
0.952381
0.346154
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
ba4b985b532c61b919cba18f2e4b40f76853316d
73
py
Python
interfaces/python/test/nodes_test.py
kernhanda/ELL
370c0de4e4c190ca0cb43654b4246b3686bca464
[ "MIT" ]
null
null
null
interfaces/python/test/nodes_test.py
kernhanda/ELL
370c0de4e4c190ca0cb43654b4246b3686bca464
[ "MIT" ]
null
null
null
interfaces/python/test/nodes_test.py
kernhanda/ELL
370c0de4e4c190ca0cb43654b4246b3686bca464
[ "MIT" ]
1
2020-12-10T17:49:07.000Z
2020-12-10T17:49:07.000Z
import ell def test(): print("nodes_test.test -- TBD") return 0
12.166667
35
0.616438
11
73
4
0.818182
0
0
0
0
0
0
0
0
0
0
0.018182
0.246575
73
5
36
14.6
0.781818
0
0
0
0
0
0.30137
0
0
0
0
0
0
1
0.25
true
0
0.25
0
0.75
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
4
ba9112f0d2bc4c24f3431ed6555b7fa00712bb4d
96
py
Python
Tutorials/01. 10 Days of Statistics/011. Day 5 - Poisson Distribution II.py
stonehengee/HackerrankPractice
ec052e7447391e40d1919cf0b641ff5023da3da3
[ "MIT" ]
null
null
null
Tutorials/01. 10 Days of Statistics/011. Day 5 - Poisson Distribution II.py
stonehengee/HackerrankPractice
ec052e7447391e40d1919cf0b641ff5023da3da3
[ "MIT" ]
null
null
null
Tutorials/01. 10 Days of Statistics/011. Day 5 - Poisson Distribution II.py
stonehengee/HackerrankPractice
ec052e7447391e40d1919cf0b641ff5023da3da3
[ "MIT" ]
null
null
null
# Problem: https://www.hackerrank.com/challenges/s10-poisson-distribution-2/problem # Score: 30
32
83
0.78125
13
96
5.769231
0.923077
0
0
0
0
0
0
0
0
0
0
0.055556
0.0625
96
2
84
48
0.777778
0.947917
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
bab3bada988756769c8b3327590eb6ad143eac63
35
py
Python
DjangoStarter/DjangoStarter/__init__.py
QuinntyneBrown/DjangoStarter
7c2f385546568604acbb4f18d8a473ecb3688202
[ "MIT" ]
null
null
null
DjangoStarter/DjangoStarter/__init__.py
QuinntyneBrown/DjangoStarter
7c2f385546568604acbb4f18d8a473ecb3688202
[ "MIT" ]
null
null
null
DjangoStarter/DjangoStarter/__init__.py
QuinntyneBrown/DjangoStarter
7c2f385546568604acbb4f18d8a473ecb3688202
[ "MIT" ]
null
null
null
""" Package for DjangoStarter. """
8.75
26
0.657143
3
35
7.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
35
3
27
11.666667
0.766667
0.742857
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
bae560e156346abefb32ddd61fea1341e16ffced
446
py
Python
test/test_cmdline/test_tokens.py
Rudedog9d/pypsi
38dda442b21b8deb569d61076ab0a19c0e78edc8
[ "0BSD" ]
18
2015-01-07T19:05:29.000Z
2022-01-09T02:33:23.000Z
test/test_cmdline/test_tokens.py
Rudedog9d/pypsi
38dda442b21b8deb569d61076ab0a19c0e78edc8
[ "0BSD" ]
30
2015-02-19T16:04:04.000Z
2021-03-30T00:09:58.000Z
test/test_cmdline/test_tokens.py
Rudedog9d/pypsi
38dda442b21b8deb569d61076ab0a19c0e78edc8
[ "0BSD" ]
7
2016-01-02T17:55:48.000Z
2020-11-22T14:52:32.000Z
import pytest from pypsi.cmdline import * class TestTokens(object): @pytest.mark.parametrize('op', (';', '&&', '|', '||')) def test_operator_is_chain(self, op): token = OperatorToken(0, op) assert token.is_chain_operator() is True @pytest.mark.parametrize('op', ('>', '>>', '<')) def test_operator_is_not_chain(self, op): token = OperatorToken(0, op) assert token.is_chain_operator() is False
26.235294
58
0.623318
54
446
4.944444
0.444444
0.149813
0.157303
0.172285
0.749064
0.749064
0.749064
0.749064
0.449438
0.449438
0
0.00565
0.206278
446
16
59
27.875
0.748588
0
0
0.181818
0
0
0.031461
0
0
0
0
0
0.181818
1
0.181818
false
0
0.181818
0
0.454545
0
0
0
0
null
0
0
1
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
0
0
0
0
0
0
0
0
4
240d5d8ee9116bcce10947cf1d8fb581564f01f1
69
py
Python
replicator/tests/__init__.py
samcmill/ngc-container-replicator
b5502076c78bb2904f2e57681c8b5a86285b4c45
[ "BSD-3-Clause" ]
20
2019-02-01T18:22:47.000Z
2022-02-09T07:35:48.000Z
replicator/tests/__init__.py
samcmill/ngc-container-replicator
b5502076c78bb2904f2e57681c8b5a86285b4c45
[ "BSD-3-Clause" ]
10
2019-06-03T19:25:17.000Z
2022-01-11T03:56:38.000Z
replicator/tests/__init__.py
samcmill/ngc-container-replicator
b5502076c78bb2904f2e57681c8b5a86285b4c45
[ "BSD-3-Clause" ]
8
2019-05-10T14:43:26.000Z
2021-06-28T20:53:19.000Z
# -*- coding: utf-8 -*- """Unit test package for ngc_replicator."""
17.25
43
0.608696
9
69
4.555556
1
0
0
0
0
0
0
0
0
0
0
0.017241
0.15942
69
3
44
23
0.689655
0.869565
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
2434424390ffb89ab3ab1f08751be05ed66ad871
1,476
py
Python
foodie1/permissions.py
Jay-davisphem/ecommerce-backend
f8802f9f14a64c25b78dc205e616858b88082102
[ "MIT" ]
null
null
null
foodie1/permissions.py
Jay-davisphem/ecommerce-backend
f8802f9f14a64c25b78dc205e616858b88082102
[ "MIT" ]
null
null
null
foodie1/permissions.py
Jay-davisphem/ecommerce-backend
f8802f9f14a64c25b78dc205e616858b88082102
[ "MIT" ]
null
null
null
from rest_framework.permissions import BasePermission, SAFE_METHODS class IsUserPermission(BasePermission): def has_permission(self, request, view): if view.action in ['list', 'retrieve']: return True elif view.action == 'create': if request.user and request.user.groups.filter(name='vendors'): return True def has_object_permission(self, request, view, obj): return obj.vendor == request.user class IsVendor(BasePermission): def has_permission(self, request, view): if request.user and request.user.groups.filter(name='vendors'): return True return False class IsVendorAndOwner(IsVendor): def has_object_permission(self, request, view, obj): return obj.vendor.id == request.user.id or request.user.is_superuser class IsReadOnly(BasePermission): def has_permission(self, request, view): return request.method in SAFE_METHODS class IsAccountOwner(BasePermission): def has_permission(self, request, view): if view.action == 'create': return request.user.is_anonymous or request.user.is_superuser elif view.action in ['update', 'partial_update', 'destroy', 'retrieve']: return request.user.is_active else: return request.user.is_superuser def has_object_permission(self, request, view, obj): return request.user.is_superuser or request.user.username == obj.username
36
81
0.685637
177
1,476
5.60452
0.288136
0.144153
0.148185
0.176411
0.582661
0.483871
0.483871
0.438508
0.393145
0.346774
0
0
0.219512
1,476
40
82
36.9
0.861111
0
0
0.387097
0
0
0.049458
0
0
0
0
0
0
1
0.225806
false
0
0.032258
0.129032
0.774194
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
24424d62523f29650f5b7085aa668cfb477348be
75
py
Python
cli/src/rnpfind/__init__.py
mnahinkhan/rnpfind
5aa956ddd528ab9ebd9588be845f78c449915b78
[ "MIT" ]
3
2021-06-08T03:55:03.000Z
2021-06-15T07:33:08.000Z
cli/src/rnpfind/__init__.py
mnahinkhan/RNPFind
8b561e087f943421c847dcb708ee386ee6439fa5
[ "MIT" ]
1
2022-02-24T15:34:24.000Z
2022-03-04T09:59:10.000Z
cli/src/rnpfind/__init__.py
mnahinkhan/RNPFind
8b561e087f943421c847dcb708ee386ee6439fa5
[ "MIT" ]
1
2021-07-22T04:13:34.000Z
2021-07-22T04:13:34.000Z
""" test """ from .config import GENOME_VERSION from .main import rnpfind
10.714286
34
0.733333
10
75
5.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.16
75
6
35
12.5
0.857143
0.053333
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
244e366c907e38a81cc2bdd92296bd45bfa08bc1
373
py
Python
emergency/registry/polls/models.py
michaelShriver/colte
ac2459c2ad8ea952b1b72e0187e36a6c5a43753b
[ "MIT" ]
48
2018-02-22T18:57:17.000Z
2021-11-09T11:17:15.000Z
emergency/registry/polls/models.py
michaelShriver/colte
ac2459c2ad8ea952b1b72e0187e36a6c5a43753b
[ "MIT" ]
81
2018-08-06T07:48:40.000Z
2022-03-31T05:35:06.000Z
emergency/registry/polls/models.py
michaelShriver/colte
ac2459c2ad8ea952b1b72e0187e36a6c5a43753b
[ "MIT" ]
22
2018-03-12T03:36:39.000Z
2021-12-18T06:27:24.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models # Create your models here. class Person(models.Model): name_text = models.CharField(max_length=50) status = models.IntegerField(default=0) phone_number = models.CharField(max_length=15) location = models.CharField(max_length=200) def __str__(self): return self.name_text
26.642857
47
0.772118
53
373
5.150943
0.679245
0.164835
0.197802
0.263736
0
0
0
0
0
0
0
0.027439
0.120643
373
13
48
28.692308
0.804878
0.123324
0
0
0
0
0
0
0
0
0
0
0
1
0.111111
false
0
0.222222
0.111111
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
79f6ccbf465cd982608dbd56b9c78c6a1a0d4f5f
51
py
Python
lib/codegen/meta-python/base/__init__.py
Bobo1239/cranelift
aa3c3b0135d9127f53a5e1015b061e212e4c8057
[ "Apache-2.0" ]
2
2018-09-27T03:39:03.000Z
2019-04-16T19:56:13.000Z
lib/codegen/meta-python/base/__init__.py
Bobo1239/cranelift
aa3c3b0135d9127f53a5e1015b061e212e4c8057
[ "Apache-2.0" ]
1
2018-10-11T22:37:33.000Z
2018-10-12T00:09:02.000Z
lib/codegen/meta-python/base/__init__.py
Bobo1239/cranelift
aa3c3b0135d9127f53a5e1015b061e212e4c8057
[ "Apache-2.0" ]
null
null
null
"""Definitions for the base Cranelift language."""
25.5
50
0.745098
6
51
6.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.117647
51
1
51
51
0.844444
0.862745
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
033b160867ae2b655c30a543f36d3697d6ca084a
2,178
py
Python
pyforms/terminal/Controls/ControlBase.py
Jess3Jane/pyforms
f34816db018f05c581ede42804771faa39e78824
[ "MIT" ]
null
null
null
pyforms/terminal/Controls/ControlBase.py
Jess3Jane/pyforms
f34816db018f05c581ede42804771faa39e78824
[ "MIT" ]
null
null
null
pyforms/terminal/Controls/ControlBase.py
Jess3Jane/pyforms
f34816db018f05c581ede42804771faa39e78824
[ "MIT" ]
null
null
null
import os, pickle,uuid class ControlBase(object): _value = None _label = None _controlHTML = "" def __init__(self, *args, **kwargs): self._id = uuid.uuid4() self._value = kwargs.get('default', None) self._parent = 1 self._label = kwargs.get('label', args[0] if len(args)>0 else '') def init_form(self): pass def load_form(self, data, path=None): oldvalue = self.value self.value = data.get('value', None) if oldvalue!=self.value: self.changed_event() def changed_event(self): """ Function called when ever the Control value is changed """ return True def show(self):pass def hide(self):pass def open_popup_menu(self, position): pass def add_popup_submenu_option(self, label, options): pass def add_popup_menu_option(self, label, functionAction = None): pass def __repr__(self): return self.value ############################################################################ ############ Properties #################################################### ############################################################################ @property def enabled(self): return True @enabled.setter def enabled(self, value): pass ############################################################################ @property def value(self): return self._value @value.setter def value(self, value): oldvalue = self._value self._value = value if oldvalue!=value: self.changed_event() ############################################################################ @property def label(self): return self._label @label.setter def label(self, value): self._label = value ############################################################################ @property def form(self): return None ############################################################################ @property def parent(self): return self._parent @parent.setter def parent(self, value): self._parent = value
25.325581
80
0.456841
202
2,178
4.752475
0.292079
0.1125
0.067708
0.065625
0.054167
0
0
0
0
0
0
0.002375
0.226814
2,178
86
81
25.325581
0.567696
0.030303
0
0.113636
0
0
0.010835
0
0
0
0
0
0
1
0.431818
false
0.159091
0.022727
0.136364
0.568182
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
cee9ce6f35afe46df316f1cac17656c411a000a3
155
py
Python
Python Fundamentals/Data types and Variables/Exercise/Task04.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
1
2022-03-16T10:23:04.000Z
2022-03-16T10:23:04.000Z
Python Fundamentals/Data types and Variables/Exercise/Task04.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
null
null
null
Python Fundamentals/Data types and Variables/Exercise/Task04.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
null
null
null
n = int(input()) total_sum = 0 for x in range(1, n + 1): ascii_code = input() total_sum += ord(ascii_code) print(f"The sum equals: {total_sum}")
17.222222
37
0.625806
28
155
3.285714
0.642857
0.26087
0.282609
0
0
0
0
0
0
0
0
0.02459
0.212903
155
9
37
17.222222
0.729508
0
0
0
0
0
0.173077
0
0
0
0
0
0
1
0
false
0
0
0
0
0.166667
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ceeaf19e4da9a5ce049c34c5c3203bae0ad3787b
216
py
Python
uam/entities/system.py
youyongsong/uam
a579752daa3e68ced97044a0aadef2ab37e387d2
[ "MIT" ]
null
null
null
uam/entities/system.py
youyongsong/uam
a579752daa3e68ced97044a0aadef2ab37e387d2
[ "MIT" ]
86
2017-12-01T02:54:15.000Z
2018-08-09T06:37:27.000Z
uam/entities/system.py
youyongsong/uam
a579752daa3e68ced97044a0aadef2ab37e387d2
[ "MIT" ]
null
null
null
import re def complete_shorten_address(address): shorten_pattern = re.compile(r"^[\w\-_\.]+/[\w\-_\.]+$") if shorten_pattern.match(address): return f'git@github.com:{address}.git' return address
27
60
0.657407
28
216
4.857143
0.607143
0.205882
0
0
0
0
0
0
0
0
0
0
0.157407
216
8
61
27
0.747253
0
0
0
0
0
0.235023
0.235023
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
cefdd4fef23552f88776b17cb33bcdb866fbab2b
131
py
Python
rllib/algorithms/mbmpo/__init__.py
kennethlien/ray
2916c2c3d29f2f7e4bf53872d5ac8c5d866b0e45
[ "Apache-2.0" ]
1
2019-06-19T02:23:43.000Z
2019-06-19T02:23:43.000Z
rllib/algorithms/mbmpo/__init__.py
kennethlien/ray
2916c2c3d29f2f7e4bf53872d5ac8c5d866b0e45
[ "Apache-2.0" ]
73
2021-09-25T07:11:39.000Z
2022-03-26T07:10:59.000Z
rllib/algorithms/mbmpo/__init__.py
kennethlien/ray
2916c2c3d29f2f7e4bf53872d5ac8c5d866b0e45
[ "Apache-2.0" ]
null
null
null
from ray.rllib.algorithms.mbmpo.mbmpo import MBMPOTrainer, DEFAULT_CONFIG __all__ = [ "MBMPOTrainer", "DEFAULT_CONFIG", ]
18.714286
73
0.740458
14
131
6.5
0.714286
0.417582
0.549451
0
0
0
0
0
0
0
0
0
0.152672
131
6
74
21.833333
0.81982
0
0
0
0
0
0.198473
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3004aa7d9d2d24b7da8e6f6d0e4b5f5558675714
30
py
Python
hardware-testing/tests/gravimetric_test/__init__.py
Opentrons/protocol_framework
ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f
[ "Apache-2.0" ]
null
null
null
hardware-testing/tests/gravimetric_test/__init__.py
Opentrons/protocol_framework
ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f
[ "Apache-2.0" ]
null
null
null
hardware-testing/tests/gravimetric_test/__init__.py
Opentrons/protocol_framework
ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f
[ "Apache-2.0" ]
null
null
null
"""Gravimetric test tests."""
15
29
0.666667
3
30
6.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.1
30
1
30
30
0.740741
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
3018767fdbc96b2ba4ecaf832e4c94ca83d84b5f
146
py
Python
VacationPy/api_keys.py
sashatherussian/python-api-challenge
5ffffd136ff4d7775cb799db7f9ee1dfe2fa0002
[ "ADSL" ]
null
null
null
VacationPy/api_keys.py
sashatherussian/python-api-challenge
5ffffd136ff4d7775cb799db7f9ee1dfe2fa0002
[ "ADSL" ]
null
null
null
VacationPy/api_keys.py
sashatherussian/python-api-challenge
5ffffd136ff4d7775cb799db7f9ee1dfe2fa0002
[ "ADSL" ]
null
null
null
# OpenWeatherMap API Key weather_api_key = "68524e14c88fa47aab3ac62f9461f6d5" # Google API Key g_key = "AIzaSyAMvlEJHc05Plk9V6VOFt-ezMHPgo6BZSo"
24.333333
52
0.835616
14
146
8.5
0.642857
0.151261
0
0
0
0
0
0
0
0
0
0.19084
0.10274
146
5
53
29.2
0.717557
0.253425
0
0
0
0
0.669811
0.669811
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