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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0c5dddaf252d500e6bd4c3090ee10da5bbe64726
| 102
|
py
|
Python
|
ALGO_DynamicPrograming.py
|
divergent63/DataStructureAlgorithms
|
1e378a31beb6ac1b333b560f0bfe2a3daeef7be2
|
[
"Apache-2.0"
] | null | null | null |
ALGO_DynamicPrograming.py
|
divergent63/DataStructureAlgorithms
|
1e378a31beb6ac1b333b560f0bfe2a3daeef7be2
|
[
"Apache-2.0"
] | null | null | null |
ALGO_DynamicPrograming.py
|
divergent63/DataStructureAlgorithms
|
1e378a31beb6ac1b333b560f0bfe2a3daeef7be2
|
[
"Apache-2.0"
] | null | null | null |
"""
贪婪策略
递归-->分治策略
动态规划
See also $ ALGO_Recursion.py minClassCoins(lst).dynamicPrograming(int) $
"""
| 12.75
| 72
| 0.715686
| 13
| 102
| 5.538462
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 102
| 8
| 73
| 12.75
| 0.8
| 0.911765
| 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
|
a74ad6dcb948b86f8ac437de6cc04a7dcfb2a87f
| 449
|
py
|
Python
|
src/tsgettoolbox/ulmo/lcra/hydromet/__init__.py
|
timcera/tsgettoolbox
|
828306aefaa097a74abd8e71605bd19eeda29058
|
[
"BSD-3-Clause"
] | 4
|
2017-11-21T20:22:47.000Z
|
2021-09-27T13:27:05.000Z
|
src/tsgettoolbox/ulmo/lcra/hydromet/__init__.py
|
timcera/tsgettoolbox
|
828306aefaa097a74abd8e71605bd19eeda29058
|
[
"BSD-3-Clause"
] | 21
|
2016-04-28T16:52:18.000Z
|
2021-12-16T17:00:27.000Z
|
src/tsgettoolbox/ulmo/lcra/hydromet/__init__.py
|
timcera/tsgettoolbox
|
828306aefaa097a74abd8e71605bd19eeda29058
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
LCRA Hydromet Data
~~~~~~~~~~~~~~~~~~
Access to hydrologic and climate data in the Colorado River Basin (Texas)
provided by the `Hydromet`_ web site and web service from
the `Lower Colorado River Authority`_.
.. _Lower Colorado River Authority: http://www.lcra.org
.. _Hydromet: http://hydromet.lcra.org
"""
from .core import get_all_sites, get_current_data, get_site_data, get_sites_by_type
| 34.538462
| 83
| 0.681514
| 62
| 449
| 4.725806
| 0.564516
| 0.133106
| 0.122867
| 0.1843
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002732
| 0.184855
| 449
| 12
| 84
| 37.416667
| 0.797814
| 0.728285
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a756db3a3610aa9de28d3cf976f0a51d14d58457
| 128
|
py
|
Python
|
solutions/python3/48.py
|
sm2774us/amazon_interview_prep_2021
|
f580080e4a6b712b0b295bb429bf676eb15668de
|
[
"MIT"
] | 42
|
2020-08-02T07:03:49.000Z
|
2022-03-26T07:50:15.000Z
|
solutions/python3/48.py
|
ajayv13/leetcode
|
de02576a9503be6054816b7444ccadcc0c31c59d
|
[
"MIT"
] | null | null | null |
solutions/python3/48.py
|
ajayv13/leetcode
|
de02576a9503be6054816b7444ccadcc0c31c59d
|
[
"MIT"
] | 40
|
2020-02-08T02:50:24.000Z
|
2022-03-26T15:38:10.000Z
|
class Solution:
def rotate(self, matrix):
matrix[:] = [[row[i] for row in matrix[::-1]] for i in range(len(matrix))]
| 42.666667
| 82
| 0.601563
| 20
| 128
| 3.85
| 0.65
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009901
| 0.210938
| 128
| 3
| 82
| 42.666667
| 0.752475
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
a75a1e111945af0f7a5cbf909792700fe4f175f1
| 179
|
py
|
Python
|
backend/history/admin.py
|
glproj/tictactoe-online
|
4a99cda10f3112fb83f6f55b95b2c98a030c1658
|
[
"MIT"
] | null | null | null |
backend/history/admin.py
|
glproj/tictactoe-online
|
4a99cda10f3112fb83f6f55b95b2c98a030c1658
|
[
"MIT"
] | null | null | null |
backend/history/admin.py
|
glproj/tictactoe-online
|
4a99cda10f3112fb83f6f55b95b2c98a030c1658
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Game
class GameAdmin(admin.ModelAdmin):
list_display = ('winner', 'loser', 'moves')
admin.site.register(Game, GameAdmin)
| 25.571429
| 47
| 0.75419
| 23
| 179
| 5.826087
| 0.73913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122905
| 179
| 6
| 48
| 29.833333
| 0.853503
| 0
| 0
| 0
| 0
| 0
| 0.089385
| 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
|
a76879bdd89b53ce3acb62f0130021d0e4cdfe8c
| 5,687
|
py
|
Python
|
migrations/versions/cb3cfcc47e2f_base.py
|
James9074/CTFd
|
26166e5415a57cefe09bee40e41d7b666b03388f
|
[
"Apache-2.0"
] | 23
|
2018-09-11T06:33:17.000Z
|
2022-03-20T12:08:34.000Z
|
migrations/versions/cb3cfcc47e2f_base.py
|
James9074/CTFd
|
26166e5415a57cefe09bee40e41d7b666b03388f
|
[
"Apache-2.0"
] | 11
|
2018-05-07T15:11:30.000Z
|
2018-11-13T16:40:41.000Z
|
migrations/versions/cb3cfcc47e2f_base.py
|
James9074/CTFd
|
26166e5415a57cefe09bee40e41d7b666b03388f
|
[
"Apache-2.0"
] | 7
|
2018-07-22T06:10:37.000Z
|
2020-10-19T13:51:06.000Z
|
"""Base 1.0.0 CTFd database
Revision ID: cb3cfcc47e2f
Revises:
Create Date: 2017-01-17 15:39:42.804290
"""
from CTFd import create_app
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'cb3cfcc47e2f'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
op.create_table('challenges',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=80), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('value', sa.Integer(), nullable=True),
sa.Column('category', sa.String(length=80), nullable=True),
sa.Column('flags', sa.Text(), nullable=True),
sa.Column('hidden', sa.Boolean(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('config',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('key', sa.Text(), nullable=True),
sa.Column('value', sa.Text(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('containers',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=80), nullable=True),
sa.Column('buildfile', sa.Text(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('pages',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('route', sa.String(length=80), nullable=True),
sa.Column('html', sa.Text(), nullable=True),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('route')
)
op.create_table('teams',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=128), nullable=True),
sa.Column('email', sa.String(length=128), nullable=True),
sa.Column('password', sa.String(length=128), nullable=True),
sa.Column('website', sa.String(length=128), nullable=True),
sa.Column('affiliation', sa.String(length=128), nullable=True),
sa.Column('country', sa.String(length=32), nullable=True),
sa.Column('bracket', sa.String(length=32), nullable=True),
sa.Column('banned', sa.Boolean(), nullable=True),
sa.Column('verified', sa.Boolean(), nullable=True),
sa.Column('admin', sa.Boolean(), nullable=True),
sa.Column('joined', sa.DateTime(), nullable=True),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('email'),
sa.UniqueConstraint('name')
)
op.create_table('awards',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('teamid', sa.Integer(), nullable=True),
sa.Column('name', sa.String(length=80), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('date', sa.DateTime(), nullable=True),
sa.Column('value', sa.Integer(), nullable=True),
sa.Column('category', sa.String(length=80), nullable=True),
sa.Column('icon', sa.Text(), nullable=True),
sa.ForeignKeyConstraint(['teamid'], ['teams.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('files',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('chal', sa.Integer(), nullable=True),
sa.Column('location', sa.Text(), nullable=True),
sa.ForeignKeyConstraint(['chal'], ['challenges.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('keys',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('chal', sa.Integer(), nullable=True),
sa.Column('key_type', sa.Integer(), nullable=True),
sa.Column('flag', sa.Text(), nullable=True),
sa.ForeignKeyConstraint(['chal'], ['challenges.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('solves',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('chalid', sa.Integer(), nullable=True),
sa.Column('teamid', sa.Integer(), nullable=True),
sa.Column('ip', sa.Integer(), nullable=True),
sa.Column('flag', sa.Text(), nullable=True),
sa.Column('date', sa.DateTime(), nullable=True),
sa.ForeignKeyConstraint(['chalid'], ['challenges.id'], ),
sa.ForeignKeyConstraint(['teamid'], ['teams.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('chalid', 'teamid')
)
op.create_table('tags',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('chal', sa.Integer(), nullable=True),
sa.Column('tag', sa.String(length=80), nullable=True),
sa.ForeignKeyConstraint(['chal'], ['challenges.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('tracking',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('ip', sa.BigInteger(), nullable=True),
sa.Column('team', sa.Integer(), nullable=True),
sa.Column('date', sa.DateTime(), nullable=True),
sa.ForeignKeyConstraint(['team'], ['teams.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('wrong_keys',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('chalid', sa.Integer(), nullable=True),
sa.Column('teamid', sa.Integer(), nullable=True),
sa.Column('date', sa.DateTime(), nullable=True),
sa.Column('flag', sa.Text(), nullable=True),
sa.ForeignKeyConstraint(['chalid'], ['challenges.id'], ),
sa.ForeignKeyConstraint(['teamid'], ['teams.id'], ),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('wrong_keys')
op.drop_table('tracking')
op.drop_table('tags')
op.drop_table('solves')
op.drop_table('keys')
op.drop_table('files')
op.drop_table('awards')
op.drop_table('teams')
op.drop_table('pages')
op.drop_table('containers')
op.drop_table('config')
op.drop_table('challenges')
# ### end Alembic commands ###
| 35.54375
| 67
| 0.647266
| 713
| 5,687
| 5.119215
| 0.147265
| 0.133699
| 0.187945
| 0.20274
| 0.75863
| 0.748493
| 0.712603
| 0.676986
| 0.546849
| 0.495616
| 0
| 0.013237
| 0.149815
| 5,687
| 159
| 68
| 35.767296
| 0.741675
| 0.042026
| 0
| 0.427481
| 0
| 0
| 0.121632
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.015267
| false
| 0.007634
| 0.022901
| 0
| 0.038168
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a77597287e22c6b9569239b553f586dbfded2d5b
| 162
|
py
|
Python
|
run.py
|
voyager-kin/antilupa
|
dd5b16541b5178b085df8899a848859adc978da9
|
[
"MIT"
] | null | null | null |
run.py
|
voyager-kin/antilupa
|
dd5b16541b5178b085df8899a848859adc978da9
|
[
"MIT"
] | null | null | null |
run.py
|
voyager-kin/antilupa
|
dd5b16541b5178b085df8899a848859adc978da9
|
[
"MIT"
] | null | null | null |
from antilupa import app
#Checks if the run.py file has executed directly and not imported
if __name__ == '__main__':
app.run(host='0.0.0.0', debug=True)
| 32.4
| 66
| 0.709877
| 28
| 162
| 3.821429
| 0.785714
| 0.056075
| 0.056075
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030075
| 0.179012
| 162
| 5
| 67
| 32.4
| 0.774436
| 0.395062
| 0
| 0
| 0
| 0
| 0.159574
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a7bacf3ba9c5b0878041638c3bf78df2e0eddc12
| 67
|
py
|
Python
|
slider-agent/src/main/python/kazoo/recipe/__init__.py
|
turningme/incubator-retired-slider
|
1d4f519d763210f46e327338be72efa99e65cb5d
|
[
"Apache-2.0"
] | 60
|
2015-01-05T10:51:11.000Z
|
2018-12-15T03:48:09.000Z
|
slider-agent/src/main/python/kazoo/recipe/__init__.py
|
turningme/incubator-retired-slider
|
1d4f519d763210f46e327338be72efa99e65cb5d
|
[
"Apache-2.0"
] | null | null | null |
slider-agent/src/main/python/kazoo/recipe/__init__.py
|
turningme/incubator-retired-slider
|
1d4f519d763210f46e327338be72efa99e65cb5d
|
[
"Apache-2.0"
] | 87
|
2015-01-14T05:14:15.000Z
|
2018-12-25T14:14:56.000Z
|
"""license: Apache License 2.0, see LICENSE for more details."""
#
| 22.333333
| 64
| 0.686567
| 10
| 67
| 4.6
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035088
| 0.149254
| 67
| 2
| 65
| 33.5
| 0.77193
| 0.865672
| 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
|
a7d4070cb3f1265a4b2c97e267bea5cd8e9f4c75
| 63
|
py
|
Python
|
Python/Topics/How to read the documentation/Help with time/main.py
|
drtierney/hyperskill-problems
|
b74da993f0ac7bcff1cbd5d89a3a1b06b05f33e0
|
[
"MIT"
] | 5
|
2020-08-29T15:15:31.000Z
|
2022-03-01T18:22:34.000Z
|
Python/Topics/How to read the documentation/Help with time/main.py
|
drtierney/hyperskill-problems
|
b74da993f0ac7bcff1cbd5d89a3a1b06b05f33e0
|
[
"MIT"
] | null | null | null |
Python/Topics/How to read the documentation/Help with time/main.py
|
drtierney/hyperskill-problems
|
b74da993f0ac7bcff1cbd5d89a3a1b06b05f33e0
|
[
"MIT"
] | 1
|
2020-12-02T11:13:14.000Z
|
2020-12-02T11:13:14.000Z
|
import time
# use built-in help system here
help(time.asctime)
| 15.75
| 31
| 0.777778
| 11
| 63
| 4.454545
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 63
| 3
| 32
| 21
| 0.907407
| 0.460317
| 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
|
ac4cf744b27c39ade9507593d87edd4eb889c251
| 278
|
py
|
Python
|
mlfinlab/ensemble/__init__.py
|
scibol/mlfinlab
|
3c80f269bc68b8cb9bcf863ceb3dc77fc14b6984
|
[
"BSD-3-Clause"
] | 8
|
2020-04-19T08:09:34.000Z
|
2022-03-30T20:49:40.000Z
|
mlfinlab/ensemble/__init__.py
|
scibol/mlfinlab
|
3c80f269bc68b8cb9bcf863ceb3dc77fc14b6984
|
[
"BSD-3-Clause"
] | 1
|
2022-03-23T01:20:59.000Z
|
2022-03-23T01:20:59.000Z
|
mlfinlab/ensemble/__init__.py
|
scibol/mlfinlab
|
3c80f269bc68b8cb9bcf863ceb3dc77fc14b6984
|
[
"BSD-3-Clause"
] | 8
|
2020-08-09T02:25:04.000Z
|
2022-03-20T15:08:11.000Z
|
"""
Implementation of Sequentially Bootstrapped Bagging Classifier using sklearn's library as base class
"""
from mlfinlab.ensemble.sb_bagging import SequentiallyBootstrappedBaggingClassifier, \
SequentiallyBootstrappedBaggingRegressor
| 39.714286
| 100
| 0.73741
| 21
| 278
| 9.714286
| 0.952381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.223022
| 278
| 6
| 101
| 46.333333
| 0.944444
| 0.359712
| 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
|
ac71fea7670090100cd2586f0b92ad46e04e7db0
| 105
|
py
|
Python
|
CodeCrewSiteApp/apps.py
|
cs-fullstack-2019-spring/django-inheritance-cw-tdude0175
|
76e688a6e93be58039a945ec25db7ddb03eda5f4
|
[
"Apache-2.0"
] | null | null | null |
CodeCrewSiteApp/apps.py
|
cs-fullstack-2019-spring/django-inheritance-cw-tdude0175
|
76e688a6e93be58039a945ec25db7ddb03eda5f4
|
[
"Apache-2.0"
] | null | null | null |
CodeCrewSiteApp/apps.py
|
cs-fullstack-2019-spring/django-inheritance-cw-tdude0175
|
76e688a6e93be58039a945ec25db7ddb03eda5f4
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class CodecrewsiteappConfig(AppConfig):
name = 'CodeCrewSiteApp'
| 17.5
| 39
| 0.790476
| 10
| 105
| 8.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 105
| 5
| 40
| 21
| 0.922222
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ac89de26c2ca89ea56e16d3b3d79d142e7b6c88a
| 1,547
|
py
|
Python
|
cohesity_management_sdk/models/category_notification_rule_enum.py
|
chandrashekar-cohesity/management-sdk-python
|
9e6ec99e8a288005804b808c4e9b19fd204e3a8b
|
[
"Apache-2.0"
] | 1
|
2019-11-07T23:19:32.000Z
|
2019-11-07T23:19:32.000Z
|
cohesity_management_sdk/models/category_notification_rule_enum.py
|
chandrashekar-cohesity/management-sdk-python
|
9e6ec99e8a288005804b808c4e9b19fd204e3a8b
|
[
"Apache-2.0"
] | null | null | null |
cohesity_management_sdk/models/category_notification_rule_enum.py
|
chandrashekar-cohesity/management-sdk-python
|
9e6ec99e8a288005804b808c4e9b19fd204e3a8b
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
class CategoryNotificationRuleEnum(object):
"""Implementation of the 'Category_NotificationRule' enum.
TODO: type enum description here.
Attributes:
KDISK: TODO: type description here.
KNODE: TODO: type description here.
KCLUSTER: TODO: type description here.
KNODEHEALTH: TODO: type description here.
KCLUSTERHEALTH: TODO: type description here.
KBACKUPRESTORE: TODO: type description here.
KENCRYPTION: TODO: type description here.
KARCHIVALRESTORE: TODO: type description here.
KREMOTEREPLICATION: TODO: type description here.
KQUOTA: TODO: type description here.
KLICENSE: TODO: type description here.
KHELIOSPROACTIVEWELLNESS: TODO: type description here.
KHELIOSANALYTICSJOBS: TODO: type description here.
KHELIOSSIGNATUREJOBS: TODO: type description here.
KSECURITY: TODO: type description here.
"""
KDISK = 'kDisk'
KNODE = 'kNode'
KCLUSTER = 'kCluster'
KNODEHEALTH = 'kNodeHealth'
KCLUSTERHEALTH = 'kClusterHealth'
KBACKUPRESTORE = 'kBackupRestore'
KENCRYPTION = 'kEncryption'
KARCHIVALRESTORE = 'kArchivalRestore'
KREMOTEREPLICATION = 'kRemoteReplication'
KQUOTA = 'kQuota'
KLICENSE = 'kLicense'
KHELIOSPROACTIVEWELLNESS = 'kHeliosProActiveWellness'
KHELIOSANALYTICSJOBS = 'kHeliosAnalyticsJobs'
KHELIOSSIGNATUREJOBS = 'kHeliosSignatureJobs'
KSECURITY = 'kSecurity'
| 26.220339
| 62
| 0.691661
| 127
| 1,547
| 8.417323
| 0.283465
| 0.119738
| 0.266604
| 0.322732
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004216
| 0.233355
| 1,547
| 58
| 63
| 26.672414
| 0.897133
| 0.561732
| 0
| 0
| 0
| 0
| 0.317114
| 0.040268
| 0
| 0
| 0
| 0.275862
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
ac8a5a81a25389a770fd42ecef50d10fa1eff9c1
| 227
|
py
|
Python
|
code/setup.py
|
utilForever/2021-JBSH-MakeANN
|
6a3e7164702e1ea272e9689e44d2624e662054fb
|
[
"MIT"
] | 9
|
2021-05-12T01:07:37.000Z
|
2021-07-24T08:07:34.000Z
|
code/setup.py
|
utilForever/2021-JBSH-MakeANN
|
6a3e7164702e1ea272e9689e44d2624e662054fb
|
[
"MIT"
] | null | null | null |
code/setup.py
|
utilForever/2021-JBSH-MakeANN
|
6a3e7164702e1ea272e9689e44d2624e662054fb
|
[
"MIT"
] | null | null | null |
from setuptools import setup
from setuptools import find_packages
setup(name='nn',
version='0.1',
description='Artificial Neural Network',
license='MIT',
packages=find_packages(),
zip_safe=False)
| 22.7
| 46
| 0.687225
| 27
| 227
| 5.666667
| 0.740741
| 0.183007
| 0.261438
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011111
| 0.207048
| 227
| 9
| 47
| 25.222222
| 0.838889
| 0
| 0
| 0
| 0
| 0
| 0.145374
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3ba43081a41d2022b387a772c5e5617d86b67d82
| 140
|
py
|
Python
|
src/run_tests.py
|
mpillar/aerofs-chat
|
d4bc18b9275a3148f631ae349a0eae9cff853993
|
[
"MIT"
] | null | null | null |
src/run_tests.py
|
mpillar/aerofs-chat
|
d4bc18b9275a3148f631ae349a0eae9cff853993
|
[
"MIT"
] | null | null | null |
src/run_tests.py
|
mpillar/aerofs-chat
|
d4bc18b9275a3148f631ae349a0eae9cff853993
|
[
"MIT"
] | null | null | null |
import unittest
import aerochat.test
test_suite = aerochat.test.create_test_suite()
text_runner = unittest.TextTestRunner().run(test_suite)
| 28
| 55
| 0.835714
| 19
| 140
| 5.894737
| 0.526316
| 0.241071
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 140
| 4
| 56
| 35
| 0.861538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
3bab841d4040c87a6cbba008bb693f93b3e02cf1
| 215
|
py
|
Python
|
src/app/__init__.py
|
pranavsharmahitechadvisors/python-demoapp
|
9ad690f34fc6e12ed77d46b55be9857318087c64
|
[
"MIT"
] | 15
|
2018-03-09T14:37:21.000Z
|
2022-03-28T20:29:01.000Z
|
src/app/__init__.py
|
pranavsharmahitechadvisors/python-demoapp
|
9ad690f34fc6e12ed77d46b55be9857318087c64
|
[
"MIT"
] | 1
|
2017-09-18T08:00:49.000Z
|
2017-09-18T08:00:49.000Z
|
src/app/__init__.py
|
pranavsharmahitechadvisors/python-demoapp
|
9ad690f34fc6e12ed77d46b55be9857318087c64
|
[
"MIT"
] | 16
|
2019-04-08T19:01:22.000Z
|
2022-03-20T10:48:54.000Z
|
from flask import Flask
def create_app():
app = Flask(__name__)
with app.app_context():
from . import views # noqa: E402,F401
from . import apis # noqa: E402,F401
return app
| 21.5
| 47
| 0.6
| 28
| 215
| 4.392857
| 0.535714
| 0.097561
| 0.195122
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081633
| 0.316279
| 215
| 9
| 48
| 23.888889
| 0.755102
| 0.144186
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.428571
| 0
| 0.714286
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
3bac4bd57564f0063d0d3669bdb32391a5055684
| 140
|
py
|
Python
|
grouper/background/settings.py
|
bonniech3n/merou
|
47d9de906686fd5b930a49299d3ffbcc0673ae8a
|
[
"Apache-2.0"
] | null | null | null |
grouper/background/settings.py
|
bonniech3n/merou
|
47d9de906686fd5b930a49299d3ffbcc0673ae8a
|
[
"Apache-2.0"
] | null | null | null |
grouper/background/settings.py
|
bonniech3n/merou
|
47d9de906686fd5b930a49299d3ffbcc0673ae8a
|
[
"Apache-2.0"
] | null | null | null |
from grouper.settings import Settings, settings as base_settings
settings = Settings.from_settings(base_settings, {"sleep_interval": 60})
| 28
| 72
| 0.814286
| 18
| 140
| 6.111111
| 0.5
| 0.436364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015873
| 0.1
| 140
| 4
| 73
| 35
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ce0ece6a12443b94e3d838eaef6ca91408b34a73
| 90
|
py
|
Python
|
pysrc/cheapstat/auctionscraper/__init__.py
|
Hrle97/Cheap-Statistics
|
b6b9159f36b1559c81987202bdb329df9faed782
|
[
"MIT"
] | null | null | null |
pysrc/cheapstat/auctionscraper/__init__.py
|
Hrle97/Cheap-Statistics
|
b6b9159f36b1559c81987202bdb329df9faed782
|
[
"MIT"
] | 1
|
2019-08-03T17:59:06.000Z
|
2019-08-03T17:59:06.000Z
|
pysrc/cheapstat/auctionscraper/__init__.py
|
Hrle97/Cheap-Statistics
|
b6b9159f36b1559c81987202bdb329df9faed782
|
[
"MIT"
] | null | null | null |
"""
The auctionscraper is a module for scraping apartment data from auctioning sites.
"""
| 22.5
| 81
| 0.766667
| 12
| 90
| 5.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155556
| 90
| 3
| 82
| 30
| 0.907895
| 0.9
| 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
|
ce270db7f289fcac7c4de73e423df42376d37f50
| 9,078
|
py
|
Python
|
CreateTargets.py
|
gideontong/FireAssassins
|
b6d256e4c5e70d4af6491e75647153432b05b00c
|
[
"MIT"
] | 1
|
2020-07-19T22:16:19.000Z
|
2020-07-19T22:16:19.000Z
|
CreateTargets.py
|
gideontong/FireAssassins
|
b6d256e4c5e70d4af6491e75647153432b05b00c
|
[
"MIT"
] | null | null | null |
CreateTargets.py
|
gideontong/FireAssassins
|
b6d256e4c5e70d4af6491e75647153432b05b00c
|
[
"MIT"
] | null | null | null |
"""
Program: Create Targets
Version: Round 1
Description
===========
This is the original code for randomizing the water assassins team list, at least it was for round 1
of the game played at Westlake High School's class of 2019. Written by Ethan Orlowsky, it makes use
of the random library included with Python and run on the repl.it service, which uses Python 3.7 by
default. In addition, this library uses the Mersenne Twister, which is a random algorithm that can
have its values reversed with approximately 300 results. As a result, we use other known information,
like the starting values of the array in order to reverse it. This code has been included as simply
a reference.
"""
import random
import sys
teams = ['Wet Supremacy', 'Liquidate the Kulaks', 'Drip or Drown', 'www.damplips.com', 'Fifty Shades of Spray', 'Wet Kavanaugh', 'Ha,,007', 'WETROBOOMIN', 'Drippy Lips', 'Teenage Mutant Ninja Squirters', 'Sheck Wetty', 'Bros Before Hose', 'Soggy Style', 'So Wet It Squirts', 'Hash Slinging Splashers', '5 3/4', 'The Squirters', 'Bubbleproof Boy Scouts', 'Drip Too Hard', 'How I Wet Your Mother', 'Wet Dreamz', 'Sprayaets Anatomy', 'Little Squirters', 'Putting Out the Flame', 'Squirt Till You Hurt', 'Too Much Fun Makes Us Squirt', 'Go In Hard, Come Out Wet', 'School Squirters', 'Your Momrs a Hose', 'Hose Your Daddy', 'Hoes Down', 'Erotic Aquatics', 'Smokinr nr Soakinr ', 'Alliance of Men Who Pee Sitting Down', 'K K Spray', 'Viagra Falls', 'Lean in my Water Cup', 'Oceanrs 5', 'Wetty or Not, Here We Come', 'Drippy on my Blicky Uh', 'Beach Bitches', 'Wet Privilege', 'NSINK', 'Splash nr Dash', 'Drippie Redd', 'Fresh Squeezed Sea-men', 'THe tHirStY GOrLs', 'Yeah Ight', 'Tunde Destroyers', 'Super Splash Bros', 'Drip Drip Suck My Dick', 'Guns Nr Hoses', 'Adult Swim', 'Water Gate', 'H2Hoes', 'T.H.Sea', 'Wet nr Wild', 'Keeping Up With The Karsplashians', 'Snoop Soggy Dog', 'Shores and Beaches', 'Brandi Love 2020', 'Wetflix and Spill', 'Jehovas Wetness']
allNames = [['Rahel Bachmann', 'Maria Hernandez', 'Josh Karasik', 'Layla Keshavarzi', 'Toni Sottile'], ['Alex Li', 'Rohil Ahuja', 'Tyler Chu', 'Akhil Gutta', 'Pranav Pomalapally'], ['Ned Jacobs', 'Oliver Wyman', 'Hirad Aboulghazemzadeh', 'Alex Whitehouse', 'Nick Norris'], ['Will Hollister', 'Peter Beer', 'Shawn Shepard', 'Jeremy Mettel', 'Garret Chen'], ['Jake Lippel', 'Sammie Schalk', 'Nate Arnold', 'Shayla Madha', 'Colin Iversen'], ['Conner Chen', 'Brett Goldman', 'Sophia Brent', 'Elliot Kim', 'Sona Bhargava'], ['Landon Stern', 'Bodie Devries', 'Eric Budnik', 'Hayden Becker', 'Dele Giwa'], ['Tristan Carta', 'Cade Kritsch', 'Cole Schiffer', 'Kasra Arjomand', 'Jason Weisenfeld'], ['Danny Hernandez', 'Kevin Taylor', 'Kevin Bleier', 'Eddie Hernandez', 'Chad McMillan'], ['Bryan Jimenez', 'Victor Cano', 'Ylse Prieto', 'Lorraine Campos', 'America Gutierrez'], ['Carson Batie', 'Bethany Reader', 'Gabi Dajic', 'Faviola Colon', 'Leyla Vahadi'], ['Grace Butler', 'Monique Savner', 'Caroline Dority', 'Gabrielle Grossman', 'Charlotte Chipembere'], ['Olivia Dubell', 'Michelle Hou', 'McKenna Katzman', 'Heather Arancon', 'Paris Hartman'], ['Allinta Tadesse', 'Maya Singh', 'Titan Teachman', 'Rylee Tilton', 'Claire Moats'], ['Julia Steinman', 'Devon Estes', 'Katie Reul', 'Sam Smart', 'Dawson Lamas'], ['Parker Clemons', 'Morgan Dye', 'Kyle Valestrino', 'Grady Johnson', 'Makena Pratt'], ['Ethan Wildermuth', 'Kyle Norvell', 'Cole Jolin', 'Corbin Stern', 'Bijan Kazemi'], ['Nina Ferrer', 'Amari Huang', 'Jamie Lee', 'Jiasen Jing', 'Julia Zhong'], ['Ronnie Tronconi', 'Josh Binsol', 'Xavier Zaldana', 'Ali Sallam', 'Elijah Taylor'], ['Ally Arnold', 'Bridgette Rosebrugh', 'Mariah Villavicencio', 'Christian Onuigbo', 'Emma Adams'], ['Julia Marek', 'Chloe Nash', 'Julian Giessinger', 'Taylor Marlowe', 'Jeffery Goodwin'], ['Jennifer Ruffing', 'Claire Robbins', 'Milla Wu', 'Ashley Webb', 'Megan King'], ['Julia Schiff', 'Bianca Rutten', 'Hailey Flatt', 'Elise Vigna', 'Bianca Nurnberger'], ['Dylan Hampton', 'Lance Minkow', 'Bryce Howard', 'Mason Thompson', 'CJ Woodall'], ['Chloe Snyders', 'Alexa Jabbour', 'Faith Johnson', 'Blake Thompson', 'Olivia Aleks'], ['Kelly Mason', 'Sydney Schlesinger', 'Natalie Nitzsche', 'Madison Melito', 'Raquel Startz'], ['Gaby Hayon', 'Jeremy Marcin', 'Jillian Gallardo', 'Melanie Zhang', 'Fiona Watkins'], ['Paul Grace', 'Makoa Dacascos', 'Justin Fealy', 'Colton Bourne', 'Ben Spiers'], ['David Fratello-Hakim', 'McCoy Eackelbary', 'Ian Guss', 'Bryce Kilkenny', 'Ethan Orlowsky'], ['Kelin Mahon', 'Gaby Plascencia', 'Baylee Heximer', 'Cameron Jasmin', 'Alex Dohn'], ['Allegra Skyy', 'Nicole Previde', 'Marina Mendoza', 'Zoe Haines', 'Maya Van Dien'], ['Sarah Upton', 'Alexa Campbell', 'Katelyn Patillo', 'Natalie Zavala', 'Tia Catalano'], ['Lily Garelick', 'Maggie Henry', 'Mina Dake', 'Layne Consales', 'Brandy Alps'], ['Scott Pugh', 'Kevin Garand', 'Ethan Harrison', 'Michael Wood', 'David Connor'], ['Marcandrew Choi', 'Eden Rosales', 'Alan Gallardo', 'Ashwin Soitkar', 'Bryan Xiao'], ['Conor Dower', 'Brett Fornatoro', 'Drake Nienow', 'Bradley Buckingham', 'Avi Kapur'], ['Ashley Freeborg', 'Isabelle Dempsey', 'Kennedy Crowley', 'Ashley Bolger', 'Hadley MacDonald'], ['Jennifer Matiz', 'Ashley Jou', 'Kayla Jou', 'Marina Bayless', 'Jada Broughton'], ['Jacob Ginzburg', 'Gideon Tong', 'Victor Bai', 'Taylor Chen', 'Anthony Haas'], ['Sonia Milio', 'Chloe Morgan', 'Valeria Barzola', 'Katelyn Waters', 'Aivy Nguyen'], ['Rucchi Dua', 'Jade Morrisey', 'Sabrina England', 'Morgan Williams', 'Josephine Martinelli'], ['Tommy Gonzalez', 'Dylan Jarvis', 'Mitchell Craig', 'Shayan Ghara', 'Preston Knapp'], ['Emiko Ito', 'Charlie Clark', 'Ian Sherril', 'Martin White', 'Zella Vacaron'], ['Will Decker', 'Hayden Vaughn', 'Ryan Downard', 'Colby Downard', 'Alexa Dickey'], ['Malia Capen', 'Diya Sinha', 'Kavyaa Thakkar', 'Blaise Liu', 'Naomie DiMartino'], ['Dylan Leong', 'Rudy Zhang', 'Monika Lopez', 'Trenton Howard', 'Cleavon Andrade'], ['Rachel Zhitnitsky', 'Mary Bissonette', 'Elizabeth Crisp', 'Isabel Galvin', 'Lorelei Lemon'], ['Sam Samalya', 'Justin Sprague', 'Erick Villegas', 'Fernando Bass', 'Carlos Higareda'], ['Mason Macdougal', 'Kade Aplin', 'Dylan Yamamoto', 'Dane Flanders', 'Tristan Becker'], ['Caelyn Pender', 'Connie Shi', 'Faiz Surani', 'Chloe Brill', 'Conner Brinkley'], ['Michael Shahidi', 'Cristian Gomez', 'Sarah Sullivan', 'Jacob Valladares', 'Olivia Dinardo'], ['Karli Lewis', 'Daisy Jones', 'Sydney Lester', 'Molly Beals', 'Amelia Brannigan'], ['Jack Gelman', 'Madison Long', 'Ethan Abes', 'Colin Ward', 'Rose Gelman'], ['Ryan Bough', 'Guillermo Castro', 'Noah Bluth', 'John Smith', 'Colby Austin'], ['Melissa De La Cruz', 'Celeste Castro', 'Rachel Mex', 'Crystal Gonzalez', 'Diana Martinez'], ['Jacqueline Gomez', 'Taylor Jones', 'Emerson Kapture', 'Sofia Kenney', 'Ethan Sherwood'], ['Clare Whitney', 'Hannah Scarborough', 'Megan Parkinson', 'Christine Collins', 'Sage Mare'], ['Kiera Price', 'Autumn Jones', 'Courtney Lam', 'Ali Karasik', 'Joey Sipos'], ['Kelby Lewis', 'Alexis Davila', 'Lexi Kerner', 'Jamee Lary', 'Cat Young'], ['Jordan Hossini', 'Sjors Lap', 'Taylor Bolger', 'Brooke Sommers', 'Ashton Valdovinos'], ['Will Lyman', 'Jason Heller', 'Chaz Meizner', 'Stone Martin', 'Terrell Vaughn'], ['Claire Adams', 'Hannah Lee', 'Victoria Nguyen', 'Josh Lunsford', 'Josseline Hernandez'], ['Aarun Devgan', 'Spencer Walshaw', 'Ryan Lam', 'Aden Fruehling', 'Connor Elstein']]
def assignTargets(teams, allNames):
used = []
rList = random.sample(range(5* len(teams)), 5*len(teams))
for i in range(5):
if (rList[5 * len(teams) - 1 - i]/5 == len(teams) - 1):
temp = rList[i]
rList[i] = rList[5 * len(teams) - 1 - i]
rList[5 * len(teams) - 1 - i] = temp
passed = []
currentIndex = 0
passedIndex = 0
for i in range(len(teams)):
print(teams[i] + " Targets: ")
for j in range(5):
if (currentIndex < 5 * len(teams)):
rt = int(rList[currentIndex]/5)
rp = rList[currentIndex] % 5
currentIndex += 1
while(rt == 1):
passed.append(rList[currentIndex - 1])
rt = int(rList[currentIndex]/5)
rp = rList[currentIndex] % 5
currentIndex += 1
used.append(allNames[rt][rp])
print(allNames[rt][rp])
else:
rt = int(passed[passedIndex]/5)
rp = passed[passedIndex] % 5
passedIndex += 1
used.append(allNames[rt][rp])
print(allNames[rt][rp])
print('\n')
for i in range(len(teams)):
for j in range(5):
if(used.count(allNames[i][j]) != 1):
print("DO NOT USE THIS SAMPLE, RUN AGAIN")
assignTargets(teams, allNames)
| 131.565217
| 5,435
| 0.641992
| 1,113
| 9,078
| 5.236298
| 0.690027
| 0.012354
| 0.01081
| 0.006863
| 0.052505
| 0.052505
| 0.038435
| 0.032773
| 0.032773
| 0.032773
| 0
| 0.006956
| 0.192333
| 9,078
| 69
| 5,436
| 131.565217
| 0.787916
| 0.074906
| 0
| 0.341463
| 0
| 0
| 0.605649
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.02439
| false
| 0.146341
| 0.04878
| 0
| 0.073171
| 0.121951
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
ce3c73dc634430e5ccc8bceb001ab129e73a097b
| 348
|
py
|
Python
|
ctapipe/flow/gui/__init__.py
|
orelgueta/ctapipe
|
ee28440e83cc283ccd57428d5fdad764a1e786f0
|
[
"BSD-3-Clause"
] | null | null | null |
ctapipe/flow/gui/__init__.py
|
orelgueta/ctapipe
|
ee28440e83cc283ccd57428d5fdad764a1e786f0
|
[
"BSD-3-Clause"
] | null | null | null |
ctapipe/flow/gui/__init__.py
|
orelgueta/ctapipe
|
ee28440e83cc283ccd57428d5fdad764a1e786f0
|
[
"BSD-3-Clause"
] | null | null | null |
"""
from ctapipe.flow.gui.main_window import ModuleApplication
from ctapipe.flow.gui.graphwidget import GraphWidget
from ctapipe.flow.gui.infolabel import *
from ctapipe.flow.gui.guiconnection import *
all = ['GraphWidget', 'Ui_MainWindow', 'ModuleApplication',
'GuiConnexion', 'StagerRep', 'ProducerRep', 'ConsumerRep','InfoLabel']
"""
| 29
| 77
| 0.758621
| 37
| 348
| 7.081081
| 0.486486
| 0.167939
| 0.229008
| 0.274809
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109195
| 348
| 11
| 78
| 31.636364
| 0.845161
| 0.971264
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ce4400ee53a642965854c8196419c15bc9ed1e84
| 157
|
py
|
Python
|
lectures/code/classes_animal.py
|
naskoch/python_course
|
84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3
|
[
"MIT"
] | 4
|
2015-08-10T17:46:55.000Z
|
2020-04-18T21:09:03.000Z
|
lectures/code/classes_animal.py
|
naskoch/python_course
|
84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3
|
[
"MIT"
] | null | null | null |
lectures/code/classes_animal.py
|
naskoch/python_course
|
84adfd3f8d48ca3ad5837f7acc59d2fa051e95d3
|
[
"MIT"
] | 2
|
2019-04-24T03:31:02.000Z
|
2019-05-13T07:36:06.000Z
|
class Animal:
def __init__(self, n_legs, color):
self.n_legs = n_legs
self.color = color
def make_noise(self):
print 'noise'
| 22.428571
| 38
| 0.598726
| 22
| 157
| 3.909091
| 0.5
| 0.174419
| 0.209302
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.305732
| 157
| 7
| 39
| 22.428571
| 0.788991
| 0
| 0
| 0
| 0
| 0
| 0.031646
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.166667
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ce445725129177938d02ca582272e5fc8536367a
| 439
|
py
|
Python
|
virtual/lib/python3.9/site-packages/pyuploadcare/__init__.py
|
alex-mu/Neighborhood-watch
|
13a4926a59a924f84c5560966ca686168efa054e
|
[
"MIT"
] | 85
|
2015-01-14T21:37:58.000Z
|
2022-03-16T07:15:41.000Z
|
virtual/lib/python3.9/site-packages/pyuploadcare/__init__.py
|
alex-mu/Neighborhood-watch
|
13a4926a59a924f84c5560966ca686168efa054e
|
[
"MIT"
] | 78
|
2015-01-15T23:44:15.000Z
|
2022-03-21T12:05:26.000Z
|
virtual/lib/python3.9/site-packages/pyuploadcare/__init__.py
|
alex-mu/Neighborhood-watch
|
13a4926a59a924f84c5560966ca686168efa054e
|
[
"MIT"
] | 34
|
2015-01-13T16:06:29.000Z
|
2021-08-09T12:38:06.000Z
|
# isort: skip_file
__version__ = "3.0.0"
from pyuploadcare.resources.file import File # noqa: F401
from pyuploadcare.resources.file_group import FileGroup # noqa: F401
from pyuploadcare.resources.file_list import FileList # noqa: F401
from pyuploadcare.resources.group_list import GroupList # noqa: F401
from pyuploadcare.api.entities import Webhook, ProjectInfo # noqa: F401
from pyuploadcare.client import Uploadcare # noqa: F401
| 43.9
| 72
| 0.801822
| 58
| 439
| 5.931034
| 0.396552
| 0.27907
| 0.174419
| 0.348837
| 0.311047
| 0.215116
| 0
| 0
| 0
| 0
| 0
| 0.05483
| 0.127563
| 439
| 9
| 73
| 48.777778
| 0.843342
| 0.186788
| 0
| 0
| 0
| 0
| 0.014327
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.857143
| 0
| 0.857143
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
020ffd82d8fdafb60ff7eb2543170ac29a7adee3
| 411
|
py
|
Python
|
src/cli/onefuzz/__main__.py
|
tonybaloney/onefuzz
|
e0f2e9ed5aae006e0054387de7a0ff8c83c8f722
|
[
"MIT"
] | 2,692
|
2020-09-15T17:54:21.000Z
|
2022-03-31T11:58:57.000Z
|
src/cli/onefuzz/__main__.py
|
tonybaloney/onefuzz
|
e0f2e9ed5aae006e0054387de7a0ff8c83c8f722
|
[
"MIT"
] | 980
|
2020-09-18T18:23:01.000Z
|
2022-03-30T22:20:43.000Z
|
src/cli/onefuzz/__main__.py
|
nharper285/onefuzz
|
1de2cc841d6fc885f8bcb6d032bf5b96ddb52493
|
[
"MIT"
] | 177
|
2020-09-16T00:10:56.000Z
|
2022-03-30T21:18:10.000Z
|
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""
Command line interface to the Onefuzz service
"""
import sys
from onefuzz.__version__ import __version__
from onefuzz.api import Command, Endpoint, Onefuzz
from onefuzz.cli import execute_api
def main() -> int:
return execute_api(Onefuzz(), [Endpoint, Command], __version__)
if __name__ == "__main__":
sys.exit(main())
| 19.571429
| 67
| 0.742092
| 52
| 411
| 5.442308
| 0.576923
| 0.116608
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.158151
| 411
| 20
| 68
| 20.55
| 0.817919
| 0.279805
| 0
| 0
| 0
| 0
| 0.027875
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| true
| 0
| 0.5
| 0.125
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
0250fc6b3b83a555902a2684eec9430c7ee75587
| 86
|
py
|
Python
|
A1/project/todo/admin.py
|
nurjima/Pikoo-A1
|
e2dd23820309a93fb8cd6786a5abb109e0dddf5a
|
[
"MIT"
] | null | null | null |
A1/project/todo/admin.py
|
nurjima/Pikoo-A1
|
e2dd23820309a93fb8cd6786a5abb109e0dddf5a
|
[
"MIT"
] | null | null | null |
A1/project/todo/admin.py
|
nurjima/Pikoo-A1
|
e2dd23820309a93fb8cd6786a5abb109e0dddf5a
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from . models import Task
admin.site.register(Task)
| 17.2
| 32
| 0.802326
| 13
| 86
| 5.307692
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127907
| 86
| 4
| 33
| 21.5
| 0.92
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0269103980b4e8d00af08523c7a6dc067da425e7
| 142
|
py
|
Python
|
gc_talk/debug.py
|
a-feld/gc_talks
|
8ce932bd3855abaa3b8d018259ce4cb3c88b7be6
|
[
"MIT"
] | 1
|
2018-02-25T01:46:08.000Z
|
2018-02-25T01:46:08.000Z
|
gc_talk/debug.py
|
a-feld/gc_talk
|
8ce932bd3855abaa3b8d018259ce4cb3c88b7be6
|
[
"MIT"
] | null | null | null |
gc_talk/debug.py
|
a-feld/gc_talk
|
8ce932bd3855abaa3b8d018259ce4cb3c88b7be6
|
[
"MIT"
] | null | null | null |
import gc
import objgraph
gc.set_debug(gc.DEBUG_SAVEALL)
# Stuff here
gc.collect()
objgraph.show_backrefs(gc.garbage, filename='graph.png')
| 15.777778
| 56
| 0.788732
| 22
| 142
| 4.954545
| 0.681818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091549
| 142
| 8
| 57
| 17.75
| 0.844961
| 0.070423
| 0
| 0
| 0
| 0
| 0.069231
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0271fcc3afdd849ecc7e52e55a21830fbfbf76eb
| 4,143
|
py
|
Python
|
tests/test_base_collection.py
|
GetThePointGit/geometry_tools
|
8aa11e00310f88246e8a2bdcbfb694d6d892579f
|
[
"MIT"
] | null | null | null |
tests/test_base_collection.py
|
GetThePointGit/geometry_tools
|
8aa11e00310f88246e8a2bdcbfb694d6d892579f
|
[
"MIT"
] | null | null | null |
tests/test_base_collection.py
|
GetThePointGit/geometry_tools
|
8aa11e00310f88246e8a2bdcbfb694d6d892579f
|
[
"MIT"
] | null | null | null |
import unittest
from geometry_tools.geom_collections.base import BaseCollection
import os.path
test_data_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data')
class TestMemCollection(unittest.TestCase):
def setUp(self):
self.collection = BaseCollection()
self.rec_one = {'geometry': {'type': 'Point', 'coordinates': (4, 4)},
'properties': {'name': 'test 1'}}
self.rec_two = {'geometry': {'type': 'Point', 'coordinates': (2, 2)},
'properties': {'name': 'test 2'}}
self.collection.write(self.rec_one)
self.collection.write(self.rec_two)
def test_len(self):
self.assertEqual(len(self.collection), 2)
def test_first_element(self):
feature = self.collection[0]
self.assertEqual(feature['geometry']['coordinates'], (4, 4))
self.assertEqual(feature['id'], 0)
self.assertDictContainsSubset({'name': 'test 1'},
feature['properties'])
def test_iterate_collection(self):
self.assertListEqual([c['properties']['name'] for c in self.collection], ['test 1', 'test 2'])
def test_keys_no_args(self):
self.assertSetEqual(self.collection.keys(), set([0, 1]))
def test_keys_start_stop(self):
# self.assertSetEqual(self.collection.keys(start=1), set([1]))
# self.assertSetEqual(self.collection.keys(start=0), set([0, 1]))
self.assertSetEqual(self.collection.keys(start=-1), set((1,)))
self.assertSetEqual(self.collection.keys(stop=0), set([]))
self.assertSetEqual(self.collection.keys(stop=1), set([0]))
self.assertSetEqual(self.collection.keys(stop=2), set([0, 1]))
self.assertSetEqual(self.collection.keys(stop=-1), set([0]))
def test_keys_bounds(self):
self.assertSetEqual(self.collection.keys(bbox=[3, 3, 5, 5]), set([0]))
self.assertSetEqual(self.collection.keys(bbox=[1, 1, 3, 3]), set([1]))
self.assertSetEqual(self.collection.keys(bbox=[1, 1, 5, 5]), set([0, 1]))
self.assertSetEqual(self.collection.keys(bbox=[2, 2, 4, 4]), set([0, 1]))
self.assertSetEqual(self.collection.keys(bbox=[2.01, 2, 4, 3.99]), set([]))
def test_keys_mask(self):
# todo: mask is not yet supported
pass
def test_keys_combined(self):
self.assertSetEqual(self.collection.keys(stop=1, bbox=[3, 3, 5, 5]), set([0]))
self.assertSetEqual(self.collection.keys(start=1, bbox=[3, 3, 5, 5]), set([]))
self.assertSetEqual(self.collection.keys(start=-1, bbox=[2, 2, 4, 4]), set([1]))
self.assertSetEqual(self.collection.keys(start=0, bbox=[2.01, 2, 4, 3.99]), set([]))
def test_filter(self):
self.assertDictEqual(next(self.collection.filter(stop=1, bbox=[3, 3, 5, 5])), self.rec_one)
self.assertDictEqual(next(self.collection.filter(start=-1, bbox=[2, 2, 4, 4])), self.rec_two)
def test_items(self):
self.assertTupleEqual(next(self.collection.items(stop=1, bbox=[3, 3, 5, 5])), (0, self.rec_one))
self.assertTupleEqual(next(self.collection.items(start=-1, bbox=[2, 2, 4, 4])), (1, self.rec_two))
def test_bounds(self):
self.assertListEqual(self.collection.bounds, [2.0, 2.0, 4.0, 4.0])
def test_get_item(self):
self.assertDictEqual(self.collection[0], self.rec_one)
self.assertDictEqual(self.collection[1], self.rec_two)
def test_empty_collection(self):
collection = BaseCollection()
self.assertEqual(len(collection), 0)
self.assertListEqual(list(collection.keys()), [])
self.assertListEqual(list(collection.keys(bbox=(0, 0, 5, 5))), [])
self.assertListEqual(list(collection.keys(0, 10)), [])
self.assertListEqual(list(collection.items()), [])
# def test_save_collection(self):
# self.collection.save('c:/tmp/test.shp', schema={
# 'geometry': 'Point',
# 'properties': {
# 'name': 'str'
# }
# })
#
# f = fiona.open('c:/tmp/test.shp')
#
# self.assertEqual(len(f), 2)
| 41.43
| 106
| 0.613324
| 538
| 4,143
| 4.641264
| 0.165428
| 0.179415
| 0.14978
| 0.217861
| 0.538246
| 0.44173
| 0.319183
| 0.259111
| 0.213456
| 0.156588
| 0
| 0.039024
| 0.208303
| 4,143
| 99
| 107
| 41.848485
| 0.722256
| 0.098238
| 0
| 0
| 0
| 0
| 0.04488
| 0
| 0
| 0
| 0
| 0.010101
| 0.516129
| 1
| 0.225806
| false
| 0.016129
| 0.048387
| 0
| 0.290323
| 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
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
027c86d3d6185b18d2a4f128400a6189af589b06
| 6,174
|
py
|
Python
|
tests/test_interactions.py
|
mwojcikowski/oddt
|
3b58b15b530e97a90d958fe8b862f16605b6da1f
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_interactions.py
|
mwojcikowski/oddt
|
3b58b15b530e97a90d958fe8b862f16605b6da1f
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_interactions.py
|
mwojcikowski/oddt
|
3b58b15b530e97a90d958fe8b862f16605b6da1f
|
[
"BSD-3-Clause"
] | null | null | null |
import os
from numpy.testing import assert_array_equal
import pytest
import oddt
from oddt.interactions import (close_contacts,
hbonds,
halogenbonds,
pi_stacking,
salt_bridges,
pi_cation,
hydrophobic_contacts)
test_data_dir = os.path.dirname(os.path.abspath(__file__))
mols = list(oddt.toolkit.readfile('sdf', os.path.join(test_data_dir, 'data/dude/xiap/actives_docked.sdf')))
list(map(lambda x: x.addh(only_polar=True), mols))
rec = next(oddt.toolkit.readfile('pdb', os.path.join(test_data_dir, 'data/dude/xiap/receptor_rdkit.pdb')))
rec.protein = True
rec.addh(only_polar=True)
def test_close_contacts():
"""Close contacts test"""
cc = [len(close_contacts(rec.atom_dict[rec.atom_dict['atomicnum'] != 1],
mol.atom_dict[mol.atom_dict['atomicnum'] != 1],
cutoff=3)[0]) for mol in mols]
assert_array_equal(cc,
[5, 7, 6, 5, 3, 6, 5, 6, 6, 6, 5, 4, 7, 6, 6, 6, 7, 5,
6, 5, 5, 7, 4, 5, 6, 7, 6, 5, 7, 5, 6, 4, 5, 4, 3, 7,
6, 6, 3, 5, 4, 3, 1, 7, 3, 2, 4, 1, 2, 7, 4, 4, 6, 4,
6, 7, 7, 6, 6, 6, 5, 6, 5, 4, 4, 7, 3, 6, 6, 4, 7, 7,
4, 5, 4, 7, 3, 6, 6, 6, 5, 6, 4, 5, 4, 4, 6, 5, 5, 7,
6, 2, 6, 5, 1, 8, 6, 5, 7, 4])
@pytest.mark.skip
def test_hbonds():
"""H-Bonds test"""
hbonds_count = [hbonds(rec, mol)[2].sum() for mol in mols]
assert_array_equal(hbonds_count,
[6, 7, 5, 5, 6, 5, 6, 4, 6, 5, 4, 6, 6, 5, 8, 5, 6, 6,
6, 7, 6, 6, 5, 6, 7, 5, 5, 7, 6, 6, 7, 6, 6, 6, 6, 6,
6, 5, 5, 6, 4, 5, 5, 6, 6, 3, 5, 5, 4, 6, 4, 8, 6, 6,
6, 4, 6, 6, 6, 6, 7, 6, 7, 6, 6, 7, 6, 6, 6, 5, 4, 5,
5, 6, 6, 6, 6, 6, 6, 4, 7, 5, 6, 6, 5, 6, 6, 5, 6, 5,
6, 5, 5, 7, 7, 6, 8, 6, 4, 5])
@pytest.mark.skip
def test_halogenbonds():
"""Halogen-Bonds test"""
halogenbonds_count = [len(halogenbonds(rec, mol)[2]) for mol in mols]
print(halogenbonds_count)
assert_array_equal(halogenbonds_count,
[])
@pytest.mark.skip
def test_pi_stacking():
"""Pi-stacking test"""
pi_parallel_count = [pi_stacking(rec,
mol,
cutoff=8)[2].sum() for mol in mols]
print(pi_parallel_count)
# assert_array_equal(pi_parallel_count,
# [])
pi_perpendicular_count = [pi_stacking(rec,
mol,
cutoff=8)[3].sum() for mol in mols]
print(pi_perpendicular_count)
assert_array_equal(pi_perpendicular_count,
[])
@pytest.mark.skip
def test_salt_bridges():
"""Salt bridges test"""
salt_bridges_count = [len(salt_bridges(rec, mol)[0]) for mol in mols]
# print(salt_bridges_count)
assert_array_equal(salt_bridges_count,
[6, 7, 5, 5, 6, 5, 6, 4, 6, 5, 4, 6, 6, 5, 8, 5, 6, 6,
6, 7, 6, 6, 5, 6, 7, 5, 5, 7, 6, 6, 7, 6, 6, 6, 6, 6,
6, 5, 5, 6, 4, 5, 5, 6, 6, 3, 5, 5, 4, 6, 4, 8, 6, 6,
6, 4, 6, 6, 6, 6, 7, 6, 7, 6, 6, 7, 6, 6, 6, 5, 4, 5,
5, 6, 6, 6, 6, 6, 6, 4, 7, 5, 6, 6, 5, 6, 6, 5, 6, 5,
6, 5, 5, 7, 7, 6, 8, 6, 4, 5])
@pytest.mark.skip
def test_pi_cation():
"""Pi-cation test"""
pi_cation_count = [len(pi_cation(rec, mol)[2]) for mol in mols]
# print(pi_cation_count)
assert_array_equal(pi_cation_count,
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 0, 0, 0, 0, 0])
pi_cation_count = [len(pi_cation(mol, rec)[2]) for mol in mols]
# print(pi_cation_count)
assert_array_equal(pi_cation_count,
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 2, 1, 0,
2, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1,
0, 1, 0, 0, 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1,
0, 2, 0, 0, 0, 0, 1, 1, 0, 1])
# Strict
pi_cation_count = [pi_cation(mol, rec)[2].sum() for mol in mols]
# print(pi_cation_count)
assert_array_equal(pi_cation_count,
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
def test_hyd_contacts():
"""Hydrophobic Contacts test"""
hyd_contacts_count = [len(hydrophobic_contacts(rec, mol)[0]) for mol in mols]
assert_array_equal(hyd_contacts_count,
[14, 10, 7, 14, 10, 13, 17, 14, 17, 12, 12, 10, 10, 11,
9, 8, 8, 4, 9, 16, 15, 6, 9, 8, 5, 5, 8, 11, 7, 10, 7,
13, 4, 13, 9, 9, 9, 4, 6, 16, 10, 13, 10, 9, 8, 9, 13,
15, 13, 9, 11, 9, 7, 10, 5, 3, 5, 7, 7, 10, 11, 7, 10,
20, 9, 6, 6, 3, 7, 7, 4, 7, 6, 2, 5, 6, 14, 9, 4, 6,
11, 10, 9, 6, 10, 8, 6, 5, 6, 11, 8, 16, 9, 9, 11, 6,
8, 5, 8, 15])
| 44.73913
| 107
| 0.416586
| 1,083
| 6,174
| 2.273315
| 0.084949
| 0.157595
| 0.21446
| 0.263201
| 0.51909
| 0.462632
| 0.413485
| 0.35134
| 0.298538
| 0.265232
| 0
| 0.208276
| 0.41286
| 6,174
| 137
| 108
| 45.065693
| 0.470897
| 0.047133
| 0
| 0.294118
| 0
| 0
| 0.015408
| 0.011299
| 0
| 0
| 0
| 0
| 0.098039
| 1
| 0.068627
| false
| 0
| 0.04902
| 0
| 0.117647
| 0.029412
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0287e05e2f96e4c9c5d6b6ef98f47ddd746df7b9
| 303
|
py
|
Python
|
utils/__init__.py
|
LuletterSoul/sast_backend
|
f3da89887420b4a3907e15f266442048029d36b4
|
[
"MIT"
] | null | null | null |
utils/__init__.py
|
LuletterSoul/sast_backend
|
f3da89887420b4a3907e15f266442048029d36b4
|
[
"MIT"
] | 1
|
2020-08-17T07:24:53.000Z
|
2020-08-17T07:24:53.000Z
|
utils/__init__.py
|
LuletterSoul/sast_backend
|
f3da89887420b4a3907e15f266442048029d36b4
|
[
"MIT"
] | 3
|
2020-08-08T09:12:10.000Z
|
2020-11-27T16:48:18.000Z
|
#!/usr/bin/env python
# encoding: utf-8
"""
@author: Shanda Lau 刘祥德
@license: (C) Copyright 2019-now, Node Supply Chain Manager Corporation Limited.
@contact: shandalaulv@gmail.com
@software:
@file: __init__.py.py
@time: 2020/8/16 23:44
@version 1.0
@desc:
"""
from .utils import *
from .video import *
| 21.642857
| 80
| 0.716172
| 47
| 303
| 4.531915
| 0.914894
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068441
| 0.132013
| 303
| 14
| 81
| 21.642857
| 0.741445
| 0.825083
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5a064c1825ed0befb720a617dde4bbef852ab677
| 209
|
py
|
Python
|
Models/querysets/Methods that return new QuerySets/defer()/models.py
|
looking-for-a-job/django-examples
|
dfafa450668cac5c0351f6c7238b8886511229bf
|
[
"Unlicense"
] | null | null | null |
Models/querysets/Methods that return new QuerySets/defer()/models.py
|
looking-for-a-job/django-examples
|
dfafa450668cac5c0351f6c7238b8886511229bf
|
[
"Unlicense"
] | null | null | null |
Models/querysets/Methods that return new QuerySets/defer()/models.py
|
looking-for-a-job/django-examples
|
dfafa450668cac5c0351f6c7238b8886511229bf
|
[
"Unlicense"
] | null | null | null |
#!/usr/bin/env python
from django.db import models
class MyModel(models.Model):
field1 = models.TextField()
field2 = models.TextField()
field3 = models.TextField()
field4 = models.TextField()
| 23.222222
| 31
| 0.698565
| 25
| 209
| 5.84
| 0.68
| 0.410959
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023256
| 0.177033
| 209
| 8
| 32
| 26.125
| 0.825581
| 0.095694
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
5a2a900dea1602bf19f4df347a9d46aa10a3c851
| 16,655
|
py
|
Python
|
tests/test_meshregion.py
|
pscedu/DPF-Core
|
05816d1d4940aacc2b51055ab67b8f4c31fc1ca3
|
[
"MIT"
] | null | null | null |
tests/test_meshregion.py
|
pscedu/DPF-Core
|
05816d1d4940aacc2b51055ab67b8f4c31fc1ca3
|
[
"MIT"
] | null | null | null |
tests/test_meshregion.py
|
pscedu/DPF-Core
|
05816d1d4940aacc2b51055ab67b8f4c31fc1ca3
|
[
"MIT"
] | null | null | null |
import numpy as np
import pytest
import vtk
from ansys import dpf
@pytest.fixture()
def simple_bar_model(simple_bar):
return dpf.core.Model(simple_bar)
def test_get_scoping_meshedregion_from_operator(simple_bar):
dataSource = dpf.core.DataSources()
dataSource.set_result_file_path(simple_bar)
mesh = dpf.core.Operator("mapdl::rst::MeshProvider")
mesh.connect(4, dataSource)
meshOut = mesh.get_output(0, dpf.core.types.meshed_region)
scop = meshOut._get_scoping(dpf.core.locations.nodal)
assert len(scop.ids) == 3751
scop = meshOut._get_scoping(dpf.core.locations.elemental)
assert len(scop.ids) == 3000
def test_get_mesh_from_model(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
assert len(mesh.nodes.scoping.ids) == 3751
assert len(mesh.elements.scoping.ids) == 3000
def test_vtk_grid_from_model(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
grid = mesh._as_vtk(include_ids=True)
assert np.allclose(grid['element_ids'], mesh.elements.scoping.ids)
assert np.allclose(grid['node_ids'], mesh.nodes.scoping.ids)
assert all(grid.celltypes == vtk.VTK_HEXAHEDRON)
def test_get_element_type_meshedregion(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
assert mesh.elements.element_by_index(1).type.value == 11
assert mesh.elements.element_by_index(1).type == dpf.core.element_types.Hex8
assert mesh.elements.element_by_index(1).shape == 'solid'
def test_get_set_unit_meshedregion(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
assert mesh.unit == 'm'
mesh.unit = 'km'
assert mesh.unit == 'km'
def test_get_node_meshedregion(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
node = mesh.nodes.node_by_index(1)
scop = mesh._get_scoping(dpf.core.locations.nodal)
assert node.id == scop.id(1)
assert node.index == 1
expected_coord = [0.1, 2.9, 0.2]
assert node.coordinates == expected_coord
assert np.allclose(mesh.grid.points[1], expected_coord)
def test_get_element_meshedregion(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
el = mesh.elements.element_by_index(1)
scop = mesh.elements.scoping
assert el.id == scop.id(1)
assert el.index == 1
nodes = el.nodes
assert el.n_nodes == len(nodes)
node = nodes[0]
assert node.index == 1053
assert node.coordinates == [0.1, 1.6, 0.1]
def test_get_coordinates_field_meshedregion(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
nodescoping = mesh.nodes.scoping
field_coordinates = mesh.nodes.coordinates_field
assert field_coordinates.component_count == 3
assert field_coordinates.elementary_data_count == nodescoping.size
assert np.allclose(field_coordinates.data[0],[0.1,2.9,0.1])
assert np.allclose(mesh.grid.points, field_coordinates.data)
def test_get_element_types_field_meshedregion(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
elemcoping = mesh.elements.scoping
field_element_types = mesh.elements.element_types_field
assert np.allclose(field_element_types.data[0], [11])
assert field_element_types.size == elemcoping.size
assert field_element_types.component_count == 1
def test_get_materials_field_meshedregion(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
elemcoping = mesh.elements.scoping
field_mat = mesh.elements.materials_field
assert field_mat.data[0] == 1
assert field_mat.size == elemcoping.size
assert field_mat.component_count == 1
def test_get_connectivities_field_meshedregion(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
elemcoping = mesh.elements.scoping
field_connect = mesh.elements.connectivities_field
assert field_connect.data[0] == 1053
assert field_connect.component_count == 1
assert np.allclose(field_connect.get_entity_data(1), [1053, 1062, 1143, 1134, 2492, 2491, 2482, 2483])
def test_get_nodes_meshedregion(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
node = mesh.nodes.node_by_id(1)
assert node.id ==1
assert node.index >=0
assert node.coordinates != None
node = mesh.nodes.node_by_index(1)
assert node.id >= 1
assert node.index ==1
assert node.coordinates != None
def test_get_elements_meshedregion(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
el = mesh.elements.element_by_id(1)
assert el.id == 1
assert el.index >= 0
assert el.nodes is not None
el = mesh.elements.element_by_index(1)
assert el.id >= 1
assert el.index ==1
assert el.nodes is not None
def test_str_meshedregion(simple_bar_model):
meshed_region = simple_bar_model.metadata.meshed_region
assert str(len(meshed_region.nodes)) in str(meshed_region)
assert str(len(meshed_region.elements)) in str(meshed_region)
def test_str_nodes_elements_meshedregion(simple_bar_model):
meshed_region = simple_bar_model.metadata.meshed_region
assert '3000' in str(meshed_region.elements)
assert '3751' in str(meshed_region.nodes)
assert 'Hex' in str(meshed_region.elements.element_by_id(1))
assert '0' in str(meshed_region.nodes.node_by_id(1))
def test_delete_meshedregion(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
del mesh
with pytest.raises(Exception):
mesh.nodes[0]
def test_delete_auto_meshedregion(simple_bar):
dataSource = dpf.core.DataSources()
dataSource.set_result_file_path(simple_bar)
mesh = dpf.core.Operator("mapdl::rst::MeshProvider")
mesh.connect(4, dataSource)
meshOut = mesh.get_output(0, dpf.core.types.meshed_region)
meshOut2 = dpf.core.meshed_region.MeshedRegion(mesh=meshOut._message)
del meshOut
with pytest.raises(Exception):
meshOut2.get_element_type(1)
def test_id_indeces_mapping_on_nodes_1(multishells):
model = dpf.core.Model(multishells)
mesh = model.metadata.meshed_region
mapping = mesh.nodes.mapping_id_to_index
nodes = mesh.nodes
assert len(mapping) == len(nodes)
assert len(nodes) == 7079
assert mapping[995] == 994
assert mapping[500] == 499
def test_id_indeces_mapping_on_nodes_2(allkindofcomplexity):
model = dpf.core.Model(allkindofcomplexity)
mesh = model.metadata.meshed_region
mapping = mesh.nodes.mapping_id_to_index
nodes = mesh.nodes
assert len(mapping) == len(nodes)
assert len(nodes) == 15129
assert mapping[20] == 19
assert mapping[9008] == 9007
assert mapping[12346] == 12345
def test_id_indeces_mapping_on_elements_1(multishells):
model = dpf.core.Model(multishells)
mesh = model.metadata.meshed_region
mapping = mesh.elements.mapping_id_to_index
elements = mesh.elements
assert len(mapping) == len(elements)
assert len(elements) == 4220
assert mapping[2500] == 2895
assert mapping[1999] == 191
def test_id_indeces_mapping_on_elements_2(allkindofcomplexity):
model = dpf.core.Model(allkindofcomplexity)
mesh = model.metadata.meshed_region
mapping = mesh.elements.mapping_id_to_index
elements = mesh.elements
assert len(mapping) == len(elements)
assert len(elements) == 10292
assert mapping[23] == 24
assert mapping[4520] == 2011
def test_named_selection_mesh(allkindofcomplexity):
model = dpf.core.Model(allkindofcomplexity)
mesh = model.metadata.meshed_region
ns = mesh.available_named_selections
assert ns == ['_CM82', '_CM86UX_XP', '_DISPNONZEROUX', '_DISPZEROUZ', '_ELMISC', '_FIXEDSU']
scop = mesh.named_selection("_CM86UX_XP")
assert len(scop)==481
assert scop.location == dpf.core.locations().nodal
def test_create_meshed_region():
mesh = dpf.core.MeshedRegion(num_nodes=4, num_elements=1)
mesh.nodes.add_node(1, [0.0,0.0,0.0])
assert mesh.nodes.n_nodes ==1
assert mesh.elements.n_elements==0
mesh.nodes.add_node(2, [1.0,0.0,0.0])
mesh.nodes.add_node(3, [1.0,1.0,0.0])
mesh.nodes.add_node(4,[0.0,1.0,0.0])
mesh.elements.add_shell_element(1, [0,1,2,3])
assert mesh.nodes.n_nodes ==4
assert mesh.elements.n_elements==1
el =mesh.elements.element_by_id(1)
assert el.shape =="shell"
assert el.type.value ==16
def test_connectivity_meshed_region():
mesh = test_create_all_shaped_meshed_region()
connectivity = mesh.elements.connectivities_field
assert np.allclose(connectivity.get_entity_data_by_id(1),[0,1,2,3])
assert np.allclose(connectivity.get_entity_data(0),[0,1,2,3])
assert np.allclose(mesh.elements.element_by_id(1).connectivity,[0,1,2,3])
nodal_conne = mesh.nodes.nodal_connectivity_field
assert np.allclose(nodal_conne.get_entity_data_by_id(1),[0])
assert np.allclose(mesh.nodes.node_by_id(1).nodal_connectivity,[0])
def test_create_all_shaped_meshed_region():
mesh = dpf.core.MeshedRegion(num_nodes=11, num_elements=4)
assert mesh.nodes.n_nodes ==0
assert mesh.elements.n_elements==0
mesh.nodes.add_node(1, [0.0,0.0,0.0])
mesh.nodes.add_node(2, [1.0,0.0,0.0])
mesh.nodes.add_node(3, [1.0,1.0,0.0])
mesh.nodes.add_node(4,[0.0,1.0,0.0])
mesh.elements.add_shell_element(1, [0,1,2,3])
mesh.nodes.add_node(5, [0.0,0.0,0.0])
mesh.elements.add_point_element(2, [4])
mesh.nodes.add_node(6, [0.0,0.0,0.0])
mesh.nodes.add_node(7, [1.0,0.0,0.0])
mesh.elements.add_beam_element(3, [5,6])
mesh.nodes.add_node(8, [0.0,0.0,0.0])
mesh.nodes.add_node(9, [1.0,0.0,0.0])
mesh.nodes.add_node(10, [1.0,1.0,0.0])
mesh.nodes.add_node(11, [0.0,1.0,1.0])
mesh.elements.add_solid_element(4, [7,8,9,10])
assert mesh.nodes.n_nodes ==11
assert mesh.elements.n_elements==4
el =mesh.elements.element_by_id(1)
assert el.shape =="shell"
assert el.type.value ==16
el =mesh.elements.element_by_id(2)
assert el.shape =="unknown_shape"
assert el.type.value ==9
assert el.nodes[0].index ==4
el =mesh.elements.element_by_id(3)
assert el.type.value ==18
assert el.shape =="beam"
assert len(el.nodes)==2
el =mesh.elements.element_by_id(4)
assert el.type.value ==10
assert el.shape =="solid"
assert len(el.nodes)==4
return mesh
def test_create_with_yield_meshed_region():
ref_mesh = test_create_all_shaped_meshed_region()
mesh = dpf.core.MeshedRegion(num_nodes=ref_mesh.nodes.n_nodes, num_elements=ref_mesh.elements.n_elements)
index=0
for node in mesh.nodes.add_nodes(ref_mesh.nodes.n_nodes):
ref_node =ref_mesh.nodes.node_by_index(index)
node.id = ref_node.id
node.coordinates = ref_node.coordinates
index=index+1
index=0
for elem in mesh.elements.add_elements(ref_mesh.elements.n_elements):
ref_elem = ref_mesh.elements.element_by_index(index)
elem.id = ref_elem.id
elem.connectivity = ref_elem.connectivity
elem.shape = ref_elem.shape
index=index+1
assert mesh.nodes.n_nodes ==11
assert mesh.elements.n_elements==4
el =mesh.elements.element_by_id(1)
assert el.shape =="shell"
assert el.type.value ==16
el =mesh.elements.element_by_id(2)
assert el.shape =="unknown_shape"
assert el.type.value ==9
assert el.nodes[0].index ==4
el =mesh.elements.element_by_id(3)
assert el.type.value ==18
assert el.shape =="beam"
assert len(el.nodes)==2
el =mesh.elements.element_by_id(4)
assert el.type.value ==10
assert el.shape =="solid"
assert len(el.nodes)==4
def test_create_by_copy_meshed_region():
ref_mesh = test_create_all_shaped_meshed_region()
mesh = dpf.core.MeshedRegion(num_nodes=ref_mesh.nodes.n_nodes, num_elements=ref_mesh.elements.n_elements)
index=0
for node in ref_mesh.nodes:
ref_node =ref_mesh.nodes.node_by_index(index)
mesh.nodes.add_node(ref_node.id, ref_node.coordinates)
index=index+1
index=0
for elem in ref_mesh.elements:
ref_elem = ref_mesh.elements.element_by_index(index)
mesh.elements.add_element(ref_elem.id, ref_elem.shape, ref_elem.connectivity)
index=index+1
assert mesh.nodes.n_nodes ==11
assert mesh.elements.n_elements==4
el =mesh.elements.element_by_id(1)
assert el.shape =="shell"
assert el.type.value ==16
el =mesh.elements.element_by_id(2)
assert el.shape =="unknown_shape"
assert el.type.value ==9
assert el.nodes[0].index ==4
el =mesh.elements.element_by_id(3)
assert el.type.value ==18
assert el.shape =="beam"
assert len(el.nodes)==2
el =mesh.elements.element_by_id(4)
assert el.type.value ==10
assert el.shape =="solid"
assert len(el.nodes)==4
def test_has_element_shape_meshed_region():
mesh = dpf.core.MeshedRegion(num_nodes=11, num_elements=4)
assert mesh.elements.has_beam_elements ==False
assert mesh.elements.has_solid_elements ==False
assert mesh.elements.has_shell_elements ==False
assert mesh.elements.has_point_elements ==False
mesh.nodes.add_node(1, [0.0,0.0,0.0])
mesh.nodes.add_node(2, [1.0,0.0,0.0])
mesh.nodes.add_node(3, [1.0,1.0,0.0])
mesh.nodes.add_node(4,[0.0,1.0,0.0])
mesh.elements.add_shell_element(1, [0,1,2,3])
assert mesh.elements.has_beam_elements ==False
assert mesh.elements.has_solid_elements ==False
assert mesh.elements.has_shell_elements ==True
assert mesh.elements.has_point_elements ==False
mesh.nodes.add_node(5, [0.0,0.0,0.0])
mesh.elements.add_point_element(2, [4])
assert mesh.elements.has_beam_elements ==False
assert mesh.elements.has_solid_elements ==False
assert mesh.elements.has_shell_elements ==True
assert mesh.elements.has_point_elements ==True
mesh.nodes.add_node(6, [0.0,0.0,0.0])
mesh.nodes.add_node(7, [1.0,0.0,0.0])
mesh.elements.add_beam_element(3, [5,6])
assert mesh.elements.has_beam_elements ==True
assert mesh.elements.has_solid_elements ==False
assert mesh.elements.has_shell_elements ==True
assert mesh.elements.has_point_elements ==True
mesh.nodes.add_node(8, [0.0,0.0,0.0])
mesh.nodes.add_node(9, [1.0,0.0,0.0])
mesh.nodes.add_node(10, [1.0,1.0,0.0])
mesh.nodes.add_node(11, [0.0,1.0,1.0])
mesh.elements.add_solid_element(4, [7,8,9,10])
assert mesh.elements.has_beam_elements ==True
assert mesh.elements.has_solid_elements ==True
assert mesh.elements.has_shell_elements ==True
assert mesh.elements.has_point_elements ==True
def test_mesh_deep_copy(allkindofcomplexity):
model = dpf.core.Model(allkindofcomplexity)
mesh = model.metadata.meshed_region
copy = mesh.deep_copy()
assert copy.nodes.scoping.ids == mesh.nodes.scoping.ids
assert copy.elements.scoping.ids == mesh.elements.scoping.ids
assert copy.unit == mesh.unit
assert np.allclose(copy.nodes.coordinates_field.data,mesh.nodes.coordinates_field.data)
assert np.allclose(copy.elements.element_types_field.data,mesh.elements.element_types_field.data)
assert np.allclose(copy.elements.connectivities_field.data,mesh.elements.connectivities_field.data)
assert np.allclose(copy.nodes.coordinates_field.scoping.ids,mesh.nodes.coordinates_field.scoping.ids)
assert np.allclose(copy.elements.element_types_field.scoping.ids,mesh.elements.element_types_field.scoping.ids)
assert np.allclose(copy.elements.connectivities_field.scoping.ids,mesh.elements.connectivities_field.scoping.ids)
def test_mesh_deep_copy2(simple_bar_model):
mesh = simple_bar_model.metadata.meshed_region
copy = mesh.deep_copy()
assert copy.nodes.scoping.ids == mesh.nodes.scoping.ids
assert copy.elements.scoping.ids == mesh.elements.scoping.ids
assert copy.unit == mesh.unit
assert np.allclose(copy.nodes.coordinates_field.data,mesh.nodes.coordinates_field.data)
assert np.allclose(copy.elements.element_types_field.data,mesh.elements.element_types_field.data)
assert np.allclose(copy.elements.connectivities_field.data,mesh.elements.connectivities_field.data)
assert np.allclose(copy.nodes.coordinates_field.scoping.ids,mesh.nodes.coordinates_field.scoping.ids)
assert np.allclose(copy.elements.element_types_field.scoping.ids,mesh.elements.element_types_field.scoping.ids)
assert np.allclose(copy.elements.connectivities_field.scoping.ids,mesh.elements.connectivities_field.scoping.ids)
| 37.680995
| 117
| 0.722786
| 2,542
| 16,655
| 4.505507
| 0.072384
| 0.016764
| 0.017026
| 0.014319
| 0.7777
| 0.743648
| 0.711167
| 0.661923
| 0.643936
| 0.642976
| 0
| 0.038995
| 0.160853
| 16,655
| 442
| 118
| 37.680995
| 0.780481
| 0
| 0
| 0.595568
| 0
| 0
| 0.014409
| 0.002882
| 0
| 0
| 0
| 0
| 0.448753
| 1
| 0.085873
| false
| 0
| 0.01108
| 0.00277
| 0.102493
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5a2f20ea2b55827d651d07a2442f95774475d9be
| 460
|
py
|
Python
|
pybader/io/__init__.py
|
adam-kerrigan/pybader
|
1d675ae69ab64fe336b936b00990681e01258031
|
[
"MIT"
] | 2
|
2021-04-30T20:15:51.000Z
|
2021-05-20T18:24:23.000Z
|
pybader/io/__init__.py
|
kerrigoon/pybader
|
1d675ae69ab64fe336b936b00990681e01258031
|
[
"MIT"
] | null | null | null |
pybader/io/__init__.py
|
kerrigoon/pybader
|
1d675ae69ab64fe336b936b00990681e01258031
|
[
"MIT"
] | 1
|
2021-03-18T13:39:53.000Z
|
2021-03-18T13:39:53.000Z
|
"""Package for I/O handling.
All modules must have a __args__ and __ext__ variable set for determining what
arguments the read function takes and what extenstion to match in the filename.
Other information (eg. flags for the writting) should be set in the dictionary
file_info with filename, prefix, file_type, write_function and voxel_offset.
"""
from pybader.io import cube, pymatgen, vasp
try:
from pybader.io import gpaw
except ImportError:
pass
| 32.857143
| 79
| 0.786957
| 72
| 460
| 4.861111
| 0.763889
| 0.028571
| 0.074286
| 0.108571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.165217
| 460
| 13
| 80
| 35.384615
| 0.911458
| 0.741304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.2
| 0.6
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
5a55e2efb8bd8d4bdfbe29f092ea19b9ad1804f4
| 58
|
py
|
Python
|
Python practice/Mit opencourceware(2.7)/string.py
|
chiranjeevbitp/Python27new
|
d366efee57857402bae16cabf1df94c657490750
|
[
"bzip2-1.0.6"
] | null | null | null |
Python practice/Mit opencourceware(2.7)/string.py
|
chiranjeevbitp/Python27new
|
d366efee57857402bae16cabf1df94c657490750
|
[
"bzip2-1.0.6"
] | null | null | null |
Python practice/Mit opencourceware(2.7)/string.py
|
chiranjeevbitp/Python27new
|
d366efee57857402bae16cabf1df94c657490750
|
[
"bzip2-1.0.6"
] | null | null | null |
print("Today I had {0} cups of {1} ".format(3,"coffee"))
| 29
| 57
| 0.603448
| 11
| 58
| 3.181818
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061224
| 0.155172
| 58
| 1
| 58
| 58
| 0.653061
| 0
| 0
| 0
| 0
| 0
| 0.596491
| 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
|
ce5976f2ad211892e1080f9302ef8a262856af3d
| 866
|
py
|
Python
|
martinez/point.py
|
skrat/martinez
|
86db48324cb50ecb52be8ab2e4278a6d5cdd562b
|
[
"MIT"
] | 7
|
2020-05-07T08:13:44.000Z
|
2021-12-17T07:33:51.000Z
|
martinez/point.py
|
skrat/martinez
|
86db48324cb50ecb52be8ab2e4278a6d5cdd562b
|
[
"MIT"
] | 17
|
2019-11-29T23:17:26.000Z
|
2020-12-20T15:47:17.000Z
|
martinez/point.py
|
skrat/martinez
|
86db48324cb50ecb52be8ab2e4278a6d5cdd562b
|
[
"MIT"
] | 1
|
2020-12-17T22:44:21.000Z
|
2020-12-17T22:44:21.000Z
|
import math
from reprit.base import generate_repr
from .bounding_box import BoundingBox
from .hints import Scalar
class Point:
__slots__ = '_x', '_y'
def __init__(self, x: Scalar, y: Scalar) -> None:
self._x = x
self._y = y
__repr__ = generate_repr(__init__)
def __eq__(self, other: 'Point') -> bool:
return (self._x == other._x and self._y == other._y
if isinstance(other, Point)
else NotImplemented)
@property
def bounding_box(self) -> BoundingBox:
return BoundingBox(self._x, self._y, self._x, self._y)
@property
def x(self) -> Scalar:
return self._x
@property
def y(self) -> Scalar:
return self._y
def distance_to(self, other: 'Point') -> Scalar:
return math.sqrt((self._x - other._x) ** 2 + (self._y - other._y) ** 2)
| 23.405405
| 79
| 0.601617
| 114
| 866
| 4.192982
| 0.307018
| 0.073222
| 0.037657
| 0.046025
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0032
| 0.278291
| 866
| 36
| 80
| 24.055556
| 0.7616
| 0
| 0
| 0.12
| 1
| 0
| 0.016166
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.24
| false
| 0
| 0.16
| 0.2
| 0.72
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
ce646950a619da22d5549fe6e7c29660cd3fec3b
| 131
|
py
|
Python
|
setup.py
|
andrewp-as-is/django-bulk.py
|
11fde85139e1e9a935d906864cfddc7aea80e531
|
[
"Unlicense"
] | null | null | null |
setup.py
|
andrewp-as-is/django-bulk.py
|
11fde85139e1e9a935d906864cfddc7aea80e531
|
[
"Unlicense"
] | null | null | null |
setup.py
|
andrewp-as-is/django-bulk.py
|
11fde85139e1e9a935d906864cfddc7aea80e531
|
[
"Unlicense"
] | null | null | null |
from setuptools import setup
setup(
name='django-bulk',
version='2021.8.26',
packages=[
'django_bulk'
]
)
| 13.1
| 28
| 0.587786
| 15
| 131
| 5.066667
| 0.8
| 0.263158
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073684
| 0.274809
| 131
| 9
| 29
| 14.555556
| 0.726316
| 0
| 0
| 0
| 0
| 0
| 0.236641
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.125
| 0
| 0.125
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ce6c6533bf061861fad5bab067584b186349ebf0
| 569
|
py
|
Python
|
excript/aulas/aula93_funcao_variadica.py
|
victorers1/anotacoes_curso_python
|
c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e
|
[
"MIT"
] | null | null | null |
excript/aulas/aula93_funcao_variadica.py
|
victorers1/anotacoes_curso_python
|
c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e
|
[
"MIT"
] | null | null | null |
excript/aulas/aula93_funcao_variadica.py
|
victorers1/anotacoes_curso_python
|
c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e
|
[
"MIT"
] | null | null | null |
#Funções variádivas são as capazes de receber quantidades arbitrárias de parâmetros
def lista_de_argumentos(*lista):
print(lista)
def lista_de_argumentos_associativos(**dicionario):
print(dicionario)
def argumentos(*args, **kwargs): #necessariamente nessa ordem
print(args)
print(kwargs)
argumentos(1, 2, 3, 4, 5, 6, a=1, b=2, c=3, d=4)
lista_de_argumentos(1, 2, 3, 4, 5, 6)
lista_de_argumentos("um", "dois", "três", "quatro")
lista_de_argumentos_associativos(a=1, b=2, c=3, d=4)
lista_de_argumentos_associativos(um=1, dois=2, tres=3, quatro=4)
| 27.095238
| 83
| 0.725835
| 92
| 569
| 4.326087
| 0.391304
| 0.105528
| 0.256281
| 0.218593
| 0.180905
| 0.180905
| 0.180905
| 0.125628
| 0.125628
| 0.125628
| 0
| 0.04878
| 0.135325
| 569
| 20
| 84
| 28.45
| 0.760163
| 0.191564
| 0
| 0
| 0
| 0
| 0.035011
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0
| 0
| 0.25
| 0.333333
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ce73df9cbd5e94effe1603f31b991fd9af1298f0
| 79
|
py
|
Python
|
tests/perfs/test_ozone_perf_measure_L1.py
|
shaido987/pyaf
|
b9afd089557bed6b90b246d3712c481ae26a1957
|
[
"BSD-3-Clause"
] | 377
|
2016-10-13T20:52:44.000Z
|
2022-03-29T18:04:14.000Z
|
tests/perfs/test_ozone_perf_measure_L1.py
|
ysdede/pyaf
|
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
|
[
"BSD-3-Clause"
] | 160
|
2016-10-13T16:11:53.000Z
|
2022-03-28T04:21:34.000Z
|
tests/perfs/test_ozone_perf_measure_L1.py
|
ysdede/pyaf
|
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
|
[
"BSD-3-Clause"
] | 63
|
2017-03-09T14:51:18.000Z
|
2022-03-27T20:52:57.000Z
|
import tests.perfs.test_ozone_perf_measure as tperf
tperf.build_model("L1");
| 15.8
| 51
| 0.810127
| 13
| 79
| 4.615385
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013889
| 0.088608
| 79
| 4
| 52
| 19.75
| 0.819444
| 0
| 0
| 0
| 0
| 0
| 0.025641
| 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
|
ce91a3761b86662db5ecad1b276089910d8c6d05
| 119
|
py
|
Python
|
neurtu/__init__.py
|
symerio/neurtu
|
d070c98f2fad295cf8a6c00fc9ac94c0e8baa026
|
[
"BSD-3-Clause"
] | 17
|
2018-02-19T07:44:10.000Z
|
2021-04-08T12:12:00.000Z
|
neurtu/__init__.py
|
symerio/neurtu
|
d070c98f2fad295cf8a6c00fc9ac94c0e8baa026
|
[
"BSD-3-Clause"
] | 10
|
2018-02-24T11:19:57.000Z
|
2019-07-21T19:44:10.000Z
|
neurtu/__init__.py
|
symerio/neurtu
|
d070c98f2fad295cf8a6c00fc9ac94c0e8baa026
|
[
"BSD-3-Clause"
] | 3
|
2018-02-18T20:29:46.000Z
|
2019-11-05T19:24:34.000Z
|
from .base import Benchmark, timeit, memit # noqa
from .delayed import delayed, Delayed # noqa
__version__ = '0.3.0'
| 23.8
| 50
| 0.731092
| 17
| 119
| 4.882353
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030303
| 0.168067
| 119
| 4
| 51
| 29.75
| 0.808081
| 0.07563
| 0
| 0
| 0
| 0
| 0.046729
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ce97286b4ffdcbcfae0d1ef7c9cafd23fef26a2e
| 573
|
py
|
Python
|
penlm/__init__.py
|
bellibot/penlm
|
cd3e82c319ed221cfdbd6c566ee63be26b3aa6fb
|
[
"MIT"
] | null | null | null |
penlm/__init__.py
|
bellibot/penlm
|
cd3e82c319ed221cfdbd6c566ee63be26b3aa6fb
|
[
"MIT"
] | null | null | null |
penlm/__init__.py
|
bellibot/penlm
|
cd3e82c319ed221cfdbd6c566ee63be26b3aa6fb
|
[
"MIT"
] | null | null | null |
from penlm.grid_search import GridSearchCV
from penlm.base_estimators import BaseClassifier, BaseRegressor
from penlm.adaptive_lasso import AdaptiveLassoClassifier, AdaptiveLassoRegressor
from penlm.bar_estimator import BARClassifier, BARRegressor
from penlm.non_negative_garrote import NNGarroteClassifier, NNGarroteRegressor
from penlm.relaxed_lasso import RelaxedLassoClassifier, RelaxedLassoRegressor
from penlm.smooth_linear_model import SmoothLinearClassifier, SmoothLinearRegressor
from penlm.smoothly_adaptively_centered_ridge import SACRClassifier, SACRRegressor
| 57.3
| 83
| 0.904014
| 59
| 573
| 8.576271
| 0.627119
| 0.142292
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069808
| 573
| 9
| 84
| 63.666667
| 0.949343
| 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
|
ce9b347021be55f8b88b0ed6dad8023dd4a90129
| 2,222
|
py
|
Python
|
python/uniq.py
|
Juniper/warp17
|
f51cc6b8f1da7ca9703c7fbb951a638ae4a0e9dc
|
[
"BSD-3-Clause"
] | 375
|
2016-06-08T13:59:43.000Z
|
2022-03-22T00:40:02.000Z
|
python/uniq.py
|
Juniper/warp17
|
f51cc6b8f1da7ca9703c7fbb951a638ae4a0e9dc
|
[
"BSD-3-Clause"
] | 96
|
2016-06-14T13:54:03.000Z
|
2021-10-09T09:04:27.000Z
|
python/uniq.py
|
Juniper/warp17
|
f51cc6b8f1da7ca9703c7fbb951a638ae4a0e9dc
|
[
"BSD-3-Clause"
] | 78
|
2016-06-08T14:14:15.000Z
|
2022-02-11T19:19:56.000Z
|
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
#
# Copyright (c) 2016, Juniper Networks, Inc. All rights reserved.
#
#
# The contents of this file are subject to the terms of the BSD 3 clause
# License (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at
# https://github.com/Juniper/warp17/blob/master/LICENSE.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# File name:
# uniq.py
#
# Description:
# Computes unique stamps..
#
# Author:
# Dumitru Ceara, Eelco Chaudron
#
# Initial Created:
# 04/12/2016
#
# Notes:
#
#
import datetime
def get_uniq_stamp():
return datetime.datetime.now().strftime('%y%m%d-%H%M%S.%f')
if __name__ == '__main__':
print(get_uniq_stamp())
| 34.184615
| 77
| 0.756076
| 328
| 2,222
| 5.085366
| 0.560976
| 0.014988
| 0.015588
| 0.027578
| 0.110312
| 0.081535
| 0.081535
| 0.081535
| 0.081535
| 0.081535
| 0
| 0.009804
| 0.173717
| 2,222
| 64
| 78
| 34.71875
| 0.898693
| 0.877588
| 0
| 0
| 0
| 0
| 0.111628
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.2
| 0.2
| 0.6
| 0.2
| 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
| 0
| 1
| 1
| 0
|
0
| 4
|
cea26d42136cf828cfdbdcc1c1eef8e30dc7fb2d
| 3,247
|
py
|
Python
|
healthcareai/tests/test_model_eval_helpers.py
|
iEvidently/healthcareai-py
|
8aaf1f7f758ae7797859dc21eae1c38686931e4f
|
[
"MIT"
] | 263
|
2017-05-04T17:00:33.000Z
|
2022-03-31T20:57:27.000Z
|
healthcareai/tests/test_model_eval_helpers.py
|
iEvidently/healthcareai-py
|
8aaf1f7f758ae7797859dc21eae1c38686931e4f
|
[
"MIT"
] | 290
|
2017-05-03T05:04:35.000Z
|
2020-08-14T20:18:23.000Z
|
healthcareai/tests/test_model_eval_helpers.py
|
iEvidently/healthcareai-py
|
8aaf1f7f758ae7797859dc21eae1c38686931e4f
|
[
"MIT"
] | 168
|
2017-05-18T19:44:20.000Z
|
2022-03-16T19:55:51.000Z
|
import unittest
from healthcareai.common.helpers import calculate_random_forest_mtry_hyperparameter
from healthcareai.common.healthcareai_error import HealthcareAIError
class TestCalculateRandomForestCalculateMTry(unittest.TestCase):
def test_less_than_three_columns_raises_error(self):
self.assertRaises(HealthcareAIError, calculate_random_forest_mtry_hyperparameter, 2, 'classification')
def test_less_than_three_columns_raises_error_with_correct_message(self):
try:
calculate_random_forest_mtry_hyperparameter(2, 'classification')
# Fail the test if the above call doesn't throw an error
self.fail()
except HealthcareAIError as e:
self.assertEqual(e.message, 'You need more than two columns to tune hyperparameters.')
def test_negative_columns_raises_error_with_correct_message(self):
try:
calculate_random_forest_mtry_hyperparameter(-10, 'classification')
# Fail the test if the above call doesn't throw an error
self.fail()
except HealthcareAIError as e:
self.assertEqual(e.message, 'You need more than two columns to tune hyperparameters.')
def test_non_integer_columns_raises_error(self):
try:
calculate_random_forest_mtry_hyperparameter('regression_metrics', 'classification')
# Fail the test if the above call doesn't throw an error
self.fail()
except HealthcareAIError as e:
self.assertEqual(e.message, 'The number_of_columns must be an integer')
def test_bad_model_type_raises_error(self):
self.assertRaises(HealthcareAIError, calculate_random_forest_mtry_hyperparameter, 3, 'regression_metrics')
def test_bad_model_type_raises_error_with_correct_message(self):
try:
calculate_random_forest_mtry_hyperparameter(3, 'regression_metrics')
# Fail the test if the above call doesn't throw an error
self.fail()
except HealthcareAIError as e:
self.assertEqual(e.message, 'Please specify model type of \'regression\' or \'classification\'')
def test_three_columns_classification(self):
result = calculate_random_forest_mtry_hyperparameter(3, 'classification')
self.assertEqual(result, [1, 2, 3])
def test_three_columns_regression(self):
result = calculate_random_forest_mtry_hyperparameter(3, 'regression')
self.assertEqual(result, [1, 2, 3])
def test_ten_columns_classification(self):
result = calculate_random_forest_mtry_hyperparameter(10, 'classification')
self.assertEqual(result, [2, 3, 4])
def test_ten_columns_regression(self):
result = calculate_random_forest_mtry_hyperparameter(10, 'regression')
self.assertEqual(result, [2, 3, 4])
def test_one_hundred_columns_classification(self):
result = calculate_random_forest_mtry_hyperparameter(100, 'classification')
self.assertEqual(result, [9, 10, 11])
def test_one_hundred_columns_regression(self):
result = calculate_random_forest_mtry_hyperparameter(100, 'regression')
self.assertEqual(result, [32, 33, 34])
if __name__ == '__main__':
unittest.main()
| 45.097222
| 114
| 0.726209
| 385
| 3,247
| 5.797403
| 0.212987
| 0.087366
| 0.122312
| 0.145609
| 0.797491
| 0.767921
| 0.767921
| 0.71147
| 0.613351
| 0.430556
| 0
| 0.015775
| 0.199569
| 3,247
| 71
| 115
| 45.732394
| 0.843017
| 0.067447
| 0
| 0.346154
| 0
| 0
| 0.124049
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 1
| 0.230769
| false
| 0
| 0.057692
| 0
| 0.307692
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ceb26c3eb47adb6145b9a7d2c5b9f018ecb1fadb
| 637
|
py
|
Python
|
week_8/12_lesson.py
|
SekachVitaliy/Python
|
4d199a571cfedca51ec6e724e4d8c98e086e984d
|
[
"Unlicense"
] | null | null | null |
week_8/12_lesson.py
|
SekachVitaliy/Python
|
4d199a571cfedca51ec6e724e4d8c98e086e984d
|
[
"Unlicense"
] | null | null | null |
week_8/12_lesson.py
|
SekachVitaliy/Python
|
4d199a571cfedca51ec6e724e4d8c98e086e984d
|
[
"Unlicense"
] | null | null | null |
import itertools
import functools
print(*(tuple([[[0]]]) + tuple(*map(lambda data: filter(lambda x: tuple(x[0]) == x[1], map(lambda var: (filter(lambda sta: ((var.index(sta[0]) >= var.index(sta[1])) ^ (var.index(sta[2]) >= var.index(sta[3]))), data[1]), data[1], var + data[2]), data[0])), map(lambda x: (itertools.permutations(set(functools.reduce(lambda x,y: x + y ,x[1]))), x[1], tuple(set(range(1, x[0] + 1)) - set(functools.reduce(lambda x,y: x + y ,x[1])))), map(lambda vvod: (next(vvod), tuple(set(map(lambda y: tuple(y), map(lambda x: map(int, input().split()), range(next(vvod))))))), [map(int, input().split())])))))[-1][-1])
| 127.4
| 601
| 0.613815
| 112
| 637
| 3.491071
| 0.241071
| 0.138107
| 0.112532
| 0.056266
| 0.153453
| 0.153453
| 0.153453
| 0.153453
| 0.153453
| 0.153453
| 0
| 0.033159
| 0.100471
| 637
| 4
| 602
| 159.25
| 0.649215
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0.333333
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0c66a7e2eecc7eb47b5ca663cc772160baa4f7bb
| 17,904
|
py
|
Python
|
pyquest_cffi/ops/test_ops.py
|
hhorii/PyQuEST-cffi
|
d1a27b149941ae40407ce2eeba66778f1edec601
|
[
"Apache-2.0"
] | 1
|
2020-08-13T14:33:12.000Z
|
2020-08-13T14:33:12.000Z
|
pyquest_cffi/ops/test_ops.py
|
hhorii/PyQuEST-cffi
|
d1a27b149941ae40407ce2eeba66778f1edec601
|
[
"Apache-2.0"
] | null | null | null |
pyquest_cffi/ops/test_ops.py
|
hhorii/PyQuEST-cffi
|
d1a27b149941ae40407ce2eeba66778f1edec601
|
[
"Apache-2.0"
] | null | null | null |
"""Testing gate operations in PyQuest-cffi"""
# Copyright 2019 HQS Quantum Simulations GmbH
#
# 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 pytest
import sys
import numpy as np
import numpy.testing as npt
from pyquest_cffi import ops
from pyquest_cffi import cheat
from pyquest_cffi import utils
@pytest.mark.parametrize("gate", [ops.hadamard,
ops.sGate,
ops.tGate,
ops.pauliX,
ops.pauliY,
ops.pauliZ,
ops.controlledNot,
ops.controlledPhaseFlip,
ops.controlledPauliY,
ops.MolmerSorensenXX,
ops.sqrtISwap,
ops.invSqrtISwap,
ops.swapGate,
ops.sqrtSwapGate
])
def test_simple_gate_matrices(gate):
"""Testing gates without parameters"""
matrix_gate = gate().matrix()
if matrix_gate.shape == (2, 2):
matrix_reconstructed = build_one_qubit_matrix(gate, {})
elif matrix_gate.shape == (4, 4):
matrix_reconstructed = build_two_qubit_matrix(gate, {})
npt.assert_array_almost_equal(matrix_gate, matrix_reconstructed)
@pytest.mark.parametrize("gate", [ops.rotateX,
ops.rotateY,
ops.rotateY,
ops.controlledRotateX,
ops.controlledRotateY,
ops.controlledRotateZ,
ops.phaseShift,
ops.controlledPhaseShift,
])
@pytest.mark.parametrize("theta", list(np.arange(0, 2 * np.pi, 2 * np.pi / 10)))
def test_single_parameter_gate_matrices(gate, theta) -> None:
"""Testing gates with one parameter"""
matrix_gate = gate().matrix(theta=theta)
if matrix_gate.shape == (2, 2):
matrix_reconstructed = build_one_qubit_matrix(gate, {'theta': theta})
elif matrix_gate.shape == (4, 4):
matrix_reconstructed = build_two_qubit_matrix(gate, {'theta': theta})
npt.assert_array_almost_equal(matrix_gate, matrix_reconstructed)
@pytest.mark.parametrize("gate", [ops.compactUnitary,
ops.controlledCompactUnitary
])
@pytest.mark.parametrize("alpha", list(np.arange(0, 1, 1 / 3)))
@pytest.mark.parametrize("phase", list(np.arange(0, 2 * np.pi, 2 * np.pi / 3)))
def test_compact_unitary_gate_matrices(gate, alpha, phase) -> None:
"""Testing compact unitary gate"""
matrix_gate = gate().matrix(alpha=alpha, beta=np.sqrt(1 - alpha**2) * np.exp(1j * phase))
if matrix_gate.shape == (2, 2):
matrix_reconstructed = build_one_qubit_matrix(
gate, {'alpha': alpha, 'beta': np.sqrt(1 - alpha**2) * np.exp(1j * phase)})
elif matrix_gate.shape == (4, 4):
matrix_reconstructed = build_two_qubit_matrix(
gate, {'alpha': alpha, 'beta': np.sqrt(1 - alpha**2) * np.exp(1j * phase)})
npt.assert_array_almost_equal(matrix_gate, matrix_reconstructed)
@pytest.mark.parametrize("gate", [ops.rotateAroundAxis,
ops.controlledRotateAroundAxis
])
@pytest.mark.parametrize("theta", list(np.arange(0, 2 * np.pi, 2 * np.pi / 3)))
@pytest.mark.parametrize("phi", list(np.arange(0, 2 * np.pi, 2 * np.pi / 3)))
@pytest.mark.parametrize("theta_s", list(np.arange(0, np.pi, np.pi / 3)))
def test_axis_rotation_gate_matrices(gate, theta, phi, theta_s) -> None:
"""Testing axis rotation"""
vector = np.zeros((3,))
vector[0] = np.sin(theta_s) * np.cos(phi)
vector[1] = np.sin(theta_s) * np.sin(phi)
vector[2] = np.cos(theta_s)
matrix_gate = gate().matrix(vector=vector, theta=theta)
if matrix_gate.shape == (2, 2):
matrix_reconstructed = build_one_qubit_matrix(
gate, {'theta': theta, 'vector': vector})
elif matrix_gate.shape == (4, 4):
matrix_reconstructed = build_two_qubit_matrix(
gate, {'theta': theta, 'vector': vector})
npt.assert_array_almost_equal(matrix_gate, matrix_reconstructed)
@pytest.mark.parametrize("gate", [ops.unitary,
ops.controlledUnitary
])
@pytest.mark.parametrize("alpha", list(np.arange(0, 1, 1 / 3)))
@pytest.mark.parametrize("phase", list(np.arange(0, 2 * np.pi, 2 * np.pi / 3)))
def test_unitary_gate_matrices(gate, alpha, phase) -> None:
"""Testing unitary gate"""
beta = np.sqrt(1 - alpha**2) * np.exp(1j * phase)
matrix = np.array([[alpha, -np.conj(beta)], [beta, np.conj(alpha)]], dtype=complex)
matrix_gate = gate().matrix(matrix=matrix)
if matrix_gate.shape == (2, 2):
matrix_reconstructed = build_one_qubit_matrix(
gate, {'matrix': matrix})
elif matrix_gate.shape == (4, 4):
matrix_reconstructed = build_two_qubit_matrix(
gate, {'matrix': matrix})
npt.assert_array_almost_equal(matrix_gate, matrix_reconstructed)
@pytest.mark.parametrize("gate", [ops.controlledRotateX,
ops.controlledRotateY,
ops.controlledRotateZ,
ops.controlledPhaseShift,
])
@pytest.mark.parametrize("theta", list(np.arange(0, 2 * np.pi, 2 * np.pi / 10)))
def test_two_qubit_unitary(gate, theta):
"""Test two qubit unitary gate"""
matrix_gate = gate().matrix(theta=theta)
matrix_reconstructed = build_two_qubit_matrix_target(
ops.twoQubitUnitary, {'matrix': matrix_gate})
npt.assert_array_almost_equal(matrix_gate, matrix_reconstructed)
@pytest.mark.parametrize("gate", [ops.controlledRotateX,
ops.controlledRotateY,
ops.controlledRotateZ,
ops.controlledPhaseShift,
])
@pytest.mark.parametrize("theta", list(np.arange(0, 2 * np.pi, 2 * np.pi / 10)))
def test_controlled_two_qubit_unitary(gate, theta):
"""Test controlled two qubit unitary gate"""
matrix_gate = gate().matrix(theta=theta)
matrix_reconstructed = build_two_qubit_matrix_target(
ops.controlledTwoQubitUnitary, {'matrix': matrix_gate}, control=True)
npt.assert_array_almost_equal(matrix_gate, matrix_reconstructed)
matrix_reconstructed = build_two_qubit_matrix_target(
ops.controlledTwoQubitUnitary, {'matrix': matrix_gate}, control=False)
npt.assert_array_almost_equal(np.eye(4), matrix_reconstructed)
@pytest.mark.parametrize("gate", [ops.controlledRotateX,
ops.controlledRotateY,
ops.controlledRotateZ,
ops.controlledPhaseShift,
])
@pytest.mark.parametrize("theta", list(np.arange(0, 2 * np.pi, 2 * np.pi / 10)))
def test_multi_qubit_unitary(gate, theta):
"""Test multi qubit unitary gate"""
matrix_gate = gate().matrix(theta=theta)
matrix_reconstructed = build_two_qubit_matrix_targets(
ops.multiQubitUnitary, {'matrix': matrix_gate})
npt.assert_array_almost_equal(matrix_gate, matrix_reconstructed)
@pytest.mark.parametrize("gate", [ops.controlledRotateX,
ops.controlledRotateY,
ops.controlledRotateZ,
ops.controlledPhaseShift,
])
@pytest.mark.parametrize("theta", list(np.arange(0, 2 * np.pi, 2 * np.pi / 10)))
def test_controlled_multi_qubit_unitary(gate, theta):
"""Test controlled multi qubit unitary gate"""
matrix_gate = gate().matrix(theta=theta)
matrix_reconstructed = build_two_qubit_matrix_targets(
ops.controlledMultiQubitUnitary, {'matrix': matrix_gate}, control=True)
npt.assert_array_almost_equal(matrix_gate, matrix_reconstructed)
matrix_reconstructed = build_two_qubit_matrix_targets(
ops.controlledMultiQubitUnitary, {'matrix': matrix_gate}, control=False)
npt.assert_array_almost_equal(np.eye(4), matrix_reconstructed)
@pytest.mark.parametrize("gate", [ops.rotateX,
ops.rotateY,
ops.rotateY,
])
@pytest.mark.parametrize("theta", list(np.arange(0, 2 * np.pi, 2 * np.pi / 10)))
def test_multi_state_controlled_unitary(gate, theta):
"""Test multiStateControlledUnitary"""
matrix_gate = gate().matrix(theta=theta)
env = utils.createQuestEnv()()
qubits = utils.createQureg()(3, env)
ops.multiStateControlledUnitary()(
qureg=qubits,
controls=[0, 1],
control_states=[0, 1],
qubit=2,
matrix=matrix_gate)
def test_multi_controlled_PhaseFlip():
"""Test multiControlledPhaseFlip"""
env = utils.createQuestEnv()()
qubits = utils.createQureg()(3, env)
ops.multiControlledPhaseFlip()(
qureg=qubits,
controls=[0, 1],
)
def test_multi_controlled_PhaseShift():
"""Test multiControlledPhaseShift"""
env = utils.createQuestEnv()()
qubits = utils.createQureg()(3, env)
ops.multiControlledPhaseShift()(
qureg=qubits,
controls=[0, 1],
theta=0.3 * np.pi
)
@pytest.mark.parametrize("gate", [ops.rotateX,
ops.rotateY,
ops.rotateY,
])
@pytest.mark.parametrize("theta", list(np.arange(0, 2 * np.pi, 2 * np.pi / 10)))
def test_multi_controlled_unitary(gate, theta):
"""Test multiControlledUnitary"""
matrix_gate = gate().matrix(theta=theta)
env = utils.createQuestEnv()()
qubits = utils.createQureg()(3, env)
ops.multiControlledUnitary()(
qureg=qubits,
controls=[0, 1],
qubit=2,
matrix=matrix_gate)
@pytest.mark.parametrize("gate", [ops.controlledRotateX,
ops.controlledRotateY,
ops.controlledRotateY,
])
@pytest.mark.parametrize("theta", list(np.arange(0, 2 * np.pi, 2 * np.pi / 10)))
def test_multi_controlled_two_qubit_unitary(gate, theta):
"""Test multiControlledTwoQubitUnitary"""
matrix_gate = gate().matrix(theta=theta)
env = utils.createQuestEnv()()
qubits = utils.createQureg()(4, env)
ops.multiControlledTwoQubitUnitary()(
qureg=qubits,
controls=[0, 1],
target_qubit_1=2,
target_qubit_2=3,
matrix=matrix_gate)
@pytest.mark.parametrize("gate", [ops.controlledRotateX,
ops.controlledRotateY,
ops.controlledRotateY,
])
@pytest.mark.parametrize("theta", list(np.arange(0, 2 * np.pi, 2 * np.pi / 10)))
def test_multi_controlled_multi_qubit_unitary(gate, theta):
"""Test multiControlledMultiQubitUnitary"""
matrix_gate = gate().matrix(theta=theta)
env = utils.createQuestEnv()()
qubits = utils.createQureg()(4, env)
ops.multiControlledMultiQubitUnitary()(
qureg=qubits,
controls=[0, 1],
targets=[2, 3],
matrix=matrix_gate)
def test_apply_Pauli_sum():
"""Test applyPauliSum"""
env = utils.createQuestEnv()()
qubits = utils.createQureg()(4, env)
qubits_out = utils.createQureg()(4, env)
ops.applyPauliSum()(
qureg=qubits,
paulis=[[0, 1, 2, 3], [3, 2, 1, 0]],
coefficients=[0.4, 0.3],
qureg_out=qubits_out,
)
def test_multiRotatePauli():
"""Testing multiRotatePauli"""
env = utils.createQuestEnv()()
qureg = utils.createQureg()(3, env=env)
a = ops.multiRotatePauli()
a(qureg, [0, 1, 2], [1, 2, 3], 0.35)
def build_one_qubit_matrix(gate, gate_args):
"""Build one qubit matrix for tests"""
matrix = np.zeros((2, 2), dtype=complex)
for co, state in enumerate([np.array([1, 0]),
np.array([0, 1])]):
env = utils.createQuestEnv()()
qubits = utils.createQureg()(1, env)
cheat.initStateFromAmps()(qubits, np.real(state), np.imag(state))
gate()(qureg=qubits, qubit=0, **gate_args)
for i in range(0, 2):
cComplex = cheat.getAmp()(qureg=qubits, index=i)
matrix[i, co] = cComplex.real + 1j * cComplex.imag
return matrix
def build_two_qubit_matrix(gate, gate_args):
"""Build two qubit matrix for tests"""
matrix = np.zeros((4, 4), dtype=complex)
for co, state in enumerate([np.array([1, 0, 0, 0]),
np.array([0, 1, 0, 0]),
np.array([0, 0, 1, 0]),
np.array([0, 0, 0, 1]), ]):
env = utils.createQuestEnv()()
qubits = utils.createQureg()(2, env)
cheat.initStateFromAmps()(qubits, np.real(state), np.imag(state))
gate()(qureg=qubits, control=1, qubit=0, **gate_args)
for i in range(0, 4):
cComplex = cheat.getAmp()(qureg=qubits, index=i)
matrix[i, co] = cComplex.real + 1j * cComplex.imag
return matrix
def build_two_qubit_matrix_target(gate, gate_args, control=None):
"""Build two qubit matrix for tests"""
matrix = np.zeros((4, 4), dtype=complex)
for co, state in enumerate([np.array([1, 0, 0, 0]),
np.array([0, 1, 0, 0]),
np.array([0, 0, 1, 0]),
np.array([0, 0, 0, 1]), ]):
env = utils.createQuestEnv()()
if control is None:
qubits = utils.createQureg()(3, env)
cheat.initStateFromAmps()(qubits, np.real(state), np.imag(state))
gate()(qureg=qubits, target_qubit_1=0, target_qubit_2=1, **gate_args)
elif control is True:
qubits = utils.createQureg()(3, env)
control_array = np.array([0, 1])
cheat.initStateFromAmps()(
qubits,
np.real(np.kron(control_array, state)),
np.imag(np.kron(control_array, state)))
gate()(qureg=qubits, target_qubit_1=0, target_qubit_2=1, control=2, **gate_args)
else:
qubits = utils.createQureg()(3, env)
control_array = np.array([1, 0])
cheat.initStateFromAmps()(
qubits,
np.real(np.kron(control_array, state)),
np.imag(np.kron(control_array, state)))
gate()(qureg=qubits, target_qubit_1=0, target_qubit_2=1, control=2, **gate_args)
for i in range(0, 4):
if control is None:
cComplex = cheat.getAmp()(qureg=qubits, index=i)
matrix[i, co] = cComplex.real + 1j * cComplex.imag
elif control is True:
cComplex = cheat.getAmp()(qureg=qubits, index=i + 4)
matrix[i, co] = cComplex.real + 1j * cComplex.imag
else:
cComplex = cheat.getAmp()(qureg=qubits, index=i)
matrix[i, co] = cComplex.real + 1j * cComplex.imag
return matrix
def build_two_qubit_matrix_targets(gate, gate_args, control=None):
"""Build two qubit matrix for tests"""
matrix = np.zeros((4, 4), dtype=complex)
for co, state in enumerate([np.array([1, 0, 0, 0]),
np.array([0, 1, 0, 0]),
np.array([0, 0, 1, 0]),
np.array([0, 0, 0, 1]), ]):
env = utils.createQuestEnv()()
if control is None:
qubits = utils.createQureg()(2, env)
cheat.initStateFromAmps()(qubits, np.real(state), np.imag(state))
gate()(qureg=qubits, targets=[0, 1], **gate_args)
elif control is True:
qubits = utils.createQureg()(3, env)
control_array = np.array([0, 1])
cheat.initStateFromAmps()(
qubits,
np.real(np.kron(control_array, state)),
np.imag(np.kron(control_array, state)))
gate()(qureg=qubits, targets=[0, 1], control=2, **gate_args)
else:
qubits = utils.createQureg()(3, env)
control_array = np.array([1, 0])
cheat.initStateFromAmps()(
qubits,
np.real(np.kron(control_array, state)),
np.imag(np.kron(control_array, state)))
gate()(qureg=qubits, targets=[0, 1], control=2, **gate_args)
for i in range(0, 4):
if control is None:
cComplex = cheat.getAmp()(qureg=qubits, index=i)
matrix[i, co] = cComplex.real + 1j * cComplex.imag
elif control is True:
cComplex = cheat.getAmp()(qureg=qubits, index=i + 4)
matrix[i, co] = cComplex.real + 1j * cComplex.imag
else:
cComplex = cheat.getAmp()(qureg=qubits, index=i)
matrix[i, co] = cComplex.real + 1j * cComplex.imag
return matrix
if __name__ == '__main__':
pytest.main(sys.argv)
| 42.832536
| 93
| 0.57529
| 2,033
| 17,904
| 4.92425
| 0.103788
| 0.053941
| 0.060833
| 0.032265
| 0.788732
| 0.753771
| 0.737389
| 0.709919
| 0.691639
| 0.676256
| 0
| 0.023089
| 0.298481
| 17,904
| 417
| 94
| 42.935252
| 0.773965
| 0.07004
| 0
| 0.68546
| 0
| 0
| 0.014401
| 0
| 0
| 0
| 0
| 0
| 0.032641
| 1
| 0.062315
| false
| 0
| 0.020772
| 0
| 0.094955
| 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
|
0c6c0294a4a075efea7ace4f0d7f38fa13e6603f
| 581
|
py
|
Python
|
imperiumab/csv.py
|
vlki/imperiumab-scripts
|
4133a9b6105331e41245344882a4c45aed9a7870
|
[
"MIT"
] | null | null | null |
imperiumab/csv.py
|
vlki/imperiumab-scripts
|
4133a9b6105331e41245344882a4c45aed9a7870
|
[
"MIT"
] | null | null | null |
imperiumab/csv.py
|
vlki/imperiumab-scripts
|
4133a9b6105331e41245344882a4c45aed9a7870
|
[
"MIT"
] | null | null | null |
from datetime import datetime
def format_date(date):
if date == None:
return None
return date.strftime('%Y-%m-%d')
def parse_date(date_str):
if date_str == "":
return None
datetime_obj = datetime.strptime(date_str, '%Y-%m-%d')
return datetime_obj.date()
def parse_str(val_str):
if val_str == "":
return None
return val_str
def parse_int(int_str):
if int_str == "":
return None
return int(int_str)
def parse_float(float_str):
if float_str == "":
return None
return float(float_str)
| 14.897436
| 58
| 0.612737
| 83
| 581
| 4.060241
| 0.240964
| 0.148368
| 0.189911
| 0.169139
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.271945
| 581
| 38
| 59
| 15.289474
| 0.79669
| 0
| 0
| 0.227273
| 0
| 0
| 0.027539
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.227273
| false
| 0
| 0.045455
| 0
| 0.727273
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
0c7e4b9b82690fb37159a3122c275a5f5d214f62
| 81
|
py
|
Python
|
example/runtests.py
|
a-murphy/sample_python_coveralls
|
25cc6416026462c2152c6f1a23d1fbc514214249
|
[
"MIT"
] | 2
|
2015-11-08T13:02:44.000Z
|
2020-12-27T19:33:59.000Z
|
example/runtests.py
|
a-murphy/sample_python_coveralls
|
25cc6416026462c2152c6f1a23d1fbc514214249
|
[
"MIT"
] | null | null | null |
example/runtests.py
|
a-murphy/sample_python_coveralls
|
25cc6416026462c2152c6f1a23d1fbc514214249
|
[
"MIT"
] | null | null | null |
# coding: utf-8
from project import hello
if __name__ == '__main__':
hello()
| 16.2
| 26
| 0.679012
| 11
| 81
| 4.272727
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015385
| 0.197531
| 81
| 5
| 27
| 16.2
| 0.707692
| 0.160494
| 0
| 0
| 0
| 0
| 0.119403
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0c9e703c61fe5ec1a9a1e36ad0b3453965a20c64
| 3,523
|
py
|
Python
|
onnxruntime/test/python/onnxruntime_test_ort_trainer_with_mixed_precision.py
|
mszhanyi/onnxruntime
|
6f85d3e5c81c919022ac4a77e5a051da8518b15d
|
[
"MIT"
] | 669
|
2018-12-03T22:00:31.000Z
|
2019-05-06T19:42:49.000Z
|
onnxruntime/test/python/onnxruntime_test_ort_trainer_with_mixed_precision.py
|
mszhanyi/onnxruntime
|
6f85d3e5c81c919022ac4a77e5a051da8518b15d
|
[
"MIT"
] | 440
|
2018-12-03T21:09:56.000Z
|
2019-05-06T20:47:23.000Z
|
onnxruntime/test/python/onnxruntime_test_ort_trainer_with_mixed_precision.py
|
mszhanyi/onnxruntime
|
6f85d3e5c81c919022ac4a77e5a051da8518b15d
|
[
"MIT"
] | 140
|
2018-12-03T21:15:28.000Z
|
2019-05-06T18:02:36.000Z
|
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import unittest
from numpy.testing import assert_allclose, assert_array_equal
from onnxruntime_test_ort_trainer import runBertTrainingTest
class TestOrtTrainer(unittest.TestCase):
def testBertTrainingMixedPrecision(self):
expected_losses = [
11.034248352050781,
11.125300407409668,
11.006105422973633,
11.047048568725586,
11.027417182922363,
11.015759468078613,
11.060905456542969,
10.971782684326172,
]
expected_all_finites = [True, True, True, True, True, True, True, True]
expected_eval_loss = [10.959012985229492]
actual_losses, actual_all_finites, actual_eval_loss = runBertTrainingTest(
gradient_accumulation_steps=1,
use_mixed_precision=True,
allreduce_post_accumulation=False,
use_simple_model_desc=False,
)
rtol = 1e-02
assert_allclose(expected_losses, actual_losses, rtol=rtol, err_msg="loss mismatch")
assert_array_equal(expected_all_finites, actual_all_finites, "all_finite mismatch")
assert_allclose(
expected_eval_loss,
actual_eval_loss,
rtol=rtol,
err_msg="evaluation loss mismatch",
)
def testBertTrainingMixedPrecisionInternalLossScale(self):
expected_losses = [
11.034248352050781,
11.125300407409668,
11.006105422973633,
11.047048568725586,
11.027417182922363,
11.015759468078613,
11.060905456542969,
10.971782684326172,
]
expected_eval_loss = [10.959012985229492]
actual_losses, actual_eval_loss = runBertTrainingTest(
gradient_accumulation_steps=1,
use_mixed_precision=True,
allreduce_post_accumulation=False,
use_simple_model_desc=False,
use_internel_loss_scale=True,
)
rtol = 1e-02
assert_allclose(expected_losses, actual_losses, rtol=rtol, err_msg="loss mismatch")
assert_allclose(
expected_eval_loss,
actual_eval_loss,
rtol=rtol,
err_msg="evaluation loss mismatch",
)
def testBertTrainingGradientAccumulationMixedPrecision(self):
expected_losses = [
11.034248352050781,
11.125300407409668,
11.006077766418457,
11.047025680541992,
11.027434349060059,
11.0156831741333,
11.060973167419434,
10.971841812133789,
]
expected_all_finites = [True, True]
expected_eval_loss = [10.95903205871582]
actual_losses, actual_all_finites, actual_eval_loss = runBertTrainingTest(
gradient_accumulation_steps=4,
use_mixed_precision=True,
allreduce_post_accumulation=False,
use_simple_model_desc=False,
)
rtol = 1e-02
assert_allclose(expected_losses, actual_losses, rtol=rtol, err_msg="loss mismatch")
assert_array_equal(expected_all_finites, actual_all_finites, "all_finite mismatch")
assert_allclose(
expected_eval_loss,
actual_eval_loss,
rtol=rtol,
err_msg="evaluation loss mismatch",
)
if __name__ == "__main__":
unittest.main(module=__name__, buffer=True)
| 34.203883
| 91
| 0.637241
| 331
| 3,523
| 6.425982
| 0.265861
| 0.045134
| 0.03385
| 0.039492
| 0.747532
| 0.734368
| 0.722144
| 0.707099
| 0.648801
| 0.648801
| 0
| 0.189015
| 0.29719
| 3,523
| 102
| 92
| 34.539216
| 0.670032
| 0.025263
| 0
| 0.662921
| 0
| 0
| 0.045759
| 0
| 0
| 0
| 0
| 0
| 0.101124
| 1
| 0.033708
| false
| 0
| 0.033708
| 0
| 0.078652
| 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
|
0ba198956d0e6d11135670e7c65db64b0d4da0b8
| 40
|
py
|
Python
|
dark_apis/__init__.py
|
pylixm/darker
|
4a50726d3e61ad021c3a4cb84074ae046494fd7e
|
[
"Apache-2.0"
] | 1
|
2019-12-24T06:22:23.000Z
|
2019-12-24T06:22:23.000Z
|
dark_apis/__init__.py
|
pylixm/darker
|
4a50726d3e61ad021c3a4cb84074ae046494fd7e
|
[
"Apache-2.0"
] | null | null | null |
dark_apis/__init__.py
|
pylixm/darker
|
4a50726d3e61ad021c3a4cb84074ae046494fd7e
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
API 相关实例
"""
| 10
| 23
| 0.425
| 5
| 40
| 3.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03125
| 0.2
| 40
| 4
| 24
| 10
| 0.5
| 0.775
| 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
|
0bb1b1f8593a9da845bed68625dc32b904422537
| 29
|
py
|
Python
|
parse_publicwww.py
|
silverfoxy/JSCryptoMinerStudy
|
abf8817c99c7f87e3a320336aa87c0466b85321d
|
[
"MIT"
] | 7
|
2018-04-03T20:10:23.000Z
|
2021-08-05T03:39:00.000Z
|
parse_publicwww.py
|
silverfoxy/JSCryptoMinerStudy
|
abf8817c99c7f87e3a320336aa87c0466b85321d
|
[
"MIT"
] | null | null | null |
parse_publicwww.py
|
silverfoxy/JSCryptoMinerStudy
|
abf8817c99c7f87e3a320336aa87c0466b85321d
|
[
"MIT"
] | 3
|
2018-05-07T17:06:09.000Z
|
2021-05-15T13:59:53.000Z
|
with open(sys.argv[1]) as f:
| 14.5
| 28
| 0.655172
| 7
| 29
| 2.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04
| 0.137931
| 29
| 1
| 29
| 29
| 0.72
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0bba30ae0be72490e335e0bf3f084cc1c08926e2
| 95
|
py
|
Python
|
class24morn/class24App/apps.py
|
cs-fullstack-2019-fall/django-models-cw-LilPrice-Code
|
202c6d2663583fd0244c91ac830303d8716096f3
|
[
"Apache-2.0"
] | null | null | null |
class24morn/class24App/apps.py
|
cs-fullstack-2019-fall/django-models-cw-LilPrice-Code
|
202c6d2663583fd0244c91ac830303d8716096f3
|
[
"Apache-2.0"
] | null | null | null |
class24morn/class24App/apps.py
|
cs-fullstack-2019-fall/django-models-cw-LilPrice-Code
|
202c6d2663583fd0244c91ac830303d8716096f3
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class Class24AppConfig(AppConfig):
name = 'class24App'
| 15.833333
| 34
| 0.768421
| 10
| 95
| 7.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.05
| 0.157895
| 95
| 5
| 35
| 19
| 0.8625
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 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
|
e7ffe89207f0ba4cd22c4c0fc972d90ce83e532b
| 65
|
py
|
Python
|
numpy/typing/tests/data/fail/modules.py
|
bytesandwich/numpy
|
a2a6d0d24d99703ded59c31b98b259900469762f
|
[
"BSD-3-Clause"
] | 1
|
2020-08-18T15:22:45.000Z
|
2020-08-18T15:22:45.000Z
|
numpy/typing/tests/data/fail/modules.py
|
bytesandwich/numpy
|
a2a6d0d24d99703ded59c31b98b259900469762f
|
[
"BSD-3-Clause"
] | 3
|
2020-08-14T14:23:54.000Z
|
2020-08-18T20:40:35.000Z
|
numpy/typing/tests/data/fail/modules.py
|
bytesandwich/numpy
|
a2a6d0d24d99703ded59c31b98b259900469762f
|
[
"BSD-3-Clause"
] | null | null | null |
import numpy as np
np.testing.bob # E: Module has no attribute
| 16.25
| 44
| 0.738462
| 12
| 65
| 4
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 65
| 3
| 45
| 21.666667
| 0.923077
| 0.4
| 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
|
f00132729862902e040157163de85c3f4a3baf14
| 122
|
py
|
Python
|
tests/asp/weakConstraints/optimization.example4.nonground.gringo.test.py
|
bernardocuteri/wasp
|
05c8f961776dbdbf7afbf905ee00fc262eba51ad
|
[
"Apache-2.0"
] | 19
|
2015-12-03T08:53:45.000Z
|
2022-03-31T02:09:43.000Z
|
tests/asp/weakConstraints/optimization.example4.nonground.gringo.test.py
|
bernardocuteri/wasp
|
05c8f961776dbdbf7afbf905ee00fc262eba51ad
|
[
"Apache-2.0"
] | 80
|
2017-11-25T07:57:32.000Z
|
2018-06-10T19:03:30.000Z
|
tests/asp/weakConstraints/optimization.example4.nonground.gringo.test.py
|
bernardocuteri/wasp
|
05c8f961776dbdbf7afbf905ee00fc262eba51ad
|
[
"Apache-2.0"
] | 6
|
2015-01-15T07:51:48.000Z
|
2020-06-18T14:47:48.000Z
|
input = """
8 2 2 3 0 0
8 2 4 5 0 0
1 1 1 1 4
6 0 1 0 4 1
0
4 c
3 b
2 a
5 d
0
B+
0
B-
1
0
1
"""
output = """
COST 1@1
"""
| 5.545455
| 12
| 0.459016
| 44
| 122
| 1.272727
| 0.340909
| 0.142857
| 0.107143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.479452
| 0.401639
| 122
| 21
| 13
| 5.809524
| 0.287671
| 0
| 0
| 0.095238
| 0
| 0
| 0.745902
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f01e6aec63f4e4b12284f3fe078da5c9473751ab
| 4,742
|
py
|
Python
|
win/devkit/other/pymel/extras/completion/py/maya/analytics/analyticGPUTweaks.py
|
leegoonz/Maya-devkit
|
b81fe799b58e854e4ef16435426d60446e975871
|
[
"ADSL"
] | 10
|
2018-03-30T16:09:02.000Z
|
2021-12-07T07:29:19.000Z
|
win/devkit/other/pymel/extras/completion/py/maya/analytics/analyticGPUTweaks.py
|
leegoonz/Maya-devkit
|
b81fe799b58e854e4ef16435426d60446e975871
|
[
"ADSL"
] | null | null | null |
win/devkit/other/pymel/extras/completion/py/maya/analytics/analyticGPUTweaks.py
|
leegoonz/Maya-devkit
|
b81fe799b58e854e4ef16435426d60446e975871
|
[
"ADSL"
] | 9
|
2018-06-02T09:18:49.000Z
|
2021-12-20T09:24:35.000Z
|
from . import BaseAnalytic
from maya.analytics.analyticGPUDeformers import *
class analyticGPUTweaks(maya.analytics.BaseAnalytic.BaseAnalytic):
"""
Analyze the usage mode of tweak node.
"""
def run(self, showDetails=False):
"""
Examine animated tweak nodes and check how they are used. It checks
whether they use the relative or absolute mode and whether individual
tweaks themselves are actually used.
When 'showDetails' is False, the default, then the CSV columns are:
TweakType : Description of the usage for the animated tweak node
Relative : Value of the relativeTweak attribute of the animated tweak nodes meeting this criteria
UsesTweaks : True if tweaks are used in the nodes meeting this criteria
UsesMesh : True if some of the geometry processed by animated tweak nodes meeting this criteria is a mesh
Count : Number of animated tweak nodes meeting this criteria
When 'showDetails' is True, then the CSV columns are:
TweakNode : Name of the animated tweak node
Relative : Value of the relativeTweak attribute of the animated tweak node
UsesTweaks : True if tweaks are used in the node
UsesMesh : True if some of the geometry processed by animated tweak node is a mesh
One row is output for every animated tweak node.
Return True if the analysis succeeded, else False
"""
pass
def help():
"""
Call this method to print the class documentation, including all methods.
"""
pass
ANALYTIC_NAME = 'GPUTweaks'
__fulldocs__ = "Analyze the usage mode of tweak node.\nBase class for output for analytics.\n\nThe default location for the anlaytic output is in a subdirectory\ncalled 'MayaAnalytics' in your temp directory. You can change that\nat any time by calling setOutputDirectory().\n\nClass static member:\n\t ANALYTIC_NAME\t: Name of the analytic\n\nClass members:\n\t director\t\t: Directory the output will go to\n\t fileName\t\t: Name of the file for this analytic\n\t fileState\t\t: Is the output stream currently opened?\n\t\t\t\t\t If FILE_DEFAULT then it isn't openable\n\t outputFile\t\t: Output File object for writing the results\n\n\tMethods\n\t-------\n\thelp : Call this method to print the class documentation, including all methods.\n\n\toutputExists : Checks to see if this analytic already has existing output at\n\t the current directory location. If stdout/stderr this is always\n\t false, otherwise it checks for the existence of a non-zero sized\n\t output file. (All legal output will at least have a header line,\n\t and we may have touched the file to create it in the call to\n\t setOutputDirectory().\n\n\trun : Examine animated tweak nodes and check how they are used. It checks\n\t whether they use the relative or absolute mode and whether individual\n\t tweaks themselves are actually used.\n\t \n\t When 'showDetails' is False, the default, then the CSV columns are:\n\t \n\t \tTweakType\t\t: Description of the usage for the animated tweak node\n\t \tRelative\t\t: Value of the relativeTweak attribute of the animated tweak nodes meeting this criteria\n\t \tUsesTweaks\t\t: True if tweaks are used in the nodes meeting this criteria\n\t \tUsesMesh\t\t: True if some of the geometry processed by animated tweak nodes meeting this criteria is a mesh\n\t \tCount\t\t\t: Number of animated tweak nodes meeting this criteria\n\t \n\t When 'showDetails' is True, then the CSV columns are:\n\t \n\t \tTweakNode\t\t: Name of the animated tweak node\n\t \tRelative\t\t: Value of the relativeTweak attribute of the animated tweak node\n\t \tUsesTweaks\t\t: True if tweaks are used in the node\n\t \tUsesMesh\t\t: True if some of the geometry processed by animated tweak node is a mesh\n\t \n\t One row is output for every animated tweak node.\n\t \n\t Return True if the analysis succeeded, else False\n\n\tsetOutputDirectory : Call this method to set a specific directory as the output location.\n\t The special names 'stdout' and 'stderr' are recognized as the\n\t output and error streams respectively rather than a directory.\n"
isAnalytic = True
| 80.372881
| 2,769
| 0.658161
| 698
| 4,742
| 4.461318
| 0.253582
| 0.022479
| 0.054592
| 0.061657
| 0.609184
| 0.583173
| 0.579961
| 0.558125
| 0.485549
| 0.416185
| 0
| 0
| 0.28469
| 4,742
| 58
| 2,770
| 81.758621
| 0.918042
| 0.289119
| 0
| 0.2
| 0
| 0.1
| 0.878585
| 0.049076
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 0.2
| 0
| 0.8
| 0.1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
b2b2ff817116ccb35a441ca93c19fae4343e9de0
| 947
|
py
|
Python
|
tests/test_time.py
|
seyfahni/desky
|
abaea13a7b89a8f11864155cbe3d3ff37b0950a9
|
[
"MIT"
] | null | null | null |
tests/test_time.py
|
seyfahni/desky
|
abaea13a7b89a8f11864155cbe3d3ff37b0950a9
|
[
"MIT"
] | null | null | null |
tests/test_time.py
|
seyfahni/desky
|
abaea13a7b89a8f11864155cbe3d3ff37b0950a9
|
[
"MIT"
] | null | null | null |
import unittest
from desktop_buddy import time
class TimeParseTest(unittest.TestCase):
def test_parse_milli_seconds_with_abbreviated_unit(self):
parsed = time.parse_time_duration('23ms')
self.assertEqual(23, parsed)
def test_parse_milli_seconds_with_full_unit(self):
parsed = time.parse_time_duration('23milliseconds')
self.assertEqual(23, parsed)
def test_parse_milli_seconds_with_short_unit(self):
parsed = time.parse_time_duration('23mil')
self.assertEqual(23, parsed)
def test_parse_seconds_no_unit(self):
parsed = time.parse_time_duration('23')
self.assertEqual(23000, parsed)
def test_parse_seconds_with_short_unit(self):
parsed = time.parse_time_duration('23s')
self.assertEqual(23000, parsed)
def test_parse_seconds_full_unit(self):
parsed = time.parse_time_duration('23seconds')
self.assertEqual(23000, parsed)
| 32.655172
| 61
| 0.726505
| 120
| 947
| 5.366667
| 0.258333
| 0.065217
| 0.111801
| 0.167702
| 0.767081
| 0.756211
| 0.712733
| 0.549689
| 0.299689
| 0.299689
| 0
| 0.042857
| 0.186906
| 947
| 28
| 62
| 33.821429
| 0.793506
| 0
| 0
| 0.285714
| 0
| 0
| 0.039071
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 1
| 0.285714
| false
| 0
| 0.095238
| 0
| 0.428571
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b2b30961c05a76d5d878dc595c3376529b5eb0cb
| 232
|
py
|
Python
|
extra_tests/snippets/iterations.py
|
tai271828/RustPython
|
9fb70707c4803f9f6d79dd4c8077bd16f0a9be45
|
[
"CC-BY-4.0",
"MIT"
] | 11,058
|
2018-05-29T07:40:06.000Z
|
2022-03-31T11:38:42.000Z
|
extra_tests/snippets/iterations.py
|
tai271828/RustPython
|
9fb70707c4803f9f6d79dd4c8077bd16f0a9be45
|
[
"CC-BY-4.0",
"MIT"
] | 2,105
|
2018-06-01T10:07:16.000Z
|
2022-03-31T14:56:42.000Z
|
extra_tests/snippets/iterations.py
|
tai271828/RustPython
|
9fb70707c4803f9f6d79dd4c8077bd16f0a9be45
|
[
"CC-BY-4.0",
"MIT"
] | 914
|
2018-07-27T09:36:14.000Z
|
2022-03-31T19:56:34.000Z
|
ls = [1, 2, 3]
i = iter(ls)
assert i.__next__() == 1
assert i.__next__() == 2
assert next(i) == 3
assert next(i, 'w00t') == 'w00t'
s = '你好'
i = iter(s)
i.__setstate__(1)
assert i.__next__() == '好'
assert i.__reduce__()[2] == 2
| 13.647059
| 32
| 0.573276
| 41
| 232
| 2.756098
| 0.341463
| 0.247788
| 0.292035
| 0.212389
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069519
| 0.193966
| 232
| 16
| 33
| 14.5
| 0.534759
| 0
| 0
| 0
| 0
| 0
| 0.047826
| 0
| 0
| 0
| 0
| 0
| 0.545455
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b2c6755b0f5370f992316200cf55180e392996cb
| 3,454
|
py
|
Python
|
env/lib/python3.6/site-packages/odf/office.py
|
anthowen/duplify
|
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
|
[
"MIT"
] | 5,079
|
2015-01-01T03:39:46.000Z
|
2022-03-31T07:38:22.000Z
|
env/lib/python3.6/site-packages/odf/office.py
|
anthowen/duplify
|
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
|
[
"MIT"
] | 1,623
|
2015-01-01T08:06:24.000Z
|
2022-03-30T19:48:52.000Z
|
env/lib/python3.6/site-packages/odf/office.py
|
anthowen/duplify
|
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
|
[
"MIT"
] | 2,033
|
2015-01-04T07:18:02.000Z
|
2022-03-28T19:55:47.000Z
|
# -*- coding: utf-8 -*-
# Copyright (C) 2006-2013 Søren Roug, European Environment Agency
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# Contributor(s):
#
from odf.namespaces import OFFICENS
from odf.element import Element
from odf.draw import StyleRefElement
# Autogenerated
def Annotation(**args):
return StyleRefElement(qname = (OFFICENS,'annotation'), **args)
def AnnotationEnd(**args):
return StyleRefElement(qname = (OFFICENS,'annotation-end'), **args)
def AutomaticStyles(**args):
return Element(qname = (OFFICENS, 'automatic-styles'), **args)
def BinaryData(**args):
return Element(qname = (OFFICENS,'binary-data'), **args)
def Body(**args):
return Element(qname = (OFFICENS, 'body'), **args)
def ChangeInfo(**args):
return Element(qname = (OFFICENS,'change-info'), **args)
def Chart(**args):
return Element(qname = (OFFICENS,'chart'), **args)
def DdeSource(**args):
return Element(qname = (OFFICENS,'dde-source'), **args)
def Document(version="1.2", **args):
return Element(qname = (OFFICENS,'document'), version=version, **args)
def DocumentContent(version="1.2", **args):
return Element(qname = (OFFICENS, 'document-content'), version=version, **args)
def DocumentMeta(version="1.2", **args):
return Element(qname = (OFFICENS, 'document-meta'), version=version, **args)
def DocumentSettings(version="1.2", **args):
return Element(qname = (OFFICENS, 'document-settings'), version=version, **args)
def DocumentStyles(version="1.2", **args):
return Element(qname = (OFFICENS, 'document-styles'), version=version, **args)
def Drawing(**args):
return Element(qname = (OFFICENS,'drawing'), **args)
def EventListeners(**args):
return Element(qname = (OFFICENS,'event-listeners'), **args)
def FontFaceDecls(**args):
return Element(qname = (OFFICENS, 'font-face-decls'), **args)
def Forms(**args):
return Element(qname = (OFFICENS,'forms'), **args)
def Image(**args):
return Element(qname = (OFFICENS,'image'), **args)
def MasterStyles(**args):
return Element(qname = (OFFICENS, 'master-styles'), **args)
def Meta(**args):
return Element(qname = (OFFICENS, 'meta'), **args)
def Presentation(**args):
return Element(qname = (OFFICENS,'presentation'), **args)
def Script(**args):
return Element(qname = (OFFICENS, 'script'), **args)
def Scripts(**args):
return Element(qname = (OFFICENS, 'scripts'), **args)
def Settings(**args):
return Element(qname = (OFFICENS, 'settings'), **args)
def Spreadsheet(**args):
return Element(qname = (OFFICENS, 'spreadsheet'), **args)
def Styles(**args):
return Element(qname = (OFFICENS, 'styles'), **args)
def Text(**args):
return Element(qname = (OFFICENS, 'text'), **args)
# Autogenerated end
| 31.981481
| 84
| 0.693399
| 432
| 3,454
| 5.543981
| 0.335648
| 0.112735
| 0.177453
| 0.229645
| 0.43048
| 0.179958
| 0.126514
| 0.098121
| 0.098121
| 0
| 0
| 0.010903
| 0.150261
| 3,454
| 107
| 85
| 32.280374
| 0.805111
| 0.241749
| 0
| 0
| 0
| 0
| 0.108972
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.473684
| false
| 0
| 0.052632
| 0.473684
| 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
|
b2cf37b4f0370787c498cefdfe6f7878b65cc7b4
| 169
|
py
|
Python
|
02_extended_boolean_search/utils.py
|
ilivans/information-retrieval
|
5370459e36f0505661431869f5fcfcb531273970
|
[
"MIT"
] | 4
|
2017-11-01T03:09:41.000Z
|
2019-06-07T16:25:07.000Z
|
02_extended_boolean_search/utils.py
|
ilivans/information-retrieval
|
5370459e36f0505661431869f5fcfcb531273970
|
[
"MIT"
] | null | null | null |
02_extended_boolean_search/utils.py
|
ilivans/information-retrieval
|
5370459e36f0505661431869f5fcfcb531273970
|
[
"MIT"
] | null | null | null |
from nltk.tokenize import RegexpTokenizer
tokenize = RegexpTokenizer("\w+").tokenize
PICKLE_PATH = "stuff.pkl"
def get_terms(text):
return tokenize(text.lower())
| 18.777778
| 42
| 0.751479
| 21
| 169
| 5.952381
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12426
| 169
| 8
| 43
| 21.125
| 0.844595
| 0
| 0
| 0
| 0
| 0
| 0.071006
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
b2dcf041b1a4cabc3608a1451a90da1b1a642804
| 84
|
py
|
Python
|
characters/Megamente.py
|
Alfred-CQ/Git_Taller_Grupo11
|
c767d4ed54d95d0244a64fc50ffce5e8ba7abb82
|
[
"Apache-2.0"
] | null | null | null |
characters/Megamente.py
|
Alfred-CQ/Git_Taller_Grupo11
|
c767d4ed54d95d0244a64fc50ffce5e8ba7abb82
|
[
"Apache-2.0"
] | 1
|
2021-06-12T23:44:26.000Z
|
2021-06-12T23:47:46.000Z
|
characters/Megamente.py
|
Alfred-CQ/Git_Taller_Grupo11
|
c767d4ed54d95d0244a64fc50ffce5e8ba7abb82
|
[
"Apache-2.0"
] | 5
|
2021-06-12T22:27:13.000Z
|
2021-06-12T22:36:51.000Z
|
class Megamente:
def SayName(self):
print("Lo logró señor. Lo logré!?")
| 21
| 43
| 0.619048
| 11
| 84
| 4.727273
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 84
| 3
| 44
| 28
| 0.825397
| 0
| 0
| 0
| 0
| 0
| 0.309524
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
b2dda3f6ad43e373d4b7b3ecad7551a92893af60
| 76
|
py
|
Python
|
python/smqtk/algorithms/descriptor_generator/colordescriptor/__init__.py
|
joshanderson-kw/SMQTK
|
594e7c733fe7f4e514a1a08a7343293a883a41fc
|
[
"BSD-3-Clause"
] | 82
|
2015-01-07T15:33:29.000Z
|
2021-08-11T18:34:05.000Z
|
python/smqtk/algorithms/descriptor_generator/colordescriptor/__init__.py
|
joshanderson-kw/SMQTK
|
594e7c733fe7f4e514a1a08a7343293a883a41fc
|
[
"BSD-3-Clause"
] | 230
|
2015-04-08T14:36:51.000Z
|
2022-03-14T17:55:30.000Z
|
python/smqtk/algorithms/descriptor_generator/colordescriptor/__init__.py
|
joshanderson-kw/SMQTK
|
594e7c733fe7f4e514a1a08a7343293a883a41fc
|
[
"BSD-3-Clause"
] | 65
|
2015-01-04T15:00:16.000Z
|
2021-11-19T18:09:11.000Z
|
from .colordescriptor import cd_type_list
SMQTK_PLUGIN_CLASS = cd_type_list
| 25.333333
| 41
| 0.881579
| 12
| 76
| 5.083333
| 0.75
| 0.196721
| 0.327869
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092105
| 76
| 2
| 42
| 38
| 0.884058
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b2f1eb49c5f7a2705cd8c9a97b1cec5e6642947f
| 2,651
|
py
|
Python
|
clients/python-experimental/generated/openapi_client/api/remote_access_api.py
|
cliffano/jenkins-api-clients-generator
|
522d02b3a130a29471df5ec1d3d22c822b3d0813
|
[
"MIT"
] | null | null | null |
clients/python-experimental/generated/openapi_client/api/remote_access_api.py
|
cliffano/jenkins-api-clients-generator
|
522d02b3a130a29471df5ec1d3d22c822b3d0813
|
[
"MIT"
] | null | null | null |
clients/python-experimental/generated/openapi_client/api/remote_access_api.py
|
cliffano/jenkins-api-clients-generator
|
522d02b3a130a29471df5ec1d3d22c822b3d0813
|
[
"MIT"
] | null | null | null |
# coding: utf-8
"""
Swaggy Jenkins
Jenkins API clients generated from Swagger / Open API specification # noqa: E501
The version of the OpenAPI document: 1.1.2-pre.0
Contact: blah@cliffano.com
Generated by: https://openapi-generator.tech
"""
from openapi_client.api_client import ApiClient
from openapi_client.api.remote_access_api_endpoints.get_computer import GetComputer
from openapi_client.api.remote_access_api_endpoints.get_jenkins import GetJenkins
from openapi_client.api.remote_access_api_endpoints.get_job import GetJob
from openapi_client.api.remote_access_api_endpoints.get_job_config import GetJobConfig
from openapi_client.api.remote_access_api_endpoints.get_job_last_build import GetJobLastBuild
from openapi_client.api.remote_access_api_endpoints.get_job_progressive_text import GetJobProgressiveText
from openapi_client.api.remote_access_api_endpoints.get_queue import GetQueue
from openapi_client.api.remote_access_api_endpoints.get_queue_item import GetQueueItem
from openapi_client.api.remote_access_api_endpoints.get_view import GetView
from openapi_client.api.remote_access_api_endpoints.get_view_config import GetViewConfig
from openapi_client.api.remote_access_api_endpoints.head_jenkins import HeadJenkins
from openapi_client.api.remote_access_api_endpoints.post_create_item import PostCreateItem
from openapi_client.api.remote_access_api_endpoints.post_create_view import PostCreateView
from openapi_client.api.remote_access_api_endpoints.post_job_build import PostJobBuild
from openapi_client.api.remote_access_api_endpoints.post_job_config import PostJobConfig
from openapi_client.api.remote_access_api_endpoints.post_job_delete import PostJobDelete
from openapi_client.api.remote_access_api_endpoints.post_job_disable import PostJobDisable
from openapi_client.api.remote_access_api_endpoints.post_job_enable import PostJobEnable
from openapi_client.api.remote_access_api_endpoints.post_job_last_build_stop import PostJobLastBuildStop
from openapi_client.api.remote_access_api_endpoints.post_view_config import PostViewConfig
class RemoteAccessApi(
GetComputer,
GetJenkins,
GetJob,
GetJobConfig,
GetJobLastBuild,
GetJobProgressiveText,
GetQueue,
GetQueueItem,
GetView,
GetViewConfig,
HeadJenkins,
PostCreateItem,
PostCreateView,
PostJobBuild,
PostJobConfig,
PostJobDelete,
PostJobDisable,
PostJobEnable,
PostJobLastBuildStop,
PostViewConfig,
ApiClient,
):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
pass
| 40.784615
| 105
| 0.843078
| 346
| 2,651
| 6.112717
| 0.251445
| 0.10922
| 0.168794
| 0.198582
| 0.47565
| 0.47565
| 0.47565
| 0.47565
| 0.454846
| 0.387707
| 0
| 0.00339
| 0.10977
| 2,651
| 64
| 106
| 41.421875
| 0.892797
| 0.135421
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.022222
| 0.466667
| 0
| 0.488889
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
65496f4fb024994ce25095056ef37812b1350c8c
| 5,364
|
py
|
Python
|
mmtbx/hydrogens/tst_add_hydrogen_2.py
|
rimmartin/cctbx_project
|
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
mmtbx/hydrogens/tst_add_hydrogen_2.py
|
rimmartin/cctbx_project
|
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
mmtbx/hydrogens/tst_add_hydrogen_2.py
|
rimmartin/cctbx_project
|
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
|
[
"BSD-3-Clause-LBNL"
] | null | null | null |
from __future__ import division, print_function
import time
import mmtbx.model
import iotbx.pdb
import mmtbx.hydrogens
from libtbx.utils import null_out
def run():
correct_H_position_with_cdl()
def compare_models(pdb_str,
contains = None,
not_contains = None,
number_h = None):
#
pdb_inp = iotbx.pdb.input(lines=pdb_str.split("\n"), source_info=None)
model_initial = mmtbx.model.manager(model_input = pdb_inp, log = null_out())
xrs = model_initial.get_xray_structure()
hd_sel_initial = model_initial.get_hd_selection()
number_h_expected = hd_sel_initial.count(True)
model_without_h = model_initial.select(~hd_sel_initial)
hd_sel_without_h = model_without_h.get_hd_selection()
assert (hd_sel_without_h is not None)
assert (hd_sel_without_h.count(True) == 0)
model_h_added = mmtbx.hydrogens.add(model = model_without_h)
hd_sel_h_added = model_h_added.get_hd_selection()
number_h_added = hd_sel_h_added.count(True)
ph_initial = model_initial.get_hierarchy()
ph_h_added = model_h_added.get_hierarchy()
assert ph_initial.is_similar_hierarchy(other=ph_h_added)
if number_h:
assert(number_h == number_h_added)
if not_contains:
h_atoms_added = model_h_added.get_hierarchy().select(hd_sel_h_added).atoms()
h_names_added = list(h_atoms_added.extract_name())
assert (not_contains not in h_names_added)
if contains:
h_atoms_added = model_h_added.get_hierarchy().select(hd_sel_h_added).atoms()
h_names_added = list(h_atoms_added.extract_name())
assert (contains in h_names_added)
def correct_H_position_with_cdl():
compare_models(pdb_str = pdb_str_1)
pdb_str_1 = """
CRYST1 72.240 72.010 86.990 90.00 90.00 90.00 P 21 21 21
SCALE1 0.013843 0.000000 0.000000 0.00000
SCALE2 0.000000 0.013887 0.000000 0.00000
SCALE3 0.000000 0.000000 0.011496 0.00000
ATOM 1 N PRO H 14 52.628 -74.147 33.427 1.00 20.43 N
ATOM 2 CA PRO H 14 53.440 -73.630 34.533 1.00 20.01 C
ATOM 3 C PRO H 14 54.482 -72.584 34.124 1.00 20.76 C
ATOM 4 O PRO H 14 55.025 -72.627 33.021 1.00 16.34 O
ATOM 5 CB PRO H 14 54.055 -74.895 35.134 1.00 22.06 C
ATOM 6 CG PRO H 14 54.084 -75.862 33.972 1.00 25.16 C
ATOM 7 CD PRO H 14 52.770 -75.608 33.294 1.00 17.36 C
ATOM 8 HD2 PRO H 14 52.801 -75.872 32.361 1.00 17.36 H
ATOM 9 HD1 PRO H 14 52.048 -76.072 33.746 1.00 17.36 H
ATOM 10 HG2 PRO H 14 54.830 -75.664 33.385 1.00 25.16 H
ATOM 11 HG1 PRO H 14 54.147 -76.775 34.292 1.00 25.16 H
ATOM 12 HA PRO H 14 52.877 -73.212 35.203 1.00 20.01 H
ATOM 13 HB1 PRO H 14 54.949 -74.711 35.461 1.00 22.06 H
ATOM 14 HB2 PRO H 14 53.499 -75.228 35.856 1.00 22.06 H
ATOM 15 N SER H 15 54.727 -71.646 35.038 1.00 21.70 N
ATOM 16 CA SER H 15 55.670 -70.537 34.874 1.00 25.33 C
ATOM 17 C SER H 15 55.049 -69.401 34.057 1.00 24.78 C
ATOM 18 O SER H 15 55.581 -68.291 34.023 1.00 27.51 O
ATOM 19 CB SER H 15 56.982 -71.005 34.219 1.00 25.20 C
ATOM 20 OG SER H 15 56.914 -70.938 32.802 1.00 28.91 O
ATOM 21 H SER H 15 54.335 -71.634 35.803 1.00 21.70 H
ATOM 22 HA SER H 15 55.899 -70.163 35.739 1.00 25.33 H
ATOM 23 HB1 SER H 15 57.705 -70.434 34.524 1.00 25.20 H
ATOM 24 HG SER H 15 56.225 -70.518 32.567 1.00 28.91 H
ATOM 25 HB2 SER H 15 57.151 -71.924 34.481 1.00 25.20 H
ATOM 26 N GLN H 16 53.918 -69.678 33.412 1.00 24.55 N
ATOM 27 CA GLN H 16 53.224 -68.673 32.611 1.00 29.39 C
ATOM 28 C GLN H 16 52.340 -67.778 33.475 1.00 28.13 C
ATOM 29 O GLN H 16 52.234 -67.987 34.681 1.00 26.35 O
ATOM 30 CB GLN H 16 52.371 -69.346 31.533 1.00 31.67 C
ATOM 31 CG GLN H 16 53.196 -70.112 30.524 1.00 44.80 C
ATOM 32 CD GLN H 16 54.379 -69.303 30.030 1.00 48.55 C
ATOM 33 OE1 GLN H 16 54.213 -68.269 29.386 1.00 52.45 O
ATOM 34 NE2 GLN H 16 55.584 -69.766 30.342 1.00 55.07 N
ATOM 35 H GLN H 16 53.530 -70.445 33.423 1.00 24.55 H
ATOM 36 HG2 GLN H 16 53.533 -70.922 30.937 1.00 44.80 H
ATOM 37 HG1 GLN H 16 52.641 -70.335 29.761 1.00 44.80 H
ATOM 38 HE22 GLN H 16 55.661 -70.489 30.801 1.00 55.07 H
ATOM 39 HE21 GLN H 16 56.287 -69.343 30.085 1.00 55.07 H
ATOM 40 HA GLN H 16 53.888 -68.112 32.179 1.00 29.39 H
ATOM 41 HB1 GLN H 16 51.871 -68.665 31.056 1.00 31.67 H
ATOM 42 HB2 GLN H 16 51.761 -69.970 31.957 1.00 31.67 H
TER
"""
if (__name__ == "__main__"):
t0 = time.time()
run()
print("OK. Time: %8.3f"%(time.time()-t0))
| 49.211009
| 80
| 0.563945
| 1,042
| 5,364
| 2.774472
| 0.285988
| 0.043584
| 0.035282
| 0.016603
| 0.199239
| 0.140782
| 0.074023
| 0.074023
| 0.074023
| 0.074023
| 0
| 0.3524
| 0.351417
| 5,364
| 108
| 81
| 49.666667
| 0.478586
| 0
| 0
| 0.043478
| 0
| 0.467391
| 0.66791
| 0
| 0
| 0
| 0
| 0
| 0.065217
| 1
| 0.032609
| false
| 0
| 0.065217
| 0
| 0.097826
| 0.021739
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e8e68441218d736dbce1e1fd51aaddd3a69b6b3a
| 13,128
|
py
|
Python
|
tests/_expression/test_expression_data_util.py
|
ynsnf/apysc
|
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
|
[
"MIT"
] | 16
|
2021-04-16T02:01:29.000Z
|
2022-01-01T08:53:49.000Z
|
tests/_expression/test_expression_data_util.py
|
ynsnf/apysc
|
b10ffaf76ec6beb187477d0a744fca00e3efc3fb
|
[
"MIT"
] | 613
|
2021-03-24T03:37:38.000Z
|
2022-03-26T10:58:37.000Z
|
tests/_expression/test_expression_data_util.py
|
simon-ritchie/apyscript
|
c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279
|
[
"MIT"
] | 2
|
2021-06-20T07:32:58.000Z
|
2021-12-26T08:22:11.000Z
|
from random import randint
from typing import List
from typing import Optional
from typing import Tuple
from retrying import retry
import apysc as ap
from apysc._expression import event_handler_scope
from apysc._expression import expression_data_util
from apysc._expression import indent_num
from apysc._expression.expression_data_util import _LimitClauseCantUseError
from apysc._expression.indent_num import Indent
from apysc._type.variable_name_interface import VariableNameInterface
from tests.testing_helper import assert_raises
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test_get_current_expression() -> None:
expression_data_util.empty_expression()
ap.append_js_expression(
expression='console.log("Hello!");'
)
expression: str = expression_data_util.get_current_expression()
assert expression == 'console.log("Hello!");'
expression_data_util.empty_expression()
expression = expression_data_util.get_current_expression()
assert expression == ''
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test_append_js_expression() -> None:
indent_num.reset()
expression_data_util.empty_expression()
ap.append_js_expression(
expression='var num = 100;\nvar str = "test";')
select_query: str = (
'SELECT txt FROM '
f'{expression_data_util.TableName.EXPRESSION_NORMAL.value};'
)
expression_data_util.exec_query(sql=select_query)
result_1: Optional[Tuple[str]] = expression_data_util.cursor.fetchone()
if result_1 is None:
raise AssertionError('result value is None.')
expected: str = 'var num = 100;\nvar str = "test";'
assert expected in result_1[0]
expression_data_util.empty_expression()
with Indent():
ap.append_js_expression(
expression=('var num_1 = 10;\nvar str_1 = "test";'))
expression_data_util.exec_query(sql=select_query)
result_2: Optional[Tuple[str]] = expression_data_util.cursor.fetchone()
if result_2 is None:
raise AssertionError('result value is None.')
expected = (
' var num_1 = 10;'
'\n var str_1 = "test";'
)
assert expected in result_2[0]
ap.append_js_expression(expression='var num_2 = 20;')
expression_data_util.exec_query(sql=select_query)
result_3: List[Tuple[str]] = expression_data_util.cursor.fetchall()
assert len(result_3) == 2
assert result_3[-1][0] == 'var num_2 = 20;'
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__get_current_expression() -> None:
expression_data_util.empty_expression()
current_expression: str = expression_data_util._get_current_expression(
table_name=expression_data_util.TableName.EXPRESSION_NORMAL)
assert current_expression == ''
ap.append_js_expression(
expression='console.log("Hello!");')
current_expression = expression_data_util._get_current_expression(
table_name=expression_data_util.TableName.EXPRESSION_NORMAL)
assert current_expression == 'console.log("Hello!");'
ap.append_js_expression(
expression='console.log("World!");')
current_expression = expression_data_util._get_current_expression(
table_name=expression_data_util.TableName.EXPRESSION_NORMAL)
assert current_expression == \
'console.log("Hello!");\nconsole.log("World!");'
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test_get_current_event_handler_scope_expression() -> None:
expression_data_util.empty_expression()
instance: VariableNameInterface = VariableNameInterface()
instance.variable_name = 'test_instance'
with event_handler_scope.HandlerScope(
handler_name='test_handler_1', instance=instance):
expression_data_util.append_js_expression(
expression='console.log("Hello!");')
current_expression: str = expression_data_util.\
get_current_event_handler_scope_expression()
assert current_expression == 'console.log("Hello!");'
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_expression_normal_table() -> None:
expression_data_util._create_expression_normal_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.EXPRESSION_NORMAL)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__table_exists() -> None:
expression_data_util._create_expression_normal_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.EXPRESSION_NORMAL)
assert result
result = expression_data_util._table_exists(
table_name=expression_data_util.TableName.NOT_EXISTING)
assert not result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test_initialize_sqlite_tables_if_not_initialized() -> None:
expression_data_util.initialize_sqlite_tables_if_not_initialized()
query: str = (
'DROP TABLE IF EXISTS '
f'{expression_data_util.TableName.EXPRESSION_NORMAL.value};')
expression_data_util.cursor.execute(query)
expression_data_util.connection.commit()
initialized: bool = expression_data_util.\
initialize_sqlite_tables_if_not_initialized()
assert initialized
table_exists: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.EXPRESSION_NORMAL)
assert table_exists
initialized = expression_data_util.\
initialize_sqlite_tables_if_not_initialized()
assert not initialized
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__make_create_table_query() -> None:
query: str = expression_data_util._make_create_table_query(
table_name=expression_data_util.TableName.EXPRESSION_HANDLER,
column_ddl=' id INTEGER,\n name TEXT')
expected: str = (
'CREATE TABLE IF NOT EXISTS '
f'{expression_data_util.TableName.EXPRESSION_HANDLER.value} ('
'\n id INTEGER,'
'\n name TEXT'
'\n);'
)
assert query == expected
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_expression_handler_table() -> None:
expression_data_util._create_expression_handler_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.EXPRESSION_HANDLER)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_indent_num_normal_table() -> None:
expression_data_util._create_indent_num_normal_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.INDENT_NUM_NORMAL)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_indent_num_handler_table() -> None:
expression_data_util._create_indent_num_handler_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.INDENT_NUM_HANDLER)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_last_scope_table() -> None:
expression_data_util._create_last_scope_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.LAST_SCOPE)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_event_handler_scope_count_table() -> None:
expression_data_util._create_event_handler_scope_count_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.EVENT_HANDLER_SCOPE_COUNT)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_loop_count_table() -> None:
expression_data_util._create_loop_count_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.LOOP_COUNT)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_debug_mode_setting_table() -> None:
expression_data_util._create_debug_mode_setting_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.DEBUG_MODE_SETTING)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test_empty_expression() -> None:
expression_data_util._create_expression_normal_table()
expression_data_util.cursor.execute(
'INSERT INTO '
f'{expression_data_util.TableName.EXPRESSION_NORMAL.value}'
'(txt) VALUES ("test_text");')
expression_data_util.empty_expression()
expression_data_util.exec_query(
sql=(
'SELECT * FROM '
f'{expression_data_util.TableName.EXPRESSION_NORMAL.value} '
'LIMIT 1;'
))
result: Optional[Tuple] = expression_data_util.cursor.fetchone()
assert result is None
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__get_expression_table_name() -> None:
instance: VariableNameInterface = VariableNameInterface()
instance.variable_name = 'test_instance'
with event_handler_scope.HandlerScope(
handler_name='test_handler_1', instance=instance):
table_name: expression_data_util.TableName = expression_data_util.\
_get_expression_table_name()
assert table_name == expression_data_util.TableName.EXPRESSION_HANDLER
table_name = expression_data_util._get_expression_table_name()
assert table_name == expression_data_util.TableName.EXPRESSION_NORMAL
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_debug_mode_callable_count_table() -> None:
expression_data_util._create_debug_mode_setting_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.DEBUG_MODE_CALLABLE_COUNT)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_stage_elem_id_table() -> None:
expression_data_util._create_stage_elem_id_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.STAGE_ELEM_ID)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_variable_name_count_table() -> None:
expression_data_util._create_variable_name_count_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.VARIABLE_NAME_COUNT)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_handler_calling_stack_table() -> None:
expression_data_util._create_handler_calling_stack_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.HANDLER_CALLING_STACK)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_circular_calling_handler_name_table() -> None:
expression_data_util._create_circular_calling_handler_name_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.
CIRCULAR_CALLING_HANDLER_NAME)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__create_stage_id_table() -> None:
expression_data_util._create_stage_id_table()
result: bool = expression_data_util._table_exists(
table_name=expression_data_util.TableName.STAGE_ID)
assert result
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test__validate_limit_clause() -> None:
sqls: List[str] = [
'DELETE FROM test_table LIMIT 1;',
'UPDATE test_table SET a = 10 LIMIT 1;',
]
for sql in sqls:
assert_raises(
_LimitClauseCantUseError,
func_or_method=expression_data_util._validate_limit_clause,
kwargs={'sql': sql},
match='LIMIT clause cannot use in the UPDATE or DELETE sql',
)
expression_data_util._validate_limit_clause(
sql='SELECT a FROM test_table LIMIT 1;')
@retry(stop_max_attempt_number=15, wait_fixed=randint(10, 3000))
def test_exec_query() -> None:
expression_data_util.empty_expression()
table_name: str = \
expression_data_util.TableName.DEBUG_MODE_CALLABLE_COUNT.value
expression_data_util.exec_query(
sql=f"INSERT INTO {table_name}(name, count) VALUES('a', 1);")
expression_data_util.exec_query(
sql=f"SELECT count FROM {table_name} WHERE name = 'a' LIMIT 1;")
result: Optional[Tuple[int]] = expression_data_util.cursor.fetchone()
assert result == (1,)
| 40.02439
| 77
| 0.73964
| 1,665
| 13,128
| 5.377778
| 0.085285
| 0.159482
| 0.205048
| 0.090462
| 0.838396
| 0.798191
| 0.736207
| 0.664172
| 0.601966
| 0.551039
| 0
| 0.022579
| 0.173446
| 13,128
| 327
| 78
| 40.146789
| 0.802599
| 0
| 0
| 0.397727
| 0
| 0
| 0.093821
| 0.037731
| 0
| 0
| 0
| 0
| 0.143939
| 1
| 0.094697
| false
| 0
| 0.049242
| 0
| 0.143939
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e8fcbf43aee3dcd37bf617b3ad40b9d26cefe495
| 188
|
py
|
Python
|
security/views.py
|
FelixTheC/onlineOrderForm
|
6f606fe7baa56e94d48278da8258b5eb33a3590d
|
[
"Apache-2.0"
] | null | null | null |
security/views.py
|
FelixTheC/onlineOrderForm
|
6f606fe7baa56e94d48278da8258b5eb33a3590d
|
[
"Apache-2.0"
] | null | null | null |
security/views.py
|
FelixTheC/onlineOrderForm
|
6f606fe7baa56e94d48278da8258b5eb33a3590d
|
[
"Apache-2.0"
] | 1
|
2021-04-01T16:52:35.000Z
|
2021-04-01T16:52:35.000Z
|
from django.shortcuts import render, render_to_response
def not_found_view(request):
response = render_to_response('my404.html')
response.status_code = 404
return response
| 18.8
| 55
| 0.765957
| 25
| 188
| 5.48
| 0.72
| 0.116788
| 0.233577
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038217
| 0.164894
| 188
| 9
| 56
| 20.888889
| 0.834395
| 0
| 0
| 0
| 0
| 0
| 0.053476
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
33053d7b56475b47f8a56e9e0d918902bc0b1ca4
| 127
|
py
|
Python
|
scripts/build_diffutils.py
|
1byte2bytes/Sydney.framework
|
f2f390ba778397c04c168fe3072eceb8c04278a0
|
[
"MIT"
] | null | null | null |
scripts/build_diffutils.py
|
1byte2bytes/Sydney.framework
|
f2f390ba778397c04c168fe3072eceb8c04278a0
|
[
"MIT"
] | null | null | null |
scripts/build_diffutils.py
|
1byte2bytes/Sydney.framework
|
f2f390ba778397c04c168fe3072eceb8c04278a0
|
[
"MIT"
] | null | null | null |
# Copyright (c) Sydney Erickson 2017
import buildlib
import buildsettings
buildlib.build_configure("diffutils-3.6.tar.xz", "")
| 25.4
| 52
| 0.787402
| 17
| 127
| 5.823529
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.052174
| 0.094488
| 127
| 5
| 52
| 25.4
| 0.808696
| 0.267717
| 0
| 0
| 0
| 0
| 0.217391
| 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
|
330a5f33e5418cab218a863981393c24c30da153
| 507
|
py
|
Python
|
wim.py
|
cr3ux53c/integrating_wim
|
5664be4e8d88e40265bd8f84e7606c4534775881
|
[
"MIT"
] | null | null | null |
wim.py
|
cr3ux53c/integrating_wim
|
5664be4e8d88e40265bd8f84e7606c4534775881
|
[
"MIT"
] | null | null | null |
wim.py
|
cr3ux53c/integrating_wim
|
5664be4e8d88e40265bd8f84e7606c4534775881
|
[
"MIT"
] | null | null | null |
class WIM:
def __init__(self, output_dict) -> None:
for k, v in output_dict.items():
setattr(self, k.replace(' ', '_'), v)
def __repr__(self):
return '{' + self.Name + ', ' + self.Architecture + ', ' + self.Languages + '}'
def __str__(self) -> str:
return self.Name + ', ' + self.Architecture + ', ' + self.Languages + ', ' + self.Version + ', ' + self.Modified + ' from ' + self.Details_for_image + ':' + self.Index
if __name__ == '__main__':
pass
| 39
| 175
| 0.550296
| 56
| 507
| 4.535714
| 0.535714
| 0.07874
| 0.110236
| 0.141732
| 0.338583
| 0.338583
| 0.338583
| 0
| 0
| 0
| 0
| 0
| 0.2643
| 507
| 13
| 176
| 39
| 0.680965
| 0
| 0
| 0
| 0
| 0
| 0.061024
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0.1
| 0
| 0.2
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
331499ce655301aa9b7b21c901d315aeb7f03d69
| 1,944
|
py
|
Python
|
lib/fbuild/config/cxx/cxx03.py
|
felix-lang/fbuild
|
9595fbfd6d3ceece31fda2f96c35d4a241f0129b
|
[
"PSF-2.0",
"BSD-2-Clause"
] | 40
|
2015-02-07T00:44:12.000Z
|
2021-04-02T13:41:08.000Z
|
lib/fbuild/config/cxx/cxx03.py
|
dmerejkowsky/fbuild
|
be0bf901eed1f66c33897fbd4b147e0433e8cc72
|
[
"BSD-2-Clause"
] | 30
|
2015-02-06T17:45:15.000Z
|
2019-01-10T16:34:29.000Z
|
lib/fbuild/config/cxx/cxx03.py
|
dmerejkowsky/fbuild
|
be0bf901eed1f66c33897fbd4b147e0433e8cc72
|
[
"BSD-2-Clause"
] | 3
|
2015-09-03T06:38:02.000Z
|
2019-10-24T14:26:57.000Z
|
import fbuild.config.c.c90 as c90
import fbuild.config.cxx as cxx
# ------------------------------------------------------------------------------
class types(c90.types):
bool = cxx.int_type_test()
class iterator(cxx.Test):
header = cxx.header_test('iterator')
namespace = 'std'
iterator = cxx.template_test(test_types=['int', 'int', 'int'])
class cmath(cxx.Test):
header = cxx.header_test('cmath')
namespace = 'std'
HUGE_VAL = cxx.macro_test()
acos = cxx.function_test('double', 'double')
asin = cxx.function_test('double', 'double')
atan = cxx.function_test('double', 'double')
atan2 = cxx.function_test('double', 'double', 'double')
ceil = cxx.function_test('double', 'double')
cos = cxx.function_test('double', 'double')
cosh = cxx.function_test('double', 'double')
exp = cxx.function_test('double', 'double')
fabs = cxx.function_test('double', 'double')
floor = cxx.function_test('double', 'double')
fmod = cxx.function_test('double', 'double', 'double')
frexp = cxx.function_test('double', 'double', 'int*', test='''
#include <cmath>
int main() {
int d0;
double d1 = std::frexp(0., &d0);
return 0;
}
''')
ldexp = cxx.function_test('double', 'double', 'int')
log = cxx.function_test('double', 'double')
log10 = cxx.function_test('double', 'double')
modf = cxx.function_test('double', 'double', 'double*', test='''
#include <cmath>
int main() {
double d0;
double d1 = std::modf(0., &d0);
return 0;
}
''')
pow = cxx.function_test('double', 'double', 'double')
sin = cxx.function_test('double', 'double')
sinh = cxx.function_test('double', 'double')
sqrt = cxx.function_test('double', 'double')
tan = cxx.function_test('double', 'double')
tanh = cxx.function_test('double', 'double')
| 34.714286
| 80
| 0.572016
| 226
| 1,944
| 4.787611
| 0.230089
| 0.288355
| 0.304991
| 0.426987
| 0.667283
| 0.225508
| 0
| 0
| 0
| 0
| 0
| 0.012508
| 0.218621
| 1,944
| 55
| 81
| 35.345455
| 0.699803
| 0.040123
| 0
| 0.208333
| 0
| 0
| 0.337983
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.041667
| 0
| 0.75
| 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
|
333b16cd25312811726d570088c244df03551794
| 104
|
py
|
Python
|
participant_ids/apps.py
|
catherinedevlin/hashed_id_rest_service
|
e2121c43d376920f5886dd11f33b68b6c772127e
|
[
"MIT"
] | 1
|
2020-05-13T19:03:56.000Z
|
2020-05-13T19:03:56.000Z
|
participant_ids/apps.py
|
catherinedevlin/hashed_id_rest_service
|
e2121c43d376920f5886dd11f33b68b6c772127e
|
[
"MIT"
] | null | null | null |
participant_ids/apps.py
|
catherinedevlin/hashed_id_rest_service
|
e2121c43d376920f5886dd11f33b68b6c772127e
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class ParticipantIdsConfig(AppConfig):
name = 'participant_ids'
| 17.333333
| 38
| 0.788462
| 11
| 104
| 7.363636
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144231
| 104
| 5
| 39
| 20.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
|
33432cd3a5912f81463c76c1c50c39933fd01f1d
| 100
|
py
|
Python
|
fitbox/consultas/apps.py
|
ravellys/fitbox
|
3ca61bf4d27f47dd7fabb1301afdf5c79284f68b
|
[
"MIT"
] | null | null | null |
fitbox/consultas/apps.py
|
ravellys/fitbox
|
3ca61bf4d27f47dd7fabb1301afdf5c79284f68b
|
[
"MIT"
] | 1
|
2020-10-29T20:03:11.000Z
|
2020-10-29T20:03:11.000Z
|
fitbox/consultas/apps.py
|
ravellys/fitbox
|
3ca61bf4d27f47dd7fabb1301afdf5c79284f68b
|
[
"MIT"
] | 2
|
2020-10-27T16:46:18.000Z
|
2020-11-04T02:29:59.000Z
|
from django.apps import AppConfig
class ConsultasConfig(AppConfig):
name = 'fitbox.consultas'
| 16.666667
| 33
| 0.77
| 11
| 100
| 7
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 100
| 5
| 34
| 20
| 0.905882
| 0
| 0
| 0
| 0
| 0
| 0.16
| 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
|
334cb72b973423aa310a757441aa390b8cafda2c
| 187
|
py
|
Python
|
datasets/__init__.py
|
devinit/extractormeter
|
19facf5713449707a14bf0f4813461627b070a4a
|
[
"MIT"
] | null | null | null |
datasets/__init__.py
|
devinit/extractormeter
|
19facf5713449707a14bf0f4813461627b070a4a
|
[
"MIT"
] | null | null | null |
datasets/__init__.py
|
devinit/extractormeter
|
19facf5713449707a14bf0f4813461627b070a4a
|
[
"MIT"
] | null | null | null |
import os
from flask import Flask
app = Flask(__name__)
config_path = os.environ.get("CONFIG_PATH", "datasets.config.DevelopmentConfig")
app.config.from_object(config_path)
import api
| 18.7
| 80
| 0.796791
| 27
| 187
| 5.222222
| 0.518519
| 0.212766
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101604
| 187
| 9
| 81
| 20.777778
| 0.839286
| 0
| 0
| 0
| 0
| 0
| 0.235294
| 0.176471
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
335dfc818e585e03b46ca03bf063ff7effb9628a
| 64
|
py
|
Python
|
basic command files/command_base.py
|
MWeberLambdaweb19/python-logger-cli
|
d972dae3eeb7552be0f12164804de0595bcd4c28
|
[
"MIT"
] | null | null | null |
basic command files/command_base.py
|
MWeberLambdaweb19/python-logger-cli
|
d972dae3eeb7552be0f12164804de0595bcd4c28
|
[
"MIT"
] | null | null | null |
basic command files/command_base.py
|
MWeberLambdaweb19/python-logger-cli
|
d972dae3eeb7552be0f12164804de0595bcd4c28
|
[
"MIT"
] | null | null | null |
# This file is always running
input('Please select a command:')
| 21.333333
| 33
| 0.75
| 10
| 64
| 4.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 64
| 3
| 33
| 21.333333
| 0.888889
| 0.421875
| 0
| 0
| 0
| 0
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
684084854af423b137381468e8df555599ffc697
| 159
|
py
|
Python
|
src/schmetterling/core/util.py
|
bjuvensjo/schmetterling
|
0cdbfe4f379a081d9d4711dd21866b90983365cf
|
[
"Apache-2.0"
] | null | null | null |
src/schmetterling/core/util.py
|
bjuvensjo/schmetterling
|
0cdbfe4f379a081d9d4711dd21866b90983365cf
|
[
"Apache-2.0"
] | null | null | null |
src/schmetterling/core/util.py
|
bjuvensjo/schmetterling
|
0cdbfe4f379a081d9d4711dd21866b90983365cf
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python3
def merge_dicts(base, update, values=False):
merged = dict(base, **update)
return list(merged.values()) if values else merged
| 22.714286
| 54
| 0.698113
| 23
| 159
| 4.782609
| 0.73913
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007519
| 0.163522
| 159
| 6
| 55
| 26.5
| 0.819549
| 0.132075
| 0
| 0
| 0
| 0
| 0
| 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
|
68774186ba9638e979336a0a17ae2f1ae22f2a7a
| 2,379
|
py
|
Python
|
cfn_guard_test/case.py
|
Nr18/cfn-guard-test
|
d7b92830c634c8107c8551540829b3205c757210
|
[
"MIT"
] | 3
|
2021-12-21T20:26:33.000Z
|
2021-12-30T23:17:37.000Z
|
cfn_guard_test/case.py
|
Nr18/cfn-guard-test
|
d7b92830c634c8107c8551540829b3205c757210
|
[
"MIT"
] | 31
|
2021-12-19T18:58:52.000Z
|
2022-03-31T18:30:52.000Z
|
cfn_guard_test/case.py
|
Nr18/cfn-guard-test
|
d7b92830c634c8107c8551540829b3205c757210
|
[
"MIT"
] | 1
|
2022-01-07T22:04:41.000Z
|
2022-01-07T22:04:41.000Z
|
from typing import List
from cfn_guard_test.rule import CfnGuardRule
class CfnGuardTestCase:
"""
Understands a cfn-guard test case
A single cfn-guard test case can contain 1 ore more rules that are evaluated. Each definition in the
`<name>_tests.yaml` file results in a cfn-guard test case.
"""
__name: str
__number: int
__rules: List[CfnGuardRule]
def __init__(self, name: str, number: int) -> None:
self.__name = name
self.__number = number
self.__rules = []
def add_rule(self, rule: CfnGuardRule) -> None:
self.__rules.append(rule)
@property
def name(self) -> str:
return self.__name
@property
def number(self) -> int:
return self.__number
@property
def message(self) -> str:
return ""
@property
def details(self) -> str:
return ""
@property
def passed(self) -> int:
rules = self.passed_rules
return len(rules) if rules else 0
@property
def errors(self) -> int:
return 0
@property
def failed(self) -> int:
rules = self.failed_rules
return len(rules) if rules else 0
@property
def all_rules(self) -> List[CfnGuardRule]:
return self.__rules
@property
def failed_rules(self) -> List[CfnGuardRule]:
return list(filter(lambda case: case.failed, self.__rules))
def failed_rules_messages(self, suite_name: str) -> List[str]:
messages: List[str] = []
def extend(rule: CfnGuardRule) -> None:
messages.append(
rule.failed_message(
suite_name=suite_name, case_number=self.number, case_name=self.name
)
)
list(map(extend, self.failed_rules))
return messages
@property
def passed_rules(self) -> List[CfnGuardRule]:
return list(filter(lambda case: case.passed, self.__rules))
class ErrorTestCase(CfnGuardTestCase):
def __init__(self, message: str, details: str) -> None:
super().__init__(name="Loading Error", number=1)
self.__message = message
self.__details = details
@property
def errors(self) -> int:
return 1
@property
def message(self) -> str:
return self.__message
@property
def details(self) -> str:
return self.__details
| 24.27551
| 104
| 0.612022
| 282
| 2,379
| 4.943262
| 0.22695
| 0.102583
| 0.046628
| 0.034433
| 0.317791
| 0.263271
| 0.139168
| 0.139168
| 0.139168
| 0.139168
| 0
| 0.00355
| 0.289617
| 2,379
| 97
| 105
| 24.525773
| 0.821302
| 0.081547
| 0
| 0.338235
| 0
| 0
| 0.006016
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.264706
| false
| 0.058824
| 0.029412
| 0.161765
| 0.573529
| 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
|
6896f65f417723bbf950282ec596f5103da4d9f7
| 323
|
py
|
Python
|
3.algorithmic_expert/framework.py
|
jimmymalhan/Coding_Interview_Questions_Python_algoexpert
|
94e8b4c63e8db92793b99741120a09f22806234f
|
[
"MIT"
] | 1
|
2020-10-05T04:55:26.000Z
|
2020-10-05T04:55:26.000Z
|
3.algorithmic_expert/framework.py
|
jimmymalhan/Coding_Interview_Questions_Python_algoexpert
|
94e8b4c63e8db92793b99741120a09f22806234f
|
[
"MIT"
] | null | null | null |
3.algorithmic_expert/framework.py
|
jimmymalhan/Coding_Interview_Questions_Python_algoexpert
|
94e8b4c63e8db92793b99741120a09f22806234f
|
[
"MIT"
] | null | null | null |
# Problem Name:
# Problem Description:
####################################
# Sample Input:
# Sample Output:
####################################
"""
Explain the solution:
##################
Detailed explanation of the Solution:
"""
####################################
def solution(self):
pass
print(solution())
| 15.380952
| 37
| 0.414861
| 22
| 323
| 6.090909
| 0.727273
| 0.164179
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123839
| 323
| 21
| 38
| 15.380952
| 0.473498
| 0.448916
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
68b27a2eb5ad2390edd31f0bb73ffb9823c87e89
| 95
|
py
|
Python
|
zampol/relocation/apps.py
|
VadymRud/zampolit
|
80bbd5dc197041c3595831a8d0ddae130e10418c
|
[
"Apache-2.0"
] | null | null | null |
zampol/relocation/apps.py
|
VadymRud/zampolit
|
80bbd5dc197041c3595831a8d0ddae130e10418c
|
[
"Apache-2.0"
] | null | null | null |
zampol/relocation/apps.py
|
VadymRud/zampolit
|
80bbd5dc197041c3595831a8d0ddae130e10418c
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class RelocationConfig(AppConfig):
name = 'relocation'
| 15.833333
| 34
| 0.768421
| 10
| 95
| 7.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 95
| 5
| 35
| 19
| 0.9125
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 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
|
d7e5760a7eeae3a061eaced8987983ccfe415f83
| 411
|
py
|
Python
|
Aula07/Ex011.py
|
FlaYukari/Exerc-cios-Python-3--Mundo-01
|
4b7e3149806d851209edc9bf643b5abd072e9bc8
|
[
"MIT"
] | null | null | null |
Aula07/Ex011.py
|
FlaYukari/Exerc-cios-Python-3--Mundo-01
|
4b7e3149806d851209edc9bf643b5abd072e9bc8
|
[
"MIT"
] | null | null | null |
Aula07/Ex011.py
|
FlaYukari/Exerc-cios-Python-3--Mundo-01
|
4b7e3149806d851209edc9bf643b5abd072e9bc8
|
[
"MIT"
] | null | null | null |
print('='*20, 'DESAFIO 011', '='*20) #ok
a = float(input('Vamos calcular a quantidade de tinta necessária para pintar uma parede. \n\nPara isso, me informe em metros a altura da sua parede: '))
l = float(input('Agora é necessária a largura da sua parede em metros: '))
print('A quantidade de litros de tinta necessária para pintar uma parede de área {:.2f} m² é de {:.2f} litros.'.format(a*l, (a*l)/2))
| 58.714286
| 153
| 0.688564
| 71
| 411
| 3.985915
| 0.535211
| 0.070671
| 0.091873
| 0.14841
| 0.254417
| 0.254417
| 0.254417
| 0
| 0
| 0
| 0
| 0.032353
| 0.172749
| 411
| 7
| 154
| 58.714286
| 0.8
| 0.004866
| 0
| 0
| 0
| 0.5
| 0.74938
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
cc0936c727854bccaa83baf88afe800940cda884
| 563
|
py
|
Python
|
worksheets/Week_07_Worksheet_0_Final_Exercise.py
|
allegheny-college-cmpsc-100-fall-2020/cmpsc-100-fall-2020-week-07-functions-and-modules
|
b546d7bc9974afa078018ae4ecd060213e3dcf76
|
[
"CC-BY-4.0"
] | null | null | null |
worksheets/Week_07_Worksheet_0_Final_Exercise.py
|
allegheny-college-cmpsc-100-fall-2020/cmpsc-100-fall-2020-week-07-functions-and-modules
|
b546d7bc9974afa078018ae4ecd060213e3dcf76
|
[
"CC-BY-4.0"
] | null | null | null |
worksheets/Week_07_Worksheet_0_Final_Exercise.py
|
allegheny-college-cmpsc-100-fall-2020/cmpsc-100-fall-2020-week-07-functions-and-modules
|
b546d7bc9974afa078018ae4ecd060213e3dcf76
|
[
"CC-BY-4.0"
] | null | null | null |
#!/usr/bin/env python
# coding: utf-8
def encipher(deciphered):
code = ""
for letter in deciphered:
code += chr(ord(letter) + 4)
return code
# TODO: Create decipher function
# TODO: Shift each letter "back" 4 code points
# TODO: return deciphered message
enciphered = "Mj$}sy+zi$higmtlivih$xlmw$erh$ors{$mx0$gpet$}syv$lerhw2"
print(# TODO: Finish decipher function call with argument)
enciphered = "Mj$}sy$ger$vieh$xlmw$qiwweki0$M+q$gsrjmhirx$xlex$}syv$higmtliviv${svow2"
print(# TODO: Finish decipher function call with argument)
| 31.277778
| 86
| 0.705151
| 80
| 563
| 4.9625
| 0.6625
| 0.120907
| 0.070529
| 0.115869
| 0.236776
| 0.236776
| 0.236776
| 0.236776
| 0
| 0
| 0
| 0.014925
| 0.166963
| 563
| 18
| 87
| 31.277778
| 0.831557
| 0
| 0
| 0.222222
| 0
| 0.222222
| 0.402556
| 0.402556
| 0
| 0
| 0
| 0.055556
| 0
| 0
| null | null | 0
| 0
| null | null | 0.222222
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0be28fe061b41160e472a29fabe70290e28cd29f
| 53
|
py
|
Python
|
AtCoder/ABC 205/A - kcal.py
|
anubhab-code/Competitive-Programming
|
de28cb7d44044b9e7d8bdb475da61e37c018ac35
|
[
"MIT"
] | null | null | null |
AtCoder/ABC 205/A - kcal.py
|
anubhab-code/Competitive-Programming
|
de28cb7d44044b9e7d8bdb475da61e37c018ac35
|
[
"MIT"
] | null | null | null |
AtCoder/ABC 205/A - kcal.py
|
anubhab-code/Competitive-Programming
|
de28cb7d44044b9e7d8bdb475da61e37c018ac35
|
[
"MIT"
] | null | null | null |
a,b = list(map(int,input().split()))
print((a/100)*b)
| 26.5
| 36
| 0.603774
| 11
| 53
| 2.909091
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06
| 0.056604
| 53
| 2
| 37
| 26.5
| 0.58
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
0beda1c38a8febd58da06365f2fa6583fad485b8
| 43
|
py
|
Python
|
salt/daemons/test/plan/__init__.py
|
Vye/salt
|
89ef86096c8f3aa02834cf2e94fc542fd2127879
|
[
"Apache-2.0"
] | null | null | null |
salt/daemons/test/plan/__init__.py
|
Vye/salt
|
89ef86096c8f3aa02834cf2e94fc542fd2127879
|
[
"Apache-2.0"
] | null | null | null |
salt/daemons/test/plan/__init__.py
|
Vye/salt
|
89ef86096c8f3aa02834cf2e94fc542fd2127879
|
[
"Apache-2.0"
] | null | null | null |
from . import actors
__all__ = ['actors']
| 10.75
| 20
| 0.674419
| 5
| 43
| 5
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.186047
| 43
| 3
| 21
| 14.333333
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0.139535
| 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
|
0bfe69d8710ac97112cbe0b67a9ec18040bb51be
| 154
|
py
|
Python
|
src/cancer/message/download.py
|
OpenAlcoholics/telegram-vreddit-bot
|
ea736f2a8808331abeb5b85ace1cff3faf7466e7
|
[
"MIT"
] | null | null | null |
src/cancer/message/download.py
|
OpenAlcoholics/telegram-vreddit-bot
|
ea736f2a8808331abeb5b85ace1cff3faf7466e7
|
[
"MIT"
] | 1
|
2021-11-17T15:44:36.000Z
|
2021-11-17T15:44:36.000Z
|
src/cancer/message/download.py
|
OpenAlcoholics/telegram-vreddit-bot
|
ea736f2a8808331abeb5b85ace1cff3faf7466e7
|
[
"MIT"
] | null | null | null |
from __future__ import annotations
from dataclasses import dataclass
from .message import Message
@dataclass
class DownloadMessage(Message):
pass
| 14
| 34
| 0.811688
| 17
| 154
| 7.117647
| 0.588235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155844
| 154
| 10
| 35
| 15.4
| 0.930769
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.166667
| 0.5
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
040b8d3f2a20dd57078a41408d04d9380e06dbd0
| 98
|
py
|
Python
|
hypha/apply/stream_forms/apps.py
|
maxpearl/hypha
|
e181ebadfb744aab34617bb766e746368d6f2de0
|
[
"BSD-3-Clause"
] | 20
|
2021-04-08T16:38:49.000Z
|
2022-02-09T20:05:57.000Z
|
hypha/apply/stream_forms/apps.py
|
maxpearl/hypha
|
e181ebadfb744aab34617bb766e746368d6f2de0
|
[
"BSD-3-Clause"
] | 538
|
2020-01-24T08:27:13.000Z
|
2021-04-05T07:15:01.000Z
|
hypha/apply/stream_forms/apps.py
|
maxpearl/hypha
|
e181ebadfb744aab34617bb766e746368d6f2de0
|
[
"BSD-3-Clause"
] | 17
|
2020-02-07T14:55:54.000Z
|
2021-04-04T19:32:38.000Z
|
from django.apps import AppConfig
class StreamFormsConfig(AppConfig):
name = 'stream_forms'
| 16.333333
| 35
| 0.77551
| 11
| 98
| 6.818182
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153061
| 98
| 5
| 36
| 19.6
| 0.903614
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 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
|
04251104814104deea2077a79915f129d6745902
| 184
|
py
|
Python
|
top_shows/shows/serializers.py
|
BednarskiMat/webscrape-api
|
15b95c688bf0a9f21d80f3010c975e7cb1911446
|
[
"MIT"
] | null | null | null |
top_shows/shows/serializers.py
|
BednarskiMat/webscrape-api
|
15b95c688bf0a9f21d80f3010c975e7cb1911446
|
[
"MIT"
] | null | null | null |
top_shows/shows/serializers.py
|
BednarskiMat/webscrape-api
|
15b95c688bf0a9f21d80f3010c975e7cb1911446
|
[
"MIT"
] | null | null | null |
from rest_framework import serializers
from shows.models import Show
class ShowSerializer(serializers.ModelSerializer):
class Meta:
model = Show
fields = "__all__"
| 26.285714
| 50
| 0.73913
| 20
| 184
| 6.55
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206522
| 184
| 7
| 51
| 26.285714
| 0.89726
| 0
| 0
| 0
| 0
| 0
| 0.037838
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
04354a123c01083c868309d5f1ac49e0a7338431
| 2,196
|
py
|
Python
|
apps/fyle_expense/migrations/0003_auto_20200402_0734.py
|
akshay-codemonk/fyle-xero
|
a040dab12282a9a64ca01aca2dc09f8bb7eaa0f6
|
[
"MIT"
] | null | null | null |
apps/fyle_expense/migrations/0003_auto_20200402_0734.py
|
akshay-codemonk/fyle-xero
|
a040dab12282a9a64ca01aca2dc09f8bb7eaa0f6
|
[
"MIT"
] | null | null | null |
apps/fyle_expense/migrations/0003_auto_20200402_0734.py
|
akshay-codemonk/fyle-xero
|
a040dab12282a9a64ca01aca2dc09f8bb7eaa0f6
|
[
"MIT"
] | null | null | null |
# Generated by Django 2.2.8 on 2020-04-02 07:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fyle_expense', '0002_auto_20200319_1519'),
]
operations = [
migrations.AlterField(
model_name='expense',
name='category',
field=models.CharField(blank=True, help_text='Fyle Expense Category', max_length=255, null=True),
),
migrations.AlterField(
model_name='expense',
name='expense_id',
field=models.CharField(help_text='Expense ID', max_length=255, unique=True),
),
migrations.AlterField(
model_name='expense',
name='expense_number',
field=models.CharField(help_text='Expense Number', max_length=255),
),
migrations.AlterField(
model_name='expense',
name='project',
field=models.CharField(blank=True, help_text='Project', max_length=255, null=True),
),
migrations.AlterField(
model_name='expense',
name='purpose',
field=models.TextField(blank=True, help_text='Purpose', null=True),
),
migrations.AlterField(
model_name='expense',
name='report_id',
field=models.CharField(help_text='Report ID', max_length=255),
),
migrations.AlterField(
model_name='expense',
name='settlement_id',
field=models.CharField(help_text='Settlement ID', max_length=255),
),
migrations.AlterField(
model_name='expense',
name='state',
field=models.CharField(help_text='Expense state', max_length=255),
),
migrations.AlterField(
model_name='expense',
name='sub_category',
field=models.CharField(blank=True, help_text='Fyle Expense Sub-Category', max_length=255, null=True),
),
migrations.AlterField(
model_name='expense',
name='vendor',
field=models.CharField(blank=True, help_text='Vendor', max_length=255, null=True),
),
]
| 34.3125
| 113
| 0.581056
| 224
| 2,196
| 5.526786
| 0.227679
| 0.106624
| 0.201939
| 0.234249
| 0.748788
| 0.732633
| 0.565428
| 0.505654
| 0.420032
| 0.336026
| 0
| 0.037589
| 0.297359
| 2,196
| 63
| 114
| 34.857143
| 0.764744
| 0.020492
| 0
| 0.526316
| 1
| 0
| 0.149372
| 0.010703
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.017544
| 0
| 0.070175
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 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
|
f092b76f26447eb471d426d4e86cfd2b33c39a11
| 459
|
py
|
Python
|
app/forms/compileForm.py
|
Protalist/pmm_project
|
71a9e43547df414b7d8e09059d195edc02cc3ed1
|
[
"MIT"
] | null | null | null |
app/forms/compileForm.py
|
Protalist/pmm_project
|
71a9e43547df414b7d8e09059d195edc02cc3ed1
|
[
"MIT"
] | null | null | null |
app/forms/compileForm.py
|
Protalist/pmm_project
|
71a9e43547df414b7d8e09059d195edc02cc3ed1
|
[
"MIT"
] | null | null | null |
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField
from wtforms.validators import DataRequired, Email
class compileForm(FlaskForm):
name = StringField('Name', validators=[DataRequired()])
surname = StringField('Surname', validators=[DataRequired()])
mail = StringField('Mail', validators=[DataRequired(),Email("This field requires a valid email address")])
submit = SubmitField('insert')
| 51
| 110
| 0.769063
| 47
| 459
| 7.489362
| 0.553191
| 0.1875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119826
| 459
| 9
| 111
| 51
| 0.871287
| 0
| 0
| 0
| 0
| 0
| 0.134783
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.125
| 0.375
| 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
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
f094c9c303c16f4e993436ef3e2784727a329075
| 282
|
py
|
Python
|
src/app_functions/exceptions/login_failed.py
|
DanielNoord/DuolingoPomodoro
|
307b386daf3216fb9ba86f983f0e39f6647ffd64
|
[
"MIT"
] | null | null | null |
src/app_functions/exceptions/login_failed.py
|
DanielNoord/DuolingoPomodoro
|
307b386daf3216fb9ba86f983f0e39f6647ffd64
|
[
"MIT"
] | 4
|
2021-04-25T15:39:32.000Z
|
2022-02-18T20:58:00.000Z
|
src/app_functions/exceptions/login_failed.py
|
DanielNoord/DuolingoPomodoro
|
307b386daf3216fb9ba86f983f0e39f6647ffd64
|
[
"MIT"
] | null | null | null |
from src.app_functions.exceptions.duolingo_pomodoro import \
DuolingoPomodoroException
class LoginFailed(DuolingoPomodoroException):
"""Raised when there are issues with login
Args:
DuolingoPomodoroException (Exception): Base excepetion class for app
"""
| 25.636364
| 76
| 0.762411
| 27
| 282
| 7.888889
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177305
| 282
| 10
| 77
| 28.2
| 0.918103
| 0.421986
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 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
|
f0d01de86bb27ede10af9be44a70eba2f3b46763
| 6,739
|
py
|
Python
|
tests/drivers/test-mg-all.py
|
thorstenb/pyxb
|
634e86f61dfb73a2900f32fc3d819e9c25365a49
|
[
"Apache-2.0"
] | null | null | null |
tests/drivers/test-mg-all.py
|
thorstenb/pyxb
|
634e86f61dfb73a2900f32fc3d819e9c25365a49
|
[
"Apache-2.0"
] | null | null | null |
tests/drivers/test-mg-all.py
|
thorstenb/pyxb
|
634e86f61dfb73a2900f32fc3d819e9c25365a49
|
[
"Apache-2.0"
] | null | null | null |
import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
schema_path = '%s/../schemas/test-mg-all.xsd' % (os.path.dirname(__file__),)
code = pyxb.binding.generate.GeneratePython(schema_location=schema_path)
rv = compile(code, 'test', 'exec')
eval(rv)
from pyxb.exceptions_ import *
from pyxb.utils import domutils
def ToDOM (instance):
return instance.toDOM().documentElement
import unittest
class TestMGAll (unittest.TestCase):
def testRequired (self):
xml = '<ns1:required xmlns:ns1="URN:test-mg-all"/>'
dom = pyxb.utils.domutils.StringToDOM(xml)
self.assertRaises(MissingContentError, required.createFromDOM, dom.documentElement)
xml = '<ns1:required xmlns:ns1="URN:test-mg-all"><first/><second/><third/></ns1:required>'
dom = pyxb.utils.domutils.StringToDOM(xml)
instance = required.createFromDOM(dom.documentElement)
self.assert_(isinstance(instance.first, required.memberElement('first').typeDefinition()))
self.assert_(isinstance(instance.second, required.memberElement('second').typeDefinition()))
self.assert_(isinstance(instance.third, required.memberElement('third').typeDefinition()))
def testRequiredMisordered (self):
xml = '<ns1:required xmlns:ns1="URN:test-mg-all"><third/><first/><second/></ns1:required>'
dom = pyxb.utils.domutils.StringToDOM(xml)
instance = required.createFromDOM(dom.documentElement)
self.assert_(isinstance(instance.first, required.memberElement('first').typeDefinition()))
self.assert_(isinstance(instance.second, required.memberElement('second').typeDefinition()))
self.assert_(isinstance(instance.third, required.memberElement('third').typeDefinition()))
def testRequiredTooMany (self):
xml = '<ns1:required xmlns:ns1="URN:test-mg-all"><third/><first/><second/><third/></ns1:required>'
dom = pyxb.utils.domutils.StringToDOM(xml)
self.assertRaises(ExtraContentError, required.createFromDOM, dom.documentElement)
def testThirdOptional (self):
xml = '<ns1:thirdOptional xmlns:ns1="URN:test-mg-all"><first/><second/></ns1:thirdOptional>'
dom = pyxb.utils.domutils.StringToDOM(xml)
instance = thirdOptional.Factory(_dom_node=dom.documentElement)
self.assert_(isinstance(instance.first, thirdOptional._ElementMap['first'].elementBinding().typeDefinition()))
self.assert_(isinstance(instance.second, thirdOptional._ElementMap['second'].elementBinding().typeDefinition()))
self.assert_(instance.third is None)
xml = '<ns1:thirdOptional xmlns:ns1="URN:test-mg-all"><first/><second/><third/></ns1:thirdOptional>'
dom = pyxb.utils.domutils.StringToDOM(xml)
instance = thirdOptional.Factory(_dom_node=dom.documentElement)
self.assert_(isinstance(instance.first, thirdOptional._ElementMap['first'].elementBinding().typeDefinition()))
self.assert_(isinstance(instance.second, thirdOptional._ElementMap['second'].elementBinding().typeDefinition()))
self.assert_(isinstance(instance.third, thirdOptional._ElementMap['third'].elementBinding().typeDefinition()))
xml = '<ns1:thirdOptional xmlns:ns1="URN:test-mg-all"><first/><second/><third/><first/></ns1:thirdOptional>'
dom = pyxb.utils.domutils.StringToDOM(xml)
self.assertRaises(ExtraContentError, thirdOptional.Factory, _dom_node=dom.documentElement)
def testOptional (self):
xml = '<ns1:optional xmlns:ns1="URN:test-mg-all"/>'
dom = pyxb.utils.domutils.StringToDOM(xml)
instance = optional.createFromDOM(dom.documentElement)
self.assert_(instance.first is None)
self.assert_(instance.second is None)
self.assert_(instance.third is None)
xml = '<ns1:optional xmlns:ns1="URN:test-mg-all"><first/><second/><third/></ns1:optional>'
dom = pyxb.utils.domutils.StringToDOM(xml)
instance = optional.createFromDOM(dom.documentElement)
self.assert_(isinstance(instance.first, optional.memberElement('first').typeDefinition()))
self.assert_(isinstance(instance.second, optional.memberElement('second').typeDefinition()))
self.assert_(isinstance(instance.third, optional.memberElement('third').typeDefinition()))
xml = '<ns1:optional xmlns:ns1="URN:test-mg-all"><first/><third/></ns1:optional>'
dom = pyxb.utils.domutils.StringToDOM(xml)
instance = optional.createFromDOM(dom.documentElement)
self.assert_(isinstance(instance.first, optional.memberElement('first').typeDefinition()))
self.assert_(instance.second is None)
self.assert_(isinstance(instance.third, optional.memberElement('third').typeDefinition()))
xml = '<ns1:optional xmlns:ns1="URN:test-mg-all"><third/></ns1:optional>'
dom = pyxb.utils.domutils.StringToDOM(xml)
instance = optional.createFromDOM(dom.documentElement)
self.assert_(instance.first is None)
self.assert_(instance.second is None)
self.assert_(isinstance(instance.third, optional.memberElement('third').typeDefinition()))
def testOptionalTooMany (self):
xml = '<ns1:optional xmlns:ns1="URN:test-mg-all"><third/><first/><third/></ns1:optional>'
dom = pyxb.utils.domutils.StringToDOM(xml)
self.assertRaises(ExtraContentError, optional.createFromDOM, dom.documentElement)
def stripMembers (self, xml, body):
for b in body:
xml = xml.replace('<%s/>' % (b,), 'X')
return xml
def testMany (self):
for body in [ "abcdefgh", "fghbcd", "bfgcahd" ]:
xml = '<ns1:many xmlns:ns1="URN:test-mg-all">%s</ns1:many>' % (''.join([ '<%s/>' % (_x,) for _x in body ]),)
dom = pyxb.utils.domutils.StringToDOM(xml)
instance = many.createFromDOM(dom.documentElement)
instance.validateBinding()
xml2 = ToDOM(instance).toxml()
rev = self.stripMembers(xml2, body)
self.assertEqual('<ns1:many xmlns:ns1="URN:test-mg-all">%s</ns1:many>' % (''.join(len(body)*['X']),), rev)
many_a = many.memberElement('a')
many_c = many.memberElement('c')
many_d = many.memberElement('d')
many_e = many.memberElement('e')
many_f = many.memberElement('f')
many_g = many.memberElement('g')
many_h = many.memberElement('h')
instance = many(a=many_a(), c=many_c(), d=many_d(), e=many_e(), f=many_f(), g=many_g(), h=many_h())
self.assertRaises(pyxb.BindingValidationError, instance.validateBinding)
self.assertRaises(pyxb.DOMGenerationError, ToDOM, instance)
if __name__ == '__main__':
unittest.main()
| 53.062992
| 120
| 0.68571
| 746
| 6,739
| 6.104558
| 0.132708
| 0.052701
| 0.07466
| 0.104524
| 0.716952
| 0.716952
| 0.70202
| 0.692798
| 0.66491
| 0.632631
| 0
| 0.007434
| 0.161597
| 6,739
| 126
| 121
| 53.484127
| 0.798584
| 0
| 0
| 0.409524
| 1
| 0.114286
| 0.177178
| 0.12539
| 0
| 0
| 0
| 0
| 0.295238
| 1
| 0.085714
| false
| 0
| 0.066667
| 0.009524
| 0.180952
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f0eeb413e3bc7697313c0aef8b14a35542c421c9
| 64
|
py
|
Python
|
docs/source/site_config.py
|
AkshayJainG/veles
|
21106f41a8e7e7e74453cd16a5059a0e6b1c315e
|
[
"Apache-2.0"
] | 1,007
|
2015-07-20T12:01:41.000Z
|
2022-03-30T23:08:35.000Z
|
docs/source/site_config.py
|
AkshayJainG/veles
|
21106f41a8e7e7e74453cd16a5059a0e6b1c315e
|
[
"Apache-2.0"
] | 52
|
2015-07-21T10:26:24.000Z
|
2019-01-24T05:46:43.000Z
|
docs/source/site_config.py
|
AkshayJainG/veles
|
21106f41a8e7e7e74453cd16a5059a0e6b1c315e
|
[
"Apache-2.0"
] | 235
|
2015-07-20T09:42:42.000Z
|
2021-12-06T18:12:26.000Z
|
import veles
veles.allow_root = True
def update(_):
pass
| 8
| 23
| 0.6875
| 9
| 64
| 4.666667
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.234375
| 64
| 7
| 24
| 9.142857
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
f0f89cce257598785b8bea1e04e5087b80022f32
| 430
|
py
|
Python
|
month01/all_code/day03/demo01.py
|
chaofan-zheng/tedu-python-demo
|
abe983ddc52690f4726cf42cc6390cba815026d8
|
[
"Apache-2.0"
] | 4
|
2021-01-07T14:25:15.000Z
|
2021-02-01T10:36:10.000Z
|
month01/all_code/day03/demo01.py
|
chaofan-zheng/tedu-python-demo
|
abe983ddc52690f4726cf42cc6390cba815026d8
|
[
"Apache-2.0"
] | null | null | null |
month01/all_code/day03/demo01.py
|
chaofan-zheng/tedu-python-demo
|
abe983ddc52690f4726cf42cc6390cba815026d8
|
[
"Apache-2.0"
] | null | null | null |
"""
变量交换
"""
# 方法一:借助第三个变量
# bridegroom_name = "武大郎"
# bride_name = "潘金莲"
# temp = bridegroom_name
# bridegroom_name = bride_name
# bride_name = temp
# print("交换后的新郎:" + bridegroom_name) #
# print("交换后的新娘:" + bride_name) #
# 方法二:直接交换
# a , b = b , a
bridegroom_name = "武大郎"
bride_name = "潘金莲"
bridegroom_name, bride_name = bride_name, bridegroom_name
print("交换后的新郎:" + bridegroom_name) #
print("交换后的新娘:" + bride_name) #
| 21.5
| 57
| 0.672093
| 55
| 430
| 4.963636
| 0.290909
| 0.410256
| 0.190476
| 0.161172
| 0.776557
| 0.776557
| 0.32967
| 0.32967
| 0
| 0
| 0
| 0
| 0.172093
| 430
| 19
| 58
| 22.631579
| 0.766854
| 0.518605
| 0
| 0
| 0
| 0
| 0.10989
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.4
| 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
|
9bda371215049bb66583112d93567afefcc2731e
| 122
|
py
|
Python
|
BOReL/environments/mujoco/rand_param_envs/gym/scoreboard/client/__init__.py
|
hai-h-nguyen/pomdp-baselines
|
629180d56641810d99653a116cca41ede65172eb
|
[
"MIT"
] | 40
|
2021-10-15T14:53:00.000Z
|
2022-03-31T02:27:20.000Z
|
BOReL/environments/mujoco/rand_param_envs/gym/scoreboard/client/__init__.py
|
hai-h-nguyen/pomdp-baselines
|
629180d56641810d99653a116cca41ede65172eb
|
[
"MIT"
] | 1
|
2022-03-13T04:02:30.000Z
|
2022-03-13T04:02:30.000Z
|
BOReL/environments/mujoco/rand_param_envs/gym/scoreboard/client/__init__.py
|
hai-h-nguyen/pomdp-baselines
|
629180d56641810d99653a116cca41ede65172eb
|
[
"MIT"
] | 5
|
2021-11-28T04:08:13.000Z
|
2022-03-17T02:33:51.000Z
|
import logging
import os
from environments.mujoco.rand_param_envs.gym import error
logger = logging.getLogger(__name__)
| 17.428571
| 57
| 0.836066
| 17
| 122
| 5.647059
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106557
| 122
| 6
| 58
| 20.333333
| 0.880734
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
9bf367eafd435e7de43cbc253adc849e34e7b8e0
| 4,851
|
py
|
Python
|
tests/core/test_histogram.py
|
serverdensity/sd-agent
|
66f0031b6be369c28e69414eb6172b5685a5110e
|
[
"BSD-3-Clause"
] | 76
|
2015-02-09T12:20:12.000Z
|
2022-03-31T04:29:35.000Z
|
tests/core/test_histogram.py
|
serverdensity/sd-agent
|
66f0031b6be369c28e69414eb6172b5685a5110e
|
[
"BSD-3-Clause"
] | 58
|
2015-01-12T08:57:23.000Z
|
2021-09-24T23:06:23.000Z
|
tests/core/test_histogram.py
|
serverdensity/sd-agent
|
66f0031b6be369c28e69414eb6172b5685a5110e
|
[
"BSD-3-Clause"
] | 31
|
2015-03-30T15:30:19.000Z
|
2021-01-12T07:37:22.000Z
|
# stdlib
import unittest
# project
from aggregator import Histogram, MetricsAggregator
from config import get_histogram_aggregates, get_histogram_percentiles
class TestHistogram(unittest.TestCase):
def test_default(self):
stats = MetricsAggregator('myhost')
for i in xrange(20):
stats.submit_packets('myhistogram:{0}|h'.format(i))
metrics = stats.flush()
self.assertEquals(len(metrics), 5, metrics)
value_by_type = {}
for k in metrics:
value_by_type[k[0][len('myhistogram')+1:]] = k[2]
self.assertEquals(
sorted(value_by_type.keys()),
['95percentile', 'avg', 'count', 'max', 'median'], value_by_type
)
self.assertEquals(value_by_type['max'], 19, value_by_type)
self.assertEquals(value_by_type['median'], 9, value_by_type)
self.assertEquals(value_by_type['avg'], 9.5, value_by_type)
self.assertEquals(value_by_type['count'], 20.0, value_by_type)
self.assertEquals(value_by_type['95percentile'], 18, value_by_type)
def test_custom_single_percentile(self):
configstr = '0.40'
stats = MetricsAggregator(
'myhost',
histogram_percentiles=get_histogram_percentiles(configstr)
)
self.assertEquals(
stats.metric_config[Histogram]['percentiles'],
[0.40],
stats.metric_config[Histogram]
)
for i in xrange(20):
stats.submit_packets('myhistogram:{0}|h'.format(i))
metrics = stats.flush()
self.assertEquals(len(metrics), 5, metrics)
value_by_type = {}
for k in metrics:
value_by_type[k[0][len('myhistogram')+1:]] = k[2]
self.assertEquals(value_by_type['40percentile'], 7, value_by_type)
def test_custom_multiple_percentile(self):
configstr = '0.4, 0.65, 0.999'
stats = MetricsAggregator(
'myhost',
histogram_percentiles=get_histogram_percentiles(configstr)
)
self.assertEquals(
stats.metric_config[Histogram]['percentiles'],
[0.4, 0.65, 0.99],
stats.metric_config[Histogram]
)
for i in xrange(20):
stats.submit_packets('myhistogram:{0}|h'.format(i))
metrics = stats.flush()
self.assertEquals(len(metrics), 7, metrics)
value_by_type = {}
for k in metrics:
value_by_type[k[0][len('myhistogram')+1:]] = k[2]
self.assertEquals(value_by_type['40percentile'], 7, value_by_type)
self.assertEquals(value_by_type['65percentile'], 12, value_by_type)
self.assertEquals(value_by_type['99percentile'], 19, value_by_type)
def test_custom_invalid_percentile(self):
configstr = '1.2342'
stats = MetricsAggregator(
'myhost',
histogram_percentiles=get_histogram_percentiles(configstr)
)
self.assertEquals(
stats.metric_config[Histogram]['percentiles'],
[],
stats.metric_config[Histogram]
)
def test_custom_invalid_percentile2(self):
configstr = 'aoeuoeu'
stats = MetricsAggregator(
'myhost',
histogram_percentiles=get_histogram_percentiles(configstr)
)
self.assertEquals(
stats.metric_config[Histogram]['percentiles'],
[],
stats.metric_config[Histogram]
)
def test_custom_invalid_percentile3skip(self):
configstr = 'aoeuoeu, 2.23, 0.8, 23'
stats = MetricsAggregator(
'myhost',
histogram_percentiles=get_histogram_percentiles(configstr)
)
self.assertEquals(
stats.metric_config[Histogram]['percentiles'],
[0.8],
stats.metric_config[Histogram]
)
def test_custom_aggregate(self):
configstr = 'median, max, sum'
stats = MetricsAggregator(
'myhost',
histogram_aggregates=get_histogram_aggregates(configstr)
)
self.assertEquals(
sorted(stats.metric_config[Histogram]['aggregates']),
['max', 'median', 'sum'],
stats.metric_config[Histogram]
)
for i in xrange(20):
stats.submit_packets('myhistogram:{0}|h'.format(i))
metrics = stats.flush()
self.assertEquals(len(metrics), 4, metrics)
value_by_type = {}
for k in metrics:
value_by_type[k[0][len('myhistogram')+1:]] = k[2]
self.assertEquals(value_by_type['median'], 9, value_by_type)
self.assertEquals(value_by_type['max'], 19, value_by_type)
self.assertEquals(value_by_type['sum'], 190, value_by_type)
self.assertEquals(value_by_type['95percentile'], 18, value_by_type)
| 31.296774
| 76
| 0.608947
| 527
| 4,851
| 5.362429
| 0.149905
| 0.089172
| 0.140127
| 0.105803
| 0.7615
| 0.757608
| 0.739915
| 0.726115
| 0.689667
| 0.689667
| 0
| 0.029847
| 0.274789
| 4,851
| 154
| 77
| 31.5
| 0.773451
| 0.002886
| 0
| 0.606838
| 0
| 0
| 0.089367
| 0
| 0
| 0
| 0
| 0
| 0.205128
| 1
| 0.059829
| false
| 0
| 0.025641
| 0
| 0.094017
| 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
|
9bf999671240f384bb32a9e56d7eb3a4f943e44d
| 22
|
py
|
Python
|
sendgrid/version.py
|
BotDeea/sendgrid-python
|
23c33b05ecbbdbd16246bc50bd607e5dd1534789
|
[
"MIT"
] | 1
|
2020-08-06T09:21:32.000Z
|
2020-08-06T09:21:32.000Z
|
sendgrid/version.py
|
BotDeea/sendgrid-python
|
23c33b05ecbbdbd16246bc50bd607e5dd1534789
|
[
"MIT"
] | null | null | null |
sendgrid/version.py
|
BotDeea/sendgrid-python
|
23c33b05ecbbdbd16246bc50bd607e5dd1534789
|
[
"MIT"
] | null | null | null |
__version__ = '6.4.5'
| 11
| 21
| 0.636364
| 4
| 22
| 2.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 0.136364
| 22
| 1
| 22
| 22
| 0.368421
| 0
| 0
| 0
| 0
| 0
| 0.227273
| 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
|
500b913dcc255e1354b40f3a313169d811957546
| 131
|
py
|
Python
|
sum.py
|
universekavish/pythonTraining
|
731da95d3fbd5b1a42116e5dad8ecedb557b71e1
|
[
"Apache-2.0"
] | null | null | null |
sum.py
|
universekavish/pythonTraining
|
731da95d3fbd5b1a42116e5dad8ecedb557b71e1
|
[
"Apache-2.0"
] | null | null | null |
sum.py
|
universekavish/pythonTraining
|
731da95d3fbd5b1a42116e5dad8ecedb557b71e1
|
[
"Apache-2.0"
] | null | null | null |
x = int(input("Enter first number: "))
y = int(input("Enter second number: "))
z = x + y;
print('Sum of', x, 'and', y, 'is: ', z)
| 21.833333
| 39
| 0.549618
| 23
| 131
| 3.130435
| 0.608696
| 0.222222
| 0.361111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.198473
| 131
| 6
| 40
| 21.833333
| 0.685714
| 0
| 0
| 0
| 0
| 0
| 0.409091
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 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
|
501877f6877dbdbdd299e996e756b51096baa312
| 2,617
|
py
|
Python
|
code/HP_data_process.py
|
julightzhong10/kaggle_HousePrice
|
e53f6a37e65c4cf9dbcd46e3cde6488c4377882a
|
[
"MIT"
] | null | null | null |
code/HP_data_process.py
|
julightzhong10/kaggle_HousePrice
|
e53f6a37e65c4cf9dbcd46e3cde6488c4377882a
|
[
"MIT"
] | null | null | null |
code/HP_data_process.py
|
julightzhong10/kaggle_HousePrice
|
e53f6a37e65c4cf9dbcd46e3cde6488c4377882a
|
[
"MIT"
] | null | null | null |
import numpy as np
import pandas as pd
import tensorflow as tf
import math
import random
import json
import time
def proccess(path):
test = pd.read_csv(path+"train.csv", index_col="Id")
print(test)
# test.drop('Name',axis=1, inplace=True) # delete Name col
# test.drop('Ticket',axis=1, inplace=True) # delete ticket col
# test.fillna(0,inplace=True) # replace Nan in Cabin col with 0
# test.loc[test['Cabin']!=0,'Cabin']=1
# test.loc[test['Cabin']==0,'Cabin0']=0 # replace other sets Cabin col with 1
# test.loc[test['Cabin']==1,'Cabin0']=1
# test.loc[test['Cabin']==0,'Cabin1']=1 # replace other sets Cabin col with 1
# test.loc[test['Cabin']==1,'Cabin1']=0
# test.pop('Cabin')
# test.loc[test['Sex'] =='male','Sex0']=1
# test.loc[test['Sex'] =='female','Sex0']=0
# test.loc[test['Sex'] =='male','Sex1']=0
# test.loc[test['Sex'] =='female','Sex1']=1
# test.pop('Sex')
# test.loc[test['Embarked']=='C','Embarked0']=1 # replace Embarked col with num.
# test.loc[test['Embarked']=='C','Embarked1']=0 # replace Embarked col with num.
# test.loc[test['Embarked']=='C','Embarked2']=0 # replace Embarked col with num.
# test.loc[test['Embarked']=='S','Embarked0']=0 # replace Embarked col with num.
# test.loc[test['Embarked']=='S','Embarked1']=1 # replace Embarked col with num.
# test.loc[test['Embarked']=='S','Embarked2']=0 # replace Embarked col with num.
# test.loc[test['Embarked']=='Q','Embarked0']=0 # replace Embarked col with num.
# test.loc[test['Embarked']=='Q','Embarked1']=0 # replace Embarked col with num.
# test.loc[test['Embarked']=='Q','Embarked2']=1 # replace Embarked col with num.
# test.pop('Embarked')
# test.loc[test['Pclass']==1,'Pclass0']=1 # replace Embarked col with num.
# test.loc[test['Pclass']==1,'Pclass1']=0 # replace Embarked col with num.
# test.loc[test['Pclass']==1,'Pclass2']=0 # replace Embarked col with num.
# test.loc[test['Pclass']==2,'Pclass0']=0 # replace Embarked col with num.
# test.loc[test['Pclass']==2,'Pclass1']=1 # replace Embarked col with num.
# test.loc[test['Pclass']==2,'Pclass2']=0 # replace Embarked col with num.
# test.loc[test['Pclass']==3,'Pclass0']=0 # replace Embarked col with num.
# test.loc[test['Pclass']==3,'Pclass1']=0 # replace Embarked col with num.
# test.loc[test['Pclass']==3,'Pclass2']=1 # replace Embarked col with num.
# test.pop('Pclass')
# test.fillna(0,inplace=True)
# test_x=np.array(test).tolist() # train input in list
# TestSet=[]
# for i in range(len(test_x)):
# TestSet.append({'x':test_x[i],'y':[-1]})
# print(len(TestSet[0]['x']))
if __name__ == '__main__':
proccess('../input/')
| 48.462963
| 81
| 0.658387
| 413
| 2,617
| 4.140436
| 0.186441
| 0.110526
| 0.173684
| 0.231579
| 0.719883
| 0.590643
| 0.569591
| 0.569591
| 0.530994
| 0.530994
| 0
| 0.033015
| 0.120367
| 2,617
| 54
| 82
| 48.462963
| 0.709818
| 0.8483
| 0
| 0
| 0
| 0
| 0.084084
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.083333
| false
| 0
| 0.583333
| 0
| 0.666667
| 0.083333
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5021680effbe7bbcbd5380fa1f71744158ec0f87
| 587
|
py
|
Python
|
Exercise_5_1.py
|
kushrami/Python-Crash-Course-book-Excersice
|
7093181940a90d9f4bab5775ef56f57963450393
|
[
"Apache-2.0"
] | null | null | null |
Exercise_5_1.py
|
kushrami/Python-Crash-Course-book-Excersice
|
7093181940a90d9f4bab5775ef56f57963450393
|
[
"Apache-2.0"
] | null | null | null |
Exercise_5_1.py
|
kushrami/Python-Crash-Course-book-Excersice
|
7093181940a90d9f4bab5775ef56f57963450393
|
[
"Apache-2.0"
] | null | null | null |
#Conditional Tests
time = 'morning'
print("is it morning? i would say True")
print(time == 'morning')
print("is it not morning? i would say False")
print(time != 'morning')
print("is it evening then? i would say False")
print(time == 'evening')
time = 'afternoon'
print("if its not evening then it may be afternoon? I would say lets check it.")
print(time == 'afternoon')
print("so its not morning? i would say True")
print(time != 'morning')
print("is morning is passed? i would say True")
print(time < 'morning')
print("Is it evening yet? I would say False")
print(time > "evening")
| 32.611111
| 81
| 0.70017
| 96
| 587
| 4.28125
| 0.260417
| 0.10219
| 0.153285
| 0.218978
| 0.6618
| 0.581509
| 0.547445
| 0.306569
| 0.306569
| 0.306569
| 0
| 0
| 0.158433
| 587
| 18
| 82
| 32.611111
| 0.831984
| 0.028961
| 0
| 0.125
| 0
| 0
| 0.621053
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.0625
| 0
| 0
| 0
| 0.875
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
|
0
| 4
|
502231be27aab6c3ddc75174261b23efdec5aac9
| 190
|
py
|
Python
|
Chapter04/counter_most_common.py
|
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
|
805d00c7a54927ba94c9077e9a580508ee3c5e56
|
[
"MIT"
] | 13
|
2018-06-21T01:44:49.000Z
|
2021-12-01T10:49:53.000Z
|
Chapter04/counter_most_common.py
|
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
|
805d00c7a54927ba94c9077e9a580508ee3c5e56
|
[
"MIT"
] | null | null | null |
Chapter04/counter_most_common.py
|
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
|
805d00c7a54927ba94c9077e9a580508ee3c5e56
|
[
"MIT"
] | 6
|
2018-10-05T08:29:24.000Z
|
2022-01-11T14:49:50.000Z
|
>>> c = Counter('gallahad')
>>> c.most_common() # return all values
[('a', 3), ('l', 2), ('g', 1), ('h', 1), ('d', 1)]
>>> c.most_common(3) # return top three
[('a', 3), ('l', 2), ('g', 1)]
| 31.666667
| 50
| 0.452632
| 32
| 190
| 2.625
| 0.5625
| 0.119048
| 0.261905
| 0.095238
| 0.142857
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0.056962
| 0.168421
| 190
| 5
| 51
| 38
| 0.474684
| 0.178947
| 0
| 0
| 0
| 0
| 0.104575
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
504cd6f7030ad724973b7b4ca9dc91e5ee9fb61a
| 237
|
py
|
Python
|
tests/compat.py
|
tltx/iommi
|
a0ca5e261040cc0452d7452e9320a88af5222b30
|
[
"BSD-3-Clause"
] | 192
|
2020-01-30T14:29:56.000Z
|
2022-03-28T19:55:30.000Z
|
tests/compat.py
|
tltx/iommi
|
a0ca5e261040cc0452d7452e9320a88af5222b30
|
[
"BSD-3-Clause"
] | 105
|
2020-03-29T21:59:01.000Z
|
2022-03-24T12:29:09.000Z
|
tests/compat.py
|
tltx/iommi
|
a0ca5e261040cc0452d7452e9320a88af5222b30
|
[
"BSD-3-Clause"
] | 28
|
2020-02-02T20:51:09.000Z
|
2022-03-08T16:23:42.000Z
|
try:
from django.utils.safestring import SafeText
from django.test import RequestFactory
except ImportError:
from jinja2 import Markup as SafeText # noqa
from .compat_flask import Jinja2RequestFactory as RequestFactory
| 29.625
| 68
| 0.78903
| 28
| 237
| 6.642857
| 0.642857
| 0.107527
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010309
| 0.181435
| 237
| 7
| 69
| 33.857143
| 0.948454
| 0.016878
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.833333
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ac976b82b65c5318505c72d242785d247c2e2274
| 194
|
py
|
Python
|
III_DataEngineer_BDSE10/1905_Python/TeacherCode/pythoncode/ch05/forstmt2.py
|
chaoannricardo/StudyNotes
|
26bed366c0c677c856eb25ffe0d7e8681d2a0740
|
[
"Apache-2.0"
] | 2
|
2019-12-24T12:46:39.000Z
|
2021-05-18T06:09:25.000Z
|
III_DataEngineer_BDSE10/1905_Python/TeacherCode/pythoncode/ch05/forstmt2.py
|
chaoannricardo/StudyNotes
|
26bed366c0c677c856eb25ffe0d7e8681d2a0740
|
[
"Apache-2.0"
] | 1
|
2021-11-16T07:58:43.000Z
|
2021-11-16T07:58:43.000Z
|
III_DataEngineer_BDSE10/1905_Python/TeacherCode/pythoncode/ch05/forstmt2.py
|
chaoannricardo/StudyNotes
|
26bed366c0c677c856eb25ffe0d7e8681d2a0740
|
[
"Apache-2.0"
] | 1
|
2021-07-05T14:30:30.000Z
|
2021-07-05T14:30:30.000Z
|
# for stmt
for i in range(5):
print("range(5) values =",i)
for i in range(1, 5):
print("range(1,5) values =",i)
for i in range(1, 11, 2):
print("range(1,11,2) values =",i)
| 21.555556
| 38
| 0.541237
| 38
| 194
| 2.763158
| 0.289474
| 0.228571
| 0.171429
| 0.314286
| 0.380952
| 0.380952
| 0.380952
| 0.380952
| 0
| 0
| 0
| 0.096552
| 0.252577
| 194
| 8
| 39
| 24.25
| 0.627586
| 0.041237
| 0
| 0
| 0
| 0
| 0.329545
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
acb9c97cb57b5f7bf9b7012eec3d78cc1306275a
| 111
|
py
|
Python
|
main.py
|
elena-lenssens/zabbix-templates
|
4ef24efaa2ff0890315d2edb3688ea4f05e705ae
|
[
"MIT"
] | null | null | null |
main.py
|
elena-lenssens/zabbix-templates
|
4ef24efaa2ff0890315d2edb3688ea4f05e705ae
|
[
"MIT"
] | null | null | null |
main.py
|
elena-lenssens/zabbix-templates
|
4ef24efaa2ff0890315d2edb3688ea4f05e705ae
|
[
"MIT"
] | null | null | null |
import os
import sys
def main():
pass
def frequencies():
pass
if __init__ == "__main__":
main()
| 9.25
| 26
| 0.612613
| 14
| 111
| 4.285714
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.27027
| 111
| 11
| 27
| 10.090909
| 0.740741
| 0
| 0
| 0.25
| 0
| 0
| 0.072072
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0.25
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
acf089674de137ed17e6a7b8400f0559b2d27545
| 409
|
py
|
Python
|
core/tests.py
|
uktrade/lite-exporter-frontend
|
cf42ac37a21236486aa303c8935c44a7eba91ef5
|
[
"MIT"
] | 3
|
2019-05-31T06:36:17.000Z
|
2020-02-12T16:02:24.000Z
|
core/tests.py
|
uktrade/lite-exporter-frontend
|
cf42ac37a21236486aa303c8935c44a7eba91ef5
|
[
"MIT"
] | 33
|
2019-03-28T10:20:14.000Z
|
2020-07-16T15:12:43.000Z
|
core/tests.py
|
uktrade/lite-exporter-frontend
|
cf42ac37a21236486aa303c8935c44a7eba91ef5
|
[
"MIT"
] | 1
|
2019-05-01T15:52:02.000Z
|
2019-05-01T15:52:02.000Z
|
from django.test import TestCase
from core.helpers import convert_parameters_to_query_params
class TestHelpers(TestCase):
def test_convert_parameters_to_query_params(self):
params = {"request": "request", "org_type": ["individual", "commercial"], "page": 1, "empty": None}
self.assertEqual(convert_parameters_to_query_params(params), "?org_type=individual&org_type=commercial&page=1")
| 37.181818
| 119
| 0.760391
| 52
| 409
| 5.673077
| 0.5
| 0.172881
| 0.19322
| 0.244068
| 0.305085
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005556
| 0.119804
| 409
| 10
| 120
| 40.9
| 0.813889
| 0
| 0
| 0
| 0
| 0
| 0.239609
| 0.114914
| 0
| 0
| 0
| 0
| 0.166667
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c581db65ba205eedd6316dc1769d5e7f8b31cd35
| 143
|
py
|
Python
|
scTE/__init__.py
|
ld32/scTE
|
e89ab3cb6c7984ccb51d11e5bdc7abfdd91768cb
|
[
"MIT"
] | 31
|
2020-12-29T16:01:36.000Z
|
2022-03-04T17:14:28.000Z
|
scTE/__init__.py
|
ld32/scTE
|
e89ab3cb6c7984ccb51d11e5bdc7abfdd91768cb
|
[
"MIT"
] | 34
|
2021-03-06T14:20:52.000Z
|
2022-03-24T04:13:25.000Z
|
scTE/__init__.py
|
ld32/scTE
|
e89ab3cb6c7984ccb51d11e5bdc7abfdd91768cb
|
[
"MIT"
] | 13
|
2019-11-13T03:18:30.000Z
|
2022-03-22T20:36:39.000Z
|
__version__ = "1.0"
# from .miniglbase import genelist, location, glload
# import .miniglbase
__all__ = ["genelist", "location", "glload",]
| 17.875
| 52
| 0.699301
| 15
| 143
| 6.133333
| 0.666667
| 0.347826
| 0.478261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016393
| 0.146853
| 143
| 7
| 53
| 20.428571
| 0.737705
| 0.482517
| 0
| 0
| 0
| 0
| 0.357143
| 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
|
c585a44031a160a9ef7becd802c55a23881f3c4d
| 6,716
|
py
|
Python
|
release/stubs.min/Wms/RemotingImplementation/Reports/ArgsProviders.py
|
tranconbv/ironpython-stubs
|
a601759e6c6819beff8e6b639d18a24b7e351851
|
[
"MIT"
] | null | null | null |
release/stubs.min/Wms/RemotingImplementation/Reports/ArgsProviders.py
|
tranconbv/ironpython-stubs
|
a601759e6c6819beff8e6b639d18a24b7e351851
|
[
"MIT"
] | null | null | null |
release/stubs.min/Wms/RemotingImplementation/Reports/ArgsProviders.py
|
tranconbv/ironpython-stubs
|
a601759e6c6819beff8e6b639d18a24b7e351851
|
[
"MIT"
] | null | null | null |
# encoding: utf-8
# module Wms.RemotingImplementation.Reports.ArgsProviders calls itself ArgsProviders
# from Wms.RemotingImplementation,Version=1.23.1.0,Culture=neutral,PublicKeyToken=null
# by generator 1.145
# no doc
# no important
from __init__ import *
# no functions
# classes
class ReportArgsProviderBase(object):
# no doc
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return ReportArgsProviderBase()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
def GetCustomOrDefaultReportPath(self,*args):
""" GetCustomOrDefaultReportPath(defaultReportPath: str,customReportPath: str,reportFile: str) -> str """
pass
class ReportPackageSlipArgsProvider(ReportArgsProviderBase):
""" ReportPackageSlipArgsProvider(general: General) """
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return ReportPackageSlipArgsProvider()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
def Prepare(self,args):
""" Prepare(self: ReportPackageSlipArgsProvider,args: PrintPackageSlipArgs) -> ReportPackageSlipArgsProvider """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self,general):
""" __new__(cls: type,general: General) """
pass
DataArgs=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: DataArgs(self: ReportPackageSlipArgsProvider) -> ReportDataArgs
"""
PrintArgs=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: PrintArgs(self: ReportPackageSlipArgsProvider) -> ReportPrintArgs
"""
class ReportPickListArgsProvider(ReportArgsProviderBase):
""" ReportPickListArgsProvider(general: General) """
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return ReportPickListArgsProvider()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
def Prepare(self,args,batch):
""" Prepare(self: ReportPickListArgsProvider,args: PrintPickingListArgs,batch: Batch) -> ReportPickListArgsProvider """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self,general):
""" __new__(cls: type,general: General) """
pass
DataArgs=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: DataArgs(self: ReportPickListArgsProvider) -> ReportDataArgs
"""
ExportArgs=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: ExportArgs(self: ReportPickListArgsProvider) -> ReportExportArgs
"""
PrintArgs=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: PrintArgs(self: ReportPickListArgsProvider) -> ReportPrintArgs
"""
class ReportPrereceivementReceiptArgsProvider(ReportArgsProviderBase):
""" ReportPrereceivementReceiptArgsProvider(general: General) """
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return ReportPrereceivementReceiptArgsProvider()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
def Prepare(self,dataset):
""" Prepare(self: ReportPrereceivementReceiptArgsProvider,dataset: PurchaseOrders_GetHistoryLinesDataTable) -> ReportPrereceivementReceiptArgsProvider """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self,general):
""" __new__(cls: type,general: General) """
pass
DataArgs=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: DataArgs(self: ReportPrereceivementReceiptArgsProvider) -> ReportDataArgs
"""
PrintArgs=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: PrintArgs(self: ReportPrereceivementReceiptArgsProvider) -> ReportPrintArgs
"""
class ReportPurchaseReceiptArgsProvider(ReportArgsProviderBase):
""" ReportPurchaseReceiptArgsProvider(general: General) """
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return ReportPurchaseReceiptArgsProvider()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
def Prepare(self,groupGuid,printer,noOfCopies):
""" Prepare(self: ReportPurchaseReceiptArgsProvider,groupGuid: Guid,printer: str,noOfCopies: int) -> ReportPurchaseReceiptArgsProvider """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self,general):
""" __new__(cls: type,general: General) """
pass
DataArgs=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: DataArgs(self: ReportPurchaseReceiptArgsProvider) -> ReportDataArgs
"""
PrintArgs=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: PrintArgs(self: ReportPurchaseReceiptArgsProvider) -> ReportPrintArgs
"""
class ReportRmaReceiptArgsProvider(ReportArgsProviderBase):
""" ReportRmaReceiptArgsProvider(general: General) """
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return ReportRmaReceiptArgsProvider()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
def Prepare(self,groupGuid,printer,noOfCopies):
""" Prepare(self: ReportRmaReceiptArgsProvider,groupGuid: Guid,printer: str,noOfCopies: int) -> ReportRmaReceiptArgsProvider """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self,general):
""" __new__(cls: type,general: General) """
pass
DataArgs=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: DataArgs(self: ReportRmaReceiptArgsProvider) -> ReportDataArgs
"""
PrintArgs=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: PrintArgs(self: ReportRmaReceiptArgsProvider) -> ReportPrintArgs
"""
| 38.820809
| 215
| 0.734366
| 683
| 6,716
| 6.862372
| 0.130307
| 0.070408
| 0.051205
| 0.060806
| 0.588436
| 0.588436
| 0.573074
| 0.573074
| 0.573074
| 0.573074
| 0
| 0.001725
| 0.136986
| 6,716
| 172
| 216
| 39.046512
| 0.806936
| 0.396516
| 0
| 0.753425
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.30137
| false
| 0.219178
| 0.013699
| 0
| 0.712329
| 0.027397
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
c5ae82389701af916a0afcc7191fc63add554323
| 162
|
py
|
Python
|
genmypy/_typing.py
|
rospypi/genpyi
|
98378a4b32f3867e86ea16573774954b1d112ab3
|
[
"Apache-2.0"
] | 1
|
2021-05-18T00:01:54.000Z
|
2021-05-18T00:01:54.000Z
|
genmypy/_typing.py
|
rospypi/genmypy
|
98378a4b32f3867e86ea16573774954b1d112ab3
|
[
"Apache-2.0"
] | 2
|
2021-05-04T18:07:25.000Z
|
2021-05-08T18:44:34.000Z
|
genmypy/_typing.py
|
rospypi/genpyi
|
98378a4b32f3867e86ea16573774954b1d112ab3
|
[
"Apache-2.0"
] | null | null | null |
TYPING_DISABLED = False
try:
import typing
TYPE_CHECKING = typing.TYPE_CHECKING
except ImportError:
TYPING_DISABLED = True
TYPE_CHECKING = False
| 18
| 40
| 0.746914
| 19
| 162
| 6.105263
| 0.526316
| 0.310345
| 0.310345
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.209877
| 162
| 8
| 41
| 20.25
| 0.90625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.285714
| 0
| 0.285714
| 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
|
c5b4df73af45186f94f835d7b855ec674c794086
| 1,555
|
py
|
Python
|
atom/nucleus/python/test/test_accounting_api.py
|
sumit4-ttn/SDK
|
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
|
[
"Apache-2.0"
] | null | null | null |
atom/nucleus/python/test/test_accounting_api.py
|
sumit4-ttn/SDK
|
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
|
[
"Apache-2.0"
] | null | null | null |
atom/nucleus/python/test/test_accounting_api.py
|
sumit4-ttn/SDK
|
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
|
[
"Apache-2.0"
] | null | null | null |
# coding: utf-8
"""
Hydrogen Atom API
The Hydrogen Atom API # noqa: E501
OpenAPI spec version: 1.7.0
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import nucleus_api
from nucleus_api.api.accounting_api import AccountingApi # noqa: E501
from nucleus_api.rest import ApiException
class TestAccountingApi(unittest.TestCase):
"""AccountingApi unit test stubs"""
def setUp(self):
self.api = nucleus_api.api.accounting_api.AccountingApi() # noqa: E501
def tearDown(self):
pass
def test_create_accounting_using_post(self):
"""Test case for create_accounting_using_post
Create an accounting # noqa: E501
"""
pass
def test_delete_accounting_using_delete(self):
"""Test case for delete_accounting_using_delete
Delete an accounting # noqa: E501
"""
pass
def test_get_accounting_all_using_get(self):
"""Test case for get_accounting_all_using_get
List all accounting # noqa: E501
"""
pass
def test_get_accounting_using_get(self):
"""Test case for get_accounting_using_get
Retrieve an accounting # noqa: E501
"""
pass
def test_update_accounting_using_put(self):
"""Test case for update_accounting_using_put
Update an accounting # noqa: E501
"""
pass
if __name__ == '__main__':
unittest.main()
| 22.214286
| 79
| 0.666881
| 190
| 1,555
| 5.163158
| 0.331579
| 0.06524
| 0.056065
| 0.076453
| 0.316004
| 0.224261
| 0.224261
| 0.159021
| 0
| 0
| 0
| 0.024201
| 0.255949
| 1,555
| 69
| 80
| 22.536232
| 0.823682
| 0.413505
| 0
| 0.272727
| 1
| 0
| 0.01043
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.318182
| false
| 0.272727
| 0.227273
| 0
| 0.590909
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
c5db3c364128f1da116ff126c9712e31e50fe586
| 34
|
py
|
Python
|
pdbparse/construct/protocols/application/tftp.py
|
ax330d/ida_pdb_loader
|
051b6806810d8aaa40f973442b06c3c0e4c24131
|
[
"MIT"
] | 50
|
2016-12-16T17:33:33.000Z
|
2022-03-17T06:15:43.000Z
|
lib/honcore/lib/construct/protocols/application/tftp.py
|
keabard/KeaBot
|
b4c39c88a11b171738d3623a9cd234e2e4342b7d
|
[
"Unlicense"
] | null | null | null |
lib/honcore/lib/construct/protocols/application/tftp.py
|
keabard/KeaBot
|
b4c39c88a11b171738d3623a9cd234e2e4342b7d
|
[
"Unlicense"
] | 29
|
2016-12-17T04:17:10.000Z
|
2022-03-17T06:15:45.000Z
|
"""
the Trivial FTP protocol
"""
| 6.8
| 24
| 0.617647
| 4
| 34
| 5.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.205882
| 34
| 4
| 25
| 8.5
| 0.777778
| 0.705882
| 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
|
a841fbd77ef23ead19d4f15bb59b4db1a6e1193d
| 48
|
py
|
Python
|
easygraphics/dialog/__init__.py
|
strakam/PyEasyGraphics
|
57a586aa92385d26725d4ec3d61b2bbbe970195d
|
[
"BSD-3-Clause"
] | 5
|
2019-09-23T05:15:47.000Z
|
2021-01-17T08:06:47.000Z
|
easygraphics/dialog/__init__.py
|
strakam/PyEasyGraphics
|
57a586aa92385d26725d4ec3d61b2bbbe970195d
|
[
"BSD-3-Clause"
] | 3
|
2019-05-03T05:25:17.000Z
|
2021-04-15T04:53:16.000Z
|
easygraphics/dialog/__init__.py
|
strakam/PyEasyGraphics
|
57a586aa92385d26725d4ec3d61b2bbbe970195d
|
[
"BSD-3-Clause"
] | 4
|
2019-05-04T13:42:40.000Z
|
2021-04-15T10:38:48.000Z
|
from .dialog import *
__all__ = dialog.__all__
| 12
| 24
| 0.75
| 6
| 48
| 4.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 48
| 3
| 25
| 16
| 0.7
| 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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.