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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a8a98856c914486131c71af74b19873a5711b4de
| 198
|
py
|
Python
|
Python_Orientacao_Objeto/teste2.py
|
carlosrjhoe/Python
|
2df531b23ebbabc40539b09bb2bbdbe1ed1c2164
|
[
"MIT"
] | null | null | null |
Python_Orientacao_Objeto/teste2.py
|
carlosrjhoe/Python
|
2df531b23ebbabc40539b09bb2bbdbe1ed1c2164
|
[
"MIT"
] | null | null | null |
Python_Orientacao_Objeto/teste2.py
|
carlosrjhoe/Python
|
2df531b23ebbabc40539b09bb2bbdbe1ed1c2164
|
[
"MIT"
] | null | null | null |
def soma(x,y):
return print(x + y)
def sub(x,y):
return print(x - y)
def mult(x,y):
return print(x * y)
def div(x,y):
return print(x / y)
soma(3,8)
sub(10,5)
mult(3,9)
div(15,7)
| 11.647059
| 23
| 0.555556
| 44
| 198
| 2.5
| 0.363636
| 0.145455
| 0.290909
| 0.472727
| 0.627273
| 0.627273
| 0.490909
| 0
| 0
| 0
| 0
| 0.066667
| 0.242424
| 198
| 17
| 24
| 11.647059
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 0.666667
| 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
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
a8ad80bc38cd16df91c7f7717982ec487fa5e8c1
| 126
|
py
|
Python
|
preprocessing_danych/dataset_config.py
|
MaciejKonieczka/gazspot-prediction
|
55177d7b7ae39a01a2820cd79f0e74897418e522
|
[
"MIT"
] | null | null | null |
preprocessing_danych/dataset_config.py
|
MaciejKonieczka/gazspot-prediction
|
55177d7b7ae39a01a2820cd79f0e74897418e522
|
[
"MIT"
] | null | null | null |
preprocessing_danych/dataset_config.py
|
MaciejKonieczka/gazspot-prediction
|
55177d7b7ae39a01a2820cd79f0e74897418e522
|
[
"MIT"
] | null | null | null |
test_index = ("2019-05-01", "2020-04-30")
train_index = ("2016-01-02", "2019-04-30")
val_index = ("2018-10-01", "2019-04-30")
| 31.5
| 42
| 0.619048
| 24
| 126
| 3.125
| 0.583333
| 0.16
| 0.213333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.421053
| 0.095238
| 126
| 3
| 43
| 42
| 0.236842
| 0
| 0
| 0
| 0
| 0
| 0.47619
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
765e377ff705e12f7620a2be9a2df5b9f1f29c8c
| 138
|
py
|
Python
|
apps/misc/context_processors.py
|
Thom03/edms-django
|
ad686a815d612f55921d6893093690311eeb831f
|
[
"MIT"
] | 70
|
2019-05-26T11:48:32.000Z
|
2022-02-16T21:33:58.000Z
|
apps/misc/context_processors.py
|
CalebeGeazi/CoinBox
|
351611745d496d3cd3d871f96eb705250b5ec03f
|
[
"MIT"
] | 7
|
2019-10-18T20:20:04.000Z
|
2021-04-21T15:25:15.000Z
|
apps/misc/context_processors.py
|
CalebeGeazi/CoinBox
|
351611745d496d3cd3d871f96eb705250b5ec03f
|
[
"MIT"
] | 26
|
2019-07-07T17:06:00.000Z
|
2022-01-20T06:40:39.000Z
|
from django.utils.translation import get_language
def django_settings(request):
return {
"LANGUAGE": get_language(),
}
| 15.333333
| 49
| 0.688406
| 15
| 138
| 6.133333
| 0.733333
| 0.23913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.217391
| 138
| 8
| 50
| 17.25
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0.057971
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
7668a391529415983ac3244d55ce03076f5a3acc
| 146
|
py
|
Python
|
starter_code/api_keys.py
|
tstenner1/python-api-challenge
|
dfc0642da6831d80664514d0705865f01e5c6c5a
|
[
"ADSL"
] | null | null | null |
starter_code/api_keys.py
|
tstenner1/python-api-challenge
|
dfc0642da6831d80664514d0705865f01e5c6c5a
|
[
"ADSL"
] | null | null | null |
starter_code/api_keys.py
|
tstenner1/python-api-challenge
|
dfc0642da6831d80664514d0705865f01e5c6c5a
|
[
"ADSL"
] | null | null | null |
# OpenWeatherMap API Key
weather_api_key = "f4695ec49ac558195fc591f0d450c34c"
# Google API Key
g_key = "AIzaSyAyIq5hhFN-Y0M16Ltie3YuwpDiKWx8tCk"
| 24.333333
| 52
| 0.835616
| 14
| 146
| 8.5
| 0.642857
| 0.151261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206107
| 0.10274
| 146
| 5
| 53
| 29.2
| 0.70229
| 0.253425
| 0
| 0
| 0
| 0
| 0.669811
| 0.669811
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
76a110e79c22c20d6fd80a6e38e2b2d759f2b55b
| 480
|
py
|
Python
|
holobot/sdk/exceptions/argument_error.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | 1
|
2021-05-24T00:17:46.000Z
|
2021-05-24T00:17:46.000Z
|
holobot/sdk/exceptions/argument_error.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | 41
|
2021-03-24T22:50:09.000Z
|
2021-12-17T12:15:13.000Z
|
holobot/sdk/exceptions/argument_error.py
|
rexor12/holobot
|
89b7b416403d13ccfeee117ef942426b08d3651d
|
[
"MIT"
] | null | null | null |
class ArgumentError(Exception):
def __init__(self, argument_name: str, *args) -> None:
super().__init__(*args)
self.argument_name = argument_name
@property
def argument_name(self) -> str:
return self.__argument_name
@argument_name.setter
def argument_name(self, value: str) -> None:
self.__argument_name = value
def __str__(self) -> str:
return f"{super().__str__()}\nArgument name: {self.argument_name}"
| 30
| 74
| 0.645833
| 56
| 480
| 5.017857
| 0.321429
| 0.384342
| 0.284698
| 0.170819
| 0.199288
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.235417
| 480
| 15
| 75
| 32
| 0.765668
| 0
| 0
| 0
| 0
| 0
| 0.116667
| 0.060417
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.166667
| 0.583333
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
76c82645a89d088d85f5022f67a7ad6314a2c8d3
| 245
|
py
|
Python
|
api-test-code/credentials.py
|
srijansingh53/hatErase
|
eab4873efee4803a0c641777bce5bd63fb4fcc2f
|
[
"MIT"
] | 1
|
2020-06-26T07:24:03.000Z
|
2020-06-26T07:24:03.000Z
|
api-test-code/credentials.py
|
srijansingh53/hatErase
|
eab4873efee4803a0c641777bce5bd63fb4fcc2f
|
[
"MIT"
] | null | null | null |
api-test-code/credentials.py
|
srijansingh53/hatErase
|
eab4873efee4803a0c641777bce5bd63fb4fcc2f
|
[
"MIT"
] | null | null | null |
consumer_key = 'F1BCRW0AXUlr0wjLE8L6Znm8a'
consumer_secret = 'HqRCnviPD8TmI05TSL47CA9eL6niFYtRu35CIP6J2F0fhjL9zz'
access_token = '1163025465423982592-WrNzWHSUZykiwRmYbexhkUa5BGudYZ'
access_secret = 'bZ0mWxWgFMClId9OoauDLQgT9IlwojmFS65OuGsy0E9QQ'
| 61.25
| 70
| 0.902041
| 13
| 245
| 16.692308
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.196581
| 0.044898
| 245
| 4
| 71
| 61.25
| 0.730769
| 0
| 0
| 0
| 0
| 0
| 0.691057
| 0.691057
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
76ce8679092b6c88a9cd642b89726a44b635faef
| 86
|
py
|
Python
|
test/lib-clay/externals/abi/newtypes/run.py
|
jb55/clay
|
db0bd2702ab0b6e48965cd85f8859bbd5f60e48e
|
[
"BSD-2-Clause"
] | 185
|
2015-01-04T09:33:17.000Z
|
2022-03-18T04:53:38.000Z
|
test/externals/abi/complex/run.py
|
aep/clay
|
92224d71c9d64a32d70a289593c13da7f970ec35
|
[
"BSD-2-Clause"
] | 7
|
2015-03-22T06:13:42.000Z
|
2015-12-28T19:07:24.000Z
|
test/externals/abi/complex/run.py
|
aep/clay
|
92224d71c9d64a32d70a289593c13da7f970ec35
|
[
"BSD-2-Clause"
] | 20
|
2015-01-09T22:24:46.000Z
|
2022-03-18T04:54:59.000Z
|
import sys
sys.path.append('..')
import external_test
external_test.runExternalTest()
| 17.2
| 31
| 0.802326
| 11
| 86
| 6.090909
| 0.636364
| 0.358209
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069767
| 86
| 4
| 32
| 21.5
| 0.8375
| 0
| 0
| 0
| 0
| 0
| 0.023256
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
4f3d60508b961f3b5da0a3e216be2a3ee247021d
| 198
|
py
|
Python
|
Server/Python/src/dbs/dao/MySQL/DataTier/List.py
|
vkuznet/DBS
|
14df8bbe8ee8f874fe423399b18afef911fe78c7
|
[
"Apache-2.0"
] | 8
|
2015-08-14T04:01:32.000Z
|
2021-06-03T00:56:42.000Z
|
Server/Python/src/dbs/dao/MySQL/DataTier/List.py
|
yuyiguo/DBS
|
14df8bbe8ee8f874fe423399b18afef911fe78c7
|
[
"Apache-2.0"
] | 162
|
2015-01-07T21:34:47.000Z
|
2021-10-13T09:42:41.000Z
|
Server/Python/src/dbs/dao/MySQL/DataTier/List.py
|
yuyiguo/DBS
|
14df8bbe8ee8f874fe423399b18afef911fe78c7
|
[
"Apache-2.0"
] | 16
|
2015-01-22T15:27:29.000Z
|
2021-04-28T09:23:28.000Z
|
#!/usr/bin/env python
"""
This module provides DataTier.List data access object.
"""
from dbs.dao.Oracle.DataTier.List import List as OraDataTierList
class List(OraDataTierList):
pass
| 19.8
| 64
| 0.727273
| 26
| 198
| 5.538462
| 0.807692
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171717
| 198
| 9
| 65
| 22
| 0.878049
| 0.378788
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
4f4c95f74358defd6290b5df4ac0fc0d0ae3c8b4
| 867
|
py
|
Python
|
src/pandas_profiling_study/report/structure/variables/__init__.py
|
lucasiscoviciMoon/pandas-profiling-study
|
142d3b0f5e3139cdb531819f637a407682fa5684
|
[
"MIT"
] | null | null | null |
src/pandas_profiling_study/report/structure/variables/__init__.py
|
lucasiscoviciMoon/pandas-profiling-study
|
142d3b0f5e3139cdb531819f637a407682fa5684
|
[
"MIT"
] | null | null | null |
src/pandas_profiling_study/report/structure/variables/__init__.py
|
lucasiscoviciMoon/pandas-profiling-study
|
142d3b0f5e3139cdb531819f637a407682fa5684
|
[
"MIT"
] | 1
|
2020-04-25T15:20:39.000Z
|
2020-04-25T15:20:39.000Z
|
from ....report.structure.variables.render_boolean import render_boolean
from ....report.structure.variables.render_categorical import (
render_categorical,
)
from ....report.structure.variables.render_common import render_common
from ....report.structure.variables.render_complex import render_complex
from ....report.structure.variables.render_count import render_count
from ....report.structure.variables.render_date import render_date
from ....report.structure.variables.render_path import render_path
from ....report.structure.variables.render_path_image import (
render_path_image,
)
from ....report.structure.variables.render_real import render_real
from ....report.structure.variables.render_url import render_url
from ....report.structure.variables.render_generic import render_generic
from ....report.structure.variables.render_int import render_int
| 54.1875
| 72
| 0.828143
| 110
| 867
| 6.290909
| 0.163636
| 0.17341
| 0.32948
| 0.485549
| 0.601156
| 0.109827
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068051
| 867
| 16
| 73
| 54.1875
| 0.856436
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4f912920b3cf2a5552ceadf14640e9d27357ffce
| 65
|
py
|
Python
|
test/Task/ImageSequence/__init__.py
|
paulondc/chilopoda
|
046dbb0c1b4ff20ea5f2e1679f8d89f3089b6aa4
|
[
"MIT"
] | 2
|
2019-09-24T18:56:27.000Z
|
2021-02-07T04:58:49.000Z
|
test/Task/ImageSequence/__init__.py
|
paulondc/kombi
|
046dbb0c1b4ff20ea5f2e1679f8d89f3089b6aa4
|
[
"MIT"
] | 20
|
2019-02-16T04:21:13.000Z
|
2019-03-09T21:21:21.000Z
|
test/Task/ImageSequence/__init__.py
|
paulondc/kombi
|
046dbb0c1b4ff20ea5f2e1679f8d89f3089b6aa4
|
[
"MIT"
] | 3
|
2019-11-15T05:16:32.000Z
|
2021-09-28T21:28:29.000Z
|
from .SequenceThumbnailTaskTest import SequenceThumbnailTaskTest
| 32.5
| 64
| 0.923077
| 4
| 65
| 15
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061538
| 65
| 1
| 65
| 65
| 0.983607
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
96e7d1ddaf507ff49c193f3c3f481b154f3b0eda
| 13,122
|
py
|
Python
|
test/jpypetest/test_jchar.py
|
baztian/jpype
|
034d44e6c719995c25e9cd61348ebc1860030a9b
|
[
"Apache-2.0"
] | null | null | null |
test/jpypetest/test_jchar.py
|
baztian/jpype
|
034d44e6c719995c25e9cd61348ebc1860030a9b
|
[
"Apache-2.0"
] | null | null | null |
test/jpypetest/test_jchar.py
|
baztian/jpype
|
034d44e6c719995c25e9cd61348ebc1860030a9b
|
[
"Apache-2.0"
] | null | null | null |
import _jpype
import jpype
import common
from jpype.types import *
class JChar2TestCase(common.JPypeTestCase):
def setUp(self):
common.JPypeTestCase.setUp(self)
def testCharRange(self):
self.assertEqual(ord(str(jpype.JChar(65))), 65)
self.assertEqual(ord(str(jpype.JChar(512))), 512)
@common.requireInstrumentation
def testJPChar_new(self):
_jpype.fault("PyJPChar_new")
with self.assertRaisesRegex(SystemError, "fault"):
JChar("a")
_jpype.fault("PyJPModule_getContext")
with self.assertRaisesRegex(SystemError, "fault"):
JChar("a")
JChar("a")
@common.requireInstrumentation
def testJPChar_str(self):
jc = JChar("a")
_jpype.fault("PyJPChar_str")
with self.assertRaisesRegex(SystemError, "fault"):
str(jc)
@common.requireInstrumentation
def testJCharGetJavaConversion(self):
_jpype.fault("JPCharType::findJavaConversion")
with self.assertRaisesRegex(SystemError, "fault"):
JChar._canConvertToJava(object())
@common.requireInstrumentation
def testJPJavaFrameCharArray(self):
ja = JArray(JChar)(5)
_jpype.fault("JPJavaFrame::NewCharArray")
with self.assertRaisesRegex(SystemError, "fault"):
JArray(JChar)(1)
_jpype.fault("JPJavaFrame::SetCharArrayRegion")
with self.assertRaisesRegex(SystemError, "fault"):
ja[0] = 0
_jpype.fault("JPJavaFrame::GetCharArrayRegion")
with self.assertRaisesRegex(SystemError, "fault"):
print(ja[0])
_jpype.fault("JPJavaFrame::GetCharArrayElements")
# Special case, only BufferError is allowed from getBuffer
with self.assertRaises(BufferError):
memoryview(ja[0:3])
_jpype.fault("JPJavaFrame::ReleaseCharArrayElements")
with self.assertRaisesRegex(SystemError, "fault"):
ja[0:3] = bytes([1, 2, 3])
# Not sure why this one changed.
_jpype.fault("JPJavaFrame::ReleaseCharArrayElements")
with self.assertRaisesRegex(SystemError, "fault"):
jpype.JObject(ja[::2], jpype.JObject)
_jpype.fault("JPJavaFrame::ReleaseCharArrayElements")
def f():
# Special case no fault is allowed
memoryview(ja[0:3])
f()
ja = JArray(JChar)(5) # lgtm [py/similar-function]
_jpype.fault("JPCharType::setArrayRange")
with self.assertRaisesRegex(SystemError, "fault"):
ja[1:3] = [0, 0]
def testFromObject(self):
ja = JArray(JChar)(5)
with self.assertRaises(TypeError):
ja[1] = object()
jf = JClass("jpype.common.Fixture")
with self.assertRaises(TypeError):
jf.static_char_field = object()
with self.assertRaises(TypeError):
jf().char_field = object()
def testCharArrayAsString(self):
t = JClass("jpype.array.TestArray")()
v = t.getCharArray()
self.assertEqual(str(v), 'avcd')
def testArrayConversionChar(self):
t = JClass("jpype.array.TestArray")()
v = t.getCharArray()
self.assertEqual(str(v[:]), 'avcd')
def testArrayEqualsChar(self):
contents = "abc"
array = jpype.JArray(jpype.JChar)(contents)
array2 = jpype.JArray(jpype.JChar)(contents)
self.assertEqual(array, array)
self.assertNotEqual(array, array2)
self.assertEqual(array, "abc")
def testArrayHash(self):
ja = JArray(JByte)([1, 2, 3])
self.assertIsInstance(hash(ja), int)
def testNone(self):
self.assertEqual(JChar._canConvertToJava(None), "none")
class JCharTestCase(common.JPypeTestCase):
def setUp(self):
common.JPypeTestCase.setUp(self)
self.nc = JChar('B')
def testStr(self):
self.assertEqual(type(str(self.nc)), str)
self.assertEqual(str(self.nc), 'B')
def testRepr(self):
self.assertEqual(type(repr(self.nc)), str)
self.assertEqual(repr(self.nc), "'B'")
def testOrd(self):
self.assertEqual(ord(self.nc), 66)
def testInt(self):
self.assertEqual(int(self.nc), 66)
def testFloat(self):
self.assertEqual(float(self.nc), 66.0)
def testSub(self):
self.assertEqual(len(self.nc), 1)
def testHash(self):
self.assertEqual(hash(self.nc), hash('B'))
def testAdd(self):
self.assertEqual(self.nc + 1, 67)
self.assertIsInstance(self.nc + 1, int)
self.assertEqual(self.nc + 1.1, 67.1)
self.assertIsInstance(self.nc + 1.1, float)
def testSub(self):
self.assertEqual(self.nc - 1, 65)
self.assertIsInstance(self.nc - 1, int)
self.assertEqual(self.nc - 1.1, 64.9)
self.assertIsInstance(self.nc - 1.1, float)
def testMult(self):
self.assertEqual(self.nc * 2, 132)
self.assertIsInstance(self.nc * 2, int)
self.assertEqual(self.nc * 0.25, 16.5)
self.assertIsInstance(self.nc * 2.0, float)
def testRshift(self):
self.assertEqual(self.nc >> 1, 33)
self.assertIsInstance(self.nc >> 2, int)
def testLshift(self):
self.assertEqual(self.nc << 1, 132)
self.assertIsInstance(self.nc << 2, int)
def testAnd(self):
self.assertEqual(self.nc & 244, 66 & 244)
self.assertIsInstance(self.nc & 2, int)
def testOr(self):
self.assertEqual(self.nc | 40, 66 | 40)
self.assertIsInstance(self.nc | 2, int)
def testXor(self):
self.assertEqual(self.nc ^ 1, 66 ^ 1)
self.assertIsInstance(self.nc ^ 1, int)
def testPass(self):
fixture = jpype.JClass('jpype.common.Fixture')()
self.assertEqual(type(fixture.callChar(self.nc)), JChar)
self.assertEqual(type(fixture.callObject(self.nc)), jpype.java.lang.Character)
def check(self, u, v0, v1, v2):
self.assertEqual(v1, u)
self.assertEqual(u, v1)
self.assertNotEqual(v0, u)
self.assertNotEqual(u, v0)
self.assertNotEqual(v2, u)
self.assertNotEqual(u, v2)
self.assertTrue(u > v0)
self.assertFalse(u > v2)
self.assertTrue(u < v2)
self.assertFalse(u < v0)
self.assertTrue(v0 < u)
self.assertFalse(v2 < u)
self.assertTrue(v2 > u)
self.assertFalse(v0 > u)
self.assertTrue(u >= v1)
self.assertFalse(u >= v2)
self.assertTrue(v1 <= u)
self.assertFalse(v2 <= u)
def testCompareInt(self):
self.check(self.nc, 65, 66, 67)
def testCompareFloat(self):
self.check(self.nc, 65.0, 66.0, 67.0)
def testCompareJInt(self):
self.check(self.nc, JInt(65), JInt(66), JInt(67))
def testCompareJFloat(self):
self.check(self.nc, JFloat(65.0), JFloat(66.0), JFloat(67.0))
class JCharBoxedTestCase(common.JPypeTestCase):
def setUp(self):
common.JPypeTestCase.setUp(self)
self.nc = jpype.java.lang.Character('B')
def testStr(self):
self.assertEqual(type(str(self.nc)), str)
self.assertEqual(str(self.nc), 'B')
def testRepr(self):
self.assertEqual(type(repr(self.nc)), str)
self.assertEqual(repr(self.nc), "'B'")
def testOrd(self):
self.assertEqual(ord(self.nc), 66)
def testInt(self):
self.assertEqual(int(self.nc), 66)
def testFloat(self):
self.assertEqual(float(self.nc), 66.0)
def testSub(self):
self.assertEqual(len(self.nc), 1)
def testHash(self):
self.assertEqual(hash(self.nc), hash('B'))
def testAdd(self):
self.assertEqual(self.nc + 1, 67)
self.assertIsInstance(self.nc + 1, int)
self.assertEqual(self.nc + 1.1, 67.1)
self.assertIsInstance(self.nc + 1.1, float)
def testSub(self):
self.assertEqual(self.nc - 1, 65)
self.assertIsInstance(self.nc - 1, int)
self.assertEqual(self.nc - 1.1, 64.9)
self.assertIsInstance(self.nc - 1.1, float)
def testMult(self):
self.assertEqual(self.nc * 2, 132)
self.assertIsInstance(self.nc * 2, int)
self.assertEqual(self.nc * 0.25, 16.5)
self.assertIsInstance(self.nc * 2.0, float)
def testRshift(self):
self.assertEqual(self.nc >> 1, 33)
self.assertIsInstance(self.nc >> 2, int)
def testLshift(self):
self.assertEqual(self.nc << 1, 132)
self.assertIsInstance(self.nc << 2, int)
def testAnd(self):
self.assertEqual(self.nc & 244, 66 & 244)
self.assertIsInstance(self.nc & 2, int)
def testOr(self):
self.assertEqual(self.nc | 40, 66 | 40)
self.assertIsInstance(self.nc | 2, int)
def testXor(self):
self.assertEqual(self.nc ^ 1, 66 ^ 1)
self.assertIsInstance(self.nc ^ 1, int)
def testFloorDiv(self):
self.assertEqual(self.nc // 3, 66 // 3)
self.assertEqual(3 // self.nc, 3 // 66)
def testDivMod(self):
self.assertEqual(divmod(self.nc, 3), divmod(66, 3))
self.assertEqual(divmod(3, self.nc), divmod(3, 66))
def testInv(self):
self.assertEqual(~self.nc, ~66)
def testPos(self):
self.assertEqual(+self.nc, +66)
def testPass(self):
fixture = jpype.JClass('jpype.common.Fixture')()
self.assertEqual(type(fixture.callObject(self.nc)), type(self.nc))
def check(self, u, v0, v1, v2):
self.assertEqual(v1, u)
self.assertEqual(u, v1)
self.assertNotEqual(v0, u)
self.assertNotEqual(u, v0)
self.assertNotEqual(v2, u)
self.assertNotEqual(u, v2)
self.assertTrue(u > v0)
self.assertFalse(u > v2)
self.assertTrue(u < v2)
self.assertFalse(u < v0)
self.assertTrue(v0 < u)
self.assertFalse(v2 < u)
self.assertTrue(v2 > u)
self.assertFalse(v0 > u)
self.assertTrue(u >= v1)
self.assertFalse(u >= v2)
self.assertTrue(v1 <= u)
self.assertFalse(v2 <= u)
def testCompareInt(self):
self.check(self.nc, 65, 66, 67)
def testCompareFloat(self):
self.check(self.nc, 65.0, 66.0, 67.0)
def testCompareJInt(self):
self.check(self.nc, JInt(65), JInt(66), JInt(67))
def testCompareJFloat(self):
self.check(self.nc, JFloat(65.0), JFloat(66.0), JFloat(67.0))
class JCharBoxedNullTestCase(common.JPypeTestCase):
def setUp(self):
common.JPypeTestCase.setUp(self)
self.nc = jpype.JObject(None, jpype.java.lang.Character)
def testStr(self):
self.assertEqual(type(str(self.nc)), str)
self.assertEqual(str(self.nc), 'None')
def testRepr(self):
self.assertEqual(type(repr(self.nc)), str)
self.assertEqual(repr(self.nc), 'None')
def testInt(self):
with self.assertRaises(TypeError):
int(self.nc)
def testFloat(self):
with self.assertRaises(TypeError):
float(self.nc)
def testSub(self):
with self.assertRaises(TypeError):
len(self.nc)
def testHash(self):
self.assertEqual(hash(self.nc), hash(None))
def testAdd(self):
with self.assertRaises(TypeError):
self.nc + 1
with self.assertRaises(TypeError):
1 + self.nc
def testSub(self):
with self.assertRaises(TypeError):
self.nc - 1
with self.assertRaises(TypeError):
1 - self.nc
def testMult(self):
with self.assertRaises(TypeError):
self.nc * 1
with self.assertRaises(TypeError):
1 * self.nc
def testRshift(self):
with self.assertRaises(TypeError):
self.nc >> 1
with self.assertRaises(TypeError):
1 >> self.nc
def testLshift(self):
with self.assertRaises(TypeError):
self.nc << 1
with self.assertRaises(TypeError):
1 << self.nc
def testAnd(self):
with self.assertRaises(TypeError):
self.nc & 1
with self.assertRaises(TypeError):
1 & self.nc
def testOr(self):
with self.assertRaises(TypeError):
self.nc | 1
with self.assertRaises(TypeError):
1 | self.nc
def testXor(self):
with self.assertRaises(TypeError):
self.nc ^ 1
with self.assertRaises(TypeError):
1 ^ self.nc
def testFloorDiv(self):
with self.assertRaises(TypeError):
self.nc // 1
with self.assertRaises(TypeError):
1 // self.nc
def testDivMod(self):
with self.assertRaises(TypeError):
divmod(self.nc, 1)
with self.assertRaises(TypeError):
divmod(1, self.nc)
def testInv(self):
with self.assertRaises(TypeError):
~self.nc
def testPos(self):
with self.assertRaises(TypeError):
+self.nc
def testPass(self):
fixture = jpype.JClass('jpype.common.Fixture')()
self.assertEqual(fixture.callObject(self.nc), None)
| 30.658879
| 86
| 0.601357
| 1,556
| 13,122
| 5.056555
| 0.102185
| 0.086934
| 0.094179
| 0.103203
| 0.77059
| 0.715048
| 0.6909
| 0.653787
| 0.643493
| 0.601423
| 0
| 0.033796
| 0.264899
| 13,122
| 427
| 87
| 30.730679
| 0.781879
| 0.011203
| 0
| 0.710914
| 0
| 0
| 0.04202
| 0.026908
| 0
| 0
| 0
| 0
| 0.474926
| 1
| 0.238938
| false
| 0.00885
| 0.011799
| 0
| 0.262537
| 0.00295
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8c05b81bf47ea60ca797bd79f44d7a048d6eca52
| 223
|
py
|
Python
|
examples/load_from_file/main.py
|
viniciuschiele/configd
|
f9b405cd2254f79152a13e57e2be907550ef83ed
|
[
"MIT"
] | 3
|
2017-03-17T15:44:26.000Z
|
2021-08-31T02:45:52.000Z
|
examples/load_from_file/main.py
|
viniciuschiele/configd
|
f9b405cd2254f79152a13e57e2be907550ef83ed
|
[
"MIT"
] | 1
|
2017-07-28T23:20:15.000Z
|
2017-07-29T11:13:49.000Z
|
examples/load_from_file/main.py
|
viniciuschiele/configd
|
f9b405cd2254f79152a13e57e2be907550ef83ed
|
[
"MIT"
] | 2
|
2021-06-26T20:57:24.000Z
|
2021-11-21T19:29:39.000Z
|
from central.config.file import FileConfig
config = FileConfig('config.json')
config.load()
print(config.get('timeout'))
print(config.get('database'))
print(config.get('database.host'))
print(config.get('database.port'))
| 22.3
| 42
| 0.753363
| 30
| 223
| 5.6
| 0.466667
| 0.261905
| 0.333333
| 0.392857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06278
| 223
| 9
| 43
| 24.777778
| 0.803828
| 0
| 0
| 0
| 0
| 0
| 0.233184
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.142857
| 0.571429
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
8c49e119bd276ab8615c3a7f51eff37f3b42ea1c
| 100
|
py
|
Python
|
eval/scripts/__init__.py
|
mbatchkarov/dc_evaluation
|
83fad49d597952957420b23c0d39c264c581e750
|
[
"BSD-3-Clause"
] | null | null | null |
eval/scripts/__init__.py
|
mbatchkarov/dc_evaluation
|
83fad49d597952957420b23c0d39c264c581e750
|
[
"BSD-3-Clause"
] | null | null | null |
eval/scripts/__init__.py
|
mbatchkarov/dc_evaluation
|
83fad49d597952957420b23c0d39c264c581e750
|
[
"BSD-3-Clause"
] | null | null | null |
__author__ = 'mmb28'
import sys
sys.path.append('.')
sys.path.append('..')
sys.path.append('../..')
| 16.666667
| 24
| 0.63
| 13
| 100
| 4.538462
| 0.461538
| 0.355932
| 0.661017
| 0.542373
| 0.661017
| 0.661017
| 0
| 0
| 0
| 0
| 0
| 0.021739
| 0.08
| 100
| 6
| 24
| 16.666667
| 0.619565
| 0
| 0
| 0
| 0
| 0
| 0.128713
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
4fdfd1c4ab06f23890420a493923d2a14bf8dc09
| 102
|
py
|
Python
|
kattis/I've Been Everywhere, Man.py
|
jaredliw/python-question-bank
|
9c8c246623d8d171f875700b57772df0afcbdcdf
|
[
"MIT"
] | 1
|
2021-04-08T07:49:15.000Z
|
2021-04-08T07:49:15.000Z
|
kattis/I've Been Everywhere, Man.py
|
jaredliw/leetcode-solutions
|
9c8c246623d8d171f875700b57772df0afcbdcdf
|
[
"MIT"
] | null | null | null |
kattis/I've Been Everywhere, Man.py
|
jaredliw/leetcode-solutions
|
9c8c246623d8d171f875700b57772df0afcbdcdf
|
[
"MIT"
] | 1
|
2022-01-23T02:12:24.000Z
|
2022-01-23T02:12:24.000Z
|
# CPU: 0.09 s
for _ in range(int(input())):
print(len(set(input() for _ in range(int(input())))))
| 25.5
| 57
| 0.598039
| 18
| 102
| 3.277778
| 0.666667
| 0.169492
| 0.338983
| 0.440678
| 0.610169
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035294
| 0.166667
| 102
| 3
| 58
| 34
| 0.658824
| 0.107843
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
8b09fd065dd599f9c34e182351ff1d15e47dc20c
| 117
|
py
|
Python
|
alumni/admin.py
|
ayushganguli1769/DevelopmentRobotix
|
1692c104a6f220aa1238840b791aa857a6cc7765
|
[
"Apache-2.0"
] | null | null | null |
alumni/admin.py
|
ayushganguli1769/DevelopmentRobotix
|
1692c104a6f220aa1238840b791aa857a6cc7765
|
[
"Apache-2.0"
] | 7
|
2020-02-12T02:54:35.000Z
|
2022-03-12T00:06:26.000Z
|
alumni/admin.py
|
ayushganguli1769/DevelopmentRobotix
|
1692c104a6f220aa1238840b791aa857a6cc7765
|
[
"Apache-2.0"
] | 6
|
2020-02-10T16:37:38.000Z
|
2021-01-28T13:39:46.000Z
|
from django.contrib import admin
from .models import Alumni
# Register your models here.
admin.site.register(Alumni)
| 23.4
| 32
| 0.811966
| 17
| 117
| 5.588235
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119658
| 117
| 4
| 33
| 29.25
| 0.92233
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8b2dde35e62db95e506b03f874b47c0094c23c3a
| 40
|
py
|
Python
|
cygraphblas/lib/monoid/ss.py
|
eriknw/cygraphblas
|
81ae37591ec38aa698d5f37716464a6c366076f9
|
[
"Apache-2.0"
] | 3
|
2020-09-03T21:47:25.000Z
|
2021-08-06T20:24:19.000Z
|
cygraphblas/lib/monoid/ss.py
|
eriknw/cygraphblas
|
81ae37591ec38aa698d5f37716464a6c366076f9
|
[
"Apache-2.0"
] | null | null | null |
cygraphblas/lib/monoid/ss.py
|
eriknw/cygraphblas
|
81ae37591ec38aa698d5f37716464a6c366076f9
|
[
"Apache-2.0"
] | 2
|
2020-09-03T21:47:52.000Z
|
2021-08-06T20:24:20.000Z
|
from cygraphblas_ss.lib.monoid import *
| 20
| 39
| 0.825
| 6
| 40
| 5.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 40
| 1
| 40
| 40
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
8c7091d977c72cdc7883602372339dbcde6de489
| 256
|
py
|
Python
|
lib/extensions/navigation_buttons_delayed_popup/startup.py
|
neurodiverseEsoteric/nimbus
|
a79a37d6001d84116831c9f3f99f5d9acfa7fd19
|
[
"CC-BY-3.0"
] | 3
|
2015-11-04T10:48:12.000Z
|
2020-07-12T06:46:27.000Z
|
lib/extensions/navigation_buttons_delayed_popup/startup.py
|
esotericDisciple/nimbus
|
a79a37d6001d84116831c9f3f99f5d9acfa7fd19
|
[
"CC-BY-3.0"
] | null | null | null |
lib/extensions/navigation_buttons_delayed_popup/startup.py
|
esotericDisciple/nimbus
|
a79a37d6001d84116831c9f3f99f5d9acfa7fd19
|
[
"CC-BY-3.0"
] | 1
|
2021-05-05T13:56:49.000Z
|
2021-05-05T13:56:49.000Z
|
self.toolBar.widgetForAction(self.backAction).setPopupMode(QToolButton.DelayedPopup)
self.toolBar.widgetForAction(self.forwardAction).setPopupMode(QToolButton.DelayedPopup)
self.toolBar.widgetForAction(self.upAction).setPopupMode(QToolButton.DelayedPopup)
| 64
| 87
| 0.882813
| 24
| 256
| 9.416667
| 0.375
| 0.146018
| 0.345133
| 0.39823
| 0.575221
| 0.575221
| 0.575221
| 0
| 0
| 0
| 0
| 0
| 0.011719
| 256
| 3
| 88
| 85.333333
| 0.893281
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8c7623c8e92992a9d432cf1310ca2b7d13d8b1c3
| 1,355
|
py
|
Python
|
code/chapter_04/listing_04_11.py
|
guinslym/python_earth_science_book
|
f4dd0115dbbce140c6713989f630a71238daa72c
|
[
"MIT"
] | 80
|
2021-04-19T10:03:57.000Z
|
2022-03-30T15:34:47.000Z
|
code/chapter_04/listing_04_11.py
|
guinslym/python_earth_science_book
|
f4dd0115dbbce140c6713989f630a71238daa72c
|
[
"MIT"
] | null | null | null |
code/chapter_04/listing_04_11.py
|
guinslym/python_earth_science_book
|
f4dd0115dbbce140c6713989f630a71238daa72c
|
[
"MIT"
] | 23
|
2021-04-25T03:50:07.000Z
|
2022-03-22T03:06:19.000Z
|
# Introductory examples
name = 'Maurizio'
surname = 'Petrelli'
print('-------------------------------------------------')
print('My name is {}'.format(name))
print('-------------------------------------------------')
print('My name is {} and my surname is {}'.format(name, surname))
print('-------------------------------------------------')
# Decimal Number formatting
PI = 3.14159265358979323846
print('----------------------------------------------------')
print("The 2 digit Archimedes' constant is equal to {:.2f}".format(PI))
print("The 3 digit Archimedes' constant is equal to {:.3f}".format(PI))
print("The 4 digit Archimedes' constant is equal to {:.4f}".format(PI))
print("The 5 digit Archimedes' constant is equal to {:.5f}".format(PI))
print('----------------------------------------------------')
'''Results
-------------------------------------------------
My name is Maurizio
-------------------------------------------------
My name is Maurizio and my surname is Petrelli
-------------------------------------------------
----------------------------------------------------
The 2 digit Archimedes' constant is equal to 3.14
The 3 digit Archimedes' constant is equal to 3.142
The 4 digit Archimedes' constant is equal to 3.1416
The 5 digit Archimedes' constant is equal to 3.14159
----------------------------------------------------
'''
| 43.709677
| 71
| 0.451661
| 136
| 1,355
| 4.5
| 0.257353
| 0.196078
| 0.300654
| 0.326797
| 0.535948
| 0.477124
| 0.477124
| 0.470588
| 0
| 0
| 0
| 0.041565
| 0.094465
| 1,355
| 30
| 72
| 45.166667
| 0.457213
| 0.034686
| 0
| 0.357143
| 0
| 0
| 0.67979
| 0.329396
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.785714
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 1
|
0
| 5
|
8c84673cd4c815a8dd356f023b667ff78319d314
| 868
|
py
|
Python
|
job-orchestrator/tests/transformers/test_model_paths.py
|
anaai/anaai
|
fa49ba107e7c6d32aef46796452308334517a224
|
[
"MIT"
] | 31
|
2022-01-26T21:47:31.000Z
|
2022-03-21T12:22:39.000Z
|
job-orchestrator/tests/transformers/test_model_paths.py
|
anaai/anaai
|
fa49ba107e7c6d32aef46796452308334517a224
|
[
"MIT"
] | 3
|
2022-01-24T11:16:05.000Z
|
2022-01-28T15:11:19.000Z
|
job-orchestrator/tests/transformers/test_model_paths.py
|
anaai/anaai
|
fa49ba107e7c6d32aef46796452308334517a224
|
[
"MIT"
] | 2
|
2022-02-08T12:07:55.000Z
|
2022-02-08T19:45:40.000Z
|
from transformers import model_paths
def test_candy_model():
assert model_paths.CANDY_FAST_NEURAL_TRANSFER_MODEL == "models/candy.t7"
def test_feathers_model():
assert model_paths.FEATHERS_FAST_NEURAL_TRANSFER_MODEL == "models/feathers.t7"
def test_mosaic_model():
assert model_paths.MOSAIC_FAST_NEURAL_TRANSFER_MODEL == "models/mosaic.t7"
def test_the_scream_model():
assert model_paths.THE_SCREAM_FAST_NEURAL_TRANSFER_MODEL == "models/the_scream.t7"
def test_udnie_model():
assert model_paths.UDNIE_FAST_NEURAL_TRANSFER_MODEL == "models/udnie.t7"
def test_celeba_distill_model():
assert model_paths.CELEBA_DISTILL_ANIME_GAN == "models/celeba_distill.pt"
def test_face_paint_model():
assert model_paths.FACE_PAINT_ANIME_GAN == "models/face_paint_512_v2.pt"
def test_paprika_model():
assert model_paths.PAPRIKA_ANIME_GAN == "models/paprika.pt"
| 33.384615
| 84
| 0.820276
| 130
| 868
| 5
| 0.223077
| 0.138462
| 0.196923
| 0.258462
| 0.223077
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011364
| 0.087558
| 868
| 25
| 85
| 34.72
| 0.809343
| 0
| 0
| 0
| 0
| 0
| 0.175115
| 0.058756
| 0
| 0
| 0
| 0
| 0.470588
| 1
| 0.470588
| true
| 0
| 0.058824
| 0
| 0.529412
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8caf6ff99d80c76a542d8a7fdffc2f654af14a1f
| 42
|
py
|
Python
|
helpers/__init__.py
|
sspbft/odin
|
30681d314748523cfbade15fc365510c78bbc711
|
[
"MIT"
] | null | null | null |
helpers/__init__.py
|
sspbft/odin
|
30681d314748523cfbade15fc365510c78bbc711
|
[
"MIT"
] | null | null | null |
helpers/__init__.py
|
sspbft/odin
|
30681d314748523cfbade15fc365510c78bbc711
|
[
"MIT"
] | null | null | null |
"""Package containing various helpers."""
| 21
| 41
| 0.738095
| 4
| 42
| 7.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 42
| 1
| 42
| 42
| 0.815789
| 0.833333
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8cc0682cc0b1ed8dabfc6863bc76066c537d9cd6
| 51
|
py
|
Python
|
autograd/__init__.py
|
mattjj/autograd_tutorial
|
c32947fbd7f130d791ab1e277a0feed05cb3da5f
|
[
"MIT"
] | 704
|
2018-01-30T16:41:47.000Z
|
2022-03-23T02:03:08.000Z
|
autograd/__init__.py
|
mattjj/autograd_tutorial
|
c32947fbd7f130d791ab1e277a0feed05cb3da5f
|
[
"MIT"
] | 6
|
2018-01-30T20:43:49.000Z
|
2020-04-27T13:27:08.000Z
|
autograd/__init__.py
|
mattjj/autograd_tutorial
|
c32947fbd7f130d791ab1e277a0feed05cb3da5f
|
[
"MIT"
] | 88
|
2018-02-03T16:36:54.000Z
|
2022-02-09T04:21:30.000Z
|
from .differential_operators import make_vjp, grad
| 25.5
| 50
| 0.862745
| 7
| 51
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098039
| 51
| 1
| 51
| 51
| 0.913043
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8cc70168627807f49cf2b5d78f4a3cbbdad4ed64
| 46
|
py
|
Python
|
bmcs_beam/mxn/scripts/__init__.py
|
bmcs-group/bmcs_beam
|
b53967d0d0461657ec914a3256ec40f9dcff80d5
|
[
"MIT"
] | 1
|
2021-05-07T11:10:27.000Z
|
2021-05-07T11:10:27.000Z
|
bmcs_beam/mxn/scripts/__init__.py
|
bmcs-group/bmcs_beam
|
b53967d0d0461657ec914a3256ec40f9dcff80d5
|
[
"MIT"
] | null | null | null |
bmcs_beam/mxn/scripts/__init__.py
|
bmcs-group/bmcs_beam
|
b53967d0d0461657ec914a3256ec40f9dcff80d5
|
[
"MIT"
] | null | null | null |
'''
Created on Dec 18, 2016
@author: rch
'''
| 7.666667
| 23
| 0.586957
| 7
| 46
| 3.857143
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 0.217391
| 46
| 5
| 24
| 9.2
| 0.583333
| 0.804348
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8ce591611d3e31d6c0cca2832c1850b12c745822
| 16,225
|
py
|
Python
|
sdk/python/pulumi_azure/waf/policy.py
|
pulumi-bot/pulumi-azure
|
64d5c30a77b3f4de117068add359ef85293cef8e
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_azure/waf/policy.py
|
pulumi-bot/pulumi-azure
|
64d5c30a77b3f4de117068add359ef85293cef8e
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_azure/waf/policy.py
|
pulumi-bot/pulumi-azure
|
64d5c30a77b3f4de117068add359ef85293cef8e
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Policy(pulumi.CustomResource):
custom_rules: pulumi.Output[list]
"""
One or more `custom_rules` blocks as defined below.
* `action` (`str`) - Type of action.
* `matchConditions` (`list`) - One or more `match_conditions` blocks as defined below.
* `matchValues` (`list`) - A list of match values.
* `matchVariables` (`list`) - One or more `match_variables` blocks as defined below.
* `selector` (`str`) - Describes field of the matchVariable collection
* `variableName` (`str`) - The name of the Match Variable
* `negationCondition` (`bool`) - Describes if this is negate condition or not
* `operator` (`str`) - Describes operator to be matched.
* `name` (`str`) - Gets name of the resource that is unique within a policy. This name can be used to access the resource.
* `priority` (`float`) - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
* `ruleType` (`str`) - Describes the type of rule.
"""
location: pulumi.Output[str]
"""
Resource location. Changing this forces a new resource to be created.
"""
managed_rules: pulumi.Output[dict]
"""
A `managed_rules` blocks as defined below.
* `exclusions` (`list`) - One or more `exclusion` block defined below.
* `matchVariable` (`str`)
* `selector` (`str`) - Describes field of the matchVariable collection.
* `selectorMatchOperator` (`str`) - Describes operator to be matched. Possible values: `Contains`, `EndsWith`, `Equals`, `EqualsAny`, `StartsWith`.
* `managedRuleSets` (`list`) - One or more `managed_rule_set` block defined below.
* `ruleGroupOverrides` (`list`) - One or more `rule_group_override` block defined below.
* `disabledRules` (`list`) - One or more Rule ID's
* `ruleGroupName` (`str`) - The name of the Rule Group
* `type` (`str`) - The rule set type.
* `version` (`str`) - The rule set version.
"""
name: pulumi.Output[str]
"""
The name of the policy. Changing this forces a new resource to be created.
"""
policy_settings: pulumi.Output[dict]
"""
A `policy_settings` block as defined below.
* `enabled` (`bool`) - Describes if the policy is in enabled state or disabled state Defaults to `Enabled`.
* `mode` (`str`) - Describes if it is in detection mode or prevention mode at the policy level Defaults to `Prevention`.
"""
resource_group_name: pulumi.Output[str]
"""
The name of the resource group. Changing this forces a new resource to be created.
"""
tags: pulumi.Output[dict]
"""
A mapping of tags to assign to the Web Application Firewall Policy.
"""
def __init__(__self__, resource_name, opts=None, custom_rules=None, location=None, managed_rules=None, name=None, policy_settings=None, resource_group_name=None, tags=None, __props__=None, __name__=None, __opts__=None):
"""
Manages a Azure Web Application Firewall Policy instance.
## Example Usage
```python
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US 2")
example_policy = azure.waf.Policy("examplePolicy",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
custom_rules=[
{
"name": "Rule1",
"priority": 1,
"ruleType": "MatchRule",
"match_conditions": [{
"match_variables": [{
"variableName": "RemoteAddr",
}],
"operator": "IPMatch",
"negationCondition": False,
"matchValues": [
"192.168.1.0/24",
"10.0.0.0/24",
],
}],
"action": "Block",
},
{
"name": "Rule2",
"priority": 2,
"ruleType": "MatchRule",
"match_conditions": [
{
"match_variables": [{
"variableName": "RemoteAddr",
}],
"operator": "IPMatch",
"negationCondition": False,
"matchValues": ["192.168.1.0/24"],
},
{
"match_variables": [{
"variableName": "RequestHeaders",
"selector": "UserAgent",
}],
"operator": "Contains",
"negationCondition": False,
"matchValues": ["Windows"],
},
],
"action": "Block",
},
],
policy_settings={
"enabled": True,
"mode": "Prevention",
},
managed_rules={
"exclusion": [
{
"matchVariable": "RequestHeaderNames",
"selector": "x-company-secret-header",
"selectorMatchOperator": "Equals",
},
{
"matchVariable": "RequestCookieNames",
"selector": "too-tasty",
"selectorMatchOperator": "EndsWith",
},
],
"managed_rule_set": [{
"type": "OWASP",
"version": "3.1",
"rule_group_override": [{
"ruleGroupName": "REQUEST-920-PROTOCOL-ENFORCEMENT",
"disabledRules": [
"920300",
"920440",
],
}],
}],
})
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[list] custom_rules: One or more `custom_rules` blocks as defined below.
:param pulumi.Input[str] location: Resource location. Changing this forces a new resource to be created.
:param pulumi.Input[dict] managed_rules: A `managed_rules` blocks as defined below.
:param pulumi.Input[str] name: The name of the policy. Changing this forces a new resource to be created.
:param pulumi.Input[dict] policy_settings: A `policy_settings` block as defined below.
:param pulumi.Input[str] resource_group_name: The name of the resource group. Changing this forces a new resource to be created.
:param pulumi.Input[dict] tags: A mapping of tags to assign to the Web Application Firewall Policy.
The **custom_rules** object supports the following:
* `action` (`pulumi.Input[str]`) - Type of action.
* `matchConditions` (`pulumi.Input[list]`) - One or more `match_conditions` blocks as defined below.
* `matchValues` (`pulumi.Input[list]`) - A list of match values.
* `matchVariables` (`pulumi.Input[list]`) - One or more `match_variables` blocks as defined below.
* `selector` (`pulumi.Input[str]`) - Describes field of the matchVariable collection
* `variableName` (`pulumi.Input[str]`) - The name of the Match Variable
* `negationCondition` (`pulumi.Input[bool]`) - Describes if this is negate condition or not
* `operator` (`pulumi.Input[str]`) - Describes operator to be matched.
* `name` (`pulumi.Input[str]`) - Gets name of the resource that is unique within a policy. This name can be used to access the resource.
* `priority` (`pulumi.Input[float]`) - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
* `ruleType` (`pulumi.Input[str]`) - Describes the type of rule.
The **managed_rules** object supports the following:
* `exclusions` (`pulumi.Input[list]`) - One or more `exclusion` block defined below.
* `matchVariable` (`pulumi.Input[str]`)
* `selector` (`pulumi.Input[str]`) - Describes field of the matchVariable collection.
* `selectorMatchOperator` (`pulumi.Input[str]`) - Describes operator to be matched. Possible values: `Contains`, `EndsWith`, `Equals`, `EqualsAny`, `StartsWith`.
* `managedRuleSets` (`pulumi.Input[list]`) - One or more `managed_rule_set` block defined below.
* `ruleGroupOverrides` (`pulumi.Input[list]`) - One or more `rule_group_override` block defined below.
* `disabledRules` (`pulumi.Input[list]`) - One or more Rule ID's
* `ruleGroupName` (`pulumi.Input[str]`) - The name of the Rule Group
* `type` (`pulumi.Input[str]`) - The rule set type.
* `version` (`pulumi.Input[str]`) - The rule set version.
The **policy_settings** object supports the following:
* `enabled` (`pulumi.Input[bool]`) - Describes if the policy is in enabled state or disabled state Defaults to `Enabled`.
* `mode` (`pulumi.Input[str]`) - Describes if it is in detection mode or prevention mode at the policy level Defaults to `Prevention`.
"""
if __name__ is not None:
warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
resource_name = __name__
if __opts__ is not None:
warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
opts = __opts__
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = dict()
__props__['custom_rules'] = custom_rules
__props__['location'] = location
if managed_rules is None:
raise TypeError("Missing required property 'managed_rules'")
__props__['managed_rules'] = managed_rules
__props__['name'] = name
__props__['policy_settings'] = policy_settings
if resource_group_name is None:
raise TypeError("Missing required property 'resource_group_name'")
__props__['resource_group_name'] = resource_group_name
__props__['tags'] = tags
super(Policy, __self__).__init__(
'azure:waf/policy:Policy',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name, id, opts=None, custom_rules=None, location=None, managed_rules=None, name=None, policy_settings=None, resource_group_name=None, tags=None):
"""
Get an existing Policy resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param str id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[list] custom_rules: One or more `custom_rules` blocks as defined below.
:param pulumi.Input[str] location: Resource location. Changing this forces a new resource to be created.
:param pulumi.Input[dict] managed_rules: A `managed_rules` blocks as defined below.
:param pulumi.Input[str] name: The name of the policy. Changing this forces a new resource to be created.
:param pulumi.Input[dict] policy_settings: A `policy_settings` block as defined below.
:param pulumi.Input[str] resource_group_name: The name of the resource group. Changing this forces a new resource to be created.
:param pulumi.Input[dict] tags: A mapping of tags to assign to the Web Application Firewall Policy.
The **custom_rules** object supports the following:
* `action` (`pulumi.Input[str]`) - Type of action.
* `matchConditions` (`pulumi.Input[list]`) - One or more `match_conditions` blocks as defined below.
* `matchValues` (`pulumi.Input[list]`) - A list of match values.
* `matchVariables` (`pulumi.Input[list]`) - One or more `match_variables` blocks as defined below.
* `selector` (`pulumi.Input[str]`) - Describes field of the matchVariable collection
* `variableName` (`pulumi.Input[str]`) - The name of the Match Variable
* `negationCondition` (`pulumi.Input[bool]`) - Describes if this is negate condition or not
* `operator` (`pulumi.Input[str]`) - Describes operator to be matched.
* `name` (`pulumi.Input[str]`) - Gets name of the resource that is unique within a policy. This name can be used to access the resource.
* `priority` (`pulumi.Input[float]`) - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
* `ruleType` (`pulumi.Input[str]`) - Describes the type of rule.
The **managed_rules** object supports the following:
* `exclusions` (`pulumi.Input[list]`) - One or more `exclusion` block defined below.
* `matchVariable` (`pulumi.Input[str]`)
* `selector` (`pulumi.Input[str]`) - Describes field of the matchVariable collection.
* `selectorMatchOperator` (`pulumi.Input[str]`) - Describes operator to be matched. Possible values: `Contains`, `EndsWith`, `Equals`, `EqualsAny`, `StartsWith`.
* `managedRuleSets` (`pulumi.Input[list]`) - One or more `managed_rule_set` block defined below.
* `ruleGroupOverrides` (`pulumi.Input[list]`) - One or more `rule_group_override` block defined below.
* `disabledRules` (`pulumi.Input[list]`) - One or more Rule ID's
* `ruleGroupName` (`pulumi.Input[str]`) - The name of the Rule Group
* `type` (`pulumi.Input[str]`) - The rule set type.
* `version` (`pulumi.Input[str]`) - The rule set version.
The **policy_settings** object supports the following:
* `enabled` (`pulumi.Input[bool]`) - Describes if the policy is in enabled state or disabled state Defaults to `Enabled`.
* `mode` (`pulumi.Input[str]`) - Describes if it is in detection mode or prevention mode at the policy level Defaults to `Prevention`.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = dict()
__props__["custom_rules"] = custom_rules
__props__["location"] = location
__props__["managed_rules"] = managed_rules
__props__["name"] = name
__props__["policy_settings"] = policy_settings
__props__["resource_group_name"] = resource_group_name
__props__["tags"] = tags
return Policy(resource_name, opts=opts, __props__=__props__)
def translate_output_property(self, prop):
return tables._CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop
def translate_input_property(self, prop):
return tables._SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop
| 51.671975
| 223
| 0.593467
| 1,768
| 16,225
| 5.296946
| 0.138009
| 0.070475
| 0.047838
| 0.026375
| 0.76252
| 0.747037
| 0.734544
| 0.710625
| 0.673999
| 0.664175
| 0
| 0.004415
| 0.302065
| 16,225
| 313
| 224
| 51.837061
| 0.822589
| 0.571094
| 0
| 0.031746
| 1
| 0
| 0.159776
| 0.013677
| 0
| 0
| 0
| 0
| 0
| 1
| 0.063492
| false
| 0.015873
| 0.095238
| 0.031746
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5080d44c3782fcef3563b3dbf70986c2e7c13739
| 283
|
py
|
Python
|
test_mersenne.py
|
Crulzor/algorithms-python-intro-ex
|
b3c10eff978a2f0f20e41c6d5aba24746ec07076
|
[
"Apache-2.0"
] | null | null | null |
test_mersenne.py
|
Crulzor/algorithms-python-intro-ex
|
b3c10eff978a2f0f20e41c6d5aba24746ec07076
|
[
"Apache-2.0"
] | null | null | null |
test_mersenne.py
|
Crulzor/algorithms-python-intro-ex
|
b3c10eff978a2f0f20e41c6d5aba24746ec07076
|
[
"Apache-2.0"
] | null | null | null |
from mersenne import generatePotentialMP, isPrime
def test_generatePotentialMP():
assert(generatePotentialMP(2) == 3)
assert(generatePotentialMP(1) ==1)
def test_isPrime():
assert(isPrime(7))
assert(isPrime(2))
assert(isPrime(3))
assert(isPrime(4) == False)
| 25.727273
| 49
| 0.710247
| 32
| 283
| 6.21875
| 0.4375
| 0.261307
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033613
| 0.159011
| 283
| 11
| 50
| 25.727273
| 0.802521
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0.222222
| true
| 0
| 0.111111
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
50bd37ee8461876376290a970632ede83e07fe93
| 183
|
py
|
Python
|
set.py
|
git4satya/koleksyon
|
966f3f6ea16a9c5c0bb12d2aec52c5c89e42090c
|
[
"MIT"
] | null | null | null |
set.py
|
git4satya/koleksyon
|
966f3f6ea16a9c5c0bb12d2aec52c5c89e42090c
|
[
"MIT"
] | null | null | null |
set.py
|
git4satya/koleksyon
|
966f3f6ea16a9c5c0bb12d2aec52c5c89e42090c
|
[
"MIT"
] | null | null | null |
from setuptools import setup, find_packages
from distutils.core import setup
from Cython.Build import cythonize
setup(name="mcmc", ext_modules=cythonize("./src/koleksyon/mcmc.pyx"))
| 30.5
| 69
| 0.808743
| 26
| 183
| 5.615385
| 0.692308
| 0.150685
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.087432
| 183
| 5
| 70
| 36.6
| 0.874252
| 0
| 0
| 0
| 0
| 0
| 0.153005
| 0.131148
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
50f6582522a07cfc18e387853c08f5bffb83bbd5
| 120
|
py
|
Python
|
src/som/vm/current.py
|
SOM-st/PySOM
|
65ef72f44252439b724a7429408dac7f8d1b1d98
|
[
"MIT"
] | 22
|
2015-10-29T05:11:06.000Z
|
2022-03-01T11:18:45.000Z
|
src/som/vm/current.py
|
smarr/PySOM
|
65ef72f44252439b724a7429408dac7f8d1b1d98
|
[
"MIT"
] | 16
|
2021-03-07T22:09:33.000Z
|
2021-08-24T12:36:15.000Z
|
src/som/vm/current.py
|
SOM-st/PySOM
|
65ef72f44252439b724a7429408dac7f8d1b1d98
|
[
"MIT"
] | 5
|
2015-01-02T03:51:29.000Z
|
2020-10-02T07:05:46.000Z
|
def _init():
from som.vm.universe import create_universe
return create_universe()
current_universe = _init()
| 15
| 47
| 0.733333
| 15
| 120
| 5.533333
| 0.666667
| 0.337349
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.183333
| 120
| 7
| 48
| 17.142857
| 0.846939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 5
|
0faef4c43d66c9f68163503158caeb67ad86c96d
| 386
|
py
|
Python
|
planner/progression/__init__.py
|
cyclone923/pyplanners
|
e2fe156ff00d0914cfb4f20afed158706f4d5d28
|
[
"MIT"
] | null | null | null |
planner/progression/__init__.py
|
cyclone923/pyplanners
|
e2fe156ff00d0914cfb4f20afed158706f4d5d28
|
[
"MIT"
] | null | null | null |
planner/progression/__init__.py
|
cyclone923/pyplanners
|
e2fe156ff00d0914cfb4f20afed158706f4d5d28
|
[
"MIT"
] | null | null | null |
from .hill_climbing import hill_climbing_search, strategies
from .best_first import path_cost_fn, greedy_cost_fn, weighted_cost_fn, macro_greedy_cost_fn, \
a_star_search, best_first_search, deferred_best_first_search, macro_deferred_best_first_search, semideferred_best_first_search
from .simple import dfs, bfs, srandom_walk, srrt
from .recurrent import rdfs, rbfs, random_walk, rrt
| 64.333333
| 128
| 0.860104
| 60
| 386
| 5.05
| 0.483333
| 0.148515
| 0.19802
| 0.151815
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088083
| 386
| 5
| 129
| 77.2
| 0.860795
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.8
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
0fc20baeb9198c74f7c0542feb89fb8850d4a334
| 401
|
py
|
Python
|
vkwave/vkscript/__init__.py
|
krasnovmv/vkwave
|
e0db86cc16f97797765aadfb811ec87ff7945b1f
|
[
"MIT"
] | 222
|
2020-03-30T18:09:20.000Z
|
2022-03-27T18:25:04.000Z
|
vkwave/vkscript/__init__.py
|
krasnovmv/vkwave
|
e0db86cc16f97797765aadfb811ec87ff7945b1f
|
[
"MIT"
] | 62
|
2020-03-30T18:31:25.000Z
|
2021-12-21T17:00:44.000Z
|
vkwave/vkscript/__init__.py
|
krasnovmv/vkwave
|
e0db86cc16f97797765aadfb811ec87ff7945b1f
|
[
"MIT"
] | 91
|
2020-03-30T18:34:49.000Z
|
2022-03-23T12:58:49.000Z
|
import vkwave.vkscript.handlers.assignments
import vkwave.vkscript.handlers.blocks
import vkwave.vkscript.handlers.calls
import vkwave.vkscript.handlers.expressions
import vkwave.vkscript.handlers.statements
import vkwave.vkscript.handlers.types
from .converter import VKScriptConverter
from .execute import Execute
from .execute import execute
__all__ = ("execute", "Execute", "VKScriptConverter")
| 30.846154
| 53
| 0.842893
| 46
| 401
| 7.26087
| 0.326087
| 0.215569
| 0.359281
| 0.502994
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.077307
| 401
| 12
| 54
| 33.416667
| 0.902703
| 0
| 0
| 0
| 0
| 0
| 0.077307
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.9
| 0
| 0.9
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
e8709f79e317a9c7cd2146a4a0c28214ab5b7958
| 22
|
py
|
Python
|
tccli/services/wss/v20180426/__init__.py
|
zyh911/tencentcloud-cli
|
dfc5dbd660d4c60d265921c4edc630091478fc41
|
[
"Apache-2.0"
] | null | null | null |
tccli/services/wss/v20180426/__init__.py
|
zyh911/tencentcloud-cli
|
dfc5dbd660d4c60d265921c4edc630091478fc41
|
[
"Apache-2.0"
] | null | null | null |
tccli/services/wss/v20180426/__init__.py
|
zyh911/tencentcloud-cli
|
dfc5dbd660d4c60d265921c4edc630091478fc41
|
[
"Apache-2.0"
] | null | null | null |
version = "2018-04-26"
| 22
| 22
| 0.681818
| 4
| 22
| 3.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.4
| 0.090909
| 22
| 1
| 22
| 22
| 0.35
| 0
| 0
| 0
| 0
| 0
| 0.434783
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e87e61caeabea7a4911a24a31a3d383ae4ecb968
| 126
|
py
|
Python
|
Server/myLibrary/admin.py
|
sepehrNorouzi/SemUniLib
|
dffeeb769ce5da4fb45a83d1792ec24adbb866e9
|
[
"MIT"
] | null | null | null |
Server/myLibrary/admin.py
|
sepehrNorouzi/SemUniLib
|
dffeeb769ce5da4fb45a83d1792ec24adbb866e9
|
[
"MIT"
] | null | null | null |
Server/myLibrary/admin.py
|
sepehrNorouzi/SemUniLib
|
dffeeb769ce5da4fb45a83d1792ec24adbb866e9
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Book, Favorite
admin.site.register(Book)
admin.site.register(Favorite)
| 18
| 34
| 0.809524
| 18
| 126
| 5.666667
| 0.555556
| 0.176471
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103175
| 126
| 7
| 35
| 18
| 0.902655
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
e89384cd4e1e1e1278f38d2fac8d56157408b3f2
| 149
|
py
|
Python
|
src/bert_summarizer/data/__init__.py
|
k-tahiro/bert-summarizer
|
03a09676130e4706b42ba6ab53c545fd10b84bce
|
[
"MIT"
] | 8
|
2020-10-05T02:34:40.000Z
|
2021-11-29T01:38:41.000Z
|
src/bert_summarizer/data/__init__.py
|
k-tahiro/bert-summarizer
|
03a09676130e4706b42ba6ab53c545fd10b84bce
|
[
"MIT"
] | 5
|
2021-04-01T07:15:26.000Z
|
2022-03-15T02:48:18.000Z
|
src/bert_summarizer/data/__init__.py
|
k-tahiro/bert-summarizer
|
03a09676130e4706b42ba6ab53c545fd10b84bce
|
[
"MIT"
] | 2
|
2021-09-30T09:10:55.000Z
|
2022-01-29T03:05:46.000Z
|
from .data_collator import (
DataCollatorWithPaddingWithAdditionalFeatures,
EncoderDecoderDataCollatorWithPadding,
)
from .datasets import *
| 24.833333
| 50
| 0.825503
| 9
| 149
| 13.555556
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127517
| 149
| 5
| 51
| 29.8
| 0.938462
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
e8cf1815da91e995a850a952f368039cd746e5df
| 89
|
py
|
Python
|
src/UQpy/surrogates/kriging/correlation_models/baseclass/__init__.py
|
SURGroup/UncertaintyQuantification
|
a94c8db47d07134ea2b3b0a3ca53ca818532c3e6
|
[
"MIT"
] | null | null | null |
src/UQpy/surrogates/kriging/correlation_models/baseclass/__init__.py
|
SURGroup/UncertaintyQuantification
|
a94c8db47d07134ea2b3b0a3ca53ca818532c3e6
|
[
"MIT"
] | null | null | null |
src/UQpy/surrogates/kriging/correlation_models/baseclass/__init__.py
|
SURGroup/UncertaintyQuantification
|
a94c8db47d07134ea2b3b0a3ca53ca818532c3e6
|
[
"MIT"
] | null | null | null |
from UQpy.surrogates.kriging.correlation_models.baseclass.Correlation import Correlation
| 44.5
| 88
| 0.898876
| 10
| 89
| 7.9
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044944
| 89
| 1
| 89
| 89
| 0.929412
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
e8d1a1267a50a6e4e81cbb82affa3e724bd9c390
| 841
|
py
|
Python
|
src/losses.py
|
saman-codes/dldojo
|
9fd828f1902ba3d46e9bb5f554ef37d07335b29e
|
[
"MIT"
] | null | null | null |
src/losses.py
|
saman-codes/dldojo
|
9fd828f1902ba3d46e9bb5f554ef37d07335b29e
|
[
"MIT"
] | null | null | null |
src/losses.py
|
saman-codes/dldojo
|
9fd828f1902ba3d46e9bb5f554ef37d07335b29e
|
[
"MIT"
] | null | null | null |
import numpy as np
class Loss():
def output_gradient(self):
return
class MSE(Loss):
def __call__(self, predicted, labels):
return 0.5 * np.square(predicted - labels)
def output_gradient(self, predicted, labels):
return predicted - labels
class BinaryCrossEntropy(Loss):
def __call__(self, predicted, labels):
return - np.nan_to_num((labels*np.log(predicted) + (1-labels)*np.log(1-predicted)))
def output_gradient(self, predicted, labels):
return np.nan_to_num(-(labels/predicted) + (1-labels)/(1-predicted))
class CategoricalCrossEntropy(Loss):
def __call__(self, predicted, labels):
return -np.nan_to_num(np.sum(labels*np.log(predicted), axis=0, keepdims=True))
def output_gradient(self, predicted, labels):
return -np.nan_to_num(labels/predicted)
| 30.035714
| 91
| 0.688466
| 111
| 841
| 5
| 0.261261
| 0.216216
| 0.205405
| 0.27027
| 0.558559
| 0.558559
| 0.558559
| 0.418018
| 0.418018
| 0.407207
| 0
| 0.010219
| 0.185493
| 841
| 27
| 92
| 31.148148
| 0.8
| 0
| 0
| 0.315789
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.368421
| false
| 0
| 0.052632
| 0.368421
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
2ce777497859d2197b79ee44dcd351d14e88fcd2
| 172
|
py
|
Python
|
scripts/item/consume_2434951.py
|
Snewmy/swordie
|
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
|
[
"MIT"
] | null | null | null |
scripts/item/consume_2434951.py
|
Snewmy/swordie
|
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
|
[
"MIT"
] | null | null | null |
scripts/item/consume_2434951.py
|
Snewmy/swordie
|
ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17
|
[
"MIT"
] | null | null | null |
# Soft-serve Damage Skin
success = sm.addDamageSkin(2434951)
if success:
sm.chat("The Soft-serve Damage Skin has been added to your account's damage skin collection.")
| 34.4
| 98
| 0.761628
| 27
| 172
| 4.851852
| 0.703704
| 0.229008
| 0.229008
| 0.290076
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047945
| 0.151163
| 172
| 4
| 99
| 43
| 0.849315
| 0.127907
| 0
| 0
| 0
| 0
| 0.560811
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2cf7ede7519b76677c68ab0cf790c978c3c5cc8f
| 203
|
py
|
Python
|
genda/formats/__init__.py
|
jeffhsu3/genda
|
5adbb5b5620c592849fa4a61126b934e1857cd77
|
[
"BSD-3-Clause"
] | 5
|
2016-01-12T15:12:18.000Z
|
2022-02-10T21:57:39.000Z
|
genda/formats/__init__.py
|
jeffhsu3/genda
|
5adbb5b5620c592849fa4a61126b934e1857cd77
|
[
"BSD-3-Clause"
] | 5
|
2015-01-20T04:22:50.000Z
|
2018-10-02T19:39:12.000Z
|
genda/formats/__init__.py
|
jeffhsu3/genda
|
5adbb5b5620c592849fa4a61126b934e1857cd77
|
[
"BSD-3-Clause"
] | 1
|
2022-03-04T06:49:39.000Z
|
2022-03-04T06:49:39.000Z
|
""" Formats submodule contains classes and functions
to parse various formats into pandas dataframes as
well as lookup utilities to various formats
"""
from .gene_utils import *
from .panVCF import VCF
| 25.375
| 52
| 0.79803
| 29
| 203
| 5.551724
| 0.758621
| 0.173913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157635
| 203
| 7
| 53
| 29
| 0.94152
| 0.704434
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2cffde54fce64df2346d3c12e08ed04887efeb6d
| 129
|
py
|
Python
|
build/ARM/arch/arm/ArmSemihosting.py
|
zhoushuxin/impl_of_HPCA2018
|
594d807fb0c0712bb7766122c4efe3321d012687
|
[
"BSD-3-Clause"
] | 5
|
2019-12-12T16:26:09.000Z
|
2022-03-17T03:23:33.000Z
|
build/ARM/arch/arm/ArmSemihosting.py
|
zhoushuxin/impl_of_HPCA2018
|
594d807fb0c0712bb7766122c4efe3321d012687
|
[
"BSD-3-Clause"
] | null | null | null |
build/ARM/arch/arm/ArmSemihosting.py
|
zhoushuxin/impl_of_HPCA2018
|
594d807fb0c0712bb7766122c4efe3321d012687
|
[
"BSD-3-Clause"
] | null | null | null |
version https://git-lfs.github.com/spec/v1
oid sha256:60c08155c02f8c1321979a81a67a2ef5a0bc292b2d26a9e5be7e6e1cb484e248
size 2756
| 32.25
| 75
| 0.883721
| 13
| 129
| 8.769231
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.398374
| 0.046512
| 129
| 3
| 76
| 43
| 0.528455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d74be0e6efcefb06e3529cae5316490cf81fffce
| 130
|
py
|
Python
|
fmojinja/awk/__main__.py
|
Taro-Imahiro/fmojinja
|
5b2c4100e25bd198b1cf8ed44b37b1c4bb93d2ee
|
[
"MIT"
] | null | null | null |
fmojinja/awk/__main__.py
|
Taro-Imahiro/fmojinja
|
5b2c4100e25bd198b1cf8ed44b37b1c4bb93d2ee
|
[
"MIT"
] | 13
|
2021-07-06T07:03:58.000Z
|
2021-11-22T15:25:22.000Z
|
fmojinja/awk/__main__.py
|
Taro-Imahiro/fmojinja
|
5b2c4100e25bd198b1cf8ed44b37b1c4bb93d2ee
|
[
"MIT"
] | 3
|
2021-06-26T19:40:34.000Z
|
2021-09-15T04:24:21.000Z
|
from ..mixin import SubCommands
from .pdb_reformer import PdbReformer
SubCommands.main_proc({
"pdb_reformer": PdbReformer
})
| 18.571429
| 37
| 0.784615
| 15
| 130
| 6.6
| 0.6
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130769
| 130
| 6
| 38
| 21.666667
| 0.876106
| 0
| 0
| 0
| 0
| 0
| 0.092308
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d782321c51f6868ecf0aeda657d36d93a32a2794
| 18,087
|
py
|
Python
|
tests/engine/test_error_handling.py
|
vanguard/sql_translate
|
28ae149e54a300c3337b538691be80d878a7dbf2
|
[
"Apache-2.0"
] | 3
|
2021-03-19T21:39:29.000Z
|
2021-03-26T14:00:24.000Z
|
tests/engine/test_error_handling.py
|
vanguard/sql_translate
|
28ae149e54a300c3337b538691be80d878a7dbf2
|
[
"Apache-2.0"
] | 1
|
2021-07-07T11:45:04.000Z
|
2021-07-07T11:45:04.000Z
|
tests/engine/test_error_handling.py
|
vanguard/sql_translate
|
28ae149e54a300c3337b538691be80d878a7dbf2
|
[
"Apache-2.0"
] | null | null | null |
import unittest
import pytest
import sqlparse
from sql_translate.engine import error_handling
from typing import Dict, List
import re
E = error_handling._ErrorHandler() # Just for coverage
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("select cast(a as integer)",
"line 1:8: Cannot cast timestamp to integer (1)",
"select to_unixtime(a)"),
("select cast(a as integer) as a",
"line 1:8: Cannot cast timestamp to integer (1)",
"select to_unixtime(a) AS a")
])
def test_cast_timestamp_to_epoch(statement: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._cast_timestamp_to_epoch]
assert ErrorHandlerHiveToPresto._cast_timestamp_to_epoch(statement, re.search(pattern[0], error_message)) == expected
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("select 1 in (select '1')",
"line 1:10: value and result of subquery must be of the same type for IN expression: integer vs varchar (1)",
"select cast(1 AS varchar) in (select '1')")
])
def test_cast_in_subquery(statement: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._cast_in_subquery]
assert ErrorHandlerHiveToPresto._cast_in_subquery(statement, re.search(pattern[0], error_message)) == expected
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("select coalesce('1', 1)",
"line 1:22: All COALESCE operands must be the same type: varchar (1)",
"select coalesce('1', cast(1 AS varchar))")
])
def test_coalesce_statements(statement: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._coalesce_statements]
assert ErrorHandlerHiveToPresto._coalesce_statements(statement, re.search(pattern[0], error_message)) == expected
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("select case when true then 'a' else 1 end",
"line 1:37: All CASE results must be the same type: varchar (1)",
"select case when true then 'a' else cast(1 AS varchar) end")
])
def test_case_statements(statement: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._case_statements]
assert ErrorHandlerHiveToPresto._case_statements(statement, re.search(pattern[0], error_message)) == expected
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("select a \nfrom cte\nwhere a in ( \n 1, 2, 3)",
"line 4:2: IN value and list items must be the same type: bigint (1)",
"select a \nfrom cte\nwhere cast(a AS bigint) in ( \n 1, 2, 3)"),
("select a \nfrom cte\nwhere a in (1.1, 2.3, 3.1)",
"line 3:13: IN value and list items must be the same type: float (1)",
"select a \nfrom cte\nwhere cast(a AS double) in (1.1, 2.3, 3.1)"),
("select a \nfrom cte\nwhere a in ('1', '2', '3')",
"line 3:13: IN value and list items must be the same type: varchar (1)",
"select a \nfrom cte\nwhere cast(a AS varchar) in ('1', '2', '3')"),
("select a \nfrom cte\nwhere a in ('1')",
"line 3:13: IN value and list items must be the same type: varchar (1)",
"select a \nfrom cte\nwhere cast(a AS varchar) in ('1')")
])
def test_cast_in(statement: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._cast_in]
assert ErrorHandlerHiveToPresto._cast_in(statement, re.search(pattern[0], error_message)) == expected
@pytest.mark.parametrize(['statement', 'error_message'], [
("select a \nfrom cte\nwhere a in ( \n 1, '2', 3)",
"line 4:2: IN value and list items must be the same type: bigint (1)")
])
def test_cast_in_ValueError(statement: str, error_message: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._cast_in]
with pytest.raises(ValueError):
ErrorHandlerHiveToPresto._cast_in(statement, re.search(pattern[0], error_message))
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("select cast(a as integer) from cte",
"line 1:8: Cannot cast char(10) to integer (1)",
"select cast(trim(cast(a AS varchar)) AS integer) from cte"),
("select a from cte",
"line 1:8: Cannot cast bigint to integer (1)",
"select a from cte")
])
def test_cannot_cast_to_type(statement: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._cannot_cast_to_type]
assert ErrorHandlerHiveToPresto._cannot_cast_to_type(statement, re.search(pattern[0], error_message)) == expected
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("select a from cte where b between c and d",
"line 1:27: Cannot check if varchar is BETWEEN varchar and date (1)",
"select a from cte where b between c and cast(d AS varchar)"),
("select a from cte where b between c and d",
"line 1:27: Cannot check if double is BETWEEN double and date (1)",
"select a from cte where cast(b AS varchar) between cast(c AS varchar) and cast(d AS varchar)")
])
def test_between(statement: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._between]
assert ErrorHandlerHiveToPresto._between(statement, re.search(pattern[0], error_message)) == expected
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("select a from db.vcte", # Table name start with v --> try with "t" as this could be a view
"Table 'db.vcte' not found (1)",
"select a from db.tcte"),
("select a from db.cte",
"Table 'db.cte' not found (1)",
"select a from db.cte_presto") # Table name does not start with v
])
def test_table_not_found(statement: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._table_not_found]
assert ErrorHandlerHiveToPresto._table_not_found(statement, re.search(pattern[0], error_message)) == expected
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("select concat(1, '1') from b inner join c\n ON a.my_col=b.another_col\nwhere d=e",
"line 1:8: Unexpected parameters (bigint, varchar) for function concat (1)",
"select concat(cast(1 AS varchar), cast('1' AS varchar)) from b inner join c\n ON a.my_col=b.another_col\nwhere d=e"),
("select concat(max(1), '1') from b inner join c\n ON a.my_col=b.another_col\nwhere d=e",
"line 1:8: Unexpected parameters (bigint, varchar) for function concat (1)",
"select concat(cast(max(1) AS varchar), cast('1' AS varchar)) from b inner join c\n ON a.my_col=b.another_col\nwhere d=e")
])
def test_unexpected_parameters(statement: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._unexpected_parameters]
assert ErrorHandlerHiveToPresto._unexpected_parameters(statement, re.search(pattern[0], error_message)) == expected
@pytest.mark.parametrize(['statement', 'error_message'], [
("select something(1, '1') from b inner join c\n ON a.my_col=b.another_col\nwhere d=e",
"line 1:8: Unexpected parameters (bigint, varchar) for function something (1)"),
("select concat(a - b, a or b) from b inner join c\n ON a.my_col=b.another_col\nwhere d=e",
"line 1:8: Unexpected parameters (bigint, varchar) for function concat (1)")
])
def test_unexpected_parameters_NotImplementedError(statement: str, error_message: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._unexpected_parameters]
with pytest.raises(NotImplementedError):
ErrorHandlerHiveToPresto._unexpected_parameters(statement, re.search(pattern[0], error_message))
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("select 'a' =1",
"line 1:12: '=' cannot be applied to varchar, bigint (1)",
"select 'a' =cast(1 AS varchar)"),
("select 'a' >1",
"line 1:12: '>' cannot be applied to varchar, bigint (1)",
"select 'a' >cast(1 AS varchar)"),
("select 'a' <1",
"line 1:12: '<' cannot be applied to varchar, bigint (1)",
"select 'a' <cast(1 AS varchar)"),
("select 'a' >=1",
"line 1:12: '>=' cannot be applied to varchar, bigint (1)",
"select 'a' >=cast(1 AS varchar)"),
("select 'a' <=1",
"line 1:12: '<=' cannot be applied to varchar, bigint (1)",
"select 'a' <=cast(1 AS varchar)"),
("select 'a' !=1",
"line 1:12: '!=' cannot be applied to varchar, bigint (1)",
"select 'a' !=cast(1 AS varchar)"),
("select a from b inner join c\n ON a.my_col=b.another_col\nwhere d=e",
"line 2:18: '=' cannot be applied to bigint, varchar (1)",
"select a from b inner join c\n ON cast(a.my_col AS varchar)=b.another_col\nwhere d=e"),
("select a from b inner join c\n ON a.my_col=b.another_col\nwhere d=e",
"line 2:18: '=' cannot be applied to date, timestamp (1)",
"select a from b inner join c\n ON cast(a.my_col AS varchar)=cast(b.another_col AS varchar)\nwhere d=e"),
("select a\nfrom b\nwhere cast(event_date AS varchar)>='2021-01-21' AND event_date<='2021-01-23'",
"line 3:63: '<=' cannot be applied to date, varchar(10) (1)",
"select a\nfrom b\nwhere cast(event_date AS varchar)>='2021-01-21' AND cast(event_date AS varchar)<='2021-01-23'")
])
def test_cast_both_sides(statement: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._cast_both_sides]
assert ErrorHandlerHiveToPresto._cast_both_sides(statement, re.search(pattern[0], error_message)) == expected
@pytest.mark.parametrize(['statement', 'table_properties', 'expected'], [
("with cte AS (select b from cte2) select b from cte", {"columns": {"b": "bigint"}}, "with cte AS (select b from cte2) SELECT\nb\nfrom cte"), # No wildcard
("with cte AS (select b from cte2) select count(*) as b from cte", {"columns": {"b": "bigint"}}, "with cte AS (select b from cte2) SELECT\ncount(*) AS b\nfrom cte"), # No wildcard
("with cte AS (select b from cte2) select * from cte",
{"columns": {"c": "bigint", "d": "bigint", "e": "bigint", "a": "bigint"}},
"with cte AS (select b from cte2) SELECT\nc,\nd,\ne,\na\nfrom cte"), # select *
("with cte AS (select b from cte2) select a.*, c as d from cte", # Wildcard then regular column
{"columns": {"b": "bigint", "d": "varchar"}},
"with cte AS (select b from cte2) SELECT\nb,\nc AS d\nfrom cte"),
("with cte AS (select b from cte2) select c as d, * from cte", # regular column then wildcard
{"columns": {"b": "bigint", "d": "varchar"}},
"with cte AS (select b from cte2) SELECT\nc AS d,\nb\nfrom cte"),
("with cte AS (select b, c from cte2) select foo(a) as d, *, cte.a, `hey yo` from cte", # Wildcard in the middle bringing 2+ columns in
{"columns": {"a": "bigint", "c": "varchar", "some thing": "varchar", "d": "varchar", "hey yo": "varchar"}},
"with cte AS (select b, c from cte2) SELECT\nfoo(a) AS d,\nc,\n`some thing`,\ncte.a,\n`hey yo`\nfrom cte") # Final column order is not sorted by * replacement is
])
def test_expand_wildcards(statement: str, table_properties: Dict[str, str], expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
assert ErrorHandlerHiveToPresto._expand_wildcards(statement, table_properties) == expected
@pytest.mark.parametrize(['statement', 'table_properties'], [
("with cte AS (select b from cte2) select *, cte.* from cte", {"columns": {"b": "bigint"}}) # Double wildcard
])
def test_expand_wildcards_ValueError(statement: str, table_properties: Dict[str, str]) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
with pytest.raises(ValueError):
ErrorHandlerHiveToPresto._expand_wildcards(statement, table_properties)
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("""with abc AS (
SELECT b
FROM c
GROUP BY b)
SELECT
d, e, f, g, CURRENT_DATE AS hhh
FROM abc a
LEFT JOIN def b
ON a.b = b.b""",
"Mismatch at column 2: 'e' is of type bigint but expression is of type double (1)",
"""with abc AS (
SELECT b
FROM c
GROUP BY b)
SELECT
d,
cast(e AS bigint) AS e,
f,
g,
CURRENT_DATE AS hhh
FROM abc a
LEFT JOIN def b
ON a.b = b.b"""
),
("select name.my_col a from b inner join c\n ON name.my_col=b.another_col\nwhere d=e",
"Mismatch at column 1: 'my_col' is of type char(1) but expression is of type smallint (1)",
"SELECT\ncast(cast(name.my_col AS varchar) AS char(1)) AS a\nfrom b inner join c\n ON name.my_col=b.another_col\nwhere d=e"),
("select name.my_col a from b inner join c\n ON name.my_col=b.another_col\nwhere d=e",
"Mismatch at column 1: 'my_col' is of type varchar but expression is of type char(1) (1)",
"SELECT\ncast(name.my_col AS varchar) AS a\nfrom b inner join c\n ON name.my_col=b.another_col\nwhere d=e"),
("select name.my_col from b inner join c\n ON name.my_col=b.another_col\nwhere d=e",
"Mismatch at column 1: 'my_col' is of type varchar but expression is of type char(1) (1)",
"SELECT\ncast(name.my_col AS varchar) AS my_col\nfrom b inner join c\n ON name.my_col=b.another_col\nwhere d=e"),
("with abc as (select name.my_col from b inner join c\n ON name.my_col=b.another_col\nwhere d=e) select j.my_col, k.my_col from abc",
"Mismatch at column 2: 'my_col' is of type varchar but expression is of type char(1) (1)",
"with abc as (select name.my_col from b inner join c\n ON name.my_col=b.another_col\nwhere d=e) SELECT\nj.my_col,\ncast(k.my_col AS varchar) AS my_col\nfrom abc"),
("with abc as (select name.my_col from b inner join c\n ON name.my_col=b.another_col\nwhere d=e) select my_col, case when a=1 then 'Y' else 'N' end from abc",
"Mismatch at column 2: 'unknown_col' is of type varchar but expression is of type char(1) (1)",
"with abc as (select name.my_col from b inner join c\n ON name.my_col=b.another_col\nwhere d=e) SELECT\nmy_col,\ncast(case when a=1 then 'Y' else 'N' end AS varchar) AS unknown_col\nfrom abc"),
("with abc as (select name.my_col from b inner join c\n ON name.my_col=b.another_col\nwhere d=e) select my_col, concat('a', max('b')) as c, k.my_col from abc",
"Mismatch at column 2: 'c' is of type varchar but expression is of type bigint (1)",
"with abc as (select name.my_col from b inner join c\n ON name.my_col=b.another_col\nwhere d=e) SELECT\nmy_col,\ncast(concat('a', max('b')) AS varchar) AS c,\nk.my_col\nfrom abc"),
("select name.my_col, cte.my_col from name inner join cte\n ON name.my_col=cte.my_col\nwhere d=e",
"Mismatch at column 1: 'my_col' is of type char(1) but expression is of type smallint (1)",
"SELECT\ncast(cast(name.my_col AS varchar) AS char(1)) AS my_col,\ncte.my_col\nfrom name inner join cte\n ON name.my_col=cte.my_col\nwhere d=e")
])
def test_column_type_mismatch(statement: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
pattern = [k for k, v in ErrorHandlerHiveToPresto.known_issues.items() if v == ErrorHandlerHiveToPresto._column_type_mismatch]
assert ErrorHandlerHiveToPresto._column_type_mismatch(statement, re.search(pattern[0], error_message), temp_tgt_table_properties={"columns": {}}) == expected
@pytest.mark.parametrize(['statement', 'error_message', 'expected'], [
("select cast(a AS bigint) from cte", "line 1:8: Cannot cast timestamp to bigint (1)", "select to_unixtime(a) from cte")
])
def test_handle_errors(statement: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
assert ErrorHandlerHiveToPresto.handle_errors(statement, statement, error_message) == (expected, expected)
@pytest.mark.parametrize(['statement', 'original_sql', 'error_message', 'expected'], [
("select a, cast(a AS bigint) from cte", "select {a}, cast(a AS bigint) from cte", "line 1:11: Cannot cast timestamp to bigint (1)", "select a, to_unixtime(a) from cte")
])
def test_handle_errors_Exception(statement: str, original_sql: str, error_message: str, expected: str) -> None:
ErrorHandlerHiveToPresto = error_handling.ErrorHandlerHiveToPresto()
assert ErrorHandlerHiveToPresto.handle_errors(statement, original_sql, error_message) == (expected, "")
| 62.368966
| 203
| 0.697241
| 2,720
| 18,087
| 4.525
| 0.073529
| 0.023562
| 0.020474
| 0.020556
| 0.830679
| 0.790705
| 0.766331
| 0.725544
| 0.697758
| 0.663308
| 0
| 0.017092
| 0.168685
| 18,087
| 289
| 204
| 62.584775
| 0.801476
| 0.017748
| 0
| 0.298755
| 0
| 0.178423
| 0.503555
| 0.061992
| 0
| 0
| 0
| 0
| 0.058091
| 1
| 0.070539
| false
| 0
| 0.024896
| 0
| 0.095436
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d78adda6c383319ee2452a20f3e7494d5bd7a171
| 145
|
py
|
Python
|
helloworld/api/v1.py
|
ElyasSantana/example-api
|
f99cff55a152e3ab4e1b3490d2632e8f06b7f7fb
|
[
"MIT"
] | null | null | null |
helloworld/api/v1.py
|
ElyasSantana/example-api
|
f99cff55a152e3ab4e1b3490d2632e8f06b7f7fb
|
[
"MIT"
] | null | null | null |
helloworld/api/v1.py
|
ElyasSantana/example-api
|
f99cff55a152e3ab4e1b3490d2632e8f06b7f7fb
|
[
"MIT"
] | null | null | null |
from fastapi import APIRouter
router_helloworld = APIRouter()
@router_helloworld.get("/")
def get_helloworld():
return {"Hello": "World"}
| 16.111111
| 31
| 0.724138
| 16
| 145
| 6.375
| 0.6875
| 0.294118
| 0.490196
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 145
| 8
| 32
| 18.125
| 0.816
| 0
| 0
| 0
| 0
| 0
| 0.075862
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 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
| 1
| 0
| 0
|
0
| 5
|
ad2017893d41afb16c0e80e4020d3f6bd20849ba
| 109
|
py
|
Python
|
tests/__init__.py
|
antoinebourayne/sd2c
|
c76a0c56d5836caba9e6b90cdf7235516e2dd694
|
[
"Apache-2.0"
] | null | null | null |
tests/__init__.py
|
antoinebourayne/sd2c
|
c76a0c56d5836caba9e6b90cdf7235516e2dd694
|
[
"Apache-2.0"
] | null | null | null |
tests/__init__.py
|
antoinebourayne/sd2c
|
c76a0c56d5836caba9e6b90cdf7235516e2dd694
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Ceci est un module avec les tests unitaires et les tests d'intégrations.
"""
| 21.8
| 76
| 0.633028
| 16
| 109
| 4.3125
| 0.875
| 0.231884
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011628
| 0.211009
| 109
| 4
| 77
| 27.25
| 0.790698
| 0.87156
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ad3017e922c09970a0f8a72fe88d8aaa1a57078a
| 224,543
|
py
|
Python
|
src/Intel_Project (1).py
|
Lance-Dsilva/Intel-Image-Classification-Using-CNN-91-Accuracy-
|
e5b729dddaa3671337c6c5019b69fc6ca2c868c0
|
[
"Unlicense"
] | null | null | null |
src/Intel_Project (1).py
|
Lance-Dsilva/Intel-Image-Classification-Using-CNN-91-Accuracy-
|
e5b729dddaa3671337c6c5019b69fc6ca2c868c0
|
[
"Unlicense"
] | null | null | null |
src/Intel_Project (1).py
|
Lance-Dsilva/Intel-Image-Classification-Using-CNN-91-Accuracy-
|
e5b729dddaa3671337c6c5019b69fc6ca2c868c0
|
[
"Unlicense"
] | null | null | null |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://github.githubassets.com">
<link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars2.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars3.githubusercontent.com">
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
<link crossorigin="anonymous" media="all" integrity="sha512-aZYk5AYsRiFiFG04Si6FnQoHFwAugnodzKJXgafKqPWsrgrjoWRsapCn//vFuWqjSzr72ucZfPq8/ZbduuSeQg==" rel="stylesheet" href="https://github.githubassets.com/assets/frameworks-next-699624e4062c462162146d384a2e859d.css" />
<link crossorigin="anonymous" media="all" integrity="sha512-c8D4SY7t8jv4IDDWg1Nv+UWEL0qRjmWc3oneTTGvc0yTWolwMo26Spqm29MlqLWPVRkovXK+A08bN/tiPAPDiQ==" rel="stylesheet" href="https://github.githubassets.com/assets/github-next-73c0f8498eedf23bf82030d683536ff9.css" />
<meta name="viewport" content="width=device-width">
<title>Intel-Image-Classification-Using-CNN/Intel_Project (1).py at master · Novia-2018/Intel-Image-Classification-Using-CNN</title>
<meta name="description" content="🧠 An Awesome Deep Learning Model That Classify And Predicts Images According To Their Classes - Novia-2018/Intel-Image-Classification-Using-CNN">
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
<meta property="fb:app_id" content="1401488693436528">
<meta name="apple-itunes-app" content="app-id=1477376905">
<meta name="twitter:image:src" content="https://avatars0.githubusercontent.com/u/56831817?s=400&v=4" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary" /><meta name="twitter:title" content="Novia-2018/Intel-Image-Classification-Using-CNN" /><meta name="twitter:description" content="🧠 An Awesome Deep Learning Model That Classify And Predicts Images According To Their Classes - Novia-2018/Intel-Image-Classification-Using-CNN" />
<meta property="og:image" content="https://avatars0.githubusercontent.com/u/56831817?s=400&v=4" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="Novia-2018/Intel-Image-Classification-Using-CNN" /><meta property="og:url" content="https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN" /><meta property="og:description" content="🧠 An Awesome Deep Learning Model That Classify And Predicts Images According To Their Classes - Novia-2018/Intel-Image-Classification-Using-CNN" />
<link rel="assets" href="https://github.githubassets.com/">
<link rel="shared-web-socket" href="wss://live.github.com/_luau/eyJ2IjoiVjMiLCJ1Ijo1NjgzMTgxNywicyI6NTUwOTMxNTE2LCJjIjoxMjU0ODg5Nzg2LCJ0IjoxNTkzMDk0ODQ3fQ==--2c919c035103de1a8219435bdefb3f5b2cf063b2c50fbd0f09ac9b5a025beb03" data-refresh-url="/_ws">
<link rel="sudo-modal" href="/sessions/sudo_modal">
<meta name="request-id" content="ED9C:2812:81E274:AE09B0:5EF4B2BB" data-pjax-transient="true" /><meta name="html-safe-nonce" content="cdf26e54f7effe8837c2e5229a6e51344c033a6f" data-pjax-transient="true" /><meta name="visitor-payload" content="eyJyZWZlcnJlciI6Imh0dHBzOi8vZ2l0aHViLmNvbS9Ob3ZpYS0yMDE4L0ludGVsLUltYWdlLUNsYXNzaWZpY2F0aW9uLVVzaW5nLUNOTi90cmVlL21hc3Rlci9zcmMiLCJyZXF1ZXN0X2lkIjoiRUQ5QzoyODEyOjgxRTI3NDpBRTA5QjA6NUVGNEIyQkIiLCJ2aXNpdG9yX2lkIjoiNzEzNTU1NzQyMTkwMzQyNjExMiIsInJlZ2lvbl9lZGdlIjoiYXAtc291dGgtMSIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==" data-pjax-transient="true" /><meta name="visitor-hmac" content="5468ad20fa2c29ebf034c6a7ada6fc49b16dec3f3d0b02385a3acb176c1fd43b" data-pjax-transient="true" />
<meta name="github-keyboard-shortcuts" content="repository,source-code" data-pjax-transient="true" />
<meta name="selected-link" value="repo_source" data-pjax-transient>
<meta name="google-site-verification" content="c1kuD-K2HIVF635lypcsWPoD4kilo5-jA_wBFyT4uMY">
<meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
<meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc">
<meta name="octolytics-host" content="collector.githubapp.com" /><meta name="octolytics-app-id" content="github" /><meta name="octolytics-event-url" content="https://collector.githubapp.com/github-external/browser_event" /><meta name="octolytics-dimension-ga_id" content="" class="js-octo-ga-id" /><meta name="octolytics-actor-id" content="56831817" /><meta name="octolytics-actor-login" content="Novia-2018" /><meta name="octolytics-actor-hash" content="1eeaa63b1ed5dba591e37ae3fdf6663f0517605c7afdbf35ed165dc8f040703f" />
<meta name="analytics-location" content="/<user-name>/<repo-name>/blob/show" data-pjax-transient="true" />
<meta name="optimizely-datafile" content="{}" />
<meta name="google-analytics" content="UA-3769691-2">
<meta class="js-ga-set" name="userId" content="ed9bd0d9c4d76560cec60b2aa2d2fb21">
<meta class="js-ga-set" name="dimension10" content="Responsive" data-pjax-transient>
<meta class="js-ga-set" name="dimension1" content="Logged In">
<meta name="hostname" content="github.com">
<meta name="user-login" content="Novia-2018">
<meta name="expected-hostname" content="github.com">
<meta name="js-proxy-site-detection-payload" content="MmEwMzczMTU1MTI5NmRjMjQ1ZjE1MjE0ZDY0NGY5Y2I4NzNlZDFjNGY3ZGY1NTE3OGIwMTljOGIxMGM3YjIyMnx7InJlbW90ZV9hZGRyZXNzIjoiMTE1LjY5LjI0Ni4yMzIiLCJyZXF1ZXN0X2lkIjoiRUQ5QzoyODEyOjgxRTI3NDpBRTA5QjA6NUVGNEIyQkIiLCJ0aW1lc3RhbXAiOjE1OTMwOTQ4NDcsImhvc3QiOiJnaXRodWIuY29tIn0=">
<meta name="enabled-features" content="MARKETPLACE_PENDING_INSTALLATIONS,PAGE_STALE_CHECK,PRIMER_NEXT">
<meta http-equiv="x-pjax-version" content="ad930a774189db897bc2f54da9e8f409">
<link href="https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/commits/master.atom" rel="alternate" title="Recent Commits to Intel-Image-Classification-Using-CNN:master" type="application/atom+xml">
<meta name="go-import" content="github.com/Novia-2018/Intel-Image-Classification-Using-CNN git https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN.git">
<meta name="octolytics-dimension-user_id" content="56831817" /><meta name="octolytics-dimension-user_login" content="Novia-2018" /><meta name="octolytics-dimension-repository_id" content="274914883" /><meta name="octolytics-dimension-repository_nwo" content="Novia-2018/Intel-Image-Classification-Using-CNN" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="274914883" /><meta name="octolytics-dimension-repository_network_root_nwo" content="Novia-2018/Intel-Image-Classification-Using-CNN" /><meta name="octolytics-dimension-repository_explore_github_marketplace_ci_cta_shown" content="true" />
<link rel="canonical" href="https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py" data-pjax-transient>
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000">
<link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png">
<link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg">
<meta name="theme-color" content="#1e2327">
<link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
</head>
<body class="logged-in env-production page-responsive page-blob">
<div class="position-relative js-header-wrapper ">
<a href="#start-of-content" class="p-3 bg-blue text-white show-on-focus js-skip-to-content">Skip to content</a>
<span class="Progress progress-pjax-loader position-fixed width-full js-pjax-loader-bar">
<span class="progress-pjax-loader-bar top-0 left-0" style="width: 0%;"></span>
</span>
<header class="Header py-lg-0 js-details-container Details flex-wrap flex-lg-nowrap px-3" role="banner">
<div class="Header-item d-none d-lg-flex">
<a class="Header-link" href="https://github.com/" data-hotkey="g d"
aria-label="Homepage " data-ga-click="Header, go to dashboard, icon:logo">
<svg class="octicon octicon-mark-github v-align-middle" height="32" viewBox="0 0 16 16" version="1.1" width="32" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
</div>
<div class="Header-item d-lg-none">
<button class="Header-link btn-link js-details-target" type="button" aria-label="Toggle navigation" aria-expanded="false">
<svg height="24" class="octicon octicon-three-bars" viewBox="0 0 16 16" version="1.1" width="24" aria-hidden="true"><path fill-rule="evenodd" d="M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z"></path></svg>
</button>
</div>
<div class="Header-item Header-item--full flex-column flex-lg-row width-full flex-order-2 flex-lg-order-none mr-0 mr-lg-3 mt-3 mt-lg-0 Details-content--hidden">
<div class="header-search header-search-current js-header-search-current flex-self-stretch flex-lg-self-auto mr-0 mr-lg-3 mb-3 mb-lg-0 scoped-search site-scoped-search js-site-search position-relative js-jump-to js-header-search-current-jump-to"
role="combobox"
aria-owns="jump-to-results"
aria-label="Search or jump to"
aria-haspopup="listbox"
aria-expanded="false"
>
<div class="position-relative">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="274914883" data-scoped-search-url="/Novia-2018/Intel-Image-Classification-Using-CNN/search" data-unscoped-search-url="/search" action="/Novia-2018/Intel-Image-Classification-Using-CNN/search" accept-charset="UTF-8" method="get">
<label class="form-control input-sm header-search-wrapper p-0 header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center js-chromeless-input-container">
<input type="text"
class="form-control input-sm header-search-input jump-to-field js-jump-to-field js-site-search-focus js-site-search-field is-clearable"
data-hotkey="s,/"
name="q"
value=""
placeholder="Search or jump to…"
data-unscoped-placeholder="Search or jump to…"
data-scoped-placeholder="Search or jump to…"
autocapitalize="off"
aria-autocomplete="list"
aria-controls="jump-to-results"
aria-label="Search or jump to…"
data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations"
spellcheck="false"
autocomplete="off"
>
<input type="hidden" value="pndCKz9+PPGta24O0DVb8WRI3V8+8amlI8wcJmy/8DdZcgkrwAb7ZYiBRl8+c8QLBY/HRO815licxVFtJtWYHw==" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" />
<input type="hidden" class="js-site-search-type-field" name="type" >
<img src="https://github.githubassets.com/images/search-key-slash.svg" alt="" class="mr-2 header-search-key-slash">
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
<ul class="d-none js-jump-to-suggestions-template-container">
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-suggestion" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
<svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path></svg>
<svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></path></svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository">
In this repository
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
</ul>
<ul class="d-none js-jump-to-no-results-template-container">
<li class="d-flex flex-justify-center flex-items-center f5 d-none js-jump-to-suggestion p-2">
<span class="text-gray">No suggested jump to results</span>
</li>
</ul>
<ul id="jump-to-results" role="listbox" class="p-0 m-0 js-navigation-container jump-to-suggestions-results-container js-jump-to-suggestions-results-container">
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-scoped-search d-none" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
<svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path></svg>
<svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></path></svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository">
In this repository
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-global-search d-none" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
<svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path></svg>
<svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></path></svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository">
In this repository
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
<div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle">↵</span>
</div>
</a>
</li>
<li class="d-flex flex-justify-center flex-items-center p-0 f5 js-jump-to-suggestion">
<img src="https://github.githubassets.com/images/spinners/octocat-spinner-128.gif" alt="Octocat Spinner Icon" class="m-2" width="28">
</li>
</ul>
</div>
</label>
</form> </div>
</div>
<nav class="d-flex flex-column flex-lg-row flex-self-stretch flex-lg-self-auto" aria-label="Global">
<a class="Header-link py-lg-3 d-block d-lg-none py-2 border-top border-lg-top-0 border-white-fade-15" data-ga-click="Header, click, Nav menu - item:dashboard:user" aria-label="Dashboard" href="/dashboard">
Dashboard
</a>
<a class="js-selected-navigation-item Header-link py-lg-3 mr-0 mr-lg-3 py-2 border-top border-lg-top-0 border-white-fade-15" data-hotkey="g p" data-ga-click="Header, click, Nav menu - item:pulls context:user" aria-label="Pull requests you created" data-selected-links="/pulls /pulls/assigned /pulls/mentioned /pulls" href="/pulls">
Pull requests
</a>
<a class="js-selected-navigation-item Header-link py-lg-3 mr-0 mr-lg-3 py-2 border-top border-lg-top-0 border-white-fade-15" data-hotkey="g i" data-ga-click="Header, click, Nav menu - item:issues context:user" aria-label="Issues you created" data-selected-links="/issues /issues/assigned /issues/mentioned /issues" href="/issues">
Issues
</a>
<div class="mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15">
<a class="js-selected-navigation-item Header-link py-lg-3 d-inline-block" data-ga-click="Header, click, Nav menu - item:marketplace context:user" data-octo-click="marketplace_click" data-octo-dimensions="location:nav_bar" data-selected-links=" /marketplace" href="/marketplace">
Marketplace
</a>
</div>
<a class="js-selected-navigation-item Header-link py-lg-3 mr-0 mr-lg-3 py-2 border-top border-lg-top-0 border-white-fade-15" data-ga-click="Header, click, Nav menu - item:explore" data-selected-links="/explore /trending /trending/developers /integrations /integrations/feature/code /integrations/feature/collaborate /integrations/feature/ship showcases showcases_search showcases_landing /explore" href="/explore">
Explore
</a>
<a class="Header-link d-block d-lg-none mr-0 mr-lg-3 py-2 py-lg-3 border-top border-lg-top-0 border-white-fade-15" href="/Novia-2018">
<img class="avatar avatar-user" src="https://avatars3.githubusercontent.com/u/56831817?s=40&v=4" width="20" height="20" alt="@Novia-2018" />
Novia-2018
</a>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form action="/logout" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="vxQQ8Cpp632ZRNy1qHAiCj68jUNMpNXFdIczOy4veDHzRQ6SshzHLjw8rnbZER27SfoIglRRcdYdvDxlvN9vTQ==" />
<button type="submit" class="Header-link mr-0 mr-lg-3 py-2 py-lg-3 border-top border-lg-top-0 border-white-fade-15 d-lg-none btn-link d-block width-full text-left" data-ga-click="Header, sign out, icon:logout" style="padding-left: 2px;">
<svg class="octicon octicon-sign-out v-align-middle" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2 2.75C2 1.784 2.784 1 3.75 1h2.5a.75.75 0 010 1.5h-2.5a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h2.5a.75.75 0 010 1.5h-2.5A1.75 1.75 0 012 13.25V2.75zm10.44 4.5H6.75a.75.75 0 000 1.5h5.69l-1.97 1.97a.75.75 0 101.06 1.06l3.25-3.25a.75.75 0 000-1.06l-3.25-3.25a.75.75 0 10-1.06 1.06l1.97 1.97z"></path></svg>
Sign out
</button>
</form></nav>
</div>
<div class="Header-item Header-item--full flex-justify-center d-lg-none position-relative">
<a class="Header-link" href="https://github.com/" data-hotkey="g d"
aria-label="Homepage " data-ga-click="Header, go to dashboard, icon:logo">
<svg class="octicon octicon-mark-github v-align-middle" height="32" viewBox="0 0 16 16" version="1.1" width="32" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
</div>
<div class="Header-item mr-0 mr-lg-3 flex-order-1 flex-lg-order-none">
<a aria-label="You have no unread notifications" class="Header-link notification-indicator position-relative tooltipped tooltipped-sw js-socket-channel js-notification-indicator" data-hotkey="g n" data-ga-click="Header, go to notifications, icon:read" data-channel="eyJjIjoibm90aWZpY2F0aW9uLWNoYW5nZWQ6NTY4MzE4MTciLCJ0IjoxNTkzMDk0ODQ3fQ==--85a7327cb0320925f31e843ecca40ae2c25a991797a75d7cf2a16ee5bdef8e30" href="/notifications">
<span class="js-indicator-modifier mail-status "></span>
<svg class="octicon octicon-bell" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 16a2 2 0 001.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 008 16z"></path><path fill-rule="evenodd" d="M8 1.5A3.5 3.5 0 004.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.018.018 0 00-.003.01l.001.006c0 .002.002.004.004.006a.017.017 0 00.006.004l.007.001h10.964l.007-.001a.016.016 0 00.006-.004.016.016 0 00.004-.006l.001-.007a.017.017 0 00-.003-.01l-1.703-2.554a1.75 1.75 0 01-.294-.97V5A3.5 3.5 0 008 1.5zM3 5a5 5 0 0110 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.518 1.518 0 0113.482 13H2.518a1.518 1.518 0 01-1.263-2.36l1.703-2.554A.25.25 0 003 7.947V5z"></path></svg>
</a>
</div>
<div class="Header-item position-relative d-none d-lg-flex">
<details class="details-overlay details-reset">
<summary class="Header-link"
aria-label="Create new…"
data-ga-click="Header, create new, icon:add">
<svg class="octicon octicon-plus" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 2a.75.75 0 01.75.75v4.5h4.5a.75.75 0 010 1.5h-4.5v4.5a.75.75 0 01-1.5 0v-4.5h-4.5a.75.75 0 010-1.5h4.5v-4.5A.75.75 0 018 2z"></path></svg> <span class="dropdown-caret"></span>
</summary>
<details-menu class="dropdown-menu dropdown-menu-sw mt-n2">
<a role="menuitem" class="dropdown-item" href="/new" data-ga-click="Header, create new repository">
New repository
</a>
<a role="menuitem" class="dropdown-item" href="/new/import" data-ga-click="Header, import a repository">
Import repository
</a>
<a role="menuitem" class="dropdown-item" href="https://gist.github.com/" data-ga-click="Header, create new gist">
New gist
</a>
<a role="menuitem" class="dropdown-item" href="/organizations/new" data-ga-click="Header, create new organization">
New organization
</a>
<div role="none" class="dropdown-divider"></div>
<div class="dropdown-header">
<span title="Novia-2018/Intel-Image-Classification-Using-CNN">This repository</span>
</div>
<a role="menuitem" class="dropdown-item" href="/Novia-2018/Intel-Image-Classification-Using-CNN/issues/new/choose" data-ga-click="Header, create new issue" data-skip-pjax>
New issue
</a>
</details-menu>
</details>
</div>
<div class="Header-item position-relative mr-0 d-none d-lg-flex">
<details class="details-overlay details-reset js-feature-preview-indicator-container" data-feature-preview-indicator-src="/users/Novia-2018/feature_preview/indicator_check">
<summary class="Header-link"
aria-label="View profile and more"
data-ga-click="Header, show menu, icon:avatar">
<img
alt="@Novia-2018"
width="20"
height="20"
src="https://avatars0.githubusercontent.com/u/56831817?s=60&v=4"
class="avatar avatar-user " />
<span class="feature-preview-indicator js-feature-preview-indicator" style="top: 10px;" hidden></span>
<span class="dropdown-caret"></span>
</summary>
<details-menu class="dropdown-menu dropdown-menu-sw mt-n2" style="width: 180px" >
<div class="header-nav-current-user css-truncate"><a role="menuitem" class="no-underline user-profile-link px-3 pt-2 pb-2 mb-n2 mt-n1 d-block" href="/Novia-2018" data-ga-click="Header, go to profile, text:Signed in as">Signed in as <strong class="css-truncate-target">Novia-2018</strong></a></div>
<div role="none" class="dropdown-divider"></div>
<div class="pl-3 pr-3 f6 user-status-container js-user-status-context lh-condensed" data-url="/users/status?compact=1&link_mentions=0&truncate=1">
<div class="js-user-status-container rounded-1 px-2 py-1 mt-2 border"
data-team-hovercards-enabled>
<details class="js-user-status-details details-reset details-overlay details-overlay-dark">
<summary class="btn-link btn-block link-gray no-underline js-toggle-user-status-edit toggle-user-status-edit "
role="menuitem" data-hydro-click="{"event_type":"user_profile.click","payload":{"profile_user_id":56831817,"target":"EDIT_USER_STATUS","user_id":56831817,"originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py"}}" data-hydro-click-hmac="c015019fc658e06304bd55b65197426dcf04d5f0202c8d65d441406e88f04f6c">
<div class="d-flex flex-items-center flex-items-stretch">
<div class="f6 lh-condensed user-status-header d-flex user-status-emoji-only-header circle">
<div class="user-status-emoji-container flex-shrink-0 mr-2 d-flex flex-items-center flex-justify-center lh-condensed-ultra v-align-bottom">
<svg class="octicon octicon-smiley" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM5 8a1 1 0 100-2 1 1 0 000 2zm7-1a1 1 0 11-2 0 1 1 0 012 0zM5.32 9.636a.75.75 0 011.038.175l.007.009c.103.118.22.222.35.31.264.178.683.37 1.285.37.602 0 1.02-.192 1.285-.371.13-.088.247-.192.35-.31l.007-.008a.75.75 0 111.222.87l-.614-.431c.614.43.614.431.613.431v.001l-.001.002-.002.003-.005.007-.014.019a1.984 1.984 0 01-.184.213c-.16.166-.338.316-.53.445-.63.418-1.37.638-2.127.629-.946 0-1.652-.308-2.126-.63a3.32 3.32 0 01-.715-.657l-.014-.02-.005-.006-.002-.003v-.002h-.001l.613-.432-.614.43a.75.75 0 01.183-1.044h.001z"></path></svg>
</div>
</div>
<div class="
user-status-message-wrapper f6 min-width-0"
style="line-height: 20px;" >
<div class="css-truncate css-truncate-target width-fit text-gray-dark text-left">
<span class="text-gray">Set status</span>
</div>
</div>
</div>
</summary>
<details-dialog class="details-dialog rounded-1 anim-fade-in fast Box Box--overlay" role="dialog" tabindex="-1">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="position-relative flex-auto js-user-status-form" action="/users/status?circle=0&compact=1&link_mentions=0&truncate=1" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="put" /><input type="hidden" name="authenticity_token" value="66hsw004BOc0Nedk4b4B1TKrcIZtW2Kesrzm+YsF6FWpnUXxqikemWRj9zT1ryt6QIXd4z5ikAjUV5S6WApRJQ==" />
<div class="Box-header bg-gray border-bottom p-3">
<button class="Box-btn-octicon js-toggle-user-status-edit btn-octicon float-right" type="reset" aria-label="Close dialog" data-close-dialog>
<svg class="octicon octicon-x" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg>
</button>
<h3 class="Box-title f5 text-bold text-gray-dark">Edit status</h3>
</div>
<input type="hidden" name="emoji" class="js-user-status-emoji-field" value="">
<input type="hidden" name="organization_id" class="js-user-status-org-id-field" value="">
<div class="px-3 py-2 text-gray-dark">
<div class="js-characters-remaining-container position-relative mt-2">
<div class="input-group d-table form-group my-0 js-user-status-form-group">
<span class="input-group-button d-table-cell v-align-middle" style="width: 1%">
<button type="button" aria-label="Choose an emoji" class="btn-outline btn js-toggle-user-status-emoji-picker btn-open-emoji-picker p-0">
<span class="js-user-status-original-emoji" hidden></span>
<span class="js-user-status-custom-emoji"></span>
<span class="js-user-status-no-emoji-icon" >
<svg class="octicon octicon-smiley" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM5 8a1 1 0 100-2 1 1 0 000 2zm7-1a1 1 0 11-2 0 1 1 0 012 0zM5.32 9.636a.75.75 0 011.038.175l.007.009c.103.118.22.222.35.31.264.178.683.37 1.285.37.602 0 1.02-.192 1.285-.371.13-.088.247-.192.35-.31l.007-.008a.75.75 0 111.222.87l-.614-.431c.614.43.614.431.613.431v.001l-.001.002-.002.003-.005.007-.014.019a1.984 1.984 0 01-.184.213c-.16.166-.338.316-.53.445-.63.418-1.37.638-2.127.629-.946 0-1.652-.308-2.126-.63a3.32 3.32 0 01-.715-.657l-.014-.02-.005-.006-.002-.003v-.002h-.001l.613-.432-.614.43a.75.75 0 01.183-1.044h.001z"></path></svg>
</span>
</button>
</span>
<text-expander keys=": @" data-mention-url="/autocomplete/user-suggestions" data-emoji-url="/autocomplete/emoji">
<input
type="text"
autocomplete="off"
data-no-org-url="/autocomplete/user-suggestions"
data-org-url="/suggestions?mention_suggester=1"
data-maxlength="80"
class="d-table-cell width-full form-control js-user-status-message-field js-characters-remaining-field"
placeholder="What's happening?"
name="message"
value=""
aria-label="What is your current status?">
</text-expander>
<div class="error">Could not update your status, please try again.</div>
</div>
<div style="margin-left: 53px" class="my-1 text-small label-characters-remaining js-characters-remaining" data-suffix="remaining" hidden>
80 remaining
</div>
</div>
<include-fragment class="js-user-status-emoji-picker" data-url="/users/status/emoji"></include-fragment>
<div class="overflow-auto ml-n3 mr-n3 px-3 border-bottom" style="max-height: 33vh">
<div class="user-status-suggestions js-user-status-suggestions collapsed overflow-hidden">
<h4 class="f6 text-normal my-3">Suggestions:</h4>
<div class="mx-3 mt-2 clearfix">
<div class="float-left col-6">
<button type="button" value=":palm_tree:" class="d-flex flex-items-baseline flex-items-stretch lh-condensed f6 btn-link link-gray no-underline js-predefined-user-status mb-1">
<div class="emoji-status-width mr-2 v-align-middle js-predefined-user-status-emoji">
<g-emoji alias="palm_tree" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f334.png">🌴</g-emoji>
</div>
<div class="d-flex flex-items-center no-underline js-predefined-user-status-message ws-normal text-left" style="border-left: 1px solid transparent">
On vacation
</div>
</button>
<button type="button" value=":face_with_thermometer:" class="d-flex flex-items-baseline flex-items-stretch lh-condensed f6 btn-link link-gray no-underline js-predefined-user-status mb-1">
<div class="emoji-status-width mr-2 v-align-middle js-predefined-user-status-emoji">
<g-emoji alias="face_with_thermometer" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f912.png">🤒</g-emoji>
</div>
<div class="d-flex flex-items-center no-underline js-predefined-user-status-message ws-normal text-left" style="border-left: 1px solid transparent">
Out sick
</div>
</button>
</div>
<div class="float-left col-6">
<button type="button" value=":house:" class="d-flex flex-items-baseline flex-items-stretch lh-condensed f6 btn-link link-gray no-underline js-predefined-user-status mb-1">
<div class="emoji-status-width mr-2 v-align-middle js-predefined-user-status-emoji">
<g-emoji alias="house" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3e0.png">🏠</g-emoji>
</div>
<div class="d-flex flex-items-center no-underline js-predefined-user-status-message ws-normal text-left" style="border-left: 1px solid transparent">
Working from home
</div>
</button>
<button type="button" value=":dart:" class="d-flex flex-items-baseline flex-items-stretch lh-condensed f6 btn-link link-gray no-underline js-predefined-user-status mb-1">
<div class="emoji-status-width mr-2 v-align-middle js-predefined-user-status-emoji">
<g-emoji alias="dart" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3af.png">🎯</g-emoji>
</div>
<div class="d-flex flex-items-center no-underline js-predefined-user-status-message ws-normal text-left" style="border-left: 1px solid transparent">
Focusing
</div>
</button>
</div>
</div>
</div>
<div class="user-status-limited-availability-container">
<div class="form-checkbox my-0">
<input type="checkbox" name="limited_availability" value="1" class="js-user-status-limited-availability-checkbox" data-default-message="I may be slow to respond." aria-describedby="limited-availability-help-text-truncate-true-compact-true" id="limited-availability-truncate-true-compact-true">
<label class="d-block f5 text-gray-dark mb-1" for="limited-availability-truncate-true-compact-true">
Busy
</label>
<p class="note" id="limited-availability-help-text-truncate-true-compact-true">
When others mention you, assign you, or request your review,
GitHub will let them know that you have limited availability.
</p>
</div>
</div>
</div>
<div class="d-inline-block f5 mr-2 pt-3 pb-2" >
<div class="d-inline-block mr-1">
Clear status
</div>
<details class="js-user-status-expire-drop-down f6 dropdown details-reset details-overlay d-inline-block mr-2">
<summary class="f5 btn-link link-gray-dark border px-2 py-1 rounded-1" aria-haspopup="true">
<div class="js-user-status-expiration-interval-selected d-inline-block v-align-baseline">
Never
</div>
<div class="dropdown-caret"></div>
</summary>
<ul class="dropdown-menu dropdown-menu-se pl-0 overflow-auto" style="width: 220px; max-height: 15.5em">
<li>
<button type="button" class="btn-link dropdown-item js-user-status-expire-button ws-normal" title="Never">
<span class="d-inline-block text-bold mb-1">Never</span>
<div class="f6 lh-condensed">Keep this status until you clear your status or edit your status.</div>
</button>
</li>
<li class="dropdown-divider" role="none"></li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 30 minutes" value="2020-06-25T07:50:47-07:00">
in 30 minutes
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 1 hour" value="2020-06-25T08:20:47-07:00">
in 1 hour
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 4 hours" value="2020-06-25T11:20:47-07:00">
in 4 hours
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="today" value="2020-06-25T23:59:59-07:00">
today
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="this week" value="2020-06-28T23:59:59-07:00">
this week
</button>
</li>
</ul>
</details>
<input class="js-user-status-expiration-date-input" type="hidden" name="expires_at" value="">
</div>
<include-fragment class="js-user-status-org-picker" data-url="/users/status/organizations"></include-fragment>
</div>
<div class="d-flex flex-items-center flex-justify-between p-3 border-top">
<button type="submit" disabled class="width-full btn btn-primary mr-2 js-user-status-submit">
Set status
</button>
<button type="button" disabled class="width-full js-clear-user-status-button btn ml-2 ">
Clear status
</button>
</div>
</form> </details-dialog>
</details>
</div>
</div>
<div role="none" class="dropdown-divider"></div>
<a role="menuitem" class="dropdown-item" href="/Novia-2018" data-ga-click="Header, go to profile, text:your profile" data-hydro-click="{"event_type":"global_header.user_menu_dropdown.click","payload":{"request_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","target":"YOUR_PROFILE","originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="b84989873dd8fd723cf9a4e2ef8be69d3cb674161ec87d2d9e4e7dc5ffa80359" >Your profile</a>
<a role="menuitem" class="dropdown-item" href="/Novia-2018?tab=repositories" data-ga-click="Header, go to repositories, text:your repositories" data-hydro-click="{"event_type":"global_header.user_menu_dropdown.click","payload":{"request_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","target":"YOUR_REPOSITORIES","originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="a92b888dffe153bcf7e3693a9693a5985ae75b1a570657da094cf022ce2368e8" >Your repositories</a>
<a role="menuitem" class="dropdown-item" href="/Novia-2018?tab=projects" data-ga-click="Header, go to projects, text:your projects" data-hydro-click="{"event_type":"global_header.user_menu_dropdown.click","payload":{"request_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","target":"YOUR_PROJECTS","originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="279c3ae2df0f7afd3d8591d8d693ebeeac39b2f8507204faa34beb8998a85b98" >Your projects</a>
<a role="menuitem" class="dropdown-item" href="/Novia-2018?tab=stars" data-ga-click="Header, go to starred repos, text:your stars" data-hydro-click="{"event_type":"global_header.user_menu_dropdown.click","payload":{"request_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","target":"YOUR_STARS","originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="70f3ac421a7713d5301096e872fa3c19e74b58f00e3e77b63efc46150f4bfc82" >Your stars</a>
<a role="menuitem" class="dropdown-item" href="https://gist.github.com/mine" data-ga-click="Header, your gists, text:your gists" data-hydro-click="{"event_type":"global_header.user_menu_dropdown.click","payload":{"request_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","target":"YOUR_GISTS","originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="95187183d45725279670bf6d8fd626f4f4199d00e174609d6c82208f65a37191" >Your gists</a>
<div role="none" class="dropdown-divider"></div>
<a role="menuitem" class="dropdown-item" href="/settings/billing" data-ga-click="Header, go to billing, text:upgrade" data-hydro-click="{"event_type":"global_header.user_menu_dropdown.click","payload":{"request_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","target":"UPGRADE","originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="2383643713bcf0ce05c1284f29fe708e1461147c1ed64150b7b49b09354d027d" >Upgrade</a>
<div id="feature-enrollment-toggle" class="hide-sm hide-md feature-preview-details position-relative">
<button
type="button"
class="dropdown-item btn-link"
role="menuitem"
data-feature-preview-trigger-url="/users/Novia-2018/feature_previews"
data-feature-preview-close-details="{"event_type":"feature_preview.clicks.close_modal","payload":{"originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}"
data-feature-preview-close-hmac="84414ed888d73b35b64a8764aba7b788d91b0f6a13be079df312f7f1c963bd83"
data-hydro-click="{"event_type":"feature_preview.clicks.open_modal","payload":{"link_location":"user_dropdown","originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}"
data-hydro-click-hmac="c4e8b08d86624de84c42c6b74860733c3cfa8f6870638ea9ed0054a668820dc4"
>
Feature preview
</button>
<span class="feature-preview-indicator js-feature-preview-indicator" hidden></span>
</div>
<a role="menuitem" class="dropdown-item" href="https://help.github.com" data-ga-click="Header, go to help, text:help" data-hydro-click="{"event_type":"global_header.user_menu_dropdown.click","payload":{"request_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","target":"HELP","originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="8a47fa825a3d782ba0e2c1a03eaecb4789ad3b21b4dc6b8d656fdddd15c65daf" >Help</a>
<a role="menuitem" class="dropdown-item" href="/settings/profile" data-ga-click="Header, go to settings, icon:settings" data-hydro-click="{"event_type":"global_header.user_menu_dropdown.click","payload":{"request_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","target":"SETTINGS","originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="eda8fd69e31f61a10f5eb61ca8b6b7fef8f2a185dafe434f277ca72dbe6e5ca9" >Settings</a>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="logout-form" action="/logout" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="sKPkc0+XkW/Iu/Im3sHVYr+GXhuCRbceCEpC2Vx5M3v88voR1+K9PG3DgOWvoOrTyMDb2pqwEw1hcU2HzokkBw==" />
<button type="submit" class="dropdown-item dropdown-signout" data-ga-click="Header, sign out, icon:logout" data-hydro-click="{"event_type":"global_header.user_menu_dropdown.click","payload":{"request_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","target":"SIGN_OUT","originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="cf7ffdedf101319f3fd0ae683b8201251b97849e631ba8f398a81f7766c67d35" role="menuitem">
Sign out
</button>
<input type="text" name="required_field_4122" hidden="hidden" class="form-control" /><input type="hidden" name="timestamp" value="1593094847138" class="form-control" /><input type="hidden" name="timestamp_secret" value="981286f3dcd91125c661207716678034ad4f207967f06e027d7049bc0c61eadf" class="form-control" />
</form> </details-menu>
</details>
</div>
</header>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div id="js-flash-container">
<template class="js-flash-template">
<div class="flash flash-full js-flash-template-container">
<div class=" px-2" >
<button class="flash-close js-flash-close" type="button" aria-label="Dismiss this message">
<svg class="octicon octicon-x" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg>
</button>
<div class="js-flash-template-message"></div>
</div>
</div>
</template>
</div>
<include-fragment class="js-notification-shelf-include-fragment" data-base-src="https://github.com/notifications/beta/shelf"></include-fragment>
<div
class="application-main "
data-commit-hovercards-enabled
data-discussion-hovercards-enabled
data-issue-and-pr-hovercards-enabled
>
<div itemscope itemtype="http://schema.org/SoftwareSourceCode" class="">
<main >
<div class="pagehead repohead hx_repohead readability-menu bg-gray-light pb-0 pt-3 border-0 mb-5">
<div class="d-flex mb-3 px-3 px-md-4 px-lg-5">
<div class="flex-auto min-width-0 width-fit mr-3">
<h1 class="public d-flex flex-wrap flex-items-center break-word float-none f3">
<svg class="octicon octicon-repo" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
<span class="author ml-2 flex-self-stretch" itemprop="author">
<a class="url fn" rel="author" data-hovercard-type="user" data-hovercard-url="/users/Novia-2018/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Novia-2018">Novia-2018</a>
</span>
<span class="path-divider flex-self-stretch">/</span>
<strong itemprop="name" class="mr-2 flex-self-stretch">
<a data-pjax="#js-repo-pjax-container" href="/Novia-2018/Intel-Image-Classification-Using-CNN">Intel-Image-Classification-Using-CNN</a>
</strong>
</h1>
</div>
<ul class="pagehead-actions flex-shrink-0 d-none d-md-inline" style="padding: 2px 0;">
<li>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form data-remote="true" class="js-social-form js-social-container clearfix" action="/notifications/subscribe" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="AvQMAYsNgR4YNbR1JH6bE8hhW7EwO14NXiuCze89ALn/NNkh8z3FMta2AU6RHuhj0qvV1Snz89ZNz6EKpLz1LA==" /> <input type="hidden" name="repository_id" value="274914883">
<details class="details-reset details-overlay select-menu float-left" >
<summary class="select-menu-button float-left btn btn-sm btn-with-count" data-hydro-click="{"event_type":"repository.click","payload":{"target":"WATCH_BUTTON","repository_id":274914883,"originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="bcb30d9160cc59d9cb43cd0244905b8a281de943dce06aa7ca5dc0ac53ce911a" data-ga-click="Repository, click Watch settings, action:blob#show"> <span data-menu-button>
<svg class="octicon octicon-eye" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"></path></svg>
Unwatch
</span>
</summary> <details-menu
class="select-menu-modal position-absolute mt-5 "
style="z-index: 99;">
<div class="select-menu-header">
<span class="select-menu-title">Notifications</span>
</div>
<div class="select-menu-list">
<button
type="submit"
name="do"
value="included"
class="select-menu-item width-full"
aria-checked="false"
role="menuitemradio"
>
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Not watching</span>
<span class="description">Be notified only when participating or @mentioned.</span>
<span class="hidden-select-button-text" data-menu-button-contents>
<svg class="octicon octicon-eye" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"></path></svg>
Watch
</span>
</div>
</button>
<button type="submit" name="do" value="release_only" class="select-menu-item width-full" aria-checked="false" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Releases only</span>
<span class="description">Be notified of new releases, and when participating or @mentioned.</span>
<span class="hidden-select-button-text" data-menu-button-contents>
<svg class="octicon octicon-eye" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"></path></svg>
Unwatch releases
</span>
</div>
</button>
<button type="submit" name="do" value="subscribed" class="select-menu-item width-full" aria-checked="true" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Watching</span>
<span class="description">Be notified of all conversations.</span>
<span class="hidden-select-button-text" data-menu-button-contents>
<svg class="octicon octicon-eye" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"></path></svg>
Unwatch
</span>
</div>
</button>
<button type="submit" name="do" value="ignore" class="select-menu-item width-full" aria-checked="false" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Ignoring</span>
<span class="description">Never be notified.</span>
<span class="hidden-select-button-text" data-menu-button-contents>
<svg class="octicon octicon-mute" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 2.75a.75.75 0 00-1.238-.57L3.472 5H1.75A1.75 1.75 0 000 6.75v2.5C0 10.216.784 11 1.75 11h1.723l3.289 2.82A.75.75 0 008 13.25V2.75zM4.238 6.32L6.5 4.38v7.24L4.238 9.68a.75.75 0 00-.488-.18h-2a.25.25 0 01-.25-.25v-2.5a.25.25 0 01.25-.25h2a.75.75 0 00.488-.18zm7.042-1.1a.75.75 0 10-1.06 1.06L11.94 8l-1.72 1.72a.75.75 0 101.06 1.06L13 9.06l1.72 1.72a.75.75 0 101.06-1.06L14.06 8l1.72-1.72a.75.75 0 00-1.06-1.06L13 6.94l-1.72-1.72z"></path></svg>
Stop ignoring
</span>
</div>
</button>
</div>
</details-menu>
</details>
<a class="social-count js-social-count"
href="/Novia-2018/Intel-Image-Classification-Using-CNN/watchers"
aria-label="1 user is watching this repository">
1
</a>
</form>
</li>
<li>
<div class="js-toggler-container js-social-container starring-container ">
<form class="starred js-social-form" action="/Novia-2018/Intel-Image-Classification-Using-CNN/unstar" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="NVb/g8hu12NSc0e7TdDwauHNkC7jBZQpt4DKkfhv2kVJlQ+ZUrIr0a9J7w43Jb6qSD6V9mDZT1+Gi9NVcF5H1Q==" />
<input type="hidden" name="context" value="repository"></input>
<button type="submit" class="btn btn-sm btn-with-count js-toggler-target" aria-label="Unstar this repository" title="Unstar Novia-2018/Intel-Image-Classification-Using-CNN" data-hydro-click="{"event_type":"repository.click","payload":{"target":"UNSTAR_BUTTON","repository_id":274914883,"originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="a8e60ba436adae1d1ba910268dd209e5f2bf9e55cad0fb8c22416349b1f1e0bf" data-ga-click="Repository, click unstar button, action:blob#show; text:Unstar"> <svg height="16" class="octicon octicon-star-fill" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z"></path></svg>
Unstar
</button> <a class="social-count js-social-count" href="/Novia-2018/Intel-Image-Classification-Using-CNN/stargazers"
aria-label="0 users starred this repository">
0
</a>
</form>
<form class="unstarred js-social-form" action="/Novia-2018/Intel-Image-Classification-Using-CNN/star" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="y6+SAMZfRboCszyydEyZlhEHV2/k19VWvpkpo+4EyrRYEBRO5kB/nos6IHmeoprKE0ijr0hBKET4CkLV8VY4ng==" />
<input type="hidden" name="context" value="repository"></input>
<button type="submit" class="btn btn-sm btn-with-count js-toggler-target" aria-label="Unstar this repository" title="Star Novia-2018/Intel-Image-Classification-Using-CNN" data-hydro-click="{"event_type":"repository.click","payload":{"target":"STAR_BUTTON","repository_id":274914883,"originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="8c237e9432ee3a5a0d56183ae3b4d6cdbf27695c7ada7850ffdfd460881e64a9" data-ga-click="Repository, click star button, action:blob#show; text:Star"> <svg height="16" class="octicon octicon-star" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"></path></svg>
Star
</button> <a class="social-count js-social-count" href="/Novia-2018/Intel-Image-Classification-Using-CNN/stargazers"
aria-label="0 users starred this repository">
0
</a>
</form> </div>
</li>
<li>
<span class="btn btn-sm btn-with-count disabled tooltipped tooltipped-sw" aria-label="Cannot fork because you own this repository and are not a member of any organizations.">
<svg class="octicon octicon-repo-forked" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"></path></svg>
Fork
</span>
<a href="/Novia-2018/Intel-Image-Classification-Using-CNN/network/members" class="social-count"
aria-label="0 users forked this repository">
0
</a>
</li>
</ul>
</div>
<nav class="UnderlineNav js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden px-3 px-md-4 px-lg-5 bg-gray-light" aria-label="Repository" data-pjax="#js-repo-pjax-container">
<ul class="UnderlineNav-body list-style-none ">
<li class="d-flex">
<a class="js-selected-navigation-item selected UnderlineNav-item hx_underlinenav-item no-wrap js-responsive-underlinenav-item" data-tab-item="code-tab" data-hotkey="g c" data-ga-click="Repository, Navigation click, Code tab" aria-current="page" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages repo_deployments /Novia-2018/Intel-Image-Classification-Using-CNN" href="/Novia-2018/Intel-Image-Classification-Using-CNN">
<svg height="16" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline" class_names="UnderlineNav-octicon" display="none inline" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M4.72 3.22a.75.75 0 011.06 1.06L2.06 8l3.72 3.72a.75.75 0 11-1.06 1.06L.47 8.53a.75.75 0 010-1.06l4.25-4.25zm6.56 0a.75.75 0 10-1.06 1.06L13.94 8l-3.72 3.72a.75.75 0 101.06 1.06l4.25-4.25a.75.75 0 000-1.06l-4.25-4.25z"></path></svg>
<span data-content="Code">Code</span>
</a> </li>
<li class="d-flex">
<a class="js-selected-navigation-item UnderlineNav-item hx_underlinenav-item no-wrap js-responsive-underlinenav-item" data-tab-item="issues-tab" data-hotkey="g i" data-ga-click="Repository, Navigation click, Issues tab" data-selected-links="repo_issues repo_labels repo_milestones /Novia-2018/Intel-Image-Classification-Using-CNN/issues" href="/Novia-2018/Intel-Image-Classification-Using-CNN/issues">
<svg height="16" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline" class_names="UnderlineNav-octicon" display="none inline" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"></path></svg>
<span data-content="Issues">Issues</span>
</a> </li>
<li class="d-flex">
<a class="js-selected-navigation-item UnderlineNav-item hx_underlinenav-item no-wrap js-responsive-underlinenav-item" data-tab-item="pull-requests-tab" data-hotkey="g p" data-ga-click="Repository, Navigation click, Pull requests tab" data-selected-links="repo_pulls checks /Novia-2018/Intel-Image-Classification-Using-CNN/pulls" href="/Novia-2018/Intel-Image-Classification-Using-CNN/pulls">
<svg height="16" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline" class_names="UnderlineNav-octicon" display="none inline" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z"></path></svg>
<span data-content="Pull requests">Pull requests</span>
</a> </li>
<li class="d-flex">
<a class="js-selected-navigation-item UnderlineNav-item hx_underlinenav-item no-wrap js-responsive-underlinenav-item" data-tab-item="actions-tab" data-hotkey="g w" data-ga-click="Repository, Navigation click, Actions tab" data-selected-links="repo_actions /Novia-2018/Intel-Image-Classification-Using-CNN/actions" href="/Novia-2018/Intel-Image-Classification-Using-CNN/actions">
<svg height="16" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline" class_names="UnderlineNav-octicon" display="none inline" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM6.379 5.227A.25.25 0 006 5.442v5.117a.25.25 0 00.379.214l4.264-2.559a.25.25 0 000-.428L6.379 5.227z"></path></svg>
<span data-content="Actions">Actions</span>
</a> </li>
<li class="d-flex">
<a class="js-selected-navigation-item UnderlineNav-item hx_underlinenav-item no-wrap js-responsive-underlinenav-item" data-tab-item="projects-tab" data-hotkey="g b" data-ga-click="Repository, Navigation click, Projects tab" data-selected-links="repo_projects new_repo_project repo_project /Novia-2018/Intel-Image-Classification-Using-CNN/projects" href="/Novia-2018/Intel-Image-Classification-Using-CNN/projects">
<svg height="16" class="octicon octicon-project UnderlineNav-octicon d-none d-sm-inline" class_names="UnderlineNav-octicon" display="none inline" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path></svg>
<span data-content="Projects">Projects</span>
</a> </li>
<li class="d-flex">
<a class="js-selected-navigation-item UnderlineNav-item hx_underlinenav-item no-wrap js-responsive-underlinenav-item" data-tab-item="wiki-tab" data-ga-click="Repository, Navigation click, Wikis tab" data-selected-links="repo_wiki /Novia-2018/Intel-Image-Classification-Using-CNN/wiki" href="/Novia-2018/Intel-Image-Classification-Using-CNN/wiki">
<svg height="16" class="octicon octicon-book UnderlineNav-octicon d-none d-sm-inline" class_names="UnderlineNav-octicon" display="none inline" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M0 1.75A.75.75 0 01.75 1h4.253c1.227 0 2.317.59 3 1.501A3.744 3.744 0 0111.006 1h4.245a.75.75 0 01.75.75v10.5a.75.75 0 01-.75.75h-4.507a2.25 2.25 0 00-1.591.659l-.622.621a.75.75 0 01-1.06 0l-.622-.621A2.25 2.25 0 005.258 13H.75a.75.75 0 01-.75-.75V1.75zm8.755 3a2.25 2.25 0 012.25-2.25H14.5v9h-3.757c-.71 0-1.4.201-1.992.572l.004-7.322zm-1.504 7.324l.004-5.073-.002-2.253A2.25 2.25 0 005.003 2.5H1.5v9h3.757a3.75 3.75 0 011.994.574z"></path></svg>
<span data-content="Wiki">Wiki</span>
</a> </li>
<li class="d-flex">
<a class="js-selected-navigation-item UnderlineNav-item hx_underlinenav-item no-wrap js-responsive-underlinenav-item" data-tab-item="security-tab" data-hotkey="g s" data-ga-click="Repository, Navigation click, Security tab" data-selected-links="security overview alerts policy token_scanning code_scanning /Novia-2018/Intel-Image-Classification-Using-CNN/security" href="/Novia-2018/Intel-Image-Classification-Using-CNN/security">
<svg height="16" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline" class_names="UnderlineNav-octicon" display="none inline" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.467.133a1.75 1.75 0 011.066 0l5.25 1.68A1.75 1.75 0 0115 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.7 1.7 0 01-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 011.217-1.667l5.25-1.68zm.61 1.429a.25.25 0 00-.153 0l-5.25 1.68a.25.25 0 00-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.2.2 0 00.154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.25.25 0 00-.174-.237l-5.25-1.68zM9 10.5a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.75a.75.75 0 10-1.5 0v3a.75.75 0 001.5 0v-3z"></path></svg>
<span data-content="Security">Security</span>
<span class="Counter js-security-tab-count " data-url="/Novia-2018/Intel-Image-Classification-Using-CNN/security/overall-count" hidden="hidden">1</span>
</a> </li>
<li class="d-flex">
<a class="js-selected-navigation-item UnderlineNav-item hx_underlinenav-item no-wrap js-responsive-underlinenav-item" data-tab-item="insights-tab" data-ga-click="Repository, Navigation click, Insights tab" data-selected-links="repo_graphs repo_contributors dependency_graph dependabot_updates pulse people /Novia-2018/Intel-Image-Classification-Using-CNN/pulse" href="/Novia-2018/Intel-Image-Classification-Using-CNN/pulse">
<svg height="16" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline" class_names="UnderlineNav-octicon" display="none inline" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 1.75a.75.75 0 00-1.5 0v12.5c0 .414.336.75.75.75h14.5a.75.75 0 000-1.5H1.5V1.75zm14.28 2.53a.75.75 0 00-1.06-1.06L10 7.94 7.53 5.47a.75.75 0 00-1.06 0L3.22 8.72a.75.75 0 001.06 1.06L7 7.06l2.47 2.47a.75.75 0 001.06 0l5.25-5.25z"></path></svg>
<span data-content="Insights">Insights</span>
</a> </li>
<li class="d-flex">
<a class="js-selected-navigation-item UnderlineNav-item hx_underlinenav-item no-wrap js-responsive-underlinenav-item" data-tab-item="settings-tab" data-ga-click="Repository, Navigation click, Settings tab" data-selected-links="repo_settings repo_branch_settings hooks integration_installations repo_keys_settings issue_template_editor secrets_settings key_links_settings repo_actions_settings notifications /Novia-2018/Intel-Image-Classification-Using-CNN/settings" href="/Novia-2018/Intel-Image-Classification-Using-CNN/settings">
<svg height="16" class="octicon octicon-gear UnderlineNav-octicon d-none d-sm-inline" class_names="UnderlineNav-octicon" display="none inline" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.429 1.525a6.593 6.593 0 011.142 0c.036.003.108.036.137.146l.289 1.105c.147.56.55.967.997 1.189.174.086.341.183.501.29.417.278.97.423 1.53.27l1.102-.303c.11-.03.175.016.195.046.219.31.41.641.573.989.014.031.022.11-.059.19l-.815.806c-.411.406-.562.957-.53 1.456a4.588 4.588 0 010 .582c-.032.499.119 1.05.53 1.456l.815.806c.08.08.073.159.059.19a6.494 6.494 0 01-.573.99c-.02.029-.086.074-.195.045l-1.103-.303c-.559-.153-1.112-.008-1.529.27-.16.107-.327.204-.5.29-.449.222-.851.628-.998 1.189l-.289 1.105c-.029.11-.101.143-.137.146a6.613 6.613 0 01-1.142 0c-.036-.003-.108-.037-.137-.146l-.289-1.105c-.147-.56-.55-.967-.997-1.189a4.502 4.502 0 01-.501-.29c-.417-.278-.97-.423-1.53-.27l-1.102.303c-.11.03-.175-.016-.195-.046a6.492 6.492 0 01-.573-.989c-.014-.031-.022-.11.059-.19l.815-.806c.411-.406.562-.957.53-1.456a4.587 4.587 0 010-.582c.032-.499-.119-1.05-.53-1.456l-.815-.806c-.08-.08-.073-.159-.059-.19a6.44 6.44 0 01.573-.99c.02-.029.086-.075.195-.045l1.103.303c.559.153 1.112.008 1.529-.27.16-.107.327-.204.5-.29.449-.222.851-.628.998-1.189l.289-1.105c.029-.11.101-.143.137-.146zM8 0c-.236 0-.47.01-.701.03-.743.065-1.29.615-1.458 1.261l-.29 1.106c-.017.066-.078.158-.211.224a5.994 5.994 0 00-.668.386c-.123.082-.233.09-.3.071L3.27 2.776c-.644-.177-1.392.02-1.82.63a7.977 7.977 0 00-.704 1.217c-.315.675-.111 1.422.363 1.891l.815.806c.05.048.098.147.088.294a6.084 6.084 0 000 .772c.01.147-.038.246-.088.294l-.815.806c-.474.469-.678 1.216-.363 1.891.2.428.436.835.704 1.218.428.609 1.176.806 1.82.63l1.103-.303c.066-.019.176-.011.299.071.213.143.436.272.668.386.133.066.194.158.212.224l.289 1.106c.169.646.715 1.196 1.458 1.26a8.094 8.094 0 001.402 0c.743-.064 1.29-.614 1.458-1.26l.29-1.106c.017-.066.078-.158.211-.224a5.98 5.98 0 00.668-.386c.123-.082.233-.09.3-.071l1.102.302c.644.177 1.392-.02 1.82-.63.268-.382.505-.789.704-1.217.315-.675.111-1.422-.364-1.891l-.814-.806c-.05-.048-.098-.147-.088-.294a6.1 6.1 0 000-.772c-.01-.147.039-.246.088-.294l.814-.806c.475-.469.679-1.216.364-1.891a7.992 7.992 0 00-.704-1.218c-.428-.609-1.176-.806-1.82-.63l-1.103.303c-.066.019-.176.011-.299-.071a5.991 5.991 0 00-.668-.386c-.133-.066-.194-.158-.212-.224L10.16 1.29C9.99.645 9.444.095 8.701.031A8.094 8.094 0 008 0zm1.5 8a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM11 8a3 3 0 11-6 0 3 3 0 016 0z"></path></svg>
<span data-content="Settings">Settings</span>
</a> </li>
</ul>
<div class="position-absolute right-0 pr-3 pr-md-4 pr-lg-5 js-responsive-underlinenav-overflow" style="visibility:hidden;">
<details class="details-overlay details-reset position-relative">
<summary role="button">
<div class="UnderlineNav-item mr-0 border-0">
<svg class="octicon octicon-kebab-horizontal" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM1.5 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm13 0a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"></path></svg>
<span class="sr-only">More</span>
</div>
</summary>
<details-menu class="dropdown-menu dropdown-menu-sw " role="menu">
<ul>
<li data-menu-item="code-tab" hidden>
<a role="menuitem" class="js-selected-navigation-item dropdown-item" data-selected-links=" /Novia-2018/Intel-Image-Classification-Using-CNN" href="/Novia-2018/Intel-Image-Classification-Using-CNN">
Code
</a> </li>
<li data-menu-item="issues-tab" hidden>
<a role="menuitem" class="js-selected-navigation-item dropdown-item" data-selected-links=" /Novia-2018/Intel-Image-Classification-Using-CNN/issues" href="/Novia-2018/Intel-Image-Classification-Using-CNN/issues">
Issues
</a> </li>
<li data-menu-item="pull-requests-tab" hidden>
<a role="menuitem" class="js-selected-navigation-item dropdown-item" data-selected-links=" /Novia-2018/Intel-Image-Classification-Using-CNN/pulls" href="/Novia-2018/Intel-Image-Classification-Using-CNN/pulls">
Pull requests
</a> </li>
<li data-menu-item="actions-tab" hidden>
<a role="menuitem" class="js-selected-navigation-item dropdown-item" data-selected-links=" /Novia-2018/Intel-Image-Classification-Using-CNN/actions" href="/Novia-2018/Intel-Image-Classification-Using-CNN/actions">
Actions
</a> </li>
<li data-menu-item="projects-tab" hidden>
<a role="menuitem" class="js-selected-navigation-item dropdown-item" data-selected-links=" /Novia-2018/Intel-Image-Classification-Using-CNN/projects" href="/Novia-2018/Intel-Image-Classification-Using-CNN/projects">
Projects
</a> </li>
<li data-menu-item="wiki-tab" hidden>
<a role="menuitem" class="js-selected-navigation-item dropdown-item" data-selected-links=" /Novia-2018/Intel-Image-Classification-Using-CNN/wiki" href="/Novia-2018/Intel-Image-Classification-Using-CNN/wiki">
Wiki
</a> </li>
<li data-menu-item="security-tab" hidden>
<a role="menuitem" class="js-selected-navigation-item dropdown-item" data-selected-links=" /Novia-2018/Intel-Image-Classification-Using-CNN/security" href="/Novia-2018/Intel-Image-Classification-Using-CNN/security">
Security
</a> </li>
<li data-menu-item="insights-tab" hidden>
<a role="menuitem" class="js-selected-navigation-item dropdown-item" data-selected-links=" /Novia-2018/Intel-Image-Classification-Using-CNN/pulse" href="/Novia-2018/Intel-Image-Classification-Using-CNN/pulse">
Insights
</a> </li>
<li data-menu-item="settings-tab" hidden>
<a role="menuitem" class="js-selected-navigation-item dropdown-item" data-selected-links=" /Novia-2018/Intel-Image-Classification-Using-CNN/settings" href="/Novia-2018/Intel-Image-Classification-Using-CNN/settings">
Settings
</a> </li>
</ul>
</details-menu>
</details>
</div>
</nav>
</div>
<div class="container-xl clearfix new-discussion-timeline px-3 px-md-4 px-lg-5">
<div class="repository-content ">
<a class="d-none js-permalink-shortcut" data-hotkey="y" href="/Novia-2018/Intel-Image-Classification-Using-CNN/blob/87e3d7360c13ba5b2c4c12ee85c939902dfbd422/src/Intel_Project%20(1).py">Permalink</a>
<!-- blob contrib key: blob_contributors:v22:7516945cbabace70346afbf5a43f7172 -->
<div class="d-flex flex-items-center flex-shrink-0 pb-3 flex-wrap flex-justify-between flex-md-justify-start">
<details class="details-reset details-overlay mr-0 mb-0 " id="branch-select-menu">
<summary class="btn css-truncate"
data-hotkey="w"
title="Switch branches or tags">
<svg height="16" class="octicon octicon-git-branch text-gray" text="gray" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M11.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122V6A2.5 2.5 0 0110 8.5H6a1 1 0 00-1 1v1.128a2.251 2.251 0 11-1.5 0V5.372a2.25 2.25 0 111.5 0v1.836A2.492 2.492 0 016 7h4a1 1 0 001-1v-.628A2.25 2.25 0 019.5 3.25zM4.25 12a.75.75 0 100 1.5.75.75 0 000-1.5zM3.5 3.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0z"></path></svg>
<i class="d-none d-lg-inline">Branch:</i>
<span class="css-truncate-target" data-menu-button>master</span>
<span class="dropdown-caret"></span>
</summary>
<details-menu class="SelectMenu SelectMenu--hasFilter" src="/Novia-2018/Intel-Image-Classification-Using-CNN/refs/master/src/Intel_Project%20(1).py?source_action=show&source_controller=blob" preload>
<div class="SelectMenu-modal">
<include-fragment class="SelectMenu-loading" aria-label="Menu is loading">
<svg class="octicon octicon-octoface anim-pulse" height="32" viewBox="0 0 16 16" version="1.1" width="32" aria-hidden="true"><path fill-rule="evenodd" d="M14.7 5.34c.13-.32.55-1.59-.13-3.31 0 0-1.05-.33-3.44 1.3-1-.28-2.07-.32-3.13-.32s-2.13.04-3.13.32c-2.39-1.64-3.44-1.3-3.44-1.3-.68 1.72-.26 2.99-.13 3.31C.49 6.21 0 7.33 0 8.69 0 13.84 3.33 15 7.98 15S16 13.84 16 8.69c0-1.36-.49-2.48-1.3-3.35zM8 14.02c-3.3 0-5.98-.15-5.98-3.35 0-.76.38-1.48 1.02-2.07 1.07-.98 2.9-.46 4.96-.46 2.07 0 3.88-.52 4.96.46.65.59 1.02 1.3 1.02 2.07 0 3.19-2.68 3.35-5.98 3.35zM5.49 9.01c-.66 0-1.2.8-1.2 1.78s.54 1.79 1.2 1.79c.66 0 1.2-.8 1.2-1.79s-.54-1.78-1.2-1.78zm5.02 0c-.66 0-1.2.79-1.2 1.78s.54 1.79 1.2 1.79c.66 0 1.2-.8 1.2-1.79s-.53-1.78-1.2-1.78z"></path></svg>
</include-fragment>
</div>
</details-menu>
</details>
<h2 id="blob-path" class="breadcrumb flex-auto min-width-0 text-normal mx-0 mx-md-3 width-full width-md-auto flex-order-1 flex-md-order-none mt-3 mt-md-0">
<span class="js-repo-root text-bold"><span class="js-path-segment d-inline-block wb-break-all"><a data-pjax="true" href="/Novia-2018/Intel-Image-Classification-Using-CNN"><span>Intel-Image-Classification-Using-CNN</span></a></span></span><span class="separator">/</span><span class="js-path-segment d-inline-block wb-break-all"><a data-pjax="true" href="/Novia-2018/Intel-Image-Classification-Using-CNN/tree/master/src"><span>src</span></a></span><span class="separator">/</span><strong class="final-path">Intel_Project (1).py</strong>
</h2>
<a href="/Novia-2018/Intel-Image-Classification-Using-CNN/find/master"
class="js-pjax-capture-input btn mr-2 d-none d-md-block"
data-pjax
data-hotkey="t">
Go to file
</a>
<details class="flex-self-end details-overlay details-reset position-relative" id="blob-more-options-details">
<summary role="button">
<span class="btn">
<svg height="16" class="octicon octicon-kebab-horizontal" aria-label="More options" viewBox="0 0 16 16" version="1.1" width="16" role="img"><path d="M8 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM1.5 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm13 0a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"></path></svg>
</span>
</summary>
<ul class="dropdown-menu dropdown-menu-sw">
<li class="d-block d-md-none">
<a class="dropdown-item d-flex flex-items-baseline" data-hydro-click="{"event_type":"repository.click","payload":{"target":"FIND_FILE_BUTTON","repository_id":274914883,"originating_url":"https://github.com/Novia-2018/Intel-Image-Classification-Using-CNN/blob/master/src/Intel_Project%20(1).py","user_id":56831817}}" data-hydro-click-hmac="41e40d790f85c273c71df7591af7e2a3b53d56d4c50721c802fa2403f52c905d" data-ga-click="Repository, find file, location:repo overview" data-hotkey="t" data-pjax="true" href="/Novia-2018/Intel-Image-Classification-Using-CNN/find/master">
<span class="flex-auto">Go to file</span>
<span class="text-small text-gray" aria-hidden="true">T</span>
</a> </li>
<li data-toggle-for="blob-more-options-details">
<button type="button" data-toggle-for="jumpto-line-details-dialog" class="btn-link dropdown-item">
<span class="d-flex flex-items-baseline">
<span class="flex-auto">Go to line</span>
<span class="text-small text-gray" aria-hidden="true">L</span>
</span>
</button>
</li>
<li class="dropdown-divider" role="none"></li>
<li>
<clipboard-copy value="src/Intel_Project (1).py" class="dropdown-item cursor-pointer" data-toggle-for="blob-more-options-details">
Copy path
</clipboard-copy>
</li>
</ul>
</details>
</div>
<div class="Box d-flex flex-column flex-shrink-0 mb-3">
<include-fragment src="/Novia-2018/Intel-Image-Classification-Using-CNN/contributors/master/src/Intel_Project%20(1).py" class="commit-loader">
<div class="Box-header Box-header--blue d-flex flex-items-center">
<div class="Skeleton avatar avatar-user flex-shrink-0 ml-n1 mr-n1 mt-n1 mb-n1" style="width:24px;height:24px;"></div>
<div class="Skeleton Skeleton--text col-5 ml-2"> </div>
</div>
<div class="Box-body d-flex flex-items-center" >
<div class="Skeleton Skeleton--text col-1"> </div>
<span class="text-red h6 loader-error">Cannot retrieve contributors at this time</span>
</div>
</include-fragment> </div>
<div class="Box mt-3 position-relative
">
<div class="Box-header py-2 d-flex flex-column flex-shrink-0 flex-md-row flex-md-items-center">
<div class="text-mono f6 flex-auto pr-3 flex-order-2 flex-md-order-1 mt-2 mt-md-0">
460 lines (266 sloc)
<span class="file-info-divider"></span>
8.28 KB
</div>
<div class="d-flex py-1 py-md-0 flex-auto flex-order-1 flex-md-order-2 flex-sm-grow-0 flex-justify-between">
<div class="BtnGroup">
<a id="raw-url" class="btn btn-sm BtnGroup-item" href="/Novia-2018/Intel-Image-Classification-Using-CNN/raw/master/src/Intel_Project%20(1).py">Raw</a>
<a class="btn btn-sm js-update-url-with-hash BtnGroup-item" data-hotkey="b" href="/Novia-2018/Intel-Image-Classification-Using-CNN/blame/master/src/Intel_Project%20(1).py">Blame</a>
</div>
<div>
<a class="btn-octicon tooltipped tooltipped-nw js-remove-unless-platform"
data-platforms="windows,mac"
href="https://desktop.github.com"
aria-label="Open this file in GitHub Desktop"
data-ga-click="Repository, open with desktop">
<svg class="octicon octicon-device-desktop" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.75 2.5h12.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25zM14.25 1H1.75A1.75 1.75 0 000 2.75v7.5C0 11.216.784 12 1.75 12h3.727c-.1 1.041-.52 1.872-1.292 2.757A.75.75 0 004.75 16h6.5a.75.75 0 00.565-1.243c-.772-.885-1.193-1.716-1.292-2.757h3.727A1.75 1.75 0 0016 10.25v-7.5A1.75 1.75 0 0014.25 1zM9.018 12H6.982a5.72 5.72 0 01-.765 2.5h3.566a5.72 5.72 0 01-.765-2.5z"></path></svg>
</a>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form js-update-url-with-hash" action="/Novia-2018/Intel-Image-Classification-Using-CNN/edit/master/src/Intel_Project%20(1).py" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="3W181oMJs/p5Npv5EnvJA8UIk6301MiB5NsOEA9+/7LiMR5cbKaK2j8L13aZ2JpcFOytnuPyoEQWw5GR3n0tWg==" />
<button class="btn-octicon tooltipped tooltipped-nw" type="submit"
aria-label="Edit this file" data-hotkey="e" data-disable-with>
<svg class="octicon octicon-pencil" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z"></path></svg>
</button>
</form>
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form" action="/Novia-2018/Intel-Image-Classification-Using-CNN/delete/master/src/Intel_Project%20(1).py" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="49tqkIezK4346J7VQG+3Y3+MHe1P47t8ghVi8mrxdmbhxUslFYU72kMib3upB8TjYdj8yPPGquyx0L/B9sfHaQ==" />
<button class="btn-octicon btn-octicon-danger tooltipped tooltipped-nw" type="submit"
aria-label="Delete this file" data-disable-with>
<svg class="octicon octicon-trashcan" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M6.5 1.75a.25.25 0 01.25-.25h2.5a.25.25 0 01.25.25V3h-3V1.75zm4.5 0V3h2.25a.75.75 0 010 1.5H2.75a.75.75 0 010-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75zM4.496 6.675a.75.75 0 10-1.492.15l.66 6.6A1.75 1.75 0 005.405 15h5.19c.9 0 1.652-.681 1.741-1.576l.66-6.6a.75.75 0 00-1.492-.149l-.66 6.6a.25.25 0 01-.249.225h-5.19a.25.25 0 01-.249-.225l-.66-6.6z"></path></svg>
</button>
</form> </div>
</div>
</div>
<div itemprop="text" class="Box-body p-0 blob-wrapper data type-python ">
<table class="highlight tab-size js-file-line-container" data-tab-size="8" data-paste-markdown-skip>
<tr>
<td id="L1" class="blob-num js-line-number" data-line-number="1"></td>
<td id="LC1" class="blob-code blob-code-inner js-file-line"><span class=pl-c>#!/usr/bin/env python</span></td>
</tr>
<tr>
<td id="L2" class="blob-num js-line-number" data-line-number="2"></td>
<td id="LC2" class="blob-code blob-code-inner js-file-line"><span class=pl-c># coding: utf-8</span></td>
</tr>
<tr>
<td id="L3" class="blob-num js-line-number" data-line-number="3"></td>
<td id="LC3" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L4" class="blob-num js-line-number" data-line-number="4"></td>
<td id="LC4" class="blob-code blob-code-inner js-file-line"><span class=pl-c># # Convolutional Neural Network</span></td>
</tr>
<tr>
<td id="L5" class="blob-num js-line-number" data-line-number="5"></td>
<td id="LC5" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L6" class="blob-num js-line-number" data-line-number="6"></td>
<td id="LC6" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Installing the libraries</span></td>
</tr>
<tr>
<td id="L7" class="blob-num js-line-number" data-line-number="7"></td>
<td id="LC7" class="blob-code blob-code-inner js-file-line">!p<span class=pl-s1>ip</span> <span class=pl-s1>install</span> <span class=pl-s1>tensorflow</span>!p<span class=pl-s1>ip</span> <span class=pl-s1>install</span> <span class=pl-s1>keras</span></td>
</tr>
<tr>
<td id="L8" class="blob-num js-line-number" data-line-number="8"></td>
<td id="LC8" class="blob-code blob-code-inner js-file-line">!p<span class=pl-s1>ip</span> <span class=pl-s1>install</span> <span class=pl-s1>opencv</span><span class=pl-c1>-</span><span class=pl-s1>python</span></td>
</tr>
<tr>
<td id="L9" class="blob-num js-line-number" data-line-number="9"></td>
<td id="LC9" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ## Importing The Libraries</span></td>
</tr>
<tr>
<td id="L10" class="blob-num js-line-number" data-line-number="10"></td>
<td id="LC10" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L11" class="blob-num js-line-number" data-line-number="11"></td>
<td id="LC11" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[213]:</span></td>
</tr>
<tr>
<td id="L12" class="blob-num js-line-number" data-line-number="12"></td>
<td id="LC12" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L13" class="blob-num js-line-number" data-line-number="13"></td>
<td id="LC13" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L14" class="blob-num js-line-number" data-line-number="14"></td>
<td id="LC14" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>tensorflow</span> <span class=pl-k>as</span> <span class=pl-s1>tf</span></td>
</tr>
<tr>
<td id="L15" class="blob-num js-line-number" data-line-number="15"></td>
<td id="LC15" class="blob-code blob-code-inner js-file-line"><span class=pl-k>from</span> <span class=pl-s1>keras</span>.<span class=pl-s1>preprocessing</span>.<span class=pl-s1>image</span> <span class=pl-k>import</span> <span class=pl-v>ImageDataGenerator</span></td>
</tr>
<tr>
<td id="L16" class="blob-num js-line-number" data-line-number="16"></td>
<td id="LC16" class="blob-code blob-code-inner js-file-line"><span class=pl-k>from</span> <span class=pl-s1>keras</span>.<span class=pl-s1>preprocessing</span> <span class=pl-k>import</span> <span class=pl-s1>image</span> <span class=pl-k>as</span> <span class=pl-s1>img</span></td>
</tr>
<tr>
<td id="L17" class="blob-num js-line-number" data-line-number="17"></td>
<td id="LC17" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>pandas</span> <span class=pl-k>as</span> <span class=pl-s1>pd</span></td>
</tr>
<tr>
<td id="L18" class="blob-num js-line-number" data-line-number="18"></td>
<td id="LC18" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>matplotlib</span>.<span class=pl-s1>pyplot</span> <span class=pl-k>as</span> <span class=pl-s1>plt</span></td>
</tr>
<tr>
<td id="L19" class="blob-num js-line-number" data-line-number="19"></td>
<td id="LC19" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>numpy</span> <span class=pl-k>as</span> <span class=pl-s1>np</span></td>
</tr>
<tr>
<td id="L20" class="blob-num js-line-number" data-line-number="20"></td>
<td id="LC20" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>tensorflow</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>layers</span> <span class=pl-k>as</span> <span class=pl-v>Layers</span></td>
</tr>
<tr>
<td id="L21" class="blob-num js-line-number" data-line-number="21"></td>
<td id="LC21" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>tensorflow</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>activations</span> <span class=pl-k>as</span> <span class=pl-v>Actications</span></td>
</tr>
<tr>
<td id="L22" class="blob-num js-line-number" data-line-number="22"></td>
<td id="LC22" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>tensorflow</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>models</span> <span class=pl-k>as</span> <span class=pl-v>Models</span></td>
</tr>
<tr>
<td id="L23" class="blob-num js-line-number" data-line-number="23"></td>
<td id="LC23" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>tensorflow</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>optimizers</span> <span class=pl-k>as</span> <span class=pl-v>Optimizer</span></td>
</tr>
<tr>
<td id="L24" class="blob-num js-line-number" data-line-number="24"></td>
<td id="LC24" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>tensorflow</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>metrics</span> <span class=pl-k>as</span> <span class=pl-v>Metrics</span></td>
</tr>
<tr>
<td id="L25" class="blob-num js-line-number" data-line-number="25"></td>
<td id="LC25" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>tensorflow</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>utils</span> <span class=pl-k>as</span> <span class=pl-v>Utils</span></td>
</tr>
<tr>
<td id="L26" class="blob-num js-line-number" data-line-number="26"></td>
<td id="LC26" class="blob-code blob-code-inner js-file-line"><span class=pl-k>from</span> <span class=pl-s1>keras</span>.<span class=pl-s1>utils</span>.<span class=pl-s1>vis_utils</span> <span class=pl-k>import</span> <span class=pl-s1>model_to_dot</span></td>
</tr>
<tr>
<td id="L27" class="blob-num js-line-number" data-line-number="27"></td>
<td id="LC27" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>os</span></td>
</tr>
<tr>
<td id="L28" class="blob-num js-line-number" data-line-number="28"></td>
<td id="LC28" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>matplotlib</span>.<span class=pl-s1>pyplot</span> <span class=pl-k>as</span> <span class=pl-s1>plot</span></td>
</tr>
<tr>
<td id="L29" class="blob-num js-line-number" data-line-number="29"></td>
<td id="LC29" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>cv2</span></td>
</tr>
<tr>
<td id="L30" class="blob-num js-line-number" data-line-number="30"></td>
<td id="LC30" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>numpy</span> <span class=pl-k>as</span> <span class=pl-s1>np</span></td>
</tr>
<tr>
<td id="L31" class="blob-num js-line-number" data-line-number="31"></td>
<td id="LC31" class="blob-code blob-code-inner js-file-line"><span class=pl-k>from</span> <span class=pl-s1>sklearn</span>.<span class=pl-s1>utils</span> <span class=pl-k>import</span> <span class=pl-s1>shuffle</span></td>
</tr>
<tr>
<td id="L32" class="blob-num js-line-number" data-line-number="32"></td>
<td id="LC32" class="blob-code blob-code-inner js-file-line"><span class=pl-k>from</span> <span class=pl-s1>sklearn</span>.<span class=pl-s1>metrics</span> <span class=pl-k>import</span> <span class=pl-s1>confusion_matrix</span> <span class=pl-k>as</span> <span class=pl-v>CM</span></td>
</tr>
<tr>
<td id="L33" class="blob-num js-line-number" data-line-number="33"></td>
<td id="LC33" class="blob-code blob-code-inner js-file-line"><span class=pl-k>from</span> <span class=pl-s1>random</span> <span class=pl-k>import</span> <span class=pl-s1>randint</span></td>
</tr>
<tr>
<td id="L34" class="blob-num js-line-number" data-line-number="34"></td>
<td id="LC34" class="blob-code blob-code-inner js-file-line"><span class=pl-k>from</span> <span class=pl-v>IPython</span>.<span class=pl-s1>display</span> <span class=pl-k>import</span> <span class=pl-v>SVG</span></td>
</tr>
<tr>
<td id="L35" class="blob-num js-line-number" data-line-number="35"></td>
<td id="LC35" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>matplotlib</span>.<span class=pl-s1>gridspec</span> <span class=pl-k>as</span> <span class=pl-s1>gridspec</span></td>
</tr>
<tr>
<td id="L36" class="blob-num js-line-number" data-line-number="36"></td>
<td id="LC36" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L37" class="blob-num js-line-number" data-line-number="37"></td>
<td id="LC37" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L38" class="blob-num js-line-number" data-line-number="38"></td>
<td id="LC38" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[184]:</span></td>
</tr>
<tr>
<td id="L39" class="blob-num js-line-number" data-line-number="39"></td>
<td id="LC39" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L40" class="blob-num js-line-number" data-line-number="40"></td>
<td id="LC40" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L41" class="blob-num js-line-number" data-line-number="41"></td>
<td id="LC41" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>tf</span>.<span class=pl-s1>__version__</span></td>
</tr>
<tr>
<td id="L42" class="blob-num js-line-number" data-line-number="42"></td>
<td id="LC42" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L43" class="blob-num js-line-number" data-line-number="43"></td>
<td id="LC43" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L44" class="blob-num js-line-number" data-line-number="44"></td>
<td id="LC44" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[185]:</span></td>
</tr>
<tr>
<td id="L45" class="blob-num js-line-number" data-line-number="45"></td>
<td id="LC45" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L46" class="blob-num js-line-number" data-line-number="46"></td>
<td id="LC46" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L47" class="blob-num js-line-number" data-line-number="47"></td>
<td id="LC47" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>cv2</span>.<span class=pl-s1>__version__</span></td>
</tr>
<tr>
<td id="L48" class="blob-num js-line-number" data-line-number="48"></td>
<td id="LC48" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L49" class="blob-num js-line-number" data-line-number="49"></td>
<td id="LC49" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L50" class="blob-num js-line-number" data-line-number="50"></td>
<td id="LC50" class="blob-code blob-code-inner js-file-line"><span class=pl-c># # Analising the Data</span></td>
</tr>
<tr>
<td id="L51" class="blob-num js-line-number" data-line-number="51"></td>
<td id="LC51" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L52" class="blob-num js-line-number" data-line-number="52"></td>
<td id="LC52" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[214]:</span></td>
</tr>
<tr>
<td id="L53" class="blob-num js-line-number" data-line-number="53"></td>
<td id="LC53" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L54" class="blob-num js-line-number" data-line-number="54"></td>
<td id="LC54" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L55" class="blob-num js-line-number" data-line-number="55"></td>
<td id="LC55" class="blob-code blob-code-inner js-file-line"><span class=pl-v>X</span> <span class=pl-c1>=</span> []</td>
</tr>
<tr>
<td id="L56" class="blob-num js-line-number" data-line-number="56"></td>
<td id="LC56" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>y</span> <span class=pl-c1>=</span> []</td>
</tr>
<tr>
<td id="L57" class="blob-num js-line-number" data-line-number="57"></td>
<td id="LC57" class="blob-code blob-code-inner js-file-line"><span class=pl-v>IMG_SIZE</span> <span class=pl-c1>=</span> <span class=pl-c1>150</span></td>
</tr>
<tr>
<td id="L58" class="blob-num js-line-number" data-line-number="58"></td>
<td id="LC58" class="blob-code blob-code-inner js-file-line"><span class=pl-v>DIR</span> <span class=pl-c1>=</span> <span class=pl-s>"111880_269359_bundle_archive/seg_train/seg_train"</span></td>
</tr>
<tr>
<td id="L59" class="blob-num js-line-number" data-line-number="59"></td>
<td id="LC59" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>folders</span> <span class=pl-c1>=</span> <span class=pl-s1>os</span>.<span class=pl-en>listdir</span>(<span class=pl-v>DIR</span>)</td>
</tr>
<tr>
<td id="L60" class="blob-num js-line-number" data-line-number="60"></td>
<td id="LC60" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>folders</span></td>
</tr>
<tr>
<td id="L61" class="blob-num js-line-number" data-line-number="61"></td>
<td id="LC61" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L62" class="blob-num js-line-number" data-line-number="62"></td>
<td id="LC62" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L63" class="blob-num js-line-number" data-line-number="63"></td>
<td id="LC63" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[216]:</span></td>
</tr>
<tr>
<td id="L64" class="blob-num js-line-number" data-line-number="64"></td>
<td id="LC64" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L65" class="blob-num js-line-number" data-line-number="65"></td>
<td id="LC65" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L66" class="blob-num js-line-number" data-line-number="66"></td>
<td id="LC66" class="blob-code blob-code-inner js-file-line"><span class=pl-k>for</span> <span class=pl-s1>i</span>, <span class=pl-s1>file</span> <span class=pl-c1>in</span> <span class=pl-en>enumerate</span>(<span class=pl-s1>folders</span>):</td>
</tr>
<tr>
<td id="L67" class="blob-num js-line-number" data-line-number="67"></td>
<td id="LC67" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>filename</span> <span class=pl-c1>=</span> <span class=pl-s1>os</span>.<span class=pl-s1>path</span>.<span class=pl-en>join</span>(<span class=pl-v>DIR</span>, <span class=pl-s1>file</span>)</td>
</tr>
<tr>
<td id="L68" class="blob-num js-line-number" data-line-number="68"></td>
<td id="LC68" class="blob-code blob-code-inner js-file-line"> <span class=pl-en>print</span>(<span class=pl-s>"Folder {} started"</span>.<span class=pl-en>format</span>(<span class=pl-s1>file</span>))</td>
</tr>
<tr>
<td id="L69" class="blob-num js-line-number" data-line-number="69"></td>
<td id="LC69" class="blob-code blob-code-inner js-file-line"> <span class=pl-k>try</span>:</td>
</tr>
<tr>
<td id="L70" class="blob-num js-line-number" data-line-number="70"></td>
<td id="LC70" class="blob-code blob-code-inner js-file-line"> <span class=pl-k>for</span> <span class=pl-s1>img</span> <span class=pl-c1>in</span> <span class=pl-s1>os</span>.<span class=pl-en>listdir</span>(<span class=pl-s1>filename</span>):</td>
</tr>
<tr>
<td id="L71" class="blob-num js-line-number" data-line-number="71"></td>
<td id="LC71" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>path</span> <span class=pl-c1>=</span> <span class=pl-s1>os</span>.<span class=pl-s1>path</span>.<span class=pl-en>join</span>(<span class=pl-s1>filename</span>, <span class=pl-s1>img</span>)</td>
</tr>
<tr>
<td id="L72" class="blob-num js-line-number" data-line-number="72"></td>
<td id="LC72" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>img</span> <span class=pl-c1>=</span> <span class=pl-s1>cv2</span>.<span class=pl-en>imread</span>(<span class=pl-s1>path</span>,<span class=pl-s1>cv2</span>.<span class=pl-v>IMREAD_COLOR</span>)</td>
</tr>
<tr>
<td id="L73" class="blob-num js-line-number" data-line-number="73"></td>
<td id="LC73" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>img</span> <span class=pl-c1>=</span> <span class=pl-s1>cv2</span>.<span class=pl-en>resize</span>(<span class=pl-s1>img</span>, (<span class=pl-v>IMG_SIZE</span>,<span class=pl-v>IMG_SIZE</span>))</td>
</tr>
<tr>
<td id="L74" class="blob-num js-line-number" data-line-number="74"></td>
<td id="LC74" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L75" class="blob-num js-line-number" data-line-number="75"></td>
<td id="LC75" class="blob-code blob-code-inner js-file-line"> <span class=pl-v>X</span>.<span class=pl-en>append</span>(<span class=pl-s1>np</span>.<span class=pl-en>array</span>(<span class=pl-s1>img</span>))</td>
</tr>
<tr>
<td id="L76" class="blob-num js-line-number" data-line-number="76"></td>
<td id="LC76" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>y</span>.<span class=pl-en>append</span>(<span class=pl-s1>i</span>)</td>
</tr>
<tr>
<td id="L77" class="blob-num js-line-number" data-line-number="77"></td>
<td id="LC77" class="blob-code blob-code-inner js-file-line"> <span class=pl-k>except</span>:</td>
</tr>
<tr>
<td id="L78" class="blob-num js-line-number" data-line-number="78"></td>
<td id="LC78" class="blob-code blob-code-inner js-file-line"> <span class=pl-en>print</span>(<span class=pl-s>"File {} not read"</span>.<span class=pl-en>format</span>(<span class=pl-s1>path</span>))</td>
</tr>
<tr>
<td id="L79" class="blob-num js-line-number" data-line-number="79"></td>
<td id="LC79" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="L80" class="blob-num js-line-number" data-line-number="80"></td>
<td id="LC80" class="blob-code blob-code-inner js-file-line"> <span class=pl-en>print</span>(<span class=pl-s>"Folder {} done"</span>.<span class=pl-en>format</span>(<span class=pl-s1>file</span>))</td>
</tr>
<tr>
<td id="L81" class="blob-num js-line-number" data-line-number="81"></td>
<td id="LC81" class="blob-code blob-code-inner js-file-line"> <span class=pl-en>print</span>(<span class=pl-s>"The folder {} is labeled as {}"</span>.<span class=pl-en>format</span>(<span class=pl-s1>file</span>, <span class=pl-s1>i</span>))</td>
</tr>
<tr>
<td id="L82" class="blob-num js-line-number" data-line-number="82"></td>
<td id="LC82" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L83" class="blob-num js-line-number" data-line-number="83"></td>
<td id="LC83" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L84" class="blob-num js-line-number" data-line-number="84"></td>
<td id="LC84" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[217]:</span></td>
</tr>
<tr>
<td id="L85" class="blob-num js-line-number" data-line-number="85"></td>
<td id="LC85" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L86" class="blob-num js-line-number" data-line-number="86"></td>
<td id="LC86" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L87" class="blob-num js-line-number" data-line-number="87"></td>
<td id="LC87" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>np</span>.<span class=pl-en>unique</span>(<span class=pl-s1>y</span>, <span class=pl-s1>return_counts</span><span class=pl-c1>=</span><span class=pl-c1>True</span>)</td>
</tr>
<tr>
<td id="L88" class="blob-num js-line-number" data-line-number="88"></td>
<td id="LC88" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L89" class="blob-num js-line-number" data-line-number="89"></td>
<td id="LC89" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L90" class="blob-num js-line-number" data-line-number="90"></td>
<td id="LC90" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Making the functions to get the training and validation set from the Images</span></td>
</tr>
<tr>
<td id="L91" class="blob-num js-line-number" data-line-number="91"></td>
<td id="LC91" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L92" class="blob-num js-line-number" data-line-number="92"></td>
<td id="LC92" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[223]:</span></td>
</tr>
<tr>
<td id="L93" class="blob-num js-line-number" data-line-number="93"></td>
<td id="LC93" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L94" class="blob-num js-line-number" data-line-number="94"></td>
<td id="LC94" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L95" class="blob-num js-line-number" data-line-number="95"></td>
<td id="LC95" class="blob-code blob-code-inner js-file-line"><span class=pl-k>from</span> <span class=pl-s1>tqdm</span> <span class=pl-k>import</span> <span class=pl-s1>tqdm</span></td>
</tr>
<tr>
<td id="L96" class="blob-num js-line-number" data-line-number="96"></td>
<td id="LC96" class="blob-code blob-code-inner js-file-line"><span class=pl-v>X</span><span class=pl-c1>=</span>[]</td>
</tr>
<tr>
<td id="L97" class="blob-num js-line-number" data-line-number="97"></td>
<td id="LC97" class="blob-code blob-code-inner js-file-line"><span class=pl-v>Z</span><span class=pl-c1>=</span>[]</td>
</tr>
<tr>
<td id="L98" class="blob-num js-line-number" data-line-number="98"></td>
<td id="LC98" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L99" class="blob-num js-line-number" data-line-number="99"></td>
<td id="LC99" class="blob-code blob-code-inner js-file-line"><span class=pl-v>IMG_SIZE</span><span class=pl-c1>=</span><span class=pl-c1>150</span></td>
</tr>
<tr>
<td id="L100" class="blob-num js-line-number" data-line-number="100"></td>
<td id="LC100" class="blob-code blob-code-inner js-file-line"><span class=pl-v>IMAGE_BUILDINGS_DIR</span><span class=pl-c1>=</span><span class=pl-s>'111880_269359_bundle_archive/seg_train/seg_train/buildings'</span></td>
</tr>
<tr>
<td id="L101" class="blob-num js-line-number" data-line-number="101"></td>
<td id="LC101" class="blob-code blob-code-inner js-file-line"><span class=pl-v>IMAGE_FOREST_DIR</span><span class=pl-c1>=</span><span class=pl-s>'111880_269359_bundle_archive/seg_train/seg_train/forest'</span></td>
</tr>
<tr>
<td id="L102" class="blob-num js-line-number" data-line-number="102"></td>
<td id="LC102" class="blob-code blob-code-inner js-file-line"><span class=pl-v>IMAGE_GLACIER_DIR</span><span class=pl-c1>=</span><span class=pl-s>'111880_269359_bundle_archive/seg_train/seg_train/glacier'</span></td>
</tr>
<tr>
<td id="L103" class="blob-num js-line-number" data-line-number="103"></td>
<td id="LC103" class="blob-code blob-code-inner js-file-line"><span class=pl-v>IMAGE_MOUNTAIN_DIR</span><span class=pl-c1>=</span><span class=pl-s>'111880_269359_bundle_archive/seg_train/seg_train/mountain'</span></td>
</tr>
<tr>
<td id="L104" class="blob-num js-line-number" data-line-number="104"></td>
<td id="LC104" class="blob-code blob-code-inner js-file-line"><span class=pl-v>IMAGE_SEA_DIR</span><span class=pl-c1>=</span><span class=pl-s>'111880_269359_bundle_archive/seg_train/seg_train/sea'</span></td>
</tr>
<tr>
<td id="L105" class="blob-num js-line-number" data-line-number="105"></td>
<td id="LC105" class="blob-code blob-code-inner js-file-line"><span class=pl-v>IMAGE_STREET_DIR</span><span class=pl-c1>=</span><span class=pl-s>'111880_269359_bundle_archive/seg_train/seg_train/street'</span></td>
</tr>
<tr>
<td id="L106" class="blob-num js-line-number" data-line-number="106"></td>
<td id="LC106" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L107" class="blob-num js-line-number" data-line-number="107"></td>
<td id="LC107" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L108" class="blob-num js-line-number" data-line-number="108"></td>
<td id="LC108" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[224]:</span></td>
</tr>
<tr>
<td id="L109" class="blob-num js-line-number" data-line-number="109"></td>
<td id="LC109" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L110" class="blob-num js-line-number" data-line-number="110"></td>
<td id="LC110" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L111" class="blob-num js-line-number" data-line-number="111"></td>
<td id="LC111" class="blob-code blob-code-inner js-file-line"><span class=pl-k>def</span> <span class=pl-en>assign_label</span>(<span class=pl-s1>img</span>,<span class=pl-s1>image_type</span>):</td>
</tr>
<tr>
<td id="L112" class="blob-num js-line-number" data-line-number="112"></td>
<td id="LC112" class="blob-code blob-code-inner js-file-line"> <span class=pl-k>return</span> <span class=pl-s1>image_type</span></td>
</tr>
<tr>
<td id="L113" class="blob-num js-line-number" data-line-number="113"></td>
<td id="LC113" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L114" class="blob-num js-line-number" data-line-number="114"></td>
<td id="LC114" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L115" class="blob-num js-line-number" data-line-number="115"></td>
<td id="LC115" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[255]:</span></td>
</tr>
<tr>
<td id="L116" class="blob-num js-line-number" data-line-number="116"></td>
<td id="LC116" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L117" class="blob-num js-line-number" data-line-number="117"></td>
<td id="LC117" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L118" class="blob-num js-line-number" data-line-number="118"></td>
<td id="LC118" class="blob-code blob-code-inner js-file-line"><span class=pl-k>def</span> <span class=pl-en>make_train_data</span>(<span class=pl-s1>image_type</span>,<span class=pl-v>DIR</span>):</td>
</tr>
<tr>
<td id="L119" class="blob-num js-line-number" data-line-number="119"></td>
<td id="LC119" class="blob-code blob-code-inner js-file-line"> <span class=pl-k>for</span> <span class=pl-s1>img</span> <span class=pl-c1>in</span> <span class=pl-en>tqdm</span>(<span class=pl-s1>os</span>.<span class=pl-en>listdir</span>(<span class=pl-v>DIR</span>)):</td>
</tr>
<tr>
<td id="L120" class="blob-num js-line-number" data-line-number="120"></td>
<td id="LC120" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>label</span><span class=pl-c1>=</span><span class=pl-en>assign_label</span>(<span class=pl-s1>img</span>,<span class=pl-s1>image_type</span>)</td>
</tr>
<tr>
<td id="L121" class="blob-num js-line-number" data-line-number="121"></td>
<td id="LC121" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>path</span> <span class=pl-c1>=</span> <span class=pl-s1>os</span>.<span class=pl-s1>path</span>.<span class=pl-en>join</span>(<span class=pl-v>DIR</span>,<span class=pl-s1>img</span>)</td>
</tr>
<tr>
<td id="L122" class="blob-num js-line-number" data-line-number="122"></td>
<td id="LC122" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>img</span> <span class=pl-c1>=</span> <span class=pl-s1>cv2</span>.<span class=pl-en>imread</span>(<span class=pl-s1>path</span>,<span class=pl-s1>cv2</span>.<span class=pl-v>IMREAD_COLOR</span>)</td>
</tr>
<tr>
<td id="L123" class="blob-num js-line-number" data-line-number="123"></td>
<td id="LC123" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>img</span> <span class=pl-c1>=</span> <span class=pl-s1>cv2</span>.<span class=pl-en>resize</span>(<span class=pl-s1>img</span>, (<span class=pl-v>IMG_SIZE</span>,<span class=pl-v>IMG_SIZE</span>))</td>
</tr>
<tr>
<td id="L124" class="blob-num js-line-number" data-line-number="124"></td>
<td id="LC124" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="L125" class="blob-num js-line-number" data-line-number="125"></td>
<td id="LC125" class="blob-code blob-code-inner js-file-line"> <span class=pl-v>X</span>.<span class=pl-en>append</span>(<span class=pl-s1>np</span>.<span class=pl-en>array</span>(<span class=pl-s1>img</span>))</td>
</tr>
<tr>
<td id="L126" class="blob-num js-line-number" data-line-number="126"></td>
<td id="LC126" class="blob-code blob-code-inner js-file-line"> <span class=pl-v>Z</span>.<span class=pl-en>append</span>(<span class=pl-s1>__builtins__</span>.<span class=pl-en>str</span>(<span class=pl-s1>label</span>))</td>
</tr>
<tr>
<td id="L127" class="blob-num js-line-number" data-line-number="127"></td>
<td id="LC127" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L128" class="blob-num js-line-number" data-line-number="128"></td>
<td id="LC128" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L129" class="blob-num js-line-number" data-line-number="129"></td>
<td id="LC129" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[256]:</span></td>
</tr>
<tr>
<td id="L130" class="blob-num js-line-number" data-line-number="130"></td>
<td id="LC130" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L131" class="blob-num js-line-number" data-line-number="131"></td>
<td id="LC131" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L132" class="blob-num js-line-number" data-line-number="132"></td>
<td id="LC132" class="blob-code blob-code-inner js-file-line"><span class=pl-en>make_train_data</span>(<span class=pl-s>'Buildings'</span>,<span class=pl-v>IMAGE_BUILDINGS_DIR</span>)</td>
</tr>
<tr>
<td id="L133" class="blob-num js-line-number" data-line-number="133"></td>
<td id="LC133" class="blob-code blob-code-inner js-file-line"><span class=pl-en>print</span>(<span class=pl-en>len</span>(<span class=pl-v>X</span>))</td>
</tr>
<tr>
<td id="L134" class="blob-num js-line-number" data-line-number="134"></td>
<td id="LC134" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L135" class="blob-num js-line-number" data-line-number="135"></td>
<td id="LC135" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L136" class="blob-num js-line-number" data-line-number="136"></td>
<td id="LC136" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[257]:</span></td>
</tr>
<tr>
<td id="L137" class="blob-num js-line-number" data-line-number="137"></td>
<td id="LC137" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L138" class="blob-num js-line-number" data-line-number="138"></td>
<td id="LC138" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L139" class="blob-num js-line-number" data-line-number="139"></td>
<td id="LC139" class="blob-code blob-code-inner js-file-line"><span class=pl-en>make_train_data</span>(<span class=pl-s>'Forest'</span>,<span class=pl-v>IMAGE_FOREST_DIR</span>)</td>
</tr>
<tr>
<td id="L140" class="blob-num js-line-number" data-line-number="140"></td>
<td id="LC140" class="blob-code blob-code-inner js-file-line"><span class=pl-en>print</span>(<span class=pl-en>len</span>(<span class=pl-v>X</span>))</td>
</tr>
<tr>
<td id="L141" class="blob-num js-line-number" data-line-number="141"></td>
<td id="LC141" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L142" class="blob-num js-line-number" data-line-number="142"></td>
<td id="LC142" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L143" class="blob-num js-line-number" data-line-number="143"></td>
<td id="LC143" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[258]:</span></td>
</tr>
<tr>
<td id="L144" class="blob-num js-line-number" data-line-number="144"></td>
<td id="LC144" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L145" class="blob-num js-line-number" data-line-number="145"></td>
<td id="LC145" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L146" class="blob-num js-line-number" data-line-number="146"></td>
<td id="LC146" class="blob-code blob-code-inner js-file-line"><span class=pl-en>make_train_data</span>(<span class=pl-s>'Glacier'</span>,<span class=pl-v>IMAGE_GLACIER_DIR</span>)</td>
</tr>
<tr>
<td id="L147" class="blob-num js-line-number" data-line-number="147"></td>
<td id="LC147" class="blob-code blob-code-inner js-file-line"><span class=pl-en>print</span>(<span class=pl-en>len</span>(<span class=pl-v>X</span>))</td>
</tr>
<tr>
<td id="L148" class="blob-num js-line-number" data-line-number="148"></td>
<td id="LC148" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L149" class="blob-num js-line-number" data-line-number="149"></td>
<td id="LC149" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L150" class="blob-num js-line-number" data-line-number="150"></td>
<td id="LC150" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[259]:</span></td>
</tr>
<tr>
<td id="L151" class="blob-num js-line-number" data-line-number="151"></td>
<td id="LC151" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L152" class="blob-num js-line-number" data-line-number="152"></td>
<td id="LC152" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L153" class="blob-num js-line-number" data-line-number="153"></td>
<td id="LC153" class="blob-code blob-code-inner js-file-line"><span class=pl-en>make_train_data</span>(<span class=pl-s>'Mountain'</span>,<span class=pl-v>IMAGE_MOUNTAIN_DIR</span>)</td>
</tr>
<tr>
<td id="L154" class="blob-num js-line-number" data-line-number="154"></td>
<td id="LC154" class="blob-code blob-code-inner js-file-line"><span class=pl-en>print</span>(<span class=pl-en>len</span>(<span class=pl-v>X</span>))</td>
</tr>
<tr>
<td id="L155" class="blob-num js-line-number" data-line-number="155"></td>
<td id="LC155" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L156" class="blob-num js-line-number" data-line-number="156"></td>
<td id="LC156" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L157" class="blob-num js-line-number" data-line-number="157"></td>
<td id="LC157" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[260]:</span></td>
</tr>
<tr>
<td id="L158" class="blob-num js-line-number" data-line-number="158"></td>
<td id="LC158" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L159" class="blob-num js-line-number" data-line-number="159"></td>
<td id="LC159" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L160" class="blob-num js-line-number" data-line-number="160"></td>
<td id="LC160" class="blob-code blob-code-inner js-file-line"><span class=pl-en>make_train_data</span>(<span class=pl-s>'Sea'</span>,<span class=pl-v>IMAGE_SEA_DIR</span>)</td>
</tr>
<tr>
<td id="L161" class="blob-num js-line-number" data-line-number="161"></td>
<td id="LC161" class="blob-code blob-code-inner js-file-line"><span class=pl-en>print</span>(<span class=pl-en>len</span>(<span class=pl-v>X</span>))</td>
</tr>
<tr>
<td id="L162" class="blob-num js-line-number" data-line-number="162"></td>
<td id="LC162" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L163" class="blob-num js-line-number" data-line-number="163"></td>
<td id="LC163" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L164" class="blob-num js-line-number" data-line-number="164"></td>
<td id="LC164" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[261]:</span></td>
</tr>
<tr>
<td id="L165" class="blob-num js-line-number" data-line-number="165"></td>
<td id="LC165" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L166" class="blob-num js-line-number" data-line-number="166"></td>
<td id="LC166" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L167" class="blob-num js-line-number" data-line-number="167"></td>
<td id="LC167" class="blob-code blob-code-inner js-file-line"><span class=pl-en>make_train_data</span>(<span class=pl-s>'Street'</span>,<span class=pl-v>IMAGE_STREET_DIR</span>)</td>
</tr>
<tr>
<td id="L168" class="blob-num js-line-number" data-line-number="168"></td>
<td id="LC168" class="blob-code blob-code-inner js-file-line"><span class=pl-en>print</span>(<span class=pl-en>len</span>(<span class=pl-v>X</span>))</td>
</tr>
<tr>
<td id="L169" class="blob-num js-line-number" data-line-number="169"></td>
<td id="LC169" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L170" class="blob-num js-line-number" data-line-number="170"></td>
<td id="LC170" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L171" class="blob-num js-line-number" data-line-number="171"></td>
<td id="LC171" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[262]:</span></td>
</tr>
<tr>
<td id="L172" class="blob-num js-line-number" data-line-number="172"></td>
<td id="LC172" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L173" class="blob-num js-line-number" data-line-number="173"></td>
<td id="LC173" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L174" class="blob-num js-line-number" data-line-number="174"></td>
<td id="LC174" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L175" class="blob-num js-line-number" data-line-number="175"></td>
<td id="LC175" class="blob-code blob-code-inner js-file-line"><span class=pl-k>from</span> <span class=pl-v>IPython</span>.<span class=pl-s1>display</span> <span class=pl-k>import</span> <span class=pl-s1>display</span></td>
</tr>
<tr>
<td id="L176" class="blob-num js-line-number" data-line-number="176"></td>
<td id="LC176" class="blob-code blob-code-inner js-file-line"><span class=pl-k>from</span> <span class=pl-v>PIL</span> <span class=pl-k>import</span> <span class=pl-v>Image</span> </td>
</tr>
<tr>
<td id="L177" class="blob-num js-line-number" data-line-number="177"></td>
<td id="LC177" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>labels</span> <span class=pl-c1>=</span> []</td>
</tr>
<tr>
<td id="L178" class="blob-num js-line-number" data-line-number="178"></td>
<td id="LC178" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>dic</span> <span class=pl-c1>=</span> <span class=pl-en>dict</span>()</td>
</tr>
<tr>
<td id="L179" class="blob-num js-line-number" data-line-number="179"></td>
<td id="LC179" class="blob-code blob-code-inner js-file-line"><span class=pl-k>for</span> <span class=pl-s1>i</span> <span class=pl-c1>in</span> <span class=pl-en>range</span>(<span class=pl-c1>0</span>,<span class=pl-c1>6</span>):</td>
</tr>
<tr>
<td id="L180" class="blob-num js-line-number" data-line-number="180"></td>
<td id="LC180" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>str</span> <span class=pl-c1>=</span> <span class=pl-s>'111880_269359_bundle_archive\seg_train\seg_train<span class=pl-cce>\\</span>'</span><span class=pl-c1>+</span><span class=pl-s1>dirs</span>[<span class=pl-s1>i</span>]</td>
</tr>
<tr>
<td id="L181" class="blob-num js-line-number" data-line-number="181"></td>
<td id="LC181" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>count</span> <span class=pl-c1>=</span> <span class=pl-c1>0</span></td>
</tr>
<tr>
<td id="L182" class="blob-num js-line-number" data-line-number="182"></td>
<td id="LC182" class="blob-code blob-code-inner js-file-line"> <span class=pl-k>for</span> <span class=pl-s1>j</span> <span class=pl-c1>in</span> <span class=pl-s1>os</span>.<span class=pl-en>listdir</span>(<span class=pl-s1>str</span>):</td>
</tr>
<tr>
<td id="L183" class="blob-num js-line-number" data-line-number="183"></td>
<td id="LC183" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>str2</span> <span class=pl-c1>=</span> <span class=pl-s1>str</span><span class=pl-c1>+</span><span class=pl-s>"<span class=pl-cce>\\</span>"</span><span class=pl-c1>+</span><span class=pl-s1>j</span></td>
</tr>
<tr>
<td id="L184" class="blob-num js-line-number" data-line-number="184"></td>
<td id="LC184" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>im</span> <span class=pl-c1>=</span> <span class=pl-v>Image</span>.<span class=pl-en>open</span>(<span class=pl-s1>str2</span>)</td>
</tr>
<tr>
<td id="L185" class="blob-num js-line-number" data-line-number="185"></td>
<td id="LC185" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>count</span> <span class=pl-c1>+=</span> <span class=pl-c1>1</span></td>
</tr>
<tr>
<td id="L186" class="blob-num js-line-number" data-line-number="186"></td>
<td id="LC186" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>labels</span>.<span class=pl-en>append</span>(<span class=pl-s1>j</span>)</td>
</tr>
<tr>
<td id="L187" class="blob-num js-line-number" data-line-number="187"></td>
<td id="LC187" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>dic</span>[<span class=pl-s1>dirs</span>[<span class=pl-s1>i</span>]] <span class=pl-c1>=</span> <span class=pl-s1>count</span></td>
</tr>
<tr>
<td id="L188" class="blob-num js-line-number" data-line-number="188"></td>
<td id="LC188" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L189" class="blob-num js-line-number" data-line-number="189"></td>
<td id="LC189" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L190" class="blob-num js-line-number" data-line-number="190"></td>
<td id="LC190" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[263]:</span></td>
</tr>
<tr>
<td id="L191" class="blob-num js-line-number" data-line-number="191"></td>
<td id="LC191" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L192" class="blob-num js-line-number" data-line-number="192"></td>
<td id="LC192" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L193" class="blob-num js-line-number" data-line-number="193"></td>
<td id="LC193" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>labels1</span> <span class=pl-c1>=</span> []</td>
</tr>
<tr>
<td id="L194" class="blob-num js-line-number" data-line-number="194"></td>
<td id="LC194" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>dic1</span> <span class=pl-c1>=</span> <span class=pl-en>dict</span>()</td>
</tr>
<tr>
<td id="L195" class="blob-num js-line-number" data-line-number="195"></td>
<td id="LC195" class="blob-code blob-code-inner js-file-line"><span class=pl-v>IMAGE_SIZE</span> <span class=pl-c1>=</span> (<span class=pl-c1>64</span>,<span class=pl-c1>64</span>)</td>
</tr>
<tr>
<td id="L196" class="blob-num js-line-number" data-line-number="196"></td>
<td id="LC196" class="blob-code blob-code-inner js-file-line"><span class=pl-k>for</span> <span class=pl-s1>i</span> <span class=pl-c1>in</span> <span class=pl-en>range</span>(<span class=pl-c1>0</span>,<span class=pl-c1>6</span>):</td>
</tr>
<tr>
<td id="L197" class="blob-num js-line-number" data-line-number="197"></td>
<td id="LC197" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>str</span> <span class=pl-c1>=</span> <span class=pl-s>'111880_269359_bundle_archive\seg_test\seg_test<span class=pl-cce>\\</span>'</span><span class=pl-c1>+</span><span class=pl-s1>dirs</span>[<span class=pl-s1>i</span>]</td>
</tr>
<tr>
<td id="L198" class="blob-num js-line-number" data-line-number="198"></td>
<td id="LC198" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>count</span> <span class=pl-c1>=</span> <span class=pl-c1>0</span></td>
</tr>
<tr>
<td id="L199" class="blob-num js-line-number" data-line-number="199"></td>
<td id="LC199" class="blob-code blob-code-inner js-file-line"> <span class=pl-k>for</span> <span class=pl-s1>j</span> <span class=pl-c1>in</span> <span class=pl-s1>os</span>.<span class=pl-en>listdir</span>(<span class=pl-s1>str</span>):</td>
</tr>
<tr>
<td id="L200" class="blob-num js-line-number" data-line-number="200"></td>
<td id="LC200" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>str2</span> <span class=pl-c1>=</span> <span class=pl-s1>str</span><span class=pl-c1>+</span><span class=pl-s>"<span class=pl-cce>\\</span>"</span><span class=pl-c1>+</span><span class=pl-s1>j</span></td>
</tr>
<tr>
<td id="L201" class="blob-num js-line-number" data-line-number="201"></td>
<td id="LC201" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>im</span> <span class=pl-c1>=</span> <span class=pl-v>Image</span>.<span class=pl-en>open</span>(<span class=pl-s1>str2</span>)</td>
</tr>
<tr>
<td id="L202" class="blob-num js-line-number" data-line-number="202"></td>
<td id="LC202" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>count</span> <span class=pl-c1>+=</span> <span class=pl-c1>1</span></td>
</tr>
<tr>
<td id="L203" class="blob-num js-line-number" data-line-number="203"></td>
<td id="LC203" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>labels1</span>.<span class=pl-en>append</span>(<span class=pl-s1>j</span>)</td>
</tr>
<tr>
<td id="L204" class="blob-num js-line-number" data-line-number="204"></td>
<td id="LC204" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>dic1</span>[<span class=pl-s1>dirs</span>[<span class=pl-s1>i</span>]] <span class=pl-c1>=</span> <span class=pl-s1>count</span></td>
</tr>
<tr>
<td id="L205" class="blob-num js-line-number" data-line-number="205"></td>
<td id="LC205" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L206" class="blob-num js-line-number" data-line-number="206"></td>
<td id="LC206" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L207" class="blob-num js-line-number" data-line-number="207"></td>
<td id="LC207" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[264]:</span></td>
</tr>
<tr>
<td id="L208" class="blob-num js-line-number" data-line-number="208"></td>
<td id="LC208" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L209" class="blob-num js-line-number" data-line-number="209"></td>
<td id="LC209" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L210" class="blob-num js-line-number" data-line-number="210"></td>
<td id="LC210" class="blob-code blob-code-inner js-file-line"><span class=pl-en>print</span> (<span class=pl-s>"Number of training examples: {}"</span>.<span class=pl-en>format</span>(<span class=pl-en>len</span>(<span class=pl-s1>labels</span>)))</td>
</tr>
<tr>
<td id="L211" class="blob-num js-line-number" data-line-number="211"></td>
<td id="LC211" class="blob-code blob-code-inner js-file-line"><span class=pl-en>print</span> (<span class=pl-s>"Number of testing examples: {}"</span>.<span class=pl-en>format</span>(<span class=pl-en>len</span>(<span class=pl-s1>labels1</span>)))</td>
</tr>
<tr>
<td id="L212" class="blob-num js-line-number" data-line-number="212"></td>
<td id="LC212" class="blob-code blob-code-inner js-file-line"><span class=pl-en>print</span> (<span class=pl-s>"Each image is of size: {}"</span>.<span class=pl-en>format</span>(<span class=pl-v>IMAGE_SIZE</span>))</td>
</tr>
<tr>
<td id="L213" class="blob-num js-line-number" data-line-number="213"></td>
<td id="LC213" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L214" class="blob-num js-line-number" data-line-number="214"></td>
<td id="LC214" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L215" class="blob-num js-line-number" data-line-number="215"></td>
<td id="LC215" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[265]:</span></td>
</tr>
<tr>
<td id="L216" class="blob-num js-line-number" data-line-number="216"></td>
<td id="LC216" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L217" class="blob-num js-line-number" data-line-number="217"></td>
<td id="LC217" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L218" class="blob-num js-line-number" data-line-number="218"></td>
<td id="LC218" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>lis1</span> <span class=pl-c1>=</span> []</td>
</tr>
<tr>
<td id="L219" class="blob-num js-line-number" data-line-number="219"></td>
<td id="LC219" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>lis2</span> <span class=pl-c1>=</span> []</td>
</tr>
<tr>
<td id="L220" class="blob-num js-line-number" data-line-number="220"></td>
<td id="LC220" class="blob-code blob-code-inner js-file-line"><span class=pl-k>for</span> <span class=pl-s1>key</span>,<span class=pl-s1>val</span> <span class=pl-c1>in</span> <span class=pl-s1>dic</span>.<span class=pl-en>items</span>():</td>
</tr>
<tr>
<td id="L221" class="blob-num js-line-number" data-line-number="221"></td>
<td id="LC221" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>lis1</span>.<span class=pl-en>append</span>(<span class=pl-s1>val</span>)</td>
</tr>
<tr>
<td id="L222" class="blob-num js-line-number" data-line-number="222"></td>
<td id="LC222" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>lis2</span>.<span class=pl-en>append</span>(<span class=pl-s1>key</span>)</td>
</tr>
<tr>
<td id="L223" class="blob-num js-line-number" data-line-number="223"></td>
<td id="LC223" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L224" class="blob-num js-line-number" data-line-number="224"></td>
<td id="LC224" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L225" class="blob-num js-line-number" data-line-number="225"></td>
<td id="LC225" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[266]:</span></td>
</tr>
<tr>
<td id="L226" class="blob-num js-line-number" data-line-number="226"></td>
<td id="LC226" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L227" class="blob-num js-line-number" data-line-number="227"></td>
<td id="LC227" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L228" class="blob-num js-line-number" data-line-number="228"></td>
<td id="LC228" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>lis11</span> <span class=pl-c1>=</span> []</td>
</tr>
<tr>
<td id="L229" class="blob-num js-line-number" data-line-number="229"></td>
<td id="LC229" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>lis22</span> <span class=pl-c1>=</span> []</td>
</tr>
<tr>
<td id="L230" class="blob-num js-line-number" data-line-number="230"></td>
<td id="LC230" class="blob-code blob-code-inner js-file-line"><span class=pl-k>for</span> <span class=pl-s1>key</span>,<span class=pl-s1>val</span> <span class=pl-c1>in</span> <span class=pl-s1>dic1</span>.<span class=pl-en>items</span>():</td>
</tr>
<tr>
<td id="L231" class="blob-num js-line-number" data-line-number="231"></td>
<td id="LC231" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>lis11</span>.<span class=pl-en>append</span>(<span class=pl-s1>val</span>)</td>
</tr>
<tr>
<td id="L232" class="blob-num js-line-number" data-line-number="232"></td>
<td id="LC232" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>lis22</span>.<span class=pl-en>append</span>(<span class=pl-s1>key</span>)</td>
</tr>
<tr>
<td id="L233" class="blob-num js-line-number" data-line-number="233"></td>
<td id="LC233" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L234" class="blob-num js-line-number" data-line-number="234"></td>
<td id="LC234" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L235" class="blob-num js-line-number" data-line-number="235"></td>
<td id="LC235" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[267]:</span></td>
</tr>
<tr>
<td id="L236" class="blob-num js-line-number" data-line-number="236"></td>
<td id="LC236" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L237" class="blob-num js-line-number" data-line-number="237"></td>
<td id="LC237" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L238" class="blob-num js-line-number" data-line-number="238"></td>
<td id="LC238" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>data</span> <span class=pl-c1>=</span> {<span class=pl-s>'Name'</span>:<span class=pl-s1>lis2</span>, <span class=pl-s>'train'</span>:<span class=pl-s1>lis1</span>,<span class=pl-s>'test'</span>:<span class=pl-s1>lis11</span>}</td>
</tr>
<tr>
<td id="L239" class="blob-num js-line-number" data-line-number="239"></td>
<td id="LC239" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>data</span></td>
</tr>
<tr>
<td id="L240" class="blob-num js-line-number" data-line-number="240"></td>
<td id="LC240" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L241" class="blob-num js-line-number" data-line-number="241"></td>
<td id="LC241" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L242" class="blob-num js-line-number" data-line-number="242"></td>
<td id="LC242" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[268]:</span></td>
</tr>
<tr>
<td id="L243" class="blob-num js-line-number" data-line-number="243"></td>
<td id="LC243" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L244" class="blob-num js-line-number" data-line-number="244"></td>
<td id="LC244" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L245" class="blob-num js-line-number" data-line-number="245"></td>
<td id="LC245" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>pandas</span> <span class=pl-k>as</span> <span class=pl-s1>pd</span></td>
</tr>
<tr>
<td id="L246" class="blob-num js-line-number" data-line-number="246"></td>
<td id="LC246" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>df</span> <span class=pl-c1>=</span> <span class=pl-s1>pd</span>.<span class=pl-v>DataFrame</span>(<span class=pl-s1>data</span>)</td>
</tr>
<tr>
<td id="L247" class="blob-num js-line-number" data-line-number="247"></td>
<td id="LC247" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>df</span></td>
</tr>
<tr>
<td id="L248" class="blob-num js-line-number" data-line-number="248"></td>
<td id="LC248" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L249" class="blob-num js-line-number" data-line-number="249"></td>
<td id="LC249" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L250" class="blob-num js-line-number" data-line-number="250"></td>
<td id="LC250" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ## 2.2 ) Visualizing some Random Images</span></td>
</tr>
<tr>
<td id="L251" class="blob-num js-line-number" data-line-number="251"></td>
<td id="LC251" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L252" class="blob-num js-line-number" data-line-number="252"></td>
<td id="LC252" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[269]:</span></td>
</tr>
<tr>
<td id="L253" class="blob-num js-line-number" data-line-number="253"></td>
<td id="LC253" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L254" class="blob-num js-line-number" data-line-number="254"></td>
<td id="LC254" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L255" class="blob-num js-line-number" data-line-number="255"></td>
<td id="LC255" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>ax</span> <span class=pl-c1>=</span> <span class=pl-s1>df</span>.<span class=pl-s1>plot</span>.<span class=pl-en>bar</span>(<span class=pl-s1>x</span><span class=pl-c1>=</span><span class=pl-s>'Name'</span>, <span class=pl-s1>y</span><span class=pl-c1>=</span>[<span class=pl-s>'train'</span>,<span class=pl-s>'test'</span>], <span class=pl-s1>rot</span><span class=pl-c1>=</span><span class=pl-c1>0</span>)</td>
</tr>
<tr>
<td id="L256" class="blob-num js-line-number" data-line-number="256"></td>
<td id="LC256" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>title</span>(<span class=pl-s>'Training sets Input'</span>)</td>
</tr>
<tr>
<td id="L257" class="blob-num js-line-number" data-line-number="257"></td>
<td id="LC257" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L258" class="blob-num js-line-number" data-line-number="258"></td>
<td id="LC258" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L259" class="blob-num js-line-number" data-line-number="259"></td>
<td id="LC259" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[270]:</span></td>
</tr>
<tr>
<td id="L260" class="blob-num js-line-number" data-line-number="260"></td>
<td id="LC260" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L261" class="blob-num js-line-number" data-line-number="261"></td>
<td id="LC261" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L262" class="blob-num js-line-number" data-line-number="262"></td>
<td id="LC262" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>pie</span>(<span class=pl-s1>lis1</span>,</td>
</tr>
<tr>
<td id="L263" class="blob-num js-line-number" data-line-number="263"></td>
<td id="LC263" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>explode</span><span class=pl-c1>=</span>(<span class=pl-c1>0</span>, <span class=pl-c1>0</span>, <span class=pl-c1>0</span>, <span class=pl-c1>0</span>, <span class=pl-c1>0</span>, <span class=pl-c1>0</span>) , </td>
</tr>
<tr>
<td id="L264" class="blob-num js-line-number" data-line-number="264"></td>
<td id="LC264" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>labels</span><span class=pl-c1>=</span><span class=pl-s1>lis2</span>,</td>
</tr>
<tr>
<td id="L265" class="blob-num js-line-number" data-line-number="265"></td>
<td id="LC265" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>autopct</span><span class=pl-c1>=</span><span class=pl-s>'%1.1f%%'</span>)</td>
</tr>
<tr>
<td id="L266" class="blob-num js-line-number" data-line-number="266"></td>
<td id="LC266" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>axis</span>(<span class=pl-s>'equal'</span>)</td>
</tr>
<tr>
<td id="L267" class="blob-num js-line-number" data-line-number="267"></td>
<td id="LC267" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>title</span>(<span class=pl-s>'Proportion of each observed category'</span>)</td>
</tr>
<tr>
<td id="L268" class="blob-num js-line-number" data-line-number="268"></td>
<td id="LC268" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>show</span>()</td>
</tr>
<tr>
<td id="L269" class="blob-num js-line-number" data-line-number="269"></td>
<td id="LC269" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L270" class="blob-num js-line-number" data-line-number="270"></td>
<td id="LC270" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L271" class="blob-num js-line-number" data-line-number="271"></td>
<td id="LC271" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[271]:</span></td>
</tr>
<tr>
<td id="L272" class="blob-num js-line-number" data-line-number="272"></td>
<td id="LC272" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L273" class="blob-num js-line-number" data-line-number="273"></td>
<td id="LC273" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L274" class="blob-num js-line-number" data-line-number="274"></td>
<td id="LC274" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>random</span> <span class=pl-k>as</span> <span class=pl-s1>rn</span></td>
</tr>
<tr>
<td id="L275" class="blob-num js-line-number" data-line-number="275"></td>
<td id="LC275" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>fig</span>,<span class=pl-s1>ax</span><span class=pl-c1>=</span><span class=pl-s1>plt</span>.<span class=pl-en>subplots</span>(<span class=pl-c1>5</span>,<span class=pl-c1>3</span>)</td>
</tr>
<tr>
<td id="L276" class="blob-num js-line-number" data-line-number="276"></td>
<td id="LC276" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>fig</span>.<span class=pl-en>set_size_inches</span>(<span class=pl-c1>15</span>,<span class=pl-c1>15</span>)</td>
</tr>
<tr>
<td id="L277" class="blob-num js-line-number" data-line-number="277"></td>
<td id="LC277" class="blob-code blob-code-inner js-file-line"><span class=pl-k>for</span> <span class=pl-s1>i</span> <span class=pl-c1>in</span> <span class=pl-en>range</span>(<span class=pl-c1>5</span>):</td>
</tr>
<tr>
<td id="L278" class="blob-num js-line-number" data-line-number="278"></td>
<td id="LC278" class="blob-code blob-code-inner js-file-line"> <span class=pl-k>for</span> <span class=pl-s1>j</span> <span class=pl-c1>in</span> <span class=pl-en>range</span> (<span class=pl-c1>3</span>):</td>
</tr>
<tr>
<td id="L279" class="blob-num js-line-number" data-line-number="279"></td>
<td id="LC279" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>l</span><span class=pl-c1>=</span><span class=pl-s1>rn</span>.<span class=pl-en>randint</span>(<span class=pl-c1>0</span>,<span class=pl-en>len</span>(<span class=pl-v>Z</span>))</td>
</tr>
<tr>
<td id="L280" class="blob-num js-line-number" data-line-number="280"></td>
<td id="LC280" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>ax</span>[<span class=pl-s1>i</span>,<span class=pl-s1>j</span>].<span class=pl-en>imshow</span>(<span class=pl-v>X</span>[<span class=pl-s1>l</span>])</td>
</tr>
<tr>
<td id="L281" class="blob-num js-line-number" data-line-number="281"></td>
<td id="LC281" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>ax</span>[<span class=pl-s1>i</span>,<span class=pl-s1>j</span>].<span class=pl-en>set_title</span>(<span class=pl-s>'Intel_Image: '</span><span class=pl-c1>+</span><span class=pl-v>Z</span>[<span class=pl-s1>l</span>])</td>
</tr>
<tr>
<td id="L282" class="blob-num js-line-number" data-line-number="282"></td>
<td id="LC282" class="blob-code blob-code-inner js-file-line"> </td>
</tr>
<tr>
<td id="L283" class="blob-num js-line-number" data-line-number="283"></td>
<td id="LC283" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>tight_layout</span>()</td>
</tr>
<tr>
<td id="L284" class="blob-num js-line-number" data-line-number="284"></td>
<td id="LC284" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L285" class="blob-num js-line-number" data-line-number="285"></td>
<td id="LC285" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L286" class="blob-num js-line-number" data-line-number="286"></td>
<td id="LC286" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Preprocessing the Training set</span></td>
</tr>
<tr>
<td id="L287" class="blob-num js-line-number" data-line-number="287"></td>
<td id="LC287" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L288" class="blob-num js-line-number" data-line-number="288"></td>
<td id="LC288" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[272]:</span></td>
</tr>
<tr>
<td id="L289" class="blob-num js-line-number" data-line-number="289"></td>
<td id="LC289" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L290" class="blob-num js-line-number" data-line-number="290"></td>
<td id="LC290" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L291" class="blob-num js-line-number" data-line-number="291"></td>
<td id="LC291" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>train_datagen</span> <span class=pl-c1>=</span> <span class=pl-v>ImageDataGenerator</span>(<span class=pl-s1>rescale</span> <span class=pl-c1>=</span> <span class=pl-c1>1.</span><span class=pl-c1>/</span><span class=pl-c1>255</span>,</td>
</tr>
<tr>
<td id="L292" class="blob-num js-line-number" data-line-number="292"></td>
<td id="LC292" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>shear_range</span> <span class=pl-c1>=</span> <span class=pl-c1>0.2</span>,</td>
</tr>
<tr>
<td id="L293" class="blob-num js-line-number" data-line-number="293"></td>
<td id="LC293" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>zoom_range</span> <span class=pl-c1>=</span> <span class=pl-c1>0.2</span>,</td>
</tr>
<tr>
<td id="L294" class="blob-num js-line-number" data-line-number="294"></td>
<td id="LC294" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>horizontal_flip</span> <span class=pl-c1>=</span> <span class=pl-c1>True</span>)</td>
</tr>
<tr>
<td id="L295" class="blob-num js-line-number" data-line-number="295"></td>
<td id="LC295" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>seg_train</span> <span class=pl-c1>=</span> <span class=pl-s1>train_datagen</span>.<span class=pl-en>flow_from_directory</span>(<span class=pl-s>'111880_269359_bundle_archive/seg_train/seg_train'</span>,</td>
</tr>
<tr>
<td id="L296" class="blob-num js-line-number" data-line-number="296"></td>
<td id="LC296" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>target_size</span> <span class=pl-c1>=</span> (<span class=pl-c1>64</span>, <span class=pl-c1>64</span>),</td>
</tr>
<tr>
<td id="L297" class="blob-num js-line-number" data-line-number="297"></td>
<td id="LC297" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>batch_size</span> <span class=pl-c1>=</span> <span class=pl-c1>32</span>,</td>
</tr>
<tr>
<td id="L298" class="blob-num js-line-number" data-line-number="298"></td>
<td id="LC298" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>class_mode</span> <span class=pl-c1>=</span> <span class=pl-s>'categorical'</span>)</td>
</tr>
<tr>
<td id="L299" class="blob-num js-line-number" data-line-number="299"></td>
<td id="LC299" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L300" class="blob-num js-line-number" data-line-number="300"></td>
<td id="LC300" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L301" class="blob-num js-line-number" data-line-number="301"></td>
<td id="LC301" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Preprocessing the Test set</span></td>
</tr>
<tr>
<td id="L302" class="blob-num js-line-number" data-line-number="302"></td>
<td id="LC302" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L303" class="blob-num js-line-number" data-line-number="303"></td>
<td id="LC303" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[273]:</span></td>
</tr>
<tr>
<td id="L304" class="blob-num js-line-number" data-line-number="304"></td>
<td id="LC304" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L305" class="blob-num js-line-number" data-line-number="305"></td>
<td id="LC305" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L306" class="blob-num js-line-number" data-line-number="306"></td>
<td id="LC306" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>test_datagen</span> <span class=pl-c1>=</span> <span class=pl-v>ImageDataGenerator</span>(<span class=pl-s1>rescale</span> <span class=pl-c1>=</span> <span class=pl-c1>1.</span><span class=pl-c1>/</span><span class=pl-c1>255</span>)</td>
</tr>
<tr>
<td id="L307" class="blob-num js-line-number" data-line-number="307"></td>
<td id="LC307" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>seg_test</span> <span class=pl-c1>=</span> <span class=pl-s1>test_datagen</span>.<span class=pl-en>flow_from_directory</span>(<span class=pl-s>'111880_269359_bundle_archive/seg_test/seg_test'</span>,</td>
</tr>
<tr>
<td id="L308" class="blob-num js-line-number" data-line-number="308"></td>
<td id="LC308" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>target_size</span> <span class=pl-c1>=</span> (<span class=pl-c1>64</span>, <span class=pl-c1>64</span>),</td>
</tr>
<tr>
<td id="L309" class="blob-num js-line-number" data-line-number="309"></td>
<td id="LC309" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>batch_size</span> <span class=pl-c1>=</span> <span class=pl-c1>32</span>,</td>
</tr>
<tr>
<td id="L310" class="blob-num js-line-number" data-line-number="310"></td>
<td id="LC310" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>class_mode</span> <span class=pl-c1>=</span> <span class=pl-s>'categorical'</span>)</td>
</tr>
<tr>
<td id="L311" class="blob-num js-line-number" data-line-number="311"></td>
<td id="LC311" class="blob-code blob-code-inner js-file-line"><span class=pl-v>IMAGE_SIZE</span> <span class=pl-c1>=</span> (<span class=pl-c1>64</span>,<span class=pl-c1>64</span>)</td>
</tr>
<tr>
<td id="L312" class="blob-num js-line-number" data-line-number="312"></td>
<td id="LC312" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L313" class="blob-num js-line-number" data-line-number="313"></td>
<td id="LC313" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L314" class="blob-num js-line-number" data-line-number="314"></td>
<td id="LC314" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ## Part 2 - Building the CNN</span></td>
</tr>
<tr>
<td id="L315" class="blob-num js-line-number" data-line-number="315"></td>
<td id="LC315" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L316" class="blob-num js-line-number" data-line-number="316"></td>
<td id="LC316" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Initialising the CNN</span></td>
</tr>
<tr>
<td id="L317" class="blob-num js-line-number" data-line-number="317"></td>
<td id="LC317" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L318" class="blob-num js-line-number" data-line-number="318"></td>
<td id="LC318" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[281]:</span></td>
</tr>
<tr>
<td id="L319" class="blob-num js-line-number" data-line-number="319"></td>
<td id="LC319" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L320" class="blob-num js-line-number" data-line-number="320"></td>
<td id="LC320" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L321" class="blob-num js-line-number" data-line-number="321"></td>
<td id="LC321" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>cnn</span> <span class=pl-c1>=</span> <span class=pl-s1>tf</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>models</span>.<span class=pl-v>Sequential</span>()</td>
</tr>
<tr>
<td id="L322" class="blob-num js-line-number" data-line-number="322"></td>
<td id="LC322" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L323" class="blob-num js-line-number" data-line-number="323"></td>
<td id="LC323" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L324" class="blob-num js-line-number" data-line-number="324"></td>
<td id="LC324" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Step 1 - Convolution</span></td>
</tr>
<tr>
<td id="L325" class="blob-num js-line-number" data-line-number="325"></td>
<td id="LC325" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L326" class="blob-num js-line-number" data-line-number="326"></td>
<td id="LC326" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[282]:</span></td>
</tr>
<tr>
<td id="L327" class="blob-num js-line-number" data-line-number="327"></td>
<td id="LC327" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L328" class="blob-num js-line-number" data-line-number="328"></td>
<td id="LC328" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L329" class="blob-num js-line-number" data-line-number="329"></td>
<td id="LC329" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>cnn</span>.<span class=pl-en>add</span>(<span class=pl-s1>tf</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>layers</span>.<span class=pl-v>Conv2D</span>(<span class=pl-s1>filters</span><span class=pl-c1>=</span><span class=pl-c1>32</span>, <span class=pl-s1>kernel_size</span><span class=pl-c1>=</span><span class=pl-c1>3</span>, <span class=pl-s1>activation</span><span class=pl-c1>=</span><span class=pl-s>'relu'</span>, <span class=pl-s1>input_shape</span><span class=pl-c1>=</span>[<span class=pl-c1>64</span>, <span class=pl-c1>64</span>, <span class=pl-c1>3</span>]))</td>
</tr>
<tr>
<td id="L330" class="blob-num js-line-number" data-line-number="330"></td>
<td id="LC330" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L331" class="blob-num js-line-number" data-line-number="331"></td>
<td id="LC331" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L332" class="blob-num js-line-number" data-line-number="332"></td>
<td id="LC332" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Step 2 - Pooling</span></td>
</tr>
<tr>
<td id="L333" class="blob-num js-line-number" data-line-number="333"></td>
<td id="LC333" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L334" class="blob-num js-line-number" data-line-number="334"></td>
<td id="LC334" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[283]:</span></td>
</tr>
<tr>
<td id="L335" class="blob-num js-line-number" data-line-number="335"></td>
<td id="LC335" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L336" class="blob-num js-line-number" data-line-number="336"></td>
<td id="LC336" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L337" class="blob-num js-line-number" data-line-number="337"></td>
<td id="LC337" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>cnn</span>.<span class=pl-en>add</span>(<span class=pl-s1>tf</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>layers</span>.<span class=pl-v>MaxPool2D</span>(<span class=pl-s1>pool_size</span><span class=pl-c1>=</span><span class=pl-c1>2</span>, <span class=pl-s1>strides</span><span class=pl-c1>=</span><span class=pl-c1>2</span>))</td>
</tr>
<tr>
<td id="L338" class="blob-num js-line-number" data-line-number="338"></td>
<td id="LC338" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L339" class="blob-num js-line-number" data-line-number="339"></td>
<td id="LC339" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L340" class="blob-num js-line-number" data-line-number="340"></td>
<td id="LC340" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Adding a second convolutional layer</span></td>
</tr>
<tr>
<td id="L341" class="blob-num js-line-number" data-line-number="341"></td>
<td id="LC341" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L342" class="blob-num js-line-number" data-line-number="342"></td>
<td id="LC342" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[284]:</span></td>
</tr>
<tr>
<td id="L343" class="blob-num js-line-number" data-line-number="343"></td>
<td id="LC343" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L344" class="blob-num js-line-number" data-line-number="344"></td>
<td id="LC344" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L345" class="blob-num js-line-number" data-line-number="345"></td>
<td id="LC345" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>cnn</span>.<span class=pl-en>add</span>(<span class=pl-s1>tf</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>layers</span>.<span class=pl-v>Conv2D</span>(<span class=pl-s1>filters</span><span class=pl-c1>=</span><span class=pl-c1>32</span>, <span class=pl-s1>kernel_size</span><span class=pl-c1>=</span><span class=pl-c1>3</span>, <span class=pl-s1>activation</span><span class=pl-c1>=</span><span class=pl-s>'relu'</span>))</td>
</tr>
<tr>
<td id="L346" class="blob-num js-line-number" data-line-number="346"></td>
<td id="LC346" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>cnn</span>.<span class=pl-en>add</span>(<span class=pl-s1>tf</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>layers</span>.<span class=pl-v>MaxPool2D</span>(<span class=pl-s1>pool_size</span><span class=pl-c1>=</span><span class=pl-c1>2</span>, <span class=pl-s1>strides</span><span class=pl-c1>=</span><span class=pl-c1>2</span>))</td>
</tr>
<tr>
<td id="L347" class="blob-num js-line-number" data-line-number="347"></td>
<td id="LC347" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L348" class="blob-num js-line-number" data-line-number="348"></td>
<td id="LC348" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L349" class="blob-num js-line-number" data-line-number="349"></td>
<td id="LC349" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Step 3 - Flattening</span></td>
</tr>
<tr>
<td id="L350" class="blob-num js-line-number" data-line-number="350"></td>
<td id="LC350" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L351" class="blob-num js-line-number" data-line-number="351"></td>
<td id="LC351" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[285]:</span></td>
</tr>
<tr>
<td id="L352" class="blob-num js-line-number" data-line-number="352"></td>
<td id="LC352" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L353" class="blob-num js-line-number" data-line-number="353"></td>
<td id="LC353" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L354" class="blob-num js-line-number" data-line-number="354"></td>
<td id="LC354" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>cnn</span>.<span class=pl-en>add</span>(<span class=pl-s1>tf</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>layers</span>.<span class=pl-v>Flatten</span>())</td>
</tr>
<tr>
<td id="L355" class="blob-num js-line-number" data-line-number="355"></td>
<td id="LC355" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L356" class="blob-num js-line-number" data-line-number="356"></td>
<td id="LC356" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L357" class="blob-num js-line-number" data-line-number="357"></td>
<td id="LC357" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Step 4 - Full Connection</span></td>
</tr>
<tr>
<td id="L358" class="blob-num js-line-number" data-line-number="358"></td>
<td id="LC358" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L359" class="blob-num js-line-number" data-line-number="359"></td>
<td id="LC359" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[286]:</span></td>
</tr>
<tr>
<td id="L360" class="blob-num js-line-number" data-line-number="360"></td>
<td id="LC360" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L361" class="blob-num js-line-number" data-line-number="361"></td>
<td id="LC361" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L362" class="blob-num js-line-number" data-line-number="362"></td>
<td id="LC362" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>cnn</span>.<span class=pl-en>add</span>(<span class=pl-s1>tf</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>layers</span>.<span class=pl-v>Dense</span>(<span class=pl-s1>units</span><span class=pl-c1>=</span><span class=pl-c1>128</span>, <span class=pl-s1>activation</span><span class=pl-c1>=</span><span class=pl-s>'relu'</span>))</td>
</tr>
<tr>
<td id="L363" class="blob-num js-line-number" data-line-number="363"></td>
<td id="LC363" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L364" class="blob-num js-line-number" data-line-number="364"></td>
<td id="LC364" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L365" class="blob-num js-line-number" data-line-number="365"></td>
<td id="LC365" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Step 5 - Output Layer</span></td>
</tr>
<tr>
<td id="L366" class="blob-num js-line-number" data-line-number="366"></td>
<td id="LC366" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L367" class="blob-num js-line-number" data-line-number="367"></td>
<td id="LC367" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[287]:</span></td>
</tr>
<tr>
<td id="L368" class="blob-num js-line-number" data-line-number="368"></td>
<td id="LC368" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L369" class="blob-num js-line-number" data-line-number="369"></td>
<td id="LC369" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L370" class="blob-num js-line-number" data-line-number="370"></td>
<td id="LC370" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>cnn</span>.<span class=pl-en>add</span>(<span class=pl-s1>tf</span>.<span class=pl-s1>keras</span>.<span class=pl-s1>layers</span>.<span class=pl-v>Dense</span>(<span class=pl-s1>units</span><span class=pl-c1>=</span><span class=pl-c1>6</span>, <span class=pl-s1>activation</span><span class=pl-c1>=</span><span class=pl-s>'softmax'</span>))</td>
</tr>
<tr>
<td id="L371" class="blob-num js-line-number" data-line-number="371"></td>
<td id="LC371" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L372" class="blob-num js-line-number" data-line-number="372"></td>
<td id="LC372" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L373" class="blob-num js-line-number" data-line-number="373"></td>
<td id="LC373" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[288]:</span></td>
</tr>
<tr>
<td id="L374" class="blob-num js-line-number" data-line-number="374"></td>
<td id="LC374" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L375" class="blob-num js-line-number" data-line-number="375"></td>
<td id="LC375" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L376" class="blob-num js-line-number" data-line-number="376"></td>
<td id="LC376" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>cnn</span>.<span class=pl-en>summary</span>()</td>
</tr>
<tr>
<td id="L377" class="blob-num js-line-number" data-line-number="377"></td>
<td id="LC377" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L378" class="blob-num js-line-number" data-line-number="378"></td>
<td id="LC378" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L379" class="blob-num js-line-number" data-line-number="379"></td>
<td id="LC379" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ## Part 3 - Training the CNN</span></td>
</tr>
<tr>
<td id="L380" class="blob-num js-line-number" data-line-number="380"></td>
<td id="LC380" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L381" class="blob-num js-line-number" data-line-number="381"></td>
<td id="LC381" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Compiling the CNN</span></td>
</tr>
<tr>
<td id="L382" class="blob-num js-line-number" data-line-number="382"></td>
<td id="LC382" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L383" class="blob-num js-line-number" data-line-number="383"></td>
<td id="LC383" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[289]:</span></td>
</tr>
<tr>
<td id="L384" class="blob-num js-line-number" data-line-number="384"></td>
<td id="LC384" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L385" class="blob-num js-line-number" data-line-number="385"></td>
<td id="LC385" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L386" class="blob-num js-line-number" data-line-number="386"></td>
<td id="LC386" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>cnn</span>.<span class=pl-en>compile</span>(<span class=pl-s1>optimizer</span> <span class=pl-c1>=</span> <span class=pl-s>'adam'</span>, <span class=pl-s1>loss</span> <span class=pl-c1>=</span> <span class=pl-s>'categorical_crossentropy'</span>, <span class=pl-s1>metrics</span> <span class=pl-c1>=</span> [<span class=pl-s>'accuracy'</span>])</td>
</tr>
<tr>
<td id="L387" class="blob-num js-line-number" data-line-number="387"></td>
<td id="LC387" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L388" class="blob-num js-line-number" data-line-number="388"></td>
<td id="LC388" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L389" class="blob-num js-line-number" data-line-number="389"></td>
<td id="LC389" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ### Training the CNN on the Training set and evaluating it on the Test set</span></td>
</tr>
<tr>
<td id="L390" class="blob-num js-line-number" data-line-number="390"></td>
<td id="LC390" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L391" class="blob-num js-line-number" data-line-number="391"></td>
<td id="LC391" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[290]:</span></td>
</tr>
<tr>
<td id="L392" class="blob-num js-line-number" data-line-number="392"></td>
<td id="LC392" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L393" class="blob-num js-line-number" data-line-number="393"></td>
<td id="LC393" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L394" class="blob-num js-line-number" data-line-number="394"></td>
<td id="LC394" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>trained</span><span class=pl-c1>=</span> <span class=pl-s1>cnn</span>.<span class=pl-en>fit</span>(<span class=pl-s1>x</span> <span class=pl-c1>=</span> <span class=pl-s1>seg_train</span>, <span class=pl-s1>validation_data</span> <span class=pl-c1>=</span> <span class=pl-s1>seg_test</span>, <span class=pl-s1>epochs</span> <span class=pl-c1>=</span> <span class=pl-c1>25</span>)</td>
</tr>
<tr>
<td id="L395" class="blob-num js-line-number" data-line-number="395"></td>
<td id="LC395" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L396" class="blob-num js-line-number" data-line-number="396"></td>
<td id="LC396" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L397" class="blob-num js-line-number" data-line-number="397"></td>
<td id="LC397" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ## Evaluating the Model Performance</span></td>
</tr>
<tr>
<td id="L398" class="blob-num js-line-number" data-line-number="398"></td>
<td id="LC398" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L399" class="blob-num js-line-number" data-line-number="399"></td>
<td id="LC399" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[291]:</span></td>
</tr>
<tr>
<td id="L400" class="blob-num js-line-number" data-line-number="400"></td>
<td id="LC400" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L401" class="blob-num js-line-number" data-line-number="401"></td>
<td id="LC401" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L402" class="blob-num js-line-number" data-line-number="402"></td>
<td id="LC402" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>plot</span>(<span class=pl-s1>trained</span>.<span class=pl-s1>history</span>[<span class=pl-s>'loss'</span>])</td>
</tr>
<tr>
<td id="L403" class="blob-num js-line-number" data-line-number="403"></td>
<td id="LC403" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>plot</span>(<span class=pl-s1>trained</span>.<span class=pl-s1>history</span>[<span class=pl-s>'val_loss'</span>])</td>
</tr>
<tr>
<td id="L404" class="blob-num js-line-number" data-line-number="404"></td>
<td id="LC404" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>title</span>(<span class=pl-s>'Model Loss'</span>)</td>
</tr>
<tr>
<td id="L405" class="blob-num js-line-number" data-line-number="405"></td>
<td id="LC405" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>ylabel</span>(<span class=pl-s>'Loss'</span>)</td>
</tr>
<tr>
<td id="L406" class="blob-num js-line-number" data-line-number="406"></td>
<td id="LC406" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>xlabel</span>(<span class=pl-s>'Epochs'</span>)</td>
</tr>
<tr>
<td id="L407" class="blob-num js-line-number" data-line-number="407"></td>
<td id="LC407" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>legend</span>([<span class=pl-s>'train'</span>, <span class=pl-s>'test'</span>])</td>
</tr>
<tr>
<td id="L408" class="blob-num js-line-number" data-line-number="408"></td>
<td id="LC408" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>show</span>()</td>
</tr>
<tr>
<td id="L409" class="blob-num js-line-number" data-line-number="409"></td>
<td id="LC409" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L410" class="blob-num js-line-number" data-line-number="410"></td>
<td id="LC410" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L411" class="blob-num js-line-number" data-line-number="411"></td>
<td id="LC411" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[292]:</span></td>
</tr>
<tr>
<td id="L412" class="blob-num js-line-number" data-line-number="412"></td>
<td id="LC412" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L413" class="blob-num js-line-number" data-line-number="413"></td>
<td id="LC413" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L414" class="blob-num js-line-number" data-line-number="414"></td>
<td id="LC414" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>plot</span>(<span class=pl-s1>trained</span>.<span class=pl-s1>history</span>[<span class=pl-s>'accuracy'</span>])</td>
</tr>
<tr>
<td id="L415" class="blob-num js-line-number" data-line-number="415"></td>
<td id="LC415" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>plot</span>(<span class=pl-s1>trained</span>.<span class=pl-s1>history</span>[<span class=pl-s>'val_accuracy'</span>])</td>
</tr>
<tr>
<td id="L416" class="blob-num js-line-number" data-line-number="416"></td>
<td id="LC416" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>title</span>(<span class=pl-s>'Model Accuracy'</span>)</td>
</tr>
<tr>
<td id="L417" class="blob-num js-line-number" data-line-number="417"></td>
<td id="LC417" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>ylabel</span>(<span class=pl-s>'Accuracy'</span>)</td>
</tr>
<tr>
<td id="L418" class="blob-num js-line-number" data-line-number="418"></td>
<td id="LC418" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>xlabel</span>(<span class=pl-s>'Epochs'</span>)</td>
</tr>
<tr>
<td id="L419" class="blob-num js-line-number" data-line-number="419"></td>
<td id="LC419" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>legend</span>([<span class=pl-s>'train'</span>, <span class=pl-s>'test'</span>])</td>
</tr>
<tr>
<td id="L420" class="blob-num js-line-number" data-line-number="420"></td>
<td id="LC420" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>plt</span>.<span class=pl-en>show</span>()</td>
</tr>
<tr>
<td id="L421" class="blob-num js-line-number" data-line-number="421"></td>
<td id="LC421" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L422" class="blob-num js-line-number" data-line-number="422"></td>
<td id="LC422" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L423" class="blob-num js-line-number" data-line-number="423"></td>
<td id="LC423" class="blob-code blob-code-inner js-file-line"><span class=pl-c># ## Visualizing Predictons on the Validation Set</span></td>
</tr>
<tr>
<td id="L424" class="blob-num js-line-number" data-line-number="424"></td>
<td id="LC424" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L425" class="blob-num js-line-number" data-line-number="425"></td>
<td id="LC425" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[298]:</span></td>
</tr>
<tr>
<td id="L426" class="blob-num js-line-number" data-line-number="426"></td>
<td id="LC426" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L427" class="blob-num js-line-number" data-line-number="427"></td>
<td id="LC427" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L428" class="blob-num js-line-number" data-line-number="428"></td>
<td id="LC428" class="blob-code blob-code-inner js-file-line"><span class=pl-k>import</span> <span class=pl-s1>numpy</span> <span class=pl-k>as</span> <span class=pl-s1>np</span></td>
</tr>
<tr>
<td id="L429" class="blob-num js-line-number" data-line-number="429"></td>
<td id="LC429" class="blob-code blob-code-inner js-file-line"><span class=pl-k>from</span> <span class=pl-s1>keras</span>.<span class=pl-s1>preprocessing</span> <span class=pl-k>import</span> <span class=pl-s1>image</span></td>
</tr>
<tr>
<td id="L430" class="blob-num js-line-number" data-line-number="430"></td>
<td id="LC430" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>test_image1</span> <span class=pl-c1>=</span> <span class=pl-s1>image</span>.<span class=pl-en>load_img</span>(<span class=pl-s>'111880_269359_bundle_archive/seg_pred/seg_pred/5.jpg'</span>, <span class=pl-s1>target_size</span> <span class=pl-c1>=</span> (<span class=pl-c1>64</span>, <span class=pl-c1>64</span>))</td>
</tr>
<tr>
<td id="L431" class="blob-num js-line-number" data-line-number="431"></td>
<td id="LC431" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>test_image</span> <span class=pl-c1>=</span> <span class=pl-s1>image</span>.<span class=pl-en>img_to_array</span>(<span class=pl-s1>test_image1</span>)</td>
</tr>
<tr>
<td id="L432" class="blob-num js-line-number" data-line-number="432"></td>
<td id="LC432" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>test_image</span> <span class=pl-c1>=</span> <span class=pl-s1>np</span>.<span class=pl-en>expand_dims</span>(<span class=pl-s1>test_image</span>, <span class=pl-s1>axis</span> <span class=pl-c1>=</span> <span class=pl-c1>0</span>)</td>
</tr>
<tr>
<td id="L433" class="blob-num js-line-number" data-line-number="433"></td>
<td id="LC433" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>result</span> <span class=pl-c1>=</span> <span class=pl-s1>cnn</span>.<span class=pl-en>predict</span>(<span class=pl-s1>test_image</span>)</td>
</tr>
<tr>
<td id="L434" class="blob-num js-line-number" data-line-number="434"></td>
<td id="LC434" class="blob-code blob-code-inner js-file-line"><span class=pl-k>if</span> <span class=pl-s1>result</span>[<span class=pl-c1>0</span>][<span class=pl-c1>0</span>] <span class=pl-c1>==</span> <span class=pl-c1>1</span>:</td>
</tr>
<tr>
<td id="L435" class="blob-num js-line-number" data-line-number="435"></td>
<td id="LC435" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>prediction</span> <span class=pl-c1>=</span> <span class=pl-s>'Building'</span></td>
</tr>
<tr>
<td id="L436" class="blob-num js-line-number" data-line-number="436"></td>
<td id="LC436" class="blob-code blob-code-inner js-file-line"><span class=pl-k>elif</span> <span class=pl-s1>result</span>[<span class=pl-c1>0</span>][<span class=pl-c1>1</span>] <span class=pl-c1>==</span> <span class=pl-c1>1</span>:</td>
</tr>
<tr>
<td id="L437" class="blob-num js-line-number" data-line-number="437"></td>
<td id="LC437" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>prediction</span> <span class=pl-c1>=</span> <span class=pl-s>'Forest'</span></td>
</tr>
<tr>
<td id="L438" class="blob-num js-line-number" data-line-number="438"></td>
<td id="LC438" class="blob-code blob-code-inner js-file-line"><span class=pl-k>elif</span> <span class=pl-s1>result</span>[<span class=pl-c1>0</span>][<span class=pl-c1>2</span>] <span class=pl-c1>==</span> <span class=pl-c1>1</span>:</td>
</tr>
<tr>
<td id="L439" class="blob-num js-line-number" data-line-number="439"></td>
<td id="LC439" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>prediction</span> <span class=pl-c1>=</span> <span class=pl-s>'Glacier'</span></td>
</tr>
<tr>
<td id="L440" class="blob-num js-line-number" data-line-number="440"></td>
<td id="LC440" class="blob-code blob-code-inner js-file-line"><span class=pl-k>elif</span> <span class=pl-s1>result</span>[<span class=pl-c1>0</span>][<span class=pl-c1>3</span>] <span class=pl-c1>==</span> <span class=pl-c1>1</span>:</td>
</tr>
<tr>
<td id="L441" class="blob-num js-line-number" data-line-number="441"></td>
<td id="LC441" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>prediction</span> <span class=pl-c1>=</span> <span class=pl-s>'Mountain'</span></td>
</tr>
<tr>
<td id="L442" class="blob-num js-line-number" data-line-number="442"></td>
<td id="LC442" class="blob-code blob-code-inner js-file-line"><span class=pl-k>elif</span> <span class=pl-s1>result</span>[<span class=pl-c1>0</span>][<span class=pl-c1>4</span>] <span class=pl-c1>==</span> <span class=pl-c1>1</span>:</td>
</tr>
<tr>
<td id="L443" class="blob-num js-line-number" data-line-number="443"></td>
<td id="LC443" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>prediction</span> <span class=pl-c1>=</span> <span class=pl-s>'Sea'</span></td>
</tr>
<tr>
<td id="L444" class="blob-num js-line-number" data-line-number="444"></td>
<td id="LC444" class="blob-code blob-code-inner js-file-line"><span class=pl-k>elif</span> <span class=pl-s1>result</span>[<span class=pl-c1>0</span>][<span class=pl-c1>5</span>] <span class=pl-c1>==</span> <span class=pl-c1>1</span>:</td>
</tr>
<tr>
<td id="L445" class="blob-num js-line-number" data-line-number="445"></td>
<td id="LC445" class="blob-code blob-code-inner js-file-line"> <span class=pl-s1>prediction</span> <span class=pl-c1>=</span> <span class=pl-s>'Street'</span></td>
</tr>
<tr>
<td id="L446" class="blob-num js-line-number" data-line-number="446"></td>
<td id="LC446" class="blob-code blob-code-inner js-file-line"><span class=pl-k>else</span>:</td>
</tr>
<tr>
<td id="L447" class="blob-num js-line-number" data-line-number="447"></td>
<td id="LC447" class="blob-code blob-code-inner js-file-line"> <span class=pl-en>print</span>(<span class=pl-s>"Error"</span>)</td>
</tr>
<tr>
<td id="L448" class="blob-num js-line-number" data-line-number="448"></td>
<td id="LC448" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L449" class="blob-num js-line-number" data-line-number="449"></td>
<td id="LC449" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L450" class="blob-num js-line-number" data-line-number="450"></td>
<td id="LC450" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[297]:</span></td>
</tr>
<tr>
<td id="L451" class="blob-num js-line-number" data-line-number="451"></td>
<td id="LC451" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L452" class="blob-num js-line-number" data-line-number="452"></td>
<td id="LC452" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L453" class="blob-num js-line-number" data-line-number="453"></td>
<td id="LC453" class="blob-code blob-code-inner js-file-line"><span class=pl-s1>result</span></td>
</tr>
<tr>
<td id="L454" class="blob-num js-line-number" data-line-number="454"></td>
<td id="LC454" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L455" class="blob-num js-line-number" data-line-number="455"></td>
<td id="LC455" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L456" class="blob-num js-line-number" data-line-number="456"></td>
<td id="LC456" class="blob-code blob-code-inner js-file-line"><span class=pl-c># In[299]:</span></td>
</tr>
<tr>
<td id="L457" class="blob-num js-line-number" data-line-number="457"></td>
<td id="LC457" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L458" class="blob-num js-line-number" data-line-number="458"></td>
<td id="LC458" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="L459" class="blob-num js-line-number" data-line-number="459"></td>
<td id="LC459" class="blob-code blob-code-inner js-file-line"><span class=pl-en>print</span>(<span class=pl-s1>prediction</span>)</td>
</tr>
</table>
<details class="details-reset details-overlay BlobToolbar position-absolute js-file-line-actions dropdown d-none" aria-hidden="true">
<summary class="btn-octicon ml-0 px-2 p-0 bg-white border border-gray-dark rounded-1" aria-label="Inline file action toolbar">
<svg class="octicon octicon-kebab-horizontal" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM1.5 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm13 0a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"></path></svg>
</summary>
<details-menu>
<ul class="BlobToolbar-dropdown dropdown-menu dropdown-menu-se mt-2" style="width:185px">
<li>
<clipboard-copy role="menuitem" class="dropdown-item" id="js-copy-lines" style="cursor:pointer;">
Copy lines
</clipboard-copy>
</li>
<li>
<clipboard-copy role="menuitem" class="dropdown-item" id="js-copy-permalink" style="cursor:pointer;">
Copy permalink
</clipboard-copy>
</li>
<li><a class="dropdown-item js-update-url-with-hash" id="js-view-git-blame" role="menuitem" href="/Novia-2018/Intel-Image-Classification-Using-CNN/blame/87e3d7360c13ba5b2c4c12ee85c939902dfbd422/src/Intel_Project%20(1).py">View git blame</a></li>
<li><a class="dropdown-item" id="js-new-issue" role="menuitem" href="/Novia-2018/Intel-Image-Classification-Using-CNN/issues/new">Reference in new issue</a></li>
</ul>
</details-menu>
</details>
</div>
</div>
<details class="details-reset details-overlay details-overlay-dark" id="jumpto-line-details-dialog">
<summary data-hotkey="l" aria-label="Jump to line"></summary>
<details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast linejump" aria-label="Jump to line">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-jump-to-line-form Box-body d-flex" action="" accept-charset="UTF-8" method="get">
<input class="form-control flex-auto mr-3 linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line…" aria-label="Jump to line" autofocus>
<button type="submit" class="btn" data-close-dialog>Go</button>
</form> </details-dialog>
</details>
</div>
</div>
</main>
</div>
</div>
<div class="footer container-xl width-full p-responsive" role="contentinfo">
<div class="position-relative d-flex flex-row-reverse flex-lg-row flex-wrap flex-lg-nowrap flex-justify-center flex-lg-justify-between pt-6 pb-2 mt-6 f6 text-gray border-top border-gray-light ">
<ul class="list-style-none d-flex flex-wrap col-12 col-lg-5 flex-justify-center flex-lg-justify-between mb-2 mb-lg-0">
<li class="mr-3 mr-lg-0">© 2020 GitHub, Inc.</li>
<li class="mr-3 mr-lg-0"><a data-ga-click="Footer, go to terms, text:terms" href="https://github.com/site/terms">Terms</a></li>
<li class="mr-3 mr-lg-0"><a data-ga-click="Footer, go to privacy, text:privacy" href="https://github.com/site/privacy">Privacy</a></li>
<li class="mr-3 mr-lg-0"><a data-ga-click="Footer, go to security, text:security" href="https://github.com/security">Security</a></li>
<li class="mr-3 mr-lg-0"><a href="https://githubstatus.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
<li><a data-ga-click="Footer, go to help, text:help" href="https://help.github.com">Help</a></li>
</ul>
<a aria-label="Homepage" title="GitHub" class="footer-octicon d-none d-lg-block mx-lg-4" href="https://github.com">
<svg height="24" class="octicon octicon-mark-github" viewBox="0 0 16 16" version="1.1" width="24" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
<ul class="list-style-none d-flex flex-wrap col-12 col-lg-5 flex-justify-center flex-lg-justify-between mb-2 mb-lg-0">
<li class="mr-3 mr-lg-0"><a data-ga-click="Footer, go to contact, text:contact" href="https://github.com/contact">Contact GitHub</a></li>
<li class="mr-3 mr-lg-0"><a href="https://github.com/pricing" data-ga-click="Footer, go to Pricing, text:Pricing">Pricing</a></li>
<li class="mr-3 mr-lg-0"><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
<li class="mr-3 mr-lg-0"><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
<li class="mr-3 mr-lg-0"><a href="https://github.blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
<li><a data-ga-click="Footer, go to about, text:about" href="https://github.com/about">About</a></li>
</ul>
</div>
<div class="d-flex flex-justify-center pb-6">
<span class="f6 text-gray-light"></span>
</div>
</div>
<div id="ajax-error-message" class="ajax-error-message flash flash-error">
<svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path></svg>
<button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
<svg class="octicon octicon-x" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg>
</button>
You can’t perform that action at this time.
</div>
<script crossorigin="anonymous" async="async" integrity="sha512-WcQmT2vhcClFVOaaAJV/M+HqsJ2Gq/myvl6F3gCVBxykazXTs+i5fvxncSXwyG1CSfcrqmLFw/R/bmFYzprX2A==" type="application/javascript" id="js-conditional-compat" data-src="https://github.githubassets.com/assets/compat-bootstrap-59c4264f.js"></script>
<script crossorigin="anonymous" integrity="sha512-47cvnR4cfmRA+p1TUeCLY+nCEqD7tni9XPMTW5kLy2C4SUhMCAw0NWiKqvZEM0iZRBw+8u8DgeD30fC56eV02w==" type="application/javascript" src="https://github.githubassets.com/assets/environment-bootstrap-e3b72f9d.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-7TxtlURVUWrbnU4wcYZ7jLSTg7Wu9kx7YNV/Pul+Cst5LlM1iXEhbvJ0dxkwVU3SbXcxFHwuljtm7BwP/2ZyKw==" type="application/javascript" src="https://github.githubassets.com/assets/vendor-ed3c6d95.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-a1TbnbJAeMGDxojD1x632hdgYt2pavdYxDtxU7WVnZtsjRSkF/3d0dZHdR5uqOD3uTHrS4Qx9avmXwhDWbjPhA==" type="application/javascript" src="https://github.githubassets.com/assets/frameworks-6b54db9d.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-VnjgOqYR8JJqkOu7HaiIEMuTXnG+lz/BJhR7fbxHOQwEEz/BgBwhtWEyO2MlT+GF+ftMeK2gRSZZ1qA/gDGZ9A==" type="application/javascript" src="https://github.githubassets.com/assets/github-bootstrap-5678e03a.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-4GcSWGoe36+BoWho4gtJcByZe8j43w+lt2/PDe3rmBxRVSgD29YipDwuIywe8fvOd2b2CszBqaPGxSznUtE3Xg==" type="application/javascript" data-module-id="./drag-drop.js" data-src="https://github.githubassets.com/assets/drag-drop-e0671258.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-2k8dDHk0yt52uKvOvgc9cwOXOeJhxBfVP5kPS2BrCdytDmtEIJ2yone26vFENAyk1a2aFQ7KDgEevRQafuAf8A==" type="application/javascript" data-module-id="./gist-vendor.js" data-src="https://github.githubassets.com/assets/gist-vendor-da4f1d0c.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-iv+4yAluOjiG50ZypUBIWIUCRDo6JEBf2twvmd5AelxgPQJO/XC1oNMGTMdDfKt30p7G7fHEOTZ2utHWDJ9PPQ==" type="application/javascript" data-module-id="./randomColor.js" data-src="https://github.githubassets.com/assets/randomColor-8affb8c8.js"></script>
<div class="js-stale-session-flash flash flash-warn flash-banner" hidden
>
<svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path></svg>
<span class="js-stale-session-flash-signed-in" hidden>You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
<span class="js-stale-session-flash-signed-out" hidden>You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
</div>
<template id="site-details-dialog">
<details class="details-reset details-overlay details-overlay-dark lh-default text-gray-dark hx_rsm" open>
<summary role="button" aria-label="Close dialog"></summary>
<details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal">
<button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog>
<svg class="octicon octicon-x" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg>
</button>
<div class="octocat-spinner my-6 js-details-dialog-spinner"></div>
</details-dialog>
</details>
</template>
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0">
<div class="Popover-message Popover-message--bottom-left Popover-message--large Box box-shadow-large" style="width:360px;">
</div>
</div>
</body>
</html>
| 68.291667
| 2,554
| 0.634956
| 38,121
| 224,543
| 3.728785
| 0.084809
| 0.066735
| 0.076999
| 0.076401
| 0.760378
| 0.738549
| 0.706286
| 0.677773
| 0.657793
| 0.520841
| 0
| 0.110559
| 0.16009
| 224,543
| 3,287
| 2,555
| 68.312443
| 0.642988
| 0
| 0
| 0.504193
| 0
| 0.353237
| 0.467227
| 0.098469
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.010735
| null | null | 0.005032
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ad3e9b467042b664880d401cd499df829e241e47
| 260
|
py
|
Python
|
ballpark/cashflows/admin.py
|
keyvanm/ballpark
|
90ca6ac355319f159fa0836f30df487ee8e72ddd
|
[
"MIT"
] | null | null | null |
ballpark/cashflows/admin.py
|
keyvanm/ballpark
|
90ca6ac355319f159fa0836f30df487ee8e72ddd
|
[
"MIT"
] | null | null | null |
ballpark/cashflows/admin.py
|
keyvanm/ballpark
|
90ca6ac355319f159fa0836f30df487ee8e72ddd
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(GenericOnetimeIncome)
admin.site.register(GenericRecurringIncome)
admin.site.register(GenericOnetimeExpense)
admin.site.register(GenericRecurringExpense)
| 26
| 44
| 0.846154
| 28
| 260
| 7.857143
| 0.5
| 0.163636
| 0.309091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073077
| 260
| 9
| 45
| 28.888889
| 0.912863
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a8f190e009aea7f92f01038fb21a86895c98af57
| 18,148
|
py
|
Python
|
research/steve/toy_demo.py
|
jdavidagudelo/tensorflow-models
|
6f019beec73b01861363bf717706e27f4210b979
|
[
"Apache-2.0"
] | 1
|
2021-05-17T01:42:29.000Z
|
2021-05-17T01:42:29.000Z
|
research/steve/toy_demo.py
|
jdavidagudelo/tensorflow-models
|
6f019beec73b01861363bf717706e27f4210b979
|
[
"Apache-2.0"
] | null | null | null |
research/steve/toy_demo.py
|
jdavidagudelo/tensorflow-models
|
6f019beec73b01861363bf717706e27f4210b979
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import division
from __future__ import print_function
from builtins import range
from past.utils import old_div
# Copyright 2018 The TensorFlow Authors All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
import numpy as np
import scipy
import matplotlib.pyplot as plt
import seaborn as sns
### Hyperparameters
NONTERMINAL_STATE_COUNT = 100
NOISE_AMOUNT = 0.1
TRAIN_STEPS = 10000
Q_ENSEMBLE_SIZE = 8
MODEL_ENSEMBLE_SIZE = 8
HORIZON = 5
TRIAL_N = 10
### Helper functions
initial_state = 0
terminal_state = NONTERMINAL_STATE_COUNT + 1
nonterminal_state_count = NONTERMINAL_STATE_COUNT
state_count = NONTERMINAL_STATE_COUNT + 1
final_reward = NONTERMINAL_STATE_COUNT
colors = sns.color_palette('husl', 4)
plt.rcParams["figure.figsize"] = (6, 5)
def step(state):
if state == terminal_state:
next_state = terminal_state
else:
next_state = state + 1
if state == terminal_state:
reward = 0
elif state + 1 == terminal_state:
reward = final_reward
else:
reward = -1
return next_state, reward
def noisy_step(state):
if state == terminal_state:
next_state = terminal_state
elif np.random.random([]) < NOISE_AMOUNT:
next_state = np.random.randint(0, state_count)
else:
next_state = state + 1
if state == terminal_state:
reward = 0
elif state + 1 == terminal_state:
reward = final_reward
else:
reward = -1
return next_state, reward
def get_error(Q):
losses = np.square(np.arange(state_count) - Q[:-1])
return np.mean(losses)
def downsample(array, factor):
pad_size = np.ceil(old_div(float(array.size), factor)) * factor - array.size
array_padded = np.append(array, np.zeros([pad_size.astype(np.int64)]) * np.NaN)
return scipy.nanmean(array_padded.reshape(-1, factor), axis=1)
######################
### Main experiments
######################
# Basic Q
if True:
print("Running basic Q-learning.")
trial_results = []
for run_i in range(TRIAL_N):
print("Trial %d" % run_i)
Q = np.random.randint(0, state_count, [state_count + 1]).astype(np.float64)
Q[state_count] = 0
losses = []
for step_i in range(TRAIN_STEPS):
state = np.random.randint(0, state_count)
next_state, reward = step(state)
Q[state] = reward + Q[next_state]
losses.append(get_error(Q))
trial_results.append(losses)
print("...complete.\n")
result = np.stack(trial_results, axis=1)
means = np.mean(result, axis=1)
stdevs = np.std(result, axis=1)
plt.plot(means, label="Basic Q-learning", color=colors[0])
plt.fill_between(np.arange(TRAIN_STEPS), means - stdevs, means + stdevs, alpha=.2, color=colors[0])
with open('Toy-v1/baseline.csv', 'w') as f:
data = []
for frame_i in range(result.shape[0]):
for loss in result[frame_i]:
data.append("%f,%f,%f,%f" % (frame_i, frame_i, frame_i, loss))
f.write("\n".join(data))
# Ensemble Q
if True:
print("Running ensemble Q-learning.")
trial_results = []
for run_i in range(TRIAL_N):
print("Trial %d" % run_i)
Q = np.random.randint(0, state_count, [Q_ENSEMBLE_SIZE, state_count + 1]).astype(np.float64)
Q[:, state_count] = 0
losses = []
for step_i in range(TRAIN_STEPS):
for q_ensemble_i in range(Q_ENSEMBLE_SIZE):
state = np.random.randint(0, state_count)
next_state, reward = step(state)
Q[q_ensemble_i, state] = reward + np.mean(Q[:, next_state])
losses.append(get_error(np.mean(Q, axis=0)))
trial_results.append(losses)
print("...complete.\n")
result = np.stack(trial_results, axis=1)
means = np.mean(result, axis=1)
stdevs = np.std(result, axis=1)
plt.plot(means, label="Ensemble Q-learning", color=colors[1])
plt.fill_between(np.arange(TRAIN_STEPS), means - stdevs, means + stdevs, alpha=.2, color=colors[1])
# Ensemble MVE-Oracle
if True:
print("Running ensemble oracle MVE.")
trial_results = []
for run_i in range(TRIAL_N):
print("Trial %d" % run_i)
Q = np.random.randint(0, state_count, [Q_ENSEMBLE_SIZE, state_count + 1]).astype(np.float64)
Q[:, state_count] = 0
losses = []
for step_i in range(TRAIN_STEPS):
for q_ensemble_i in range(Q_ENSEMBLE_SIZE):
state = np.random.randint(0, state_count)
next_state, reward = step(state)
# MVE rollout
target = reward
for _ in range(HORIZON):
next_state, reward = step(next_state)
target += reward
target += np.mean(Q[:, next_state])
Q[q_ensemble_i, state] = target
losses.append(get_error(np.mean(Q, axis=0)))
trial_results.append(losses)
print("...complete.\n")
result = np.stack(trial_results, axis=1)
means = np.mean(result, axis=1)
stdevs = np.std(result, axis=1)
plt.plot(means, label="MVE-oracle", color=colors[2])
plt.fill_between(np.arange(TRAIN_STEPS), means - stdevs, means + stdevs, alpha=.2, color=colors[2])
with open('Toy-v1/mve_oracle.csv', 'w') as f:
data = []
for frame_i in range(result.shape[0]):
for loss in result[frame_i]:
data.append("%f,%f,%f,%f" % (frame_i, frame_i, frame_i, loss))
f.write("\n".join(data))
# Ensemble MVE-Noisy
if True:
print("Running ensemble noisy MVE.")
trial_results = []
for run_i in range(TRIAL_N):
print("Trial %d" % run_i)
Q = np.random.randint(0, state_count, [Q_ENSEMBLE_SIZE, state_count + 1]).astype(np.float64)
Q[:, state_count] = 0
losses = []
for step_i in range(TRAIN_STEPS):
for q_ensemble_i in range(Q_ENSEMBLE_SIZE):
state = np.random.randint(0, state_count)
next_state, reward = step(state)
# MVE rollout
targets = []
first_next_state, first_reward = next_state, reward
for model_ensemble_i in range(MODEL_ENSEMBLE_SIZE):
next_state, reward = first_next_state, first_reward
target = reward
for _ in range(HORIZON):
next_state, reward = noisy_step(next_state)
target += reward
target += np.mean(Q[:, next_state])
targets.append(target)
Q[q_ensemble_i, state] = np.mean(targets)
losses.append(get_error(np.mean(Q, axis=0)))
trial_results.append(losses)
print("...complete.\n")
result = np.stack(trial_results, axis=1)
means = np.mean(result, axis=1)
stdevs = np.std(result, axis=1)
plt.plot(means, label="MVE-noisy", color=colors[2], linestyle='dotted')
plt.fill_between(np.arange(TRAIN_STEPS), means - stdevs, means + stdevs, alpha=.2, color=colors[2])
with open('Toy-v1/mve_noisy.csv', 'w') as f:
data = []
for frame_i in range(result.shape[0]):
for loss in result[frame_i]:
data.append("%f,%f,%f,%f" % (frame_i, frame_i, frame_i, loss))
f.write("\n".join(data))
# STEVE-Oracle
if True:
print("Running ensemble oracle STEVE.")
trial_results = []
oracle_q_estimate_errors = []
oracle_mve_estimate_errors = []
oracle_steve_estimate_errors = []
oracle_opt_estimate_errors = []
for run_i in range(TRIAL_N):
print("Trial %d" % run_i)
Q = np.random.randint(0, state_count, [Q_ENSEMBLE_SIZE, state_count + 1]).astype(np.float64)
Q[:, state_count] = 0
losses = []
q_estimate_errors = []
mve_estimate_errors = []
steve_estimate_errors = []
opt_estimate_errors = []
steve_beat_freq = []
for step_i in range(TRAIN_STEPS):
_q_estimate_errors = []
_mve_estimate_errors = []
_steve_estimate_errors = []
_opt_estimate_errors = []
_steve_beat_freq = []
for q_ensemble_i in range(Q_ENSEMBLE_SIZE):
state = np.random.randint(0, state_count)
next_state, reward = step(state)
# STEVE rollout
Q_est_mat = np.zeros([HORIZON + 1, Q_ENSEMBLE_SIZE])
reward_est_mat = np.zeros([HORIZON + 1, 1])
first_next_state, first_reward = next_state, reward
next_state, reward = first_next_state, first_reward
Q_est_mat[0, :] = Q[:, next_state]
reward_est_mat[0, 0] = reward
for timestep_i in range(1, HORIZON + 1):
next_state, reward = step(next_state)
Q_est_mat[timestep_i, :] = Q[:, next_state]
reward_est_mat[timestep_i, 0] = reward
all_targets = Q_est_mat + np.cumsum(reward_est_mat, axis=0)
# STEVE weight calculation
estimates = np.mean(all_targets, axis=1)
confidences = old_div(1., (np.var(all_targets, axis=1) + 1e-8))
coefficients = old_div(confidences, np.sum(confidences))
target = np.sum(estimates * coefficients)
Q[q_ensemble_i, state] = target
true_target = state + 1. if state != terminal_state else 0.
_q_estimate_errors.append(np.square(estimates[0] - true_target))
_mve_estimate_errors.append(np.square(estimates[-1] - true_target))
_steve_estimate_errors.append(np.square(np.sum(estimates * coefficients) - true_target))
_opt_estimate_errors.append(np.min(np.square(estimates - true_target)))
losses.append(get_error(np.mean(Q, axis=0)))
q_estimate_errors.append(np.mean(_q_estimate_errors))
mve_estimate_errors.append(np.mean(_mve_estimate_errors))
steve_estimate_errors.append(np.mean(_steve_estimate_errors))
opt_estimate_errors.append(np.mean(_opt_estimate_errors))
trial_results.append(losses)
oracle_q_estimate_errors.append(q_estimate_errors)
oracle_mve_estimate_errors.append(mve_estimate_errors)
oracle_steve_estimate_errors.append(steve_estimate_errors)
oracle_opt_estimate_errors.append(opt_estimate_errors)
print("...complete.\n")
result = np.stack(trial_results, axis=1)
means = np.mean(result, axis=1)
stdevs = np.std(result, axis=1)
plt.plot(means, label="STEVE-oracle", color=colors[3])
plt.fill_between(np.arange(TRAIN_STEPS), means - stdevs, means + stdevs, alpha=.2, color=colors[3])
with open('Toy-v1/steve_oracle.csv', 'w') as f:
data = []
for frame_i in range(result.shape[0]):
for loss in result[frame_i]:
data.append("%f,%f,%f,%f" % (frame_i, frame_i, frame_i, loss))
f.write("\n".join(data))
# STEVE-Noisy
if True:
print("Running ensemble noisy STEVE.")
trial_results = []
noisy_q_estimate_errors = []
noisy_mve_estimate_errors = []
noisy_steve_estimate_errors = []
noisy_opt_estimate_errors = []
noisy_steve_beat_freq = []
for run_i in range(TRIAL_N):
print("Trial %d" % run_i)
Q = np.random.randint(0, state_count, [Q_ENSEMBLE_SIZE, state_count + 1]).astype(np.float64)
Q[:, state_count] = 0
losses = []
q_estimate_errors = []
mve_estimate_errors = []
steve_estimate_errors = []
opt_estimate_errors = []
steve_beat_freq = []
for step_i in range(TRAIN_STEPS):
_q_estimate_errors = []
_mve_estimate_errors = []
_steve_estimate_errors = []
_opt_estimate_errors = []
_steve_beat_freq = []
for q_ensemble_i in range(Q_ENSEMBLE_SIZE):
state = np.random.randint(0, state_count)
next_state, reward = step(state)
# STEVE rollout
Q_est_mat = np.zeros([HORIZON + 1, MODEL_ENSEMBLE_SIZE, Q_ENSEMBLE_SIZE])
reward_est_mat = np.zeros([HORIZON + 1, MODEL_ENSEMBLE_SIZE, 1])
first_next_state, first_reward = next_state, reward
for model_ensemble_i in range(MODEL_ENSEMBLE_SIZE):
next_state, reward = first_next_state, first_reward
Q_est_mat[0, model_ensemble_i, :] = Q[:, next_state]
reward_est_mat[0, model_ensemble_i, 0] = reward
for timestep_i in range(1, HORIZON + 1):
next_state, reward = noisy_step(next_state)
Q_est_mat[timestep_i, model_ensemble_i, :] = Q[:, next_state]
reward_est_mat[timestep_i, model_ensemble_i, 0] = reward
all_targets = Q_est_mat + np.cumsum(reward_est_mat, axis=0)
# STEVE weight calculation
all_targets = np.reshape(all_targets, [HORIZON + 1, MODEL_ENSEMBLE_SIZE * Q_ENSEMBLE_SIZE])
estimates = np.mean(all_targets, axis=1)
confidences = old_div(1., (np.var(all_targets, axis=1) + 1e-8))
coefficients = old_div(confidences, np.sum(confidences))
target = np.sum(estimates * coefficients)
# target = estimates[0]
Q[q_ensemble_i, state] = target
true_target = state + 1. if state != terminal_state else 0.
_q_estimate_errors.append(np.square(estimates[0] - true_target))
_mve_estimate_errors.append(np.square(estimates[-1] - true_target))
_steve_estimate_errors.append(np.square(np.sum(estimates * coefficients) - true_target))
_opt_estimate_errors.append(np.min(np.square(estimates - true_target)))
_steve_beat_freq.append(float(np.square(estimates[0] - true_target) > np.square(target - true_target)))
losses.append(get_error(np.mean(Q, axis=0)))
q_estimate_errors.append(np.mean(_q_estimate_errors))
mve_estimate_errors.append(np.mean(_mve_estimate_errors))
steve_estimate_errors.append(np.mean(_steve_estimate_errors))
opt_estimate_errors.append(np.mean(_opt_estimate_errors))
steve_beat_freq.append(np.mean(_steve_beat_freq))
trial_results.append(losses)
noisy_q_estimate_errors.append(q_estimate_errors)
noisy_mve_estimate_errors.append(mve_estimate_errors)
noisy_steve_estimate_errors.append(steve_estimate_errors)
noisy_opt_estimate_errors.append(opt_estimate_errors)
noisy_steve_beat_freq.append(steve_beat_freq)
print("...complete.\n")
result = np.stack(trial_results, axis=1)
means = np.mean(result, axis=1)
stdevs = np.std(result, axis=1)
plt.plot(means, label="STEVE-noisy", color=colors[3], linestyle='dotted')
plt.fill_between(np.arange(TRAIN_STEPS), means - stdevs, means + stdevs, alpha=.2, color=colors[3])
with open('Toy-v1/steve_noisy.csv', 'w') as f:
data = []
for frame_i in range(result.shape[0]):
for loss in result[frame_i]:
data.append("%f,%f,%f,%f" % (frame_i, frame_i, frame_i, loss))
f.write("\n".join(data))
# ### Display results
# plt.title("Comparison of convergence rates")
# plt.legend()
# plt.savefig("comparison.pdf")
# plt.show()
#
# ### Display secondary results - error comparison
# DOWNSAMPLE = 50
# colors = sns.color_palette('husl', 8)
# for i, (error_curve, label) in enumerate([
# (oracle_q_estimate_errors, "Oracle Q error"),
# (oracle_mve_estimate_errors, "Oracle MVE error"),
# (oracle_steve_estimate_errors, "Oracle STEVE error"),
# # (oracle_opt_estimate_errors, "Oracle minimum single-estimate error"),
# ]):
# result = np.stack(error_curve, axis=1)
# means = downsample(np.mean(result, axis=1), DOWNSAMPLE)
# stdevs = downsample(np.std(result, axis=1), DOWNSAMPLE)
# plt.plot(means, label=label, color=colors[i])
# plt.fill_between(np.arange(means.shape[0]), means - stdevs, means + stdevs, alpha=.2, color=colors[i])
#
# plt.title("Comparison of errors for oracle dynamics")
# plt.legend()
# plt.show()
#
# for i, (error_curve, label) in enumerate([
# (noisy_q_estimate_errors, "Noisy Q error"),
# (noisy_mve_estimate_errors, "Noisy MVE error"),
# (noisy_steve_estimate_errors, "Noisy STEVE error"),
# # (noisy_opt_estimate_errors, "Noisy minimum single-estimate error"),
# # (trial_steve_beat_freq, "STEVE beat freq"),
# ]):
# result = np.stack(error_curve, axis=1)
# means = downsample(np.mean(result, axis=1), DOWNSAMPLE)
# stdevs = downsample(np.std(result, axis=1), DOWNSAMPLE)
# plt.plot(means, label=label, color=colors[i])
# plt.fill_between(np.arange(means.shape[0]), means - stdevs, means + stdevs, alpha=.2, color=colors[i])
#
# plt.title("Comparison of errors for noisy dynamics")
# plt.legend()
# plt.show()
| 40.782022
| 119
| 0.605356
| 2,351
| 18,148
| 4.421948
| 0.098681
| 0.09696
| 0.020008
| 0.033859
| 0.812813
| 0.771066
| 0.762793
| 0.677761
| 0.668623
| 0.642074
| 0
| 0.013949
| 0.273143
| 18,148
| 444
| 120
| 40.873874
| 0.774164
| 0.161946
| 0
| 0.704762
| 0
| 0
| 0.038533
| 0.004377
| 0
| 0
| 0
| 0
| 0
| 1
| 0.012698
| false
| 0
| 0.025397
| 0
| 0.050794
| 0.060317
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
0f0b7b2c5564b7c02453602dda17e447559b3a6d
| 56
|
py
|
Python
|
tests/unchained/conftest.py
|
uolot/py-yaml-fixtures
|
0b165d91578420cd4cb0b2fc245ae0e39578ede5
|
[
"MIT"
] | 13
|
2018-08-14T12:28:54.000Z
|
2022-02-08T04:25:47.000Z
|
tests/unchained/conftest.py
|
uolot/py-yaml-fixtures
|
0b165d91578420cd4cb0b2fc245ae0e39578ede5
|
[
"MIT"
] | 5
|
2019-02-23T04:01:48.000Z
|
2021-04-08T17:37:40.000Z
|
tests/unchained/conftest.py
|
uolot/py-yaml-fixtures
|
0b165d91578420cd4cb0b2fc245ae0e39578ede5
|
[
"MIT"
] | 5
|
2018-09-04T03:28:46.000Z
|
2021-04-09T11:46:03.000Z
|
from flask_unchained.bundles.sqlalchemy.pytest import *
| 28
| 55
| 0.857143
| 7
| 56
| 6.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 56
| 1
| 56
| 56
| 0.903846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
0f634577290308b8a34cd2796dad52f018337f67
| 112
|
py
|
Python
|
hello_world.py
|
hmallen/mrhawaii
|
4b973c185e9acf030342435204480467d189f013
|
[
"MIT"
] | null | null | null |
hello_world.py
|
hmallen/mrhawaii
|
4b973c185e9acf030342435204480467d189f013
|
[
"MIT"
] | 1
|
2020-07-30T01:46:09.000Z
|
2020-07-30T01:46:09.000Z
|
hello_world.py
|
hmallen/mrhawaii
|
4b973c185e9acf030342435204480467d189f013
|
[
"MIT"
] | null | null | null |
# Hello world program to demonstrate running PYthon files
print('Hello, world!')
print('I live on a volcano!')
| 22.4
| 57
| 0.741071
| 17
| 112
| 4.882353
| 0.823529
| 0.240964
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151786
| 112
| 4
| 58
| 28
| 0.873684
| 0.491071
| 0
| 0
| 0
| 0
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 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
| 1
|
0
| 5
|
0f63dcf544f98cf5aa08276887974023d5184846
| 161
|
py
|
Python
|
lib/JumpScale/lib/ms1/__init__.py
|
rudecs/jumpscale_core7
|
30c03f26f1cdad3edbb9d79d50fbada8acc974f5
|
[
"Apache-2.0"
] | null | null | null |
lib/JumpScale/lib/ms1/__init__.py
|
rudecs/jumpscale_core7
|
30c03f26f1cdad3edbb9d79d50fbada8acc974f5
|
[
"Apache-2.0"
] | 4
|
2016-08-25T12:08:39.000Z
|
2018-04-12T12:36:01.000Z
|
lib/JumpScale/lib/ms1/__init__.py
|
rudecs/jumpscale_core7
|
30c03f26f1cdad3edbb9d79d50fbada8acc974f5
|
[
"Apache-2.0"
] | 3
|
2016-03-08T07:49:34.000Z
|
2018-10-19T13:56:43.000Z
|
from JumpScale import j
def cb():
from .ms1 import MS1Factory
return MS1Factory()
j.base.loader.makeAvailable(j, 'tools')
j.tools._register('ms1', cb)
| 17.888889
| 39
| 0.708075
| 23
| 161
| 4.913043
| 0.608696
| 0.106195
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02963
| 0.161491
| 161
| 8
| 40
| 20.125
| 0.807407
| 0
| 0
| 0
| 0
| 0
| 0.049689
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
0f6811584c35d57112dde4d376d40b9b051263d0
| 48
|
py
|
Python
|
Tools/MagicPanels/panelMoveXp.py
|
dprojects/Woodworking
|
24420b248e3343a387ae1328fc6dcbf97e433242
|
[
"MIT"
] | 6
|
2022-02-25T19:11:40.000Z
|
2022-03-24T22:03:47.000Z
|
Tools/MagicPanels/panelMoveXp.py
|
dprojects/Woodworking
|
24420b248e3343a387ae1328fc6dcbf97e433242
|
[
"MIT"
] | 1
|
2022-03-13T09:35:22.000Z
|
2022-03-13T13:30:36.000Z
|
Tools/MagicPanels/panelMoveXp.py
|
dprojects/Woodworking
|
24420b248e3343a387ae1328fc6dcbf97e433242
|
[
"MIT"
] | 3
|
2022-02-26T15:01:08.000Z
|
2022-03-20T21:30:04.000Z
|
import MagicPanels
MagicPanels.panelMove("Xp")
| 12
| 27
| 0.8125
| 5
| 48
| 7.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 48
| 3
| 28
| 16
| 0.886364
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7e13fe81701a2fe45cfed9171d56097965bceb41
| 56
|
py
|
Python
|
findtime/utils.py
|
MattCCS/FindTime
|
8c38965661444d342a28eadc0cdedaf70e9f9279
|
[
"MIT"
] | null | null | null |
findtime/utils.py
|
MattCCS/FindTime
|
8c38965661444d342a28eadc0cdedaf70e9f9279
|
[
"MIT"
] | null | null | null |
findtime/utils.py
|
MattCCS/FindTime
|
8c38965661444d342a28eadc0cdedaf70e9f9279
|
[
"MIT"
] | null | null | null |
def day_of_year(dt):
return dt.timetuple().tm_yday
| 14
| 33
| 0.714286
| 10
| 56
| 3.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.160714
| 56
| 3
| 34
| 18.666667
| 0.787234
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
7e557776390bf717690c0ffe3d5af9bb9e5270df
| 282
|
py
|
Python
|
codility/python/fib.py
|
guvkon/aoc-2021
|
15c8d387f5bf218790d461d32dd948d6c667be6c
|
[
"MIT"
] | null | null | null |
codility/python/fib.py
|
guvkon/aoc-2021
|
15c8d387f5bf218790d461d32dd948d6c667be6c
|
[
"MIT"
] | null | null | null |
codility/python/fib.py
|
guvkon/aoc-2021
|
15c8d387f5bf218790d461d32dd948d6c667be6c
|
[
"MIT"
] | null | null | null |
import math
def fib(n):
fib = [0] * (n + 1)
fib[1] = 1
for i in range(2, n + 1):
fib[i] = fib[i - 1] + fib[i - 2]
return fib[n]
def fib_formula(n):
return int((math.pow((1 + math.sqrt(5)) / 2, n) - math.pow((1 - math.sqrt(5)) / 2, n)) / math.sqrt(5))
| 21.692308
| 106
| 0.485816
| 55
| 282
| 2.472727
| 0.327273
| 0.088235
| 0.198529
| 0.176471
| 0.308824
| 0.308824
| 0.308824
| 0.308824
| 0.308824
| 0
| 0
| 0.074627
| 0.287234
| 282
| 12
| 107
| 23.5
| 0.60199
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.111111
| 0.111111
| 0.555556
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
7e5a4b7a911240a4176bf8ae58a08ef0931285dc
| 62
|
py
|
Python
|
gsee/__init__.py
|
scene-connect/gsee
|
f5515fb2a20af9278e7ca11312388717760a8225
|
[
"BSD-3-Clause"
] | null | null | null |
gsee/__init__.py
|
scene-connect/gsee
|
f5515fb2a20af9278e7ca11312388717760a8225
|
[
"BSD-3-Clause"
] | 5
|
2022-03-11T10:52:24.000Z
|
2022-03-11T14:09:09.000Z
|
gsee/__init__.py
|
scene-connect/gsee
|
f5515fb2a20af9278e7ca11312388717760a8225
|
[
"BSD-3-Clause"
] | null | null | null |
__all__ = ["brl_model", "pv"]
from gsee import brl_model, pv
| 15.5
| 30
| 0.693548
| 10
| 62
| 3.7
| 0.7
| 0.432432
| 0.540541
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16129
| 62
| 3
| 31
| 20.666667
| 0.711538
| 0
| 0
| 0
| 0
| 0
| 0.177419
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
|
0
| 5
|
7e72844189e895886424dc16300b05e203165f43
| 46
|
py
|
Python
|
elevadorJahNoUltimoAndarException.py
|
IpRocha1/dsoo_exercicio_6
|
69ece39b2189b3a17a9185dca8a6d17acb6b5aa5
|
[
"MIT"
] | null | null | null |
elevadorJahNoUltimoAndarException.py
|
IpRocha1/dsoo_exercicio_6
|
69ece39b2189b3a17a9185dca8a6d17acb6b5aa5
|
[
"MIT"
] | null | null | null |
elevadorJahNoUltimoAndarException.py
|
IpRocha1/dsoo_exercicio_6
|
69ece39b2189b3a17a9185dca8a6d17acb6b5aa5
|
[
"MIT"
] | null | null | null |
class ElevadorJahNoUltimoAndarException( ...
| 15.333333
| 44
| 0.826087
| 2
| 46
| 19
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086957
| 46
| 2
| 45
| 23
| 0.904762
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
0e224344c163f81deb574207f38b8233548b28f8
| 119
|
bzl
|
Python
|
test/com/facebook/buck/parser/testdata/disable_implicit_native_rules/skylark/implicit_in_extension_bzl/extension.bzl
|
Unknoob/buck
|
2dfc734354b326f2f66896dde7746a11965d5a13
|
[
"Apache-2.0"
] | 8,027
|
2015-01-02T05:31:44.000Z
|
2022-03-31T07:08:09.000Z
|
test/com/facebook/buck/parser/testdata/disable_implicit_native_rules/skylark/implicit_in_extension_bzl/extension.bzl
|
Unknoob/buck
|
2dfc734354b326f2f66896dde7746a11965d5a13
|
[
"Apache-2.0"
] | 2,355
|
2015-01-01T15:30:53.000Z
|
2022-03-30T20:21:16.000Z
|
test/com/facebook/buck/parser/testdata/disable_implicit_native_rules/skylark/implicit_in_extension_bzl/extension.bzl
|
Unknoob/buck
|
2dfc734354b326f2f66896dde7746a11965d5a13
|
[
"Apache-2.0"
] | 1,280
|
2015-01-09T03:29:04.000Z
|
2022-03-30T15:14:14.000Z
|
""" Example module """
def java_maker(*args, **kwargs):
""" Make you a java """
java_library(*args, **kwargs)
| 19.833333
| 33
| 0.588235
| 15
| 119
| 4.533333
| 0.733333
| 0.294118
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.201681
| 119
| 5
| 34
| 23.8
| 0.715789
| 0.260504
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 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
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
0e4ecce9b8ee44d7a2ecb07d04597a919fe2daa5
| 146
|
py
|
Python
|
euler_01.py
|
zhou-le/euler
|
78033a10bc186fbd2a004760966e15724b0a98f9
|
[
"Apache-2.0"
] | 2
|
2018-12-24T15:36:00.000Z
|
2021-06-07T09:35:59.000Z
|
euler_01.py
|
zhou-le/Euler
|
78033a10bc186fbd2a004760966e15724b0a98f9
|
[
"Apache-2.0"
] | null | null | null |
euler_01.py
|
zhou-le/Euler
|
78033a10bc186fbd2a004760966e15724b0a98f9
|
[
"Apache-2.0"
] | null | null | null |
#coding: utf-8
#date: 2018/7/30 19:07
#author: zhou_le
# 求1000以下3和5的倍数之和
print(sum([i for i in range(1000) if i % 3 == 0 or i % 5 == 0]))
| 20.857143
| 64
| 0.59589
| 29
| 146
| 2.965517
| 0.862069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.232143
| 0.232877
| 146
| 7
| 64
| 20.857143
| 0.535714
| 0.452055
| 0
| 0
| 0
| 0
| 0
| 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
| 1
| 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
| 5
|
0e5a60a46aeb18c5fcebbf2deb1ab0ad21f787d1
| 24
|
py
|
Python
|
asn1tools/version.py
|
eerimoq/asn1tools
|
93e5fc2922c191e4a593507d4bc8847341fc9f40
|
[
"MIT"
] | 198
|
2017-08-04T21:49:15.000Z
|
2022-03-26T10:11:21.000Z
|
asn1tools/version.py
|
eerimoq/asn1tools
|
93e5fc2922c191e4a593507d4bc8847341fc9f40
|
[
"MIT"
] | 144
|
2017-09-29T12:06:51.000Z
|
2022-03-29T13:04:44.000Z
|
asn1tools/version.py
|
eerimoq/asn1tools
|
93e5fc2922c191e4a593507d4bc8847341fc9f40
|
[
"MIT"
] | 73
|
2017-10-09T13:33:28.000Z
|
2022-03-11T01:35:22.000Z
|
__version__ = '0.159.0'
| 12
| 23
| 0.666667
| 4
| 24
| 3
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.238095
| 0.125
| 24
| 1
| 24
| 24
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0.291667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
0e67c3d1189cc9a2fa0ae70c15b2f561c7bd2b47
| 404
|
py
|
Python
|
Semester2/bottles.py
|
ConstantineLinardakis/Programming1Portfolio
|
9062590de87e495ecf19b759a5d7a132a6982e3b
|
[
"MIT"
] | 1
|
2020-11-23T19:02:21.000Z
|
2020-11-23T19:02:21.000Z
|
Semester2/bottles.py
|
ConstantineLinardakis/Programming1Portfolio
|
9062590de87e495ecf19b759a5d7a132a6982e3b
|
[
"MIT"
] | null | null | null |
Semester2/bottles.py
|
ConstantineLinardakis/Programming1Portfolio
|
9062590de87e495ecf19b759a5d7a132a6982e3b
|
[
"MIT"
] | null | null | null |
#loop
bottles = 99
while (bottles > 0):
if (bottles > 1):
print bottles, "bottles of root beer on the wall", bottles, "bottles of root beer"
print "Take one down pass it around,", bottles, "bottles of root beer on the wall"
else:
print bottles, "bottles of root beer on the wall", bottles, "bottle of root beer"
bottles = bottles - 1
| 21.263158
| 90
| 0.591584
| 56
| 404
| 4.267857
| 0.392857
| 0.292887
| 0.209205
| 0.334728
| 0.585774
| 0.514644
| 0.514644
| 0.514644
| 0.376569
| 0.376569
| 0
| 0.018315
| 0.324257
| 404
| 19
| 91
| 21.263158
| 0.857143
| 0.009901
| 0
| 0
| 0
| 0
| 0.41
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.125
| 0
| null | null | 0.375
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
0ea7201b51048203ec576eca4a186c7f31e54813
| 169
|
py
|
Python
|
practice/bitwise_operations/ex2.py
|
recursivelycurious/wordnik-repl
|
9d9e96a8ebc79b95f135d5bc871602b65d2d2b79
|
[
"MIT"
] | 346
|
2016-02-22T20:21:10.000Z
|
2022-01-27T20:55:53.000Z
|
Language Skills/Python/Unit 10/2-Introduction to Bitwise Operators/Binary representation/2-Lesson I0_ The Base 2 Number System_.py
|
vpstudios/Codecademy-Exercise-Answers
|
ebd0ee8197a8001465636f52c69592ea6745aa0c
|
[
"MIT"
] | 55
|
2016-04-07T13:58:44.000Z
|
2020-06-25T12:20:24.000Z
|
Language Skills/Python/Unit 10/2-Introduction to Bitwise Operators/Binary representation/2-Lesson I0_ The Base 2 Number System_.py
|
vpstudios/Codecademy-Exercise-Answers
|
ebd0ee8197a8001465636f52c69592ea6745aa0c
|
[
"MIT"
] | 477
|
2016-02-21T06:17:02.000Z
|
2021-12-22T10:08:01.000Z
|
print 0b1, #1
print 0b10, #2
print 0b11, #3
print 0b100, #4
print 0b101, #5
print 0b110, #6
print 0b111 #7
print "******"
print 0b1 + 0b11
print 0b11 * 0b11
| 15.363636
| 17
| 0.609467
| 28
| 169
| 3.678571
| 0.535714
| 0.15534
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 0.254438
| 169
| 10
| 18
| 16.9
| 0.484127
| 0.04142
| 0
| 0
| 0
| 0
| 0.03871
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
7ed68a92c00d63af048a398460040921d4a594c2
| 152
|
py
|
Python
|
src/xbrief/deco/__init__.py
|
pydget/xbrief
|
9e91927a98754b0fca1fa55eae9a785b15e963f9
|
[
"MIT"
] | null | null | null |
src/xbrief/deco/__init__.py
|
pydget/xbrief
|
9e91927a98754b0fca1fa55eae9a785b15e963f9
|
[
"MIT"
] | null | null | null |
src/xbrief/deco/__init__.py
|
pydget/xbrief
|
9e91927a98754b0fca1fa55eae9a785b15e963f9
|
[
"MIT"
] | null | null | null |
from .deco_entries import deco_dict, deco_entries
from .deco_matrix import deco_matrix
from .deco_node import deco
from .deco_vector import deco_vector
| 30.4
| 49
| 0.855263
| 25
| 152
| 4.88
| 0.32
| 0.262295
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111842
| 152
| 4
| 50
| 38
| 0.903704
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7edcf59eb18eef02bdb316448f6adea4f05d6570
| 130
|
py
|
Python
|
pymoo/operators/mutation/nom.py
|
jarreguit/pymoo
|
0496a3c6765826148d8bab21650736760517dd25
|
[
"Apache-2.0"
] | 762
|
2018-06-05T20:56:09.000Z
|
2021-09-14T09:09:42.000Z
|
pymoo/operators/mutation/nom.py
|
jarreguit/pymoo
|
0496a3c6765826148d8bab21650736760517dd25
|
[
"Apache-2.0"
] | 176
|
2018-09-05T18:37:05.000Z
|
2021-09-14T01:18:43.000Z
|
pymoo/operators/mutation/nom.py
|
jarreguit/pymoo
|
0496a3c6765826148d8bab21650736760517dd25
|
[
"Apache-2.0"
] | 160
|
2018-08-05T05:31:20.000Z
|
2021-09-14T09:09:45.000Z
|
from pymoo.core.mutation import Mutation
class NoMutation(Mutation):
def _do(self, problem, X, **kwargs):
return X
| 16.25
| 40
| 0.684615
| 17
| 130
| 5.176471
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.215385
| 130
| 7
| 41
| 18.571429
| 0.862745
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
7ee00fb2a41f748e6f16cd24d5dbedd13ee2a74c
| 155
|
py
|
Python
|
portfolio/portfolio_site/models/__init__.py
|
nguyentrisinh/portfolio
|
83b13f8ffaafae76f3a9597b2b8b428da188a555
|
[
"MIT"
] | null | null | null |
portfolio/portfolio_site/models/__init__.py
|
nguyentrisinh/portfolio
|
83b13f8ffaafae76f3a9597b2b8b428da188a555
|
[
"MIT"
] | null | null | null |
portfolio/portfolio_site/models/__init__.py
|
nguyentrisinh/portfolio
|
83b13f8ffaafae76f3a9597b2b8b428da188a555
|
[
"MIT"
] | null | null | null |
from .contact import Contact
from .project import Project
from .link import Link
from .category import Category
from .project_image import ProjectImage
| 31
| 39
| 0.819355
| 21
| 155
| 6
| 0.380952
| 0.174603
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148387
| 155
| 5
| 39
| 31
| 0.954545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7d47e3a2c72557ea55cdd53dea81dcefd1f28f34
| 181
|
py
|
Python
|
Lib/fontTools/ttLib/tables/T_S_I_B_.py
|
twardoch/fonttools-py27
|
75b852d3f59fc0d03c6e78581530597d4c6368a1
|
[
"MIT",
"BSD-3-Clause"
] | 240
|
2021-01-11T14:49:24.000Z
|
2022-03-29T22:33:49.000Z
|
Lib/fontTools/ttLib/tables/T_S_I_B_.py
|
twardoch/fonttools-py27
|
75b852d3f59fc0d03c6e78581530597d4c6368a1
|
[
"MIT",
"BSD-3-Clause"
] | 77
|
2021-01-12T20:23:30.000Z
|
2022-03-28T12:14:34.000Z
|
Lib/fontTools/ttLib/tables/T_S_I_B_.py
|
twardoch/fonttools-py27
|
75b852d3f59fc0d03c6e78581530597d4c6368a1
|
[
"MIT",
"BSD-3-Clause"
] | 28
|
2021-01-17T05:44:11.000Z
|
2022-01-11T19:58:46.000Z
|
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
from .T_S_I_V_ import table_T_S_I_V_
class table_T_S_I_B_(table_T_S_I_V_):
pass
| 25.857143
| 64
| 0.845304
| 36
| 181
| 3.555556
| 0.5
| 0.0625
| 0.09375
| 0.09375
| 0.140625
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012346
| 0.104972
| 181
| 6
| 65
| 30.166667
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.2
| 0.6
| 0
| 0.8
| 0.2
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
adee84920a6fd9a1311346aec3afbb03a615787d
| 1,237
|
py
|
Python
|
sdk/python/pulumi_azure_native/automation/v20200113preview/__init__.py
|
sebtelko/pulumi-azure-native
|
711ec021b5c73da05611c56c8a35adb0ce3244e4
|
[
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_azure_native/automation/v20200113preview/__init__.py
|
sebtelko/pulumi-azure-native
|
711ec021b5c73da05611c56c8a35adb0ce3244e4
|
[
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_azure_native/automation/v20200113preview/__init__.py
|
sebtelko/pulumi-azure-native
|
711ec021b5c73da05611c56c8a35adb0ce3244e4
|
[
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from ... import _utilities
import typing
# Export this package's modules as members:
from ._enums import *
from .automation_account import *
from .certificate import *
from .connection import *
from .connection_type import *
from .credential import *
from .dsc_node_configuration import *
from .get_automation_account import *
from .get_certificate import *
from .get_connection import *
from .get_connection_type import *
from .get_credential import *
from .get_dsc_node_configuration import *
from .get_job_schedule import *
from .get_module import *
from .get_private_endpoint_connection import *
from .get_python2_package import *
from .get_schedule import *
from .get_source_control import *
from .get_variable import *
from .get_watcher import *
from .job_schedule import *
from .list_key_by_automation_account import *
from .module import *
from .private_endpoint_connection import *
from .python2_package import *
from .schedule import *
from .source_control import *
from .variable import *
from .watcher import *
from ._inputs import *
from . import outputs
| 30.925
| 80
| 0.78658
| 172
| 1,237
| 5.430233
| 0.348837
| 0.331906
| 0.194861
| 0.086724
| 0.14561
| 0.070664
| 0
| 0
| 0
| 0
| 0
| 0.002822
| 0.140663
| 1,237
| 39
| 81
| 31.717949
| 0.875823
| 0.164107
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
bc2367f7ad3d249653384c57887795fc9732fb47
| 136
|
py
|
Python
|
models/__init__.py
|
dudtjakdl/OpenNMT-Korean-To-English
|
32fcdb860906f40f84375ec17a23ae32cb90baa0
|
[
"Apache-2.0"
] | 1,491
|
2017-06-30T16:15:40.000Z
|
2022-03-22T02:05:16.000Z
|
models/__init__.py
|
dudtjakdl/OpenNMT-Korean-To-English
|
32fcdb860906f40f84375ec17a23ae32cb90baa0
|
[
"Apache-2.0"
] | 128
|
2017-07-07T21:41:03.000Z
|
2021-06-30T13:18:23.000Z
|
models/__init__.py
|
dudtjakdl/OpenNMT-Korean-To-English
|
32fcdb860906f40f84375ec17a23ae32cb90baa0
|
[
"Apache-2.0"
] | 434
|
2017-07-08T12:35:15.000Z
|
2022-03-25T06:28:13.000Z
|
from .EncoderRNN import EncoderRNN
from .DecoderRNN import DecoderRNN
from .TopKDecoder import TopKDecoder
from .seq2seq import Seq2seq
| 27.2
| 36
| 0.852941
| 16
| 136
| 7.25
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016667
| 0.117647
| 136
| 4
| 37
| 34
| 0.95
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
bc3c7092993eb4e13af6dd3b1e0b4b31e2777061
| 18,700
|
py
|
Python
|
Environment.py
|
mxrcfdez/TrafficLightsAutomation
|
fe5b3c1cebe585e4f9a3fb2d2a7653f4ac2edb8a
|
[
"Apache-2.0"
] | null | null | null |
Environment.py
|
mxrcfdez/TrafficLightsAutomation
|
fe5b3c1cebe585e4f9a3fb2d2a7653f4ac2edb8a
|
[
"Apache-2.0"
] | null | null | null |
Environment.py
|
mxrcfdez/TrafficLightsAutomation
|
fe5b3c1cebe585e4f9a3fb2d2a7653f4ac2edb8a
|
[
"Apache-2.0"
] | null | null | null |
import gym
from gym import spaces
import numpy as np
import learning_data
from Simulation import Simulation
def get_value_or_delimiter(value, delimiter):
return min(delimiter[1], max(delimiter[0], value))
class Environment(gym.Env):
def __init__(self, simulation, training):
super(Environment, self).__init__()
self.simulation = simulation
self.training = training
self.action_space = spaces.Discrete(2)
observation_space_dictionary = dict()
observation_space_dictionary['lights_settings'] = spaces.Box(low=0, high=1, shape=(1,), dtype=np.uint8)
observation_space_dictionary['intersection_cars'] = spaces.Box(low=0, high=1000, shape=(2,), dtype=np.uint8)
observation_space_dictionary['input_cars'] = spaces.Box(low=0, high=1000, shape=(2,), dtype=np.uint8)
observation_space_dictionary['output_cars'] = spaces.Box(low=0, high=1000, shape=(2,), dtype=np.uint8)
self.observation_space = spaces.Dict(observation_space_dictionary)
def reset(self, reset_simulation=True):
print('\033[94m' + 'resetting environment...' + '\033[0;0m')
if reset_simulation:
self.simulation = Simulation(self.simulation.traffic_volume, self.simulation.rows, self.simulation.cols, self.simulation.road_length, self.simulation.simulation_time)
observation = self.simulation.get_observation()
learning_data.previous_observation = observation
return observation
def step(self, action):
if self.training:
previous_observation = learning_data.previous_observation
done = self.simulation.advance_step(action)
current_observation = self.simulation.get_observation()
learning_data.previous_observation = current_observation
reward = self.definitive2x2(previous_observation, action)
else:
done = self.simulation.advance_step(action)
current_observation = self.simulation.get_observation()
reward = 0
return current_observation, reward, done, {}
def render(self, mode='human', close=False):
pass
def reward_function_1(self, previous_observation, current_observation):
previous_horizontal_waiting_time = 0
previous_vertical_waiting_time = 0
current_horizontal_waiting_time = 0
current_vertical_waiting_time = 0
for intersection in range(self.simulation.rows * self.simulation.cols):
for car in range(self.simulation.road_length):
if previous_observation['horizontal_waiting_time'][intersection][car] != -1:
previous_horizontal_waiting_time += previous_observation['horizontal_waiting_time'][intersection][car]
if previous_observation['vertical_waiting_time'][intersection][car] != -1:
previous_vertical_waiting_time += previous_observation['vertical_waiting_time'][intersection][car]
if current_observation['horizontal_waiting_time'][intersection][car] != -1:
current_horizontal_waiting_time += current_observation['horizontal_waiting_time'][intersection][car]
if current_observation['vertical_waiting_time'][intersection][car] != -1:
current_vertical_waiting_time += current_observation['vertical_waiting_time'][intersection][car]
previous_waiting_time = previous_horizontal_waiting_time + previous_vertical_waiting_time
current_waiting_time = current_horizontal_waiting_time + current_vertical_waiting_time
return previous_waiting_time - current_waiting_time
def reward_function_2(self, previous_observation, action):
reward = 0
num_of_intersections = self.simulation.rows * self.simulation.cols
for intersection in range(num_of_intersections):
# If the vertical lights turn green
if previous_observation['lights_settings'][intersection] == 1 and action[intersection] >= 0.5:
reward = reward + previous_observation['vertical_num_of_cars_waiting'][intersection] - previous_observation['horizontal_num_of_cars_waiting'][intersection]
# If the horizontal lights turn green
elif previous_observation['lights_settings'][intersection] == 0 and action[intersection] >= 0.5:
reward = reward + previous_observation['horizontal_num_of_cars_waiting'][intersection] - previous_observation['vertical_num_of_cars_waiting'][intersection]
return reward
def reward_function_3(self, previous_observation, action):
reward = 0
num_of_intersections = self.simulation.rows * self.simulation.cols
for intersection in range(num_of_intersections):
# If the vertical lights turn green
if previous_observation['lights_settings'][intersection] >= 1 and action[intersection] >= 0.5:
for car in range(self.simulation.road_length):
if previous_observation['vertical_waiting_time'][intersection][car] != -1:
reward += previous_observation['vertical_waiting_time'][intersection][car]
if previous_observation['horizontal_waiting_time'][intersection][car] != -1:
reward -= previous_observation['horizontal_waiting_time'][intersection][car]
# If the horizontal lights turn green
if previous_observation['lights_settings'][intersection] == 0 and action[intersection] >= 0.5:
for car in range(self.simulation.road_length):
if previous_observation['horizontal_waiting_time'][intersection][car] != -1:
reward += previous_observation['horizontal_waiting_time'][intersection][car]
if previous_observation['vertical_waiting_time'][intersection][car] != -1:
reward -= previous_observation['vertical_waiting_time'][intersection][car]
return reward
def reward_function_4(self, previous_observation, action):
reward = 0
num_of_intersections = self.simulation.rows * self.simulation.cols
for intersection in range(num_of_intersections):
# If the vertical lights turn green
if previous_observation['lights_settings'][intersection] == 1 and action[intersection] == 1:
if previous_observation['vertical_waiting_time'][intersection][0] != -1:
reward += previous_observation['vertical_waiting_time'][intersection][0]
if previous_observation['horizontal_waiting_time'][intersection][0] != -1:
reward -= previous_observation['horizontal_waiting_time'][intersection][0]
# If the horizontal lights turn green
if previous_observation['lights_settings'][intersection] == 0 and action[intersection] == 1:
if previous_observation['horizontal_waiting_time'][intersection][0] != -1:
reward += previous_observation['horizontal_waiting_time'][intersection][0]
if previous_observation['vertical_waiting_time'][intersection][0] != -1:
reward -= previous_observation['vertical_waiting_time'][intersection][0]
return reward
def reward_function_6(self, current_observation):
return - current_observation['average_waiting_time'][0]
def reward_function_7(self, previous_observation, action):
reward = 0
if action < self.simulation.rows * self.simulation.cols:
if previous_observation['ready_to_switch'][action] == 0:
reward -= 1
return reward
def reward_function_8(self, previous_observation, action):
reward = 0
if action < self.simulation.rows * self.simulation.cols:
if previous_observation['lights_settings'][action] == 1:
reward += (previous_observation['vertical_num_of_cars_waiting'][action] - previous_observation['horizontal_num_of_cars_waiting'][action]) / self.simulation.road_length
else:
reward += (previous_observation['horizontal_num_of_cars_waiting'][action] - previous_observation['vertical_num_of_cars_waiting'][action]) / self.simulation.road_length
if previous_observation['ready_to_switch'][action] == 0:
reward -= 1
return reward
def reward_function_9(self, previous_observation, action):
reward = -4
if action < self.simulation.rows * self.simulation.cols:
if previous_observation['lights_settings'][action] == 1:
reward += previous_observation['vertical_num_of_cars_waiting'][action] - previous_observation['horizontal_num_of_cars_waiting'][action]
else:
reward += previous_observation['horizontal_num_of_cars_waiting'][action] - previous_observation['vertical_num_of_cars_waiting'][action]
return reward
def reward_function_10(self, previous_observation, action):
if action < self.simulation.rows * self.simulation.cols:
# print('vertical cars: ' + str(previous_observation['vertical_num_of_cars'][action]), 'horizontal cars: ' + str(previous_observation['horizontal_num_of_cars'][action]))
# reward = -10 if previous_observation['ready_to_switch'][action] == 0 else 0
reward = - self.simulation.road_length / 2
if previous_observation['lights_settings'][action] == 1:
reward += min(previous_observation['vertical_num_of_cars'][action] - previous_observation['horizontal_num_of_cars'][action], self.simulation.road_length)
else:
reward += min(previous_observation['horizontal_num_of_cars'][action] - previous_observation['vertical_num_of_cars'][action], self.simulation.road_length)
else:
reward = 0
not_action = action - self.simulation.rows * self.simulation.cols
if previous_observation['lights_settings'][not_action] == 1:
reward += max(previous_observation['horizontal_num_of_cars'][not_action] - previous_observation['vertical_num_of_cars'][not_action], - self.simulation.road_length)
else:
reward += max(previous_observation['vertical_num_of_cars'][not_action] - previous_observation['horizontal_num_of_cars'][not_action], - self.simulation.road_length)
# print('action: ' + str(action) + ', reward: ' + str(reward))
return reward
def reward_function_11(self, prev_obs, action):
reward = 0
if action == 1:
reward = - self.simulation.road_length
if prev_obs['lights_settings'][0] == 1:
reward += get_value_or_delimiter(value=prev_obs['num_of_cars'][0][0] - prev_obs['num_of_cars'][0][1], delimiter=[-self.simulation.road_length, self.simulation.road_length])
# reward += get_value_or_delimiter(value=prev_obs['num_of_cars'][0][0] - prev_obs['num_of_cars'][1][0], delimiter=[-self.simulation.road_length, self.simulation.road_length])
# reward += get_value_or_delimiter(value=- prev_obs['num_of_cars'][0][1] + self.simulation.road_length, delimiter=[-self.simulation.road_length, 0])
else:
reward += get_value_or_delimiter(value=prev_obs['num_of_cars'][0][1] - prev_obs['num_of_cars'][0][0], delimiter=[-self.simulation.road_length, self.simulation.road_length])
# reward += get_value_or_delimiter(value=prev_obs['num_of_cars'][0][1] - prev_obs['num_of_cars'][1][1], delimiter=[-self.simulation.road_length, self.simulation.road_length])
# reward += get_value_or_delimiter(value=- prev_obs['num_of_cars'][0][0] + self.simulation.road_length, delimiter=[-self.simulation.road_length, 0])
else:
if prev_obs['lights_settings'][0] == 0:
reward += get_value_or_delimiter(value=prev_obs['num_of_cars'][0][0] - prev_obs['num_of_cars'][0][1], delimiter=[-self.simulation.road_length, self.simulation.road_length])
# reward += get_value_or_delimiter(value=prev_obs['num_of_cars'][0][0] - prev_obs['num_of_cars'][1][0], delimiter=[-self.simulation.road_length, self.simulation.road_length])
# reward += get_value_or_delimiter(value=- prev_obs['num_of_cars'][0][0] + self.simulation.road_length, delimiter=[-self.simulation.road_length, 0])
else:
reward += get_value_or_delimiter(value=prev_obs['num_of_cars'][0][1] - prev_obs['num_of_cars'][0][0], delimiter=[-self.simulation.road_length, self.simulation.road_length])
# reward += get_value_or_delimiter(value=prev_obs['num_of_cars'][0][1] - prev_obs['num_of_cars'][1][1], delimiter=[-self.simulation.road_length, self.simulation.road_length])
# reward += get_value_or_delimiter(value=- prev_obs['num_of_cars'][0][1] + self.simulation.road_length, delimiter=[-self.simulation.road_length, 0])
# print('action: ' + str(action) + ', reward: ' + str(reward))
# print('vertical cars: ' + str(prev_obs['num_of_cars'][0][0]), 'horizontal cars: ' + str(prev_obs['num_of_cars'][0][1]) + '\n')
return reward
def reward_function_12(self, prev_obs, action):
reward = 0
if prev_obs['ready_to_switch'] == 0:
if action == 1:
reward = -10
else:
if action == 1:
if prev_obs['lights_settings'][0] == 1:
reward += 1 if prev_obs['num_of_cars'][0][0] > 8 and prev_obs['num_of_cars'][0][1] < 2 else 0
# reward += 1 if prev_obs['num_of_cars'][1][0] < 2 else 0
else:
reward += 1 if prev_obs['num_of_cars'][0][1] > 8 and prev_obs['num_of_cars'][0][0] < 2 else 0
# reward += 1 if prev_obs['num_of_cars'][2][1] < 2 else 0
else:
if prev_obs['lights_settings'][0] == 0:
reward += 1 if prev_obs['num_of_cars'][0][0] > 8 else 0
else:
reward += 1 if prev_obs['num_of_cars'][0][1] > 8 else 0
# if self.simulation.intersection_to_process == 2:
# print('action: ' + str(action) + ', reward: ' + str(reward))
# print('vertical cars: ' + str(prev_obs['num_of_cars'][0][0]), 'horizontal cars: ' + str(prev_obs['num_of_cars'][0][1]) + '\n')
return reward
def definitive2x2(self, prev_obs, action):
reward = 0
vertical_load = prev_obs['intersection_cars'][0] # + prev_obs['input_cars'][0]
horizontal_load = prev_obs['intersection_cars'][1] # + prev_obs['input_cars'][1]
if prev_obs['lights_settings'][0] == 0:
if horizontal_load > 2 * vertical_load:
if action == 1:
reward = 1
else:
reward = -1
elif vertical_load > 2 * horizontal_load:
if action == 1:
reward = -1
else:
reward = 1
elif action == 1:
reward = -1
if prev_obs['lights_settings'][0] == 1:
if horizontal_load > 2 * vertical_load:
if action == 1:
reward = -1
else:
reward = 1
elif vertical_load > 2 * horizontal_load:
if action == 1:
reward = 1
else:
reward = -1
elif action == 1:
reward = -1
if self.simulation.intersection_to_process == 20:
print('The vertical load is: ' + str(vertical_load))
print('The horizontal load is: ' + str(horizontal_load))
print('The green light is: ' + str('VERTICAL' if prev_obs['lights_settings'][0] == 0 else 'HORIZONTAL'))
print('The action is: ' + str('MAINTAIN' if action == 0 else 'CHANGE'))
print('The reward is: ' + str(reward))
print('\n')
return reward
def definitive3x3(self, prev_obs, action):
reward = 0
vertical_load = prev_obs['intersection_cars'][0]
horizontal_load = prev_obs['intersection_cars'][1]
vertical_output_load = prev_obs['output_cars'][0]
horizontal_output_load = prev_obs['output_cars'][1]
if prev_obs['lights_settings'][0] == 0:
if horizontal_load - vertical_load > 6:
reward = 1 if action == 1 else -1
elif vertical_load - horizontal_load > 4:
reward = -1 if action == 1 else 1
elif vertical_output_load - horizontal_output_load > 6:
reward = 1 if action == 1 else -1
elif horizontal_output_load - vertical_output_load > 4:
reward = -1 if action == 1 else 1
elif vertical_load > 5 and horizontal_load > 5 and vertical_output_load - horizontal_output_load > 3:
reward = 1 if action == 1 else -1
elif vertical_output_load == 10:
reward = 1 if action == 1 else -1
elif action == 1:
reward = -1
if prev_obs['lights_settings'][0] == 1:
if vertical_load - horizontal_load > 6:
reward = 1 if action == 1 else -1
elif horizontal_load - vertical_load > 4:
reward = -1 if action == 1 else 1
elif horizontal_output_load - vertical_output_load > 6:
reward = 1 if action == 1 else -1
elif vertical_output_load - horizontal_output_load > 4:
reward = -1 if action == 1 else 1
elif horizontal_load > 5 and vertical_load > 5 and horizontal_output_load - vertical_output_load > 3:
reward = 1 if action == 1 else -1
elif horizontal_output_load == 10:
reward = 1 if action == 1 else -1
elif action == 1:
reward = -1
print('The intersection is: ' + str(self.simulation.intersection_to_process))
print('The vertical load is: ' + str(vertical_load))
print('The horizontal load is: ' + str(horizontal_load))
print('The vertical output load is: ' + str(vertical_output_load))
print('The horizontal output load is: ' + str(horizontal_output_load))
print('The green light is: ' + str('VERTICAL' if prev_obs['lights_settings'][0] == 0 else 'HORIZONTAL'))
print('The action is: ' + str('MAINTAIN' if action == 0 else 'CHANGE'))
print('The reward is: ' + str(reward))
print('\n')
return reward
| 53.276353
| 190
| 0.634439
| 2,211
| 18,700
| 5.080959
| 0.053822
| 0.085989
| 0.043262
| 0.076909
| 0.855617
| 0.801406
| 0.770251
| 0.718355
| 0.663789
| 0.630319
| 0
| 0.023589
| 0.254171
| 18,700
| 350
| 191
| 53.428571
| 0.781889
| 0.127647
| 0
| 0.54902
| 0
| 0
| 0.128515
| 0.059192
| 0
| 0
| 0
| 0
| 0
| 1
| 0.070588
| false
| 0.003922
| 0.019608
| 0.007843
| 0.156863
| 0.062745
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
70b086468733c1b6ce77c49c47bc0d4d8412c1dd
| 101
|
py
|
Python
|
enthought/mayavi/components/implicit_plane.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 3
|
2016-12-09T06:05:18.000Z
|
2018-03-01T13:00:29.000Z
|
enthought/mayavi/components/implicit_plane.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 1
|
2020-12-02T00:51:32.000Z
|
2020-12-02T08:48:55.000Z
|
enthought/mayavi/components/implicit_plane.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | null | null | null |
# proxy module
from __future__ import absolute_import
from mayavi.components.implicit_plane import *
| 25.25
| 46
| 0.851485
| 13
| 101
| 6.153846
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108911
| 101
| 3
| 47
| 33.666667
| 0.888889
| 0.118812
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
70fed1aa735bf095ea4ea44b9f449fbb2dd1b487
| 128
|
py
|
Python
|
backend/src/analytics/admin.py
|
codingforentrepreneurs/Geolocator-2
|
d4c2410301aa2497816e7ed2ec1890bc9be2e8fd
|
[
"MIT"
] | 34
|
2017-04-27T20:22:08.000Z
|
2021-11-08T13:01:43.000Z
|
backend/src/analytics/admin.py
|
hercules261188/Geolocator-2
|
d4c2410301aa2497816e7ed2ec1890bc9be2e8fd
|
[
"MIT"
] | null | null | null |
backend/src/analytics/admin.py
|
hercules261188/Geolocator-2
|
d4c2410301aa2497816e7ed2ec1890bc9be2e8fd
|
[
"MIT"
] | 34
|
2017-05-18T23:23:01.000Z
|
2022-03-02T21:08:54.000Z
|
from django.contrib import admin
# Register your models here.
from .models import UserSession
admin.site.register(UserSession)
| 21.333333
| 32
| 0.820313
| 17
| 128
| 6.176471
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117188
| 128
| 6
| 33
| 21.333333
| 0.929204
| 0.203125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
cb0840d5bc91aaecbc980279a62bae916478d2ee
| 58
|
py
|
Python
|
conference/forms/__init__.py
|
zevaverbach/epcon
|
8352c030ee0d4197f559cdb58a54ee45c7a4471a
|
[
"BSD-2-Clause"
] | null | null | null |
conference/forms/__init__.py
|
zevaverbach/epcon
|
8352c030ee0d4197f559cdb58a54ee45c7a4471a
|
[
"BSD-2-Clause"
] | null | null | null |
conference/forms/__init__.py
|
zevaverbach/epcon
|
8352c030ee0d4197f559cdb58a54ee45c7a4471a
|
[
"BSD-2-Clause"
] | null | null | null |
from .forms import * # noqa
from .talks import * # noqa
| 19.333333
| 28
| 0.655172
| 8
| 58
| 4.75
| 0.625
| 0.526316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.241379
| 58
| 2
| 29
| 29
| 0.863636
| 0.155172
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
cb779cc66f314d2d2731877166e373742311a2fe
| 428
|
py
|
Python
|
editor/importme.py
|
Amazeryogo/surf-exel
|
0d6a43a7ba2b059f61405db846e546308a035733
|
[
"MIT"
] | 3
|
2020-08-12T05:59:47.000Z
|
2020-11-08T00:01:04.000Z
|
editor/importme.py
|
Amazeryogo/surf-exel
|
0d6a43a7ba2b059f61405db846e546308a035733
|
[
"MIT"
] | 8
|
2020-08-19T06:24:06.000Z
|
2020-10-27T04:37:46.000Z
|
editor/importme.py
|
Amazeryogo/surf-exel
|
0d6a43a7ba2b059f61405db846e546308a035733
|
[
"MIT"
] | 1
|
2020-10-25T13:35:17.000Z
|
2020-10-25T13:35:17.000Z
|
from Tkinter import *
from Tkinter import filedialog, simpledialog
from Tkinter import messagebox
from editor.settings import backgroundcolor as bc
from editor.settings import forgroundcolor as fc
from editor.settings import back as b
from editor.settings import fore as f
from editor.settings import size
from editor.settings import font as fontx
from gtts import gTTS
import playsound
import os
# Imported everything here
| 23.777778
| 49
| 0.831776
| 63
| 428
| 5.650794
| 0.412698
| 0.168539
| 0.303371
| 0.404494
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147196
| 428
| 17
| 50
| 25.176471
| 0.975342
| 0.056075
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
cb84957ad1b624b8b574c38b8823c92d6f5be898
| 96
|
py
|
Python
|
werewolf/models/__init__.py
|
LucienZhang/werewolf-back
|
289468c3589a7ad101358175e26401ba6b3b4f16
|
[
"MIT"
] | null | null | null |
werewolf/models/__init__.py
|
LucienZhang/werewolf-back
|
289468c3589a7ad101358175e26401ba6b3b4f16
|
[
"MIT"
] | null | null | null |
werewolf/models/__init__.py
|
LucienZhang/werewolf-back
|
289468c3589a7ad101358175e26401ba6b3b4f16
|
[
"MIT"
] | null | null | null |
from .base import Base
from .user import User
from .game import Game
from .role import Role
| 19.2
| 23
| 0.75
| 16
| 96
| 4.5
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208333
| 96
| 4
| 24
| 24
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
cbbbcdd9a359c2d8bfbdd28aa61f833e1d9364df
| 362
|
py
|
Python
|
tests/__init__.py
|
zhester/jdi
|
18d43331f15776a5ef94342ac85a24a083a3c7d7
|
[
"BSD-2-Clause"
] | null | null | null |
tests/__init__.py
|
zhester/jdi
|
18d43331f15776a5ef94342ac85a24a083a3c7d7
|
[
"BSD-2-Clause"
] | null | null | null |
tests/__init__.py
|
zhester/jdi
|
18d43331f15776a5ef94342ac85a24a083a3c7d7
|
[
"BSD-2-Clause"
] | null | null | null |
#=============================================================================
#
# JDI Unit Tests
#
#=============================================================================
"""
JDI Unit Tests
==============
Run all unit tests from project's root directory.
python -m unittest discover
python3 -m unittest discover
"""
__version__ = '0.0.0'
| 16.454545
| 78
| 0.345304
| 27
| 362
| 4.481481
| 0.62963
| 0.223141
| 0.198347
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.01278
| 0.135359
| 362
| 21
| 79
| 17.238095
| 0.373802
| 0.872928
| 0
| 0
| 0
| 0
| 0.16129
| 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
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
cbce8d593e80431df2ec54039449d1df714915f5
| 13,919
|
py
|
Python
|
src/Python/flask/app.py
|
mwaseem75/iris-python-template
|
c8d75e22a6eee33e796d28f5508fd656a6ea58d6
|
[
"MIT"
] | null | null | null |
src/Python/flask/app.py
|
mwaseem75/iris-python-template
|
c8d75e22a6eee33e796d28f5508fd656a6ea58d6
|
[
"MIT"
] | null | null | null |
src/Python/flask/app.py
|
mwaseem75/iris-python-template
|
c8d75e22a6eee33e796d28f5508fd656a6ea58d6
|
[
"MIT"
] | 1
|
2022-02-21T05:14:48.000Z
|
2022-02-21T05:14:48.000Z
|
from flask import Flask, jsonify, Response, request, make_response, render_template
from definitions.passenger import Passenger
import json,util,io,random
import iris
from matplotlib.backends.backend_agg import FigureCanvasAgg
from matplotlib.backends.backend_svg import FigureCanvasSVG
from matplotlib.figure import Figure
app = Flask(__name__)
app.secret_key = "abc222"
# ----------------------------------------------------------------
### CRUD FOR TITANIC_TABLE.PASSENGER
# ----------------------------------------------------------------
@app.route("/")
def index():
content = util.get_dashboard_stats()
return render_template('index.html', content = content)
@app.route("/processes")
def processes():
iris.cls("Embedded.Utils").SetNameSpace("USER")
statement = iris.sql.exec(util.get_sql_stat("processes"))
df = statement.dataframe()
my_data=json.loads(df.to_json(orient="split"))["data"]
my_cols=[{"title": str(col)} for col in json.loads(df.to_json(orient="split"))["columns"]]
ftitle = "Processes"
fheading = "Currently runnung processes"
content = util.get_sidebar_stats()
return render_template('tablesdata.html', ftitle = ftitle, fheading = fheading, my_data = my_data, my_cols = my_cols, content = content)
@app.route("/messages")
def messages():
iris.cls("Embedded.Utils").SetNameSpace("USER")
statement = iris.sql.exec(util.get_sql_stat("messages"))
df = statement.dataframe()
my_data=json.loads(df.to_json(orient="split"))["data"]
my_cols=[{"title": str(col)} for col in json.loads(df.to_json(orient="split"))["columns"]]
ftitle = "Messages"
fheading = "Production Messages"
content = util.get_sidebar_stats()
return render_template('tablesdata.html', ftitle = ftitle, fheading = fheading, my_data = my_data, my_cols = my_cols, content = content)
@app.route("/securityusers")
def securityusers():
iris.cls("Embedded.Utils").SetNameSpace("%SYS")
statement = iris.sql.exec(util.get_sql_stat("securityusers"))
df = statement.dataframe()
my_data=json.loads(df.to_json(orient="split"))["data"]
my_cols=[{"title": str(col)} for col in json.loads(df.to_json(orient="split"))["columns"]]
ftitle = "Users"
fheading = "Security Users"
content = util.get_sidebar_stats()
return render_template('tablesdata.html', ftitle = ftitle, fheading = fheading, my_data = my_data, my_cols = my_cols, content = content)
@app.route("/securityapps")
def securityapps():
iris.cls("Embedded.Utils").SetNameSpace("%SYS")
statement = iris.sql.exec(util.get_sql_stat("securityapps"))
df = statement.dataframe()
my_data=json.loads(df.to_json(orient="split"))["data"]
my_cols=[{"title": str(col)} for col in json.loads(df.to_json(orient="split"))["columns"]]
ftitle = "Applications"
fheading = "Created Applications"
content = util.get_sidebar_stats()
return render_template('tablesdata.html', ftitle = ftitle, fheading = fheading, my_data = my_data, my_cols = my_cols, content = content)
@app.route("/elassert")
def elassert():
iris.cls("Embedded.Utils").SetNameSpace("USER")
statement = iris.sql.exec(util.get_sql_stat("elassert"))
df = statement.dataframe()
my_data=json.loads(df.to_json(orient="split"))["data"]
my_cols=[{"title": str(col)} for col in json.loads(df.to_json(orient="split"))["columns"]]
ftitle = "Assert"
fheading = "Event Log Assert"
content = util.get_sidebar_stats()
return render_template('tablesdata.html', ftitle = ftitle, fheading = fheading, my_data = my_data, my_cols = my_cols, content = content)
@app.route("/elerror")
def elerror():
iris.cls("Embedded.Utils").SetNameSpace("USER")
statement = iris.sql.exec(util.get_sql_stat("elerror"))
df = statement.dataframe()
my_data=json.loads(df.to_json(orient="split"))["data"]
my_cols=[{"title": str(col)} for col in json.loads(df.to_json(orient="split"))["columns"]]
ftitle = "Error"
fheading = "Event Log Error"
content = util.get_sidebar_stats()
return render_template('tablesdata.html', ftitle = ftitle, fheading = fheading, my_data = my_data, my_cols = my_cols, content = content)
@app.route("/elwarning")
def elwarning():
statement = iris.sql.exec(util.get_sql_stat("elwarning"))
df = statement.dataframe()
my_data=json.loads(df.to_json(orient="split"))["data"]
my_cols=[{"title": str(col)} for col in json.loads(df.to_json(orient="split"))["columns"]]
ftitle = "Warning"
fheading = "Event Log Warning"
content = util.get_sidebar_stats()
return render_template('tablesdata.html', ftitle = ftitle, fheading = fheading, my_data = my_data, my_cols = my_cols, content = content)
@app.route("/elinfo")
def elinfo():
statement = iris.sql.exec(util.get_sql_stat("elinfo"))
df = statement.dataframe()
my_data=json.loads(df.to_json(orient="split"))["data"]
my_cols=[{"title": str(col)} for col in json.loads(df.to_json(orient="split"))["columns"]]
ftitle = "Info"
fheading = "Event Log Info"
content = util.get_sidebar_stats()
return render_template('tablesdata.html', ftitle = ftitle, fheading = fheading, my_data = my_data, my_cols = my_cols, content = content)
@app.route("/eltrace")
def eltrace():
statement = iris.sql.exec(util.get_sql_stat("eltrace"))
df = statement.dataframe()
my_data=json.loads(df.to_json(orient="split"))["data"]
my_cols=[{"title": str(col)} for col in json.loads(df.to_json(orient="split"))["columns"]]
ftitle = "Trace"
fheading = "Event Log Trace"
content = util.get_sidebar_stats()
return render_template('tablesdata.html', ftitle = ftitle, fheading = fheading, my_data = my_data, my_cols = my_cols, content = content)
@app.route("/elevent")
def elevent():
statement = iris.sql.exec(util.get_sql_stat("elalert"))
df = statement.dataframe()
my_data=json.loads(df.to_json(orient="split"))["data"]
my_cols=[{"title": str(col)} for col in json.loads(df.to_json(orient="split"))["columns"]]
ftitle = "Alert"
fheading = "Event Log Alert"
content = util.get_sidebar_stats()
return render_template('tablesdata.html', ftitle = ftitle, fheading = fheading, my_data = my_data, my_cols = my_cols, content = content)
# GET all passengers
@app.route("/api/passengers")
def getAllPassengers():
payload = {}
payload['passengers'] = []
tp = {}
name = request.args.get('name')
currPage = request.args.get('currPage')
pageSize = request.args.get('pageSize')
if name is not None:
# If search by name
query = "SELECT ID FROM Titanic_Table.Passenger WHERE name %STARTSWITH ?"
rs = iris.sql.exec(query, name)
for i in rs:
# We create an iris object
tp = iris.ref(1)
# We get the json in a string
iris.cls("Titanic.Table.Passenger")._OpenId(i[0])._JSONExportToString(tp)
# We normalize the string to get it in python
tp = iris.cls("%String").Normalize(tp)
# We load the string in a dict
tp = json.loads(tp)
# We add the id
tp['passengerId'] = i[0]
payload['passengers'].append(tp)
else:
currPage = int(currPage) if currPage is not None else 1
pageSize = int(pageSize) if pageSize is not None else 10
tFrom = ((currPage -1 ) * pageSize)+1
tTo = tFrom + (pageSize-1)
query = """
SELECT * FROM
(
SELECT ID,
ROW_NUMBER() OVER (ORDER By ID ASC) rn
FROM Titanic_Table.Passenger
) tmp
WHERE rn between {} and {}
ORDER By ID ASC
""".format(tFrom,tTo)
rs = iris.sql.exec(query)
for i in rs:
# We create an iris object
tp = iris.ref(1)
# We get the json in a string
iris.cls("Titanic.Table.Passenger")._OpenId(i[0])._JSONExportToString(tp)
# We normalize the string to get it in python
tp = iris.cls("%String").Normalize(tp)
# We load the string in a dict
tp = json.loads(tp)
# We add the id
tp['passengerId'] = i[0]
payload['passengers'].append(tp)
# Getting the total number of passengers
rs = iris.sql.exec("SELECT COUNT(*) FROM Titanic_Table.Passenger")
payload['total'] = rs.__next__()[0]
payload['query'] = query
return jsonify(payload)
# POST a new passenger
@app.route("/api/passengers", methods=["POST"])
def createPassenger():
# Retreiving the data in request body
passenger = request.get_json()
query = "INSERT INTO Titanic_Table.Passenger (survived, pclass, name, sex, age, sibSp, parCh, ticket, fare, cabin, embarked) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
# Getting the new ID of the passenger
newId = int(iris.sql.exec("SELECT MAX(ID) FROM Titanic_Table.Passenger").__next__()[0]) + 1
try:
iris.sql.exec(query, passenger['survived'], passenger['pclass'], passenger['name'], passenger['sex'], passenger['age'], passenger['sibSp'], passenger['parCh'], passenger['ticket'], passenger['fare'], passenger['cabin'], passenger['embarked'])
except:
return make_response(
'Bad Request',
400
)
payload = {
'query': query,
'passengerId': newId
}
return jsonify(payload)
# GET passenger with id
@app.route("/api/passengers/<int:id>", methods=["GET"])
def getPassenger(id):
payload = {}
query = "SELECT * FROM Titanic_Table.Passenger WHERE ID = ?"
rs = iris.sql.exec(query, str(id))
try :
passenger = Passenger(rs.__next__()).__dict__
except:
return make_response(
'Not Found',
204
)
payload['passenger'] = passenger
payload['query'] = query
return jsonify(payload)
# PUT to update passenger with id
@app.route("/api/passengers/<int:id>", methods=["PUT"])
def updatePassenger(id):
# First, checking to see if the passenger exists
query = "SELECT ID FROM Titanic_Table.Passenger WHERE ID = ?"
rs = iris.sql.exec(query, str(id))
try :
rs.__next__()
except:
return make_response(
'Not Found',
204
)
# Updating
passenger = request.get_json()
query = "UPDATE Titanic_Table.Passenger SET survived = ?, pclass = ?, name = ?, sex = ?, age = ?, sibSp = ?, parCh = ?, ticket = ?, fare = ?, cabin = ?, embarked = ? WHERE ID = ?"
try:
iris.sql.exec(query, passenger['survived'], passenger['pclass'], passenger['name'], passenger['sex'], passenger['age'], passenger['sibSp'], passenger['parCh'], passenger['ticket'], passenger['fare'], passenger['cabin'], passenger['embarked'], id)
except:
return make_response(
'Bad Request',
400
)
payload = {
'query': query,
}
return jsonify(payload)
# DELETE passenger with id
@app.route("/api/passengers/<int:id>", methods=["DELETE"])
def deletePassenger(id):
payload = {}
query = "DELETE FROM Titanic_Table.Passenger WHERE ID = ?"
try:
iris.sql.exec(query, str(id))
except:
return make_response(
'Not Found',
204
)
payload['query'] = query
return jsonify(payload)
def getP():
payload = {}
payload['passengers'] = []
tp = {}
name = request.args.get('name')
currPage = request.args.get('currPage')
pageSize = request.args.get('pageSize')
currPage = int(currPage) if currPage is not None else 1
pageSize = int(pageSize) if pageSize is not None else 10
tFrom = ((currPage -1 ) * pageSize)+1
tTo = tFrom + (pageSize-1)
query = """
SELECT * FROM
(
SELECT ID,
ROW_NUMBER() OVER (ORDER By ID ASC) rn
FROM Titanic_Table.Passenger
) tmp
WHERE rn between {} and {}
ORDER By ID ASC
""".format(tFrom,tTo)
rs = iris.sql.exec(query)
for i in rs:
# We create an iris object
tp = iris.ref(1)
# We get the json in a string
iris.cls("Titanic.Table.Passenger")._OpenId(i[0])._JSONExportToString(tp)
# We normalize the string to get it in python
tp = iris.cls("%String").Normalize(tp)
# We load the string in a dict
tp = json.loads(tp)
# We add the id
tp['passengerId'] = i[0]
payload['passengers'].append(tp)
# Getting the total number of passengers
rs = iris.sql.exec("SELECT COUNT(*) FROM Titanic_Table.Passenger")
payload['total'] = rs.__next__()[0]
payload['query'] = query
return jsonify(payload)
@app.route("/matplot")
def matplot():
""" Returns html with the img tag for your plot.
"""
content = util.get_sidebar_stats()
num_x_points = int(request.args.get("num_x_points", 50))
return render_template('matplot.html', content = content, num_x_points = num_x_points)
@app.route("/matplot-as-image-<int:num_x_points>.png")
def plot_png(num_x_points=50):
""" renders the plot on the fly.
"""
fig = Figure()
axis = fig.add_subplot(1, 1, 1)
x_points = range(num_x_points)
axis.plot(x_points, [random.randint(1, 30) for x in x_points])
output = io.BytesIO()
FigureCanvasAgg(fig).print_png(output)
return Response(output.getvalue(), mimetype="image/png")
# ----------------------------------------------------------------
### MAIN PROGRAM
# ----------------------------------------------------------------
if __name__ == '__main__':
app.run('0.0.0.0', port = "8080", debug=True)
| 39.997126
| 254
| 0.613694
| 1,733
| 13,919
| 4.799769
| 0.134449
| 0.02164
| 0.027771
| 0.031258
| 0.747656
| 0.732147
| 0.718081
| 0.709906
| 0.676725
| 0.676725
| 0
| 0.00567
| 0.227028
| 13,919
| 348
| 255
| 39.997126
| 0.767451
| 0.082908
| 0
| 0.592199
| 0
| 0.007092
| 0.227491
| 0.034128
| 0
| 0
| 0
| 0
| 0.017731
| 1
| 0.067376
| false
| 0.141844
| 0.024823
| 0
| 0.177305
| 0.003546
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
1dbddad7e6aa4ab9f3b4b98398e41967db617fa0
| 2,989
|
py
|
Python
|
database/models.py
|
zdresearch/Nettacker
|
6d1653df01fee06ac6906a3cb1beebed39c166ef
|
[
"Apache-2.0"
] | 884
|
2020-09-26T01:12:09.000Z
|
2022-03-31T07:39:23.000Z
|
database/models.py
|
GeauxWeisbeck4/Nettacker
|
0d6a907f4528b42ff6460c8a1e58f73ae768b38e
|
[
"Apache-2.0"
] | 185
|
2018-04-18T12:16:27.000Z
|
2020-09-25T10:37:23.000Z
|
database/models.py
|
GeauxWeisbeck4/Nettacker
|
0d6a907f4528b42ff6460c8a1e58f73ae768b38e
|
[
"Apache-2.0"
] | 236
|
2020-09-26T22:19:29.000Z
|
2022-03-30T08:21:28.000Z
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import (Column,
Integer,
Text,
DateTime)
Base = declarative_base()
class Report(Base):
"""
This class defines the table schema of the reports table. Any changes to the reports table need to be done here.
"""
__tablename__ = 'reports'
id = Column(Integer, primary_key=True, autoincrement=True)
date = Column(DateTime)
scan_unique_id = Column(Text)
report_path_filename = Column(Text)
options = Column(Text)
def __repr__(self):
"""
returns a printable representation of the object of the class Report
"""
return "<Report(id={0}, scan_unique_id={1}, date={2}, report_path_filename={3})>".format(
self.id,
self.scan_unique_id,
self.date,
self.report_path_filename
)
class TempEvents(Base):
"""
This class defines the table schema of the reports table. Any changes to the reports table need to be done here.
"""
__tablename__ = 'temp_events'
id = Column(Integer, primary_key=True, autoincrement=True)
date = Column(DateTime)
target = Column(Text)
module_name = Column(Text)
scan_unique_id = Column(Text)
event_name = Column(Text)
port = Column(Text)
event = Column(Text)
data = Column(Text)
def __repr__(self):
"""
returns a printable representation of the object of the class Report
"""
return '''
<scan_events(id={0}, target={1}, date={2}, module_name={3}, scan_unqiue_id={4},
port={5}, event={6}, data={7})>
'''.format(
self.id,
self.target,
self.date,
self.module_name,
self.scan_unique_id,
self.port,
self.event,
self.data
)
class HostsLog(Base):
"""
This class defines the table schema of the hosts_log table. Any changes to the reports hosts_log need to be done here.
"""
__tablename__ = 'scan_events'
id = Column(Integer, primary_key=True, autoincrement=True)
date = Column(DateTime)
target = Column(Text)
module_name = Column(Text)
scan_unique_id = Column(Text)
port = Column(Text)
event = Column(Text)
json_event = Column(Text)
def __repr__(self):
"""
returns a printable representation of the object of the class HostsLog
"""
return '''
<scan_events(id={0}, target={1}, date={2}, module_name={3}, scan_unqiue_id={4},
port={5}, event={6}, json_event={7})>
'''.format(
self.id,
self.target,
self.date,
self.module_name,
self.scan_unique_id,
self.port,
self.event,
self.json_event
)
| 28.740385
| 122
| 0.573101
| 354
| 2,989
| 4.644068
| 0.217514
| 0.097324
| 0.051095
| 0.036496
| 0.766423
| 0.740876
| 0.709246
| 0.709246
| 0.667883
| 0.644161
| 0
| 0.010821
| 0.319839
| 2,989
| 103
| 123
| 29.019417
| 0.797836
| 0.199732
| 0
| 0.623188
| 0
| 0.028986
| 0.185852
| 0.011424
| 0
| 0
| 0
| 0
| 0
| 1
| 0.043478
| false
| 0
| 0.028986
| 0
| 0.521739
| 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
| 1
| 0
|
0
| 5
|
1dccc5743e94de53f95b5ccf3e289dd5436b798d
| 17,756
|
py
|
Python
|
baselines/deepq/assembly/data/plot_result.py
|
DengYuelin/baselines-assembly
|
d40171845349395f0ed389d725873b389b08f94f
|
[
"MIT"
] | 1
|
2022-03-23T02:35:05.000Z
|
2022-03-23T02:35:05.000Z
|
baselines/deepq/assembly/data/plot_result.py
|
DengYuelin/baselines-assembly
|
d40171845349395f0ed389d725873b389b08f94f
|
[
"MIT"
] | null | null | null |
baselines/deepq/assembly/data/plot_result.py
|
DengYuelin/baselines-assembly
|
d40171845349395f0ed389d725873b389b08f94f
|
[
"MIT"
] | 3
|
2018-12-20T10:10:57.000Z
|
2020-08-07T10:12:57.000Z
|
# -*- coding: utf-8 -*-
"""
# @Time : 24/10/18 2:40 PM
# @Author : ZHIMIN HOU
# @FileName: plot_result.py
# @Software: PyCharm
# @Github : https://github.com/hzm2016
"""
import collections
import matplotlib.pyplot as plt
import numpy as np
import pickle
import copy as cp
from baselines.deepq.assembly.src.value_functions import *
"""=================================Plot result====================================="""
# YLABEL = ['$F_x(N)$', '$F_y(N)$', '$F_z(N)$', '$M_x(Nm)$', '$M_y(Nm)$', '$M_z(Nm)$']
YLABEL = ['$F_x$(N)', '$F_y$(N)', '$F_z$(N)', '$M_x$(Nm)', '$M_y$(Nm)', '$M_z$(Nm)']
Title = ["X axis force", "Y axis force", "Z axis force",
"X axis moment", "Y axis moment", "Z axis moment"]
High = np.array([40, 40, 0, 5, 5, 5, 542, -36, 188, 5, 5, 5])
Low = np.array([-40, -40, -40, -5, -5, -5, 538, -42, 192, -5, -5, -5])
scale = np.array([40, 40, 40, 5, 5, 5])
"""================================================================================="""
plt.rcParams['font.sans-serif']=['SimHei']
plt.rcParams['axes.unicode_minus']=False
def plot(result_path):
plt.figure(figsize=(15, 15), dpi=100)
plt.title('Search Result')
prediction_result = np.load(result_path)
for i in range(len(prediction_result)):
for j in range(6):
line = prediction_result[:, j]
# plt.subplot(2, 3, j+1)
plt.plot(line)
plt.ylabel(YLABEL[j])
plt.xlabel('steps')
plt.legend(YLABEL)
plt.show()
def plot_force_and_moment(path_2, path_3):
V_force = np.load(path_2)
V_state = np.load(path_3)
plt.figure(figsize=(15, 10), dpi=100)
plt.title("Search Result of Force", fontsize=20)
plt.plot(V_force[:100])
plt.xlabel("Steps", fontsize=20)
plt.ylabel("F(N)", fontsize=20)
plt.legend(labels=['Fx', 'Fy', 'Fz', 'Mx', 'My', 'Mz'], loc='best', fontsize=20)
plt.xticks(fontsize=15)
plt.yticks(fontsize=15)
plt.figure(figsize=(15, 10), dpi=100)
plt.title("Search Result of State", fontsize=20)
plt.plot(V_state[:100] - [539.88427, -38.68679, 190.03184, 179.88444, 1.30539, 0.21414])
plt.xlabel("Steps", fontsize=20)
plt.ylabel("Coordinate", fontsize=20)
plt.legend(labels=['x', 'y', 'z', 'rx', 'ry', 'rz'], loc='best', fontsize=20)
plt.xticks(fontsize=15)
plt.yticks(fontsize=15)
plt.show()
def plot_reward(reward_path):
reward = np.load(reward_path)
print(reward[0])
plt.figure(figsize=(15, 15), dpi=100)
plt.title('Episode Reward')
plt.plot(np.arange(len(reward) - 1), np.array(reward[1:]))
plt.ylabel('Episode Reward')
plt.xlabel('Episodes')
plt.show()
def plot_raw_data(path_1):
data = np.load(path_1)
force_m = np.zeros((len(data), 12))
plt.figure(figsize=(20, 20), dpi=100)
plt.tight_layout(pad=3, w_pad=0.5, h_pad=1.0)
plt.subplots_adjust(left=0.065, bottom=0.1, right=0.995, top=0.9, wspace=0.2, hspace=0.2)
plt.title("True Data")
for j in range(len(data)):
force_m[j] = data[j, 0]
k = -1
for i in range(len(data)):
if data[i, 1] == 0:
print("===========================================")
line = force_m[k+1:i+1]
print(line)
k = i
for j in range(6):
plt.subplot(2, 3, j + 1)
plt.plot(line[:, j])
# plt.plot(line[:, 0])
if j == 1:
plt.ylabel(YLABEL[j], fontsize=17.5)
plt.xlabel('steps', fontsize=20)
plt.xticks(fontsize=15)
plt.yticks(fontsize=15)
else:
plt.ylabel(YLABEL[j], fontsize=20)
plt.xlabel('steps', fontsize=20)
plt.xticks(fontsize=15)
plt.yticks(fontsize=15)
i += 1
def plot_continuous_data(path):
raw_data = np.load(path)
plt.figure(figsize=(20, 15))
plt.title('Episode Reward')
plt.tight_layout(pad=3, w_pad=0.5, h_pad=1.0)
plt.subplots_adjust(left=0.1, bottom=0.15, right=0.98, top=0.9, wspace=0.23, hspace=0.22)
# plt.subplots_adjust(left=0.065, bottom=0.1, right=0.995, top=0.9, wspace=0.2, hspace=0.2)
data = np.zeros((len(raw_data), 12))
for j in range(len(raw_data)):
data[j] = raw_data[j, 0]
for j in range(6):
plt.subplot(2, 3, j + 1)
plt.plot(data[:, j]*scale[j], linewidth=2.5)
# plt.ylabel(YLABEL[j], fontsize=18)
if j>2:
plt.xlabel('steps', fontsize=30)
plt.title(YLABEL[j], fontsize=30)
plt.xticks(fontsize=25)
plt.yticks(fontsize=25)
# plt.subplots_adjust(left=0.1, bottom=0.1, right=0.9, top=0.9, wspace=0.4, hspace=0.2)
plt.savefig('raw_data.pdf')
plt.show()
def compute_true_return(path):
raw_data = np.load(path)
# print(raw_data)
clock = 0
G = 0.
past_gammas = []
past_cumulants = []
all_G = []
for i in range(len(raw_data)):
observation, action, done, action_probability = raw_data[i]
if done == False:
gamma = 0.99
else:
gamma = 0.
past_gammas.append(gamma)
past_cumulants.append(1)
if done == False:
clock += 1
G = 0
all_G.append(cp.deepcopy(G))
else:
print('clock', clock)
for j in reversed(range(0, clock + 1)):
G *= past_gammas[j]
G += past_cumulants[j]
all_G.append(cp.deepcopy(G))
clock = 0
past_cumulants = []
past_gammas = []
print(len(raw_data))
plt.figure(figsize=(20, 15))
plt.plot(all_G[300:400])
plt.show()
return all_G
# Plot the true prediction and true value
def plot_different_gamma_data(path):
f = open(path, 'rb')
titles = ['$\gamma = 0.4$', '$\gamma = 0.8$', '$\gamma = 0.96$', '$\gamma =1.0$']
# true_data = compute_true_return('prediction_result_different_gamma.npy')
# f = open('../data/learning_result_policy', 'rb')
# plot_value_functions = ['Move down Fy', 'Move down Fx', 'Move down Fz', 'Move down Mx', 'Move down My', 'Move down Mz']
plot_value_functions = ['Move down step', 'Move down step 2', 'Move down step 3', 'Move down step 4']
# plot_value_functions = ['Move down Fx', 'Move down Fx 1', 'Move down Fx 2', 'Move down Fx 3']
raw_data = pickle.load(f)
plt.figure(figsize=(20, 15))
plt.tight_layout(pad=3, w_pad=1., h_pad=0.5)
plt.subplots_adjust(left=0.1, bottom=0.15, right=0.98, top=0.9, wspace=0.23, hspace=0.23)
# legend = sorted([key for key in plot_value_functions.keys()])
# print(legend)
# print(value_functions.keys())
for j, key in enumerate(plot_value_functions):
plt.subplot(2, 2, j + 1)
# print(list(raw_data[('GTD(1)', 'Hindsight Error')][key]))
# plt.plot(np.array(raw_data[('GTD(1)', 'Hindsight Error')][key])[:], linewidth=2.5)
# plt.plot(true_data[300:])
plt.plot(np.array(raw_data[('GTD(0)', 'UDE')][key])[600:], linewidth=2.75)
# print('true value', np.array(raw_data[('GTD(0)', 'UDE')][key])[300:400])
# plt.plot(np.array(raw_data[('GTD(0)', 'TD Error')][key])[600:], linewidth=2.5)
# print('old prediction', np.array(raw_data[('GTD(0)', 'TD Error')][key])[300:400])
plt.plot(np.array(raw_data[('GTD(0)', 'Prediction')][key])[600:], linewidth=2.75)
# plt.plot(np.array(raw_data[('GTD(1)', 'Prediction')][key])[300:] - np.array(raw_data[('GTD(1)', 'Hindsight Error')][key])[300:], linewidth=2.5)
# plt.legend('True value', 'Prediction value')
plt.title(titles[j], fontsize=30)
if j > 1:
plt.xlabel('steps', fontsize=30)
plt.ylabel('Number of steps', fontsize=30)
plt.xticks(fontsize=25)
plt.yticks(fontsize=25)
# plt.savefig('different_gamma.pdf')
plt.show()
# Plot the true prediction and true value
def chinese_plot_different_gamma_data(path):
f = open(path, 'rb')
titles = ['$\gamma = 0.4$', '$\gamma = 0.8$', '$\gamma = 0.96$', '$\gamma =1.0$']
# true_data = compute_true_return('prediction_result_different_gamma.npy')
# f = open('../data/learning_result_policy', 'rb')
# plot_value_functions = ['Move down Fy', 'Move down Fx', 'Move down Fz', 'Move down Mx', 'Move down My', 'Move down Mz']
plot_value_functions = ['Move down step', 'Move down step 2', 'Move down step 3', 'Move down step 4']
# plot_value_functions = ['Move down Fx', 'Move down Fx 1', 'Move down Fx 2', 'Move down Fx 3']
raw_data = pickle.load(f)
plt.figure(figsize=(20, 12), dpi=1000)
plt.tight_layout(pad=3, w_pad=1., h_pad=0.5)
plt.subplots_adjust(left=0.08, bottom=0.12, right=0.98, top=0.95, wspace=0.23, hspace=0.33)
# legend = sorted([key for key in plot_value_functions.keys()])
# print(legend)
# print(value_functions.keys())
for j, key in enumerate(plot_value_functions):
plt.subplot(2, 2, j + 1)
# print(list(raw_data[('GTD(1)', 'Hindsight Error')][key]))
# plt.plot(np.array(raw_data[('GTD(1)', 'Hindsight Error')][key])[:], linewidth=2.5)
# plt.plot(true_data[300:])
plt.plot(np.array(raw_data[('GTD(0)', 'UDE')][key])[600:], linewidth=2.75)
# print('true value', np.array(raw_data[('GTD(0)', 'UDE')][key])[300:400])
# plt.plot(np.array(raw_data[('GTD(0)', 'TD Error')][key])[600:], linewidth=2.5)
# print('old prediction', np.array(raw_data[('GTD(0)', 'TD Error')][key])[300:400])
plt.plot(np.array(raw_data[('GTD(0)', 'Prediction')][key])[600:], linewidth=2.75)
# plt.plot(np.array(raw_data[('GTD(1)', 'Prediction')][key])[300:] - np.array(raw_data[('GTD(1)', 'Hindsight Error')][key])[300:], linewidth=2.5)
# plt.legend('True value', 'Prediction value')
plt.title(titles[j], fontsize=36)
if j > 1:
plt.xlabel('搜索步数', fontsize=36)
plt.ylabel('预测周期', fontsize=36)
plt.xticks([0, 50, 100, 150, 200], fontsize=36)
plt.yticks(fontsize=36)
plt.savefig('./figure/pdf/chinese_different_gamma.pdf')
# plt.show()
def chinese_plot_compare_raw_data(path1, path2):
raw_data = np.load(path1)
raw_data_1 = np.load(path2)
plt.figure(figsize=(20, 12), dpi=1000)
plt.title('Episode Reward')
plt.tight_layout(pad=3, w_pad=0.5, h_pad=1.0)
plt.subplots_adjust(left=0.08, bottom=0.08, right=0.98, top=0.95, wspace=0.33, hspace=0.15)
data = np.zeros((len(raw_data), 12))
for j in range(len(raw_data)):
data[j] = raw_data[j, 0]
data_1 = np.zeros((len(raw_data_1), 12))
for j in range(len(raw_data_1)):
data_1[j] = raw_data_1[j, 0]
for j in range(6):
plt.subplot(2, 3, j + 1)
plt.plot(data[:100, j], linewidth=2.5, color='r', linestyle='--')
plt.plot(data_1[:100, j], linewidth=2.5, color='b')
# plt.ylabel(YLABEL[j], fontsize=18)
if j>2:
plt.xlabel('搜索步数', fontsize=38)
plt.title(YLABEL[j], fontsize=38)
plt.xticks(fontsize=38)
plt.yticks(fontsize=38)
# plt.subplots_adjust(left=0.1, bottom=0.1, right=0.9, top=0.9, wspace=0.4, hspace=0.2)
plt.savefig('./figure/pdf/chinese_raw_data.pdf')
# plt.show()
# Plot the true prediction and true value
def chinese_plot_different_policy_data(path, name):
f = open(path, 'rb')
# true_data = compute_true_return('prediction_result_different_gamma.npy')
# f = open('../data/learning_result_policy', 'rb')
plot_value_functions = ['Move down Fx', 'Move down Fy', 'Move down Fz', 'Move down Mx', 'Move down My', 'Move down Mz']
# plot_value_functions = ['Move down step', 'Move down step 2', 'Move down step 3', 'Move down step 4']
# plot_value_functions = ['Move down Fx', 'Move down Fx 1', 'Move down Fx 2', 'Move down Fx 3']
raw_data = pickle.load(f)
plt.figure(figsize=(20, 12), dpi=1000)
plt.title('Episode Reward')
plt.tight_layout(pad=3, w_pad=0.5, h_pad=1.0)
plt.subplots_adjust(left=0.1, bottom=0.1, right=0.98, top=0.95, wspace=0.33, hspace=0.25)
# plt.subplots_adjust(left=0.1, bottom=0.12, right=0.98, top=0.94, wspace=0.23, hspace=0.33)
# legend = sorted([key for key in plot_value_functions.keys()])
# print(legend)
# print(value_functions.keys())
for j, key in enumerate(plot_value_functions):
plt.subplot(2, 3, j + 1)
# print(list(raw_data[('GTD(1)', 'Hindsight Error')][key]))
# plt.plot(np.array(raw_data[('GTD(1)', 'Hindsight Error')][key])[400:]*scale[j], linewidth=2.5)
# plt.plot(true_data[300:])
plt.plot(np.array(raw_data[('GTD(1)', 'UDE')][key])[1000:]*scale[j], linewidth=2.5)
# print('true value', np.array(raw_data[('GTD(0)', 'UDE')][key])[300:400])
# plt.plot(np.array(raw_data[('GTD(0)', 'TD Error')][key])[600:], linewidth=2.5, color='r')
# print('old prediction', np.array(raw_data[('GTD(0)', 'TD Error')][key])[300:400])
plt.plot(np.array(raw_data[('GTD(1)', 'Prediction')][key])[1000:]*scale[j], linewidth=2.5)
# plt.plot(np.array(raw_data[('GTD(1)', 'Prediction')][key])[300:] - np.array(raw_data[('GTD(1)', 'Hindsight Error')][key])[300:], linewidth=2.5)
# plt.legend('True value', 'Prediction value')
plt.title(YLABEL[j], fontsize=38)
if j > 2:
plt.xlabel('搜索步数', fontsize=38)
plt.xticks([0, 50, 100, 150, 200], fontsize=38)
plt.yticks(fontsize=38)
plt.savefig('./figure/pdf/chinese_' + name +'.pdf')
# plt.show()
# Plot the true prediction and true value
def plot_different_policy_data(path):
f = open(path, 'rb')
# true_data = compute_true_return('prediction_result_different_gamma.npy')
# f = open('../data/learning_result_policy', 'rb')
plot_value_functions = ['Move down Fx', 'Move down Fy', 'Move down Fz', 'Move down Mx', 'Move down My', 'Move down Mz']
# plot_value_functions = ['Move down step', 'Move down step 2', 'Move down step 3', 'Move down step 4']
# plot_value_functions = ['Move down Fx', 'Move down Fx 1', 'Move down Fx 2', 'Move down Fx 3']
raw_data = pickle.load(f)
plt.figure(figsize=(20, 12), dpi=1000)
plt.title('Episode Reward')
plt.tight_layout(pad=3, w_pad=1.0, h_pad=1.0)
plt.subplots_adjust(left=0.1, bottom=0.15, right=0.98, top=0.9, wspace=0.23, hspace=0.23)
# legend = sorted([key for key in plot_value_functions.keys()])
# print(legend)
# print(value_functions.keys())
for j, key in enumerate(plot_value_functions):
plt.subplot(2, 3, j + 1)
# print(list(raw_data[('GTD(1)', 'Hindsight Error')][key]))
# plt.plot(np.array(raw_data[('GTD(1)', 'Hindsight Error')][key])[400:]*scale[j], linewidth=2.5)
# plt.plot(true_data[300:])
plt.plot(np.array(raw_data[('GTD(1)', 'UDE')][key])[1000:]*scale[j], linewidth=2.5)
# print('true value', np.array(raw_data[('GTD(0)', 'UDE')][key])[300:400])
# plt.plot(np.array(raw_data[('GTD(0)', 'TD Error')][key])[600:], linewidth=2.5, color='r')
# print('old prediction', np.array(raw_data[('GTD(0)', 'TD Error')][key])[300:400])
plt.plot(np.array(raw_data[('GTD(1)', 'Prediction')][key])[1000:]*scale[j], linewidth=2.5)
# plt.plot(np.array(raw_data[('GTD(1)', 'Prediction')][key])[300:] - np.array(raw_data[('GTD(1)', 'Hindsight Error')][key])[300:], linewidth=2.5)
# plt.legend('True value', 'Prediction value')
plt.title(YLABEL[j], fontsize=30)
if j > 2:
plt.xlabel('steps', fontsize=30)
plt.xticks([0, 50, 100, 150, 200], fontsize=25)
plt.yticks(fontsize=25)
plt.savefig('./figure/pdf/chinese_different_policies_b.pdf')
# plt.show()
if __name__ == "__main__":
# force = np.load('./search_force.npy')
# state = np.load('./search_state.npy')
# print(np.max(force, axis=0))
# print(np.min(force, axis=0))
# print(np.max(state, axis=0))
# print(np.min(state, axis=0))
# plot('./search_state.npy')
# plot('./search_force.npy')
# plot_reward('./episode_rewards.npy')
# data = np.load('prediction_result.npy')
# print(data[:, 2])
# plot_continuous_data('prediction_result_different_gamma_six_force.npy')
# f = open('../data/learning_result', 'rb')
# y = pickle.load(f)
# data = y[('GTD(1)', 'Hindsight Error')]['Move down Fz']
# print(data)
# plt.figure(figsize=(15, 15), dpi=100)
# plt.title('Search Result')
#
# plt.plot(data)
# plt.ylabel(YLABEL[0])
# plt.xlabel('steps')
# plt.legend(YLABEL)
# plt.show()
# compute_true_return('prediction_result_different_gamma.npy')
# plot_true_data('learning_result_six_force_gamma_0.9')
# plot_true_data('learning_result_different_gamma')
# plot_different_gamma_data('learning_result_different_policy')
"""=============================== plot different policy ===================================== """
# plot_different_policy_data('learning_result_six_force_gamma_0.9')
# chinese_plot_different_policy_data('learning_result_six_force_gamma_0.9')
# plot_different_policy_data('learning_result_different_policy_new_3')
chinese_plot_different_policy_data('learning_result_different_policy_new_3', 'off_policy_3')
# chinese_plot_different_policy_data('learning_result_different_policy')
# chinese_plot_different_policy_data('learning_result_different_policy')
"""=============================== plot different gamma ======================================== """
# plot_different_gamma_data('learning_result_different_gamma_new')
# chinese_plot_different_gamma_data('learning_result_different_gamma_new')
| 42.785542
| 153
| 0.592926
| 2,699
| 17,756
| 3.762134
| 0.089663
| 0.042052
| 0.035454
| 0.044121
| 0.805889
| 0.759208
| 0.725231
| 0.710557
| 0.676581
| 0.630687
| 0
| 0.06412
| 0.202467
| 17,756
| 415
| 154
| 42.785542
| 0.65292
| 0.367312
| 0
| 0.516949
| 0
| 0
| 0.11079
| 0.020482
| 0
| 0
| 0
| 0
| 0
| 1
| 0.04661
| false
| 0
| 0.025424
| 0
| 0.076271
| 0.021186
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1de174b38b26130877be87229aea9bb86c21ce03
| 52
|
py
|
Python
|
backend/models/__init__.py
|
hajajmaor/e_commerce_website
|
c3cb4b7acb4447231358ee153128dab1ef7096f5
|
[
"MIT"
] | null | null | null |
backend/models/__init__.py
|
hajajmaor/e_commerce_website
|
c3cb4b7acb4447231358ee153128dab1ef7096f5
|
[
"MIT"
] | 7
|
2021-04-06T16:01:12.000Z
|
2021-04-29T07:11:40.000Z
|
backend/models/__init__.py
|
hajajmaor/e_commerce_website
|
c3cb4b7acb4447231358ee153128dab1ef7096f5
|
[
"MIT"
] | null | null | null |
from .cart import receipt_col as receipt_collection
| 26
| 51
| 0.865385
| 8
| 52
| 5.375
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 52
| 1
| 52
| 52
| 0.934783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1de641bdba821c7515279839b852f0ac77f42640
| 55
|
py
|
Python
|
src/torchphysics/utils/data/__init__.py
|
uwe-iben/torchphysics
|
f0a56539cff331d49caaa90bc2fdd0d238b298f8
|
[
"Apache-2.0"
] | 203
|
2021-11-10T10:33:29.000Z
|
2022-03-26T09:05:12.000Z
|
src/torchphysics/utils/data/__init__.py
|
DKreuter/torchphysics
|
775d9aca71752a568f1fca972c958b99107f3b7c
|
[
"Apache-2.0"
] | 3
|
2022-01-07T19:57:00.000Z
|
2022-03-10T08:04:49.000Z
|
src/torchphysics/utils/data/__init__.py
|
DKreuter/torchphysics
|
775d9aca71752a568f1fca972c958b99107f3b7c
|
[
"Apache-2.0"
] | 16
|
2021-09-30T08:35:37.000Z
|
2022-03-16T13:12:22.000Z
|
from .dataloader import PointsDataset, PointsDataLoader
| 55
| 55
| 0.890909
| 5
| 55
| 9.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072727
| 55
| 1
| 55
| 55
| 0.960784
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
383e3af7fe9618bbfe62c21b134b2caa1c790a2d
| 167
|
py
|
Python
|
.kodi/addons/plugin.audio.radioreference/__init__.py
|
C6SUMMER/allinclusive-kodi-pi
|
8baf247c79526849c640c6e56ca57a708a65bd11
|
[
"Apache-2.0"
] | null | null | null |
.kodi/addons/plugin.audio.radioreference/__init__.py
|
C6SUMMER/allinclusive-kodi-pi
|
8baf247c79526849c640c6e56ca57a708a65bd11
|
[
"Apache-2.0"
] | null | null | null |
.kodi/addons/plugin.audio.radioreference/__init__.py
|
C6SUMMER/allinclusive-kodi-pi
|
8baf247c79526849c640c6e56ca57a708a65bd11
|
[
"Apache-2.0"
] | 2
|
2018-04-17T17:34:39.000Z
|
2020-07-26T03:43:33.000Z
|
# -*- coding: utf-8 -*-
#------------------------------------------------------------
# broadcastify
#------------------------------------------------------------
| 33.4
| 62
| 0.131737
| 4
| 167
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006494
| 0.077844
| 167
| 4
| 63
| 41.75
| 0.136364
| 0.922156
| 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
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
384588ab19b7b9445eb8d0e620a6a304d88dad1c
| 62
|
py
|
Python
|
tests/__init__.py
|
johnsca/charm-helpers
|
e1157a1edb7ef2cc478af176086998d68de0b193
|
[
"Apache-2.0"
] | null | null | null |
tests/__init__.py
|
johnsca/charm-helpers
|
e1157a1edb7ef2cc478af176086998d68de0b193
|
[
"Apache-2.0"
] | null | null | null |
tests/__init__.py
|
johnsca/charm-helpers
|
e1157a1edb7ef2cc478af176086998d68de0b193
|
[
"Apache-2.0"
] | null | null | null |
import sys
import mock
sys.modules['yum'] = mock.MagicMock()
| 12.4
| 37
| 0.725806
| 9
| 62
| 5
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 62
| 4
| 38
| 15.5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0.048387
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
69b8ea15180398bc6ee7cd290eed58c81d9257b6
| 27,827
|
py
|
Python
|
services/ui_backend_service/tests/integration_tests/tasks_test.py
|
runsascoded/metaflow-service
|
ac7770dfeae17fd060129d408fa3bb472fc00b86
|
[
"Apache-2.0"
] | 103
|
2019-12-04T04:41:08.000Z
|
2022-03-29T16:20:45.000Z
|
services/ui_backend_service/tests/integration_tests/tasks_test.py
|
runsascoded/metaflow-service
|
ac7770dfeae17fd060129d408fa3bb472fc00b86
|
[
"Apache-2.0"
] | 42
|
2019-12-16T23:15:44.000Z
|
2022-02-18T17:33:32.000Z
|
services/ui_backend_service/tests/integration_tests/tasks_test.py
|
valayDave/metaflow-service
|
65e19aef268e9e707522ee0695fd4ebaee42aa69
|
[
"Apache-2.0"
] | 36
|
2019-12-12T17:46:46.000Z
|
2022-01-21T04:53:24.000Z
|
import pytest
import time
from .utils import (
init_app, init_db, clean_db,
add_flow, add_run, add_step, add_task, add_artifact,
_test_list_resources, _test_single_resource, add_metadata, get_heartbeat_ts
)
pytestmark = [pytest.mark.integration_tests]
# Fixtures begin
@pytest.fixture
def cli(loop, aiohttp_client):
return init_app(loop, aiohttp_client)
@pytest.fixture
async def db(cli):
async_db = await init_db(cli)
yield async_db
await clean_db(async_db)
# Fixtures end
async def test_list_tasks(cli, db):
_flow = (await add_flow(db, flow_id="HelloFlow")).body
_run = (await add_run(db, flow_id=_flow.get("flow_id"))).body
_step = (await add_step(db, flow_id=_run.get("flow_id"), step_name="step", run_number=_run.get("run_number"), run_id=_run.get("run_id"))).body
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/tasks".format(**_step), 200, [])
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks".format(**_step), 200, [])
_task = await create_task(db, step=_step)
_task['duration'] = None
_task['status'] = 'pending'
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/tasks".format(**_task), 200, [_task])
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks".format(**_task), 200, [_task])
async def test_list_tasks_non_numerical(cli, db):
_flow = (await add_flow(db, flow_id="HelloFlow")).body
_run = (await add_run(db, flow_id=_flow.get("flow_id"))).body
_step = (await add_step(db, flow_id=_run.get("flow_id"), step_name="step", run_number=_run.get("run_number"), run_id=_run.get("run_id"))).body
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/tasks".format(**_step), 200, [])
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks".format(**_step), 200, [])
_task = await create_task(db, step=_step, task_name="bar")
_, data = await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/tasks".format(**_task), 200, None)
_, data = await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks".format(**_task), 200, None)
assert len(data) == 1
assert data[0]['task_name'] == 'bar'
assert data[0]['task_id'] != 'bar'
async def test_single_task(cli, db):
await _test_single_resource(cli, db, "/flows/HelloFlow/runs/404/steps/none/tasks/5", 404, {})
_task = await create_task(db)
_task['duration'] = None
_task['status'] = 'pending'
await _test_single_resource(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}".format(**_task), 200, _task)
async def test_single_task_non_numerical(cli, db):
_task = await create_task(db, task_name="bar")
_, data = await _test_single_resource(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/bar".format(**_task), 200, None)
assert data['task_name'] == 'bar'
assert data['task_id'] != 'bar'
async def test_list_old_metadata_task_attempts(cli, db):
# Test tasks with old (missing attempt) metadata
_task = await create_task(db)
_task['duration'] = None
_task['status'] = 'pending'
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
_artifact_first = await create_ok_artifact_for_task(db, _task)
_artifact_second = await create_ok_artifact_for_task(db, _task, attempt=1)
_task['status'] = 'unknown'
_task['task_ok'] = 'location'
_task_first_attempt = dict(_task)
_task_second_attempt = dict(_task)
_task_first_attempt['attempt_id'] = 0
_task_first_attempt['finished_at'] = _artifact_first['ts_epoch']
_task_first_attempt['duration'] = _artifact_first['ts_epoch'] - \
_task_first_attempt['ts_epoch']
_task_second_attempt['attempt_id'] = 1
_task_second_attempt['finished_at'] = _artifact_second['ts_epoch']
_task_second_attempt['duration'] = _artifact_second['ts_epoch'] - \
_task_second_attempt['ts_epoch']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks?task_id={task_id}".format(**_task), 200, [_task_second_attempt, _task_first_attempt])
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task_second_attempt, _task_first_attempt])
async def test_old_metadata_task_with_multiple_attempts(cli, db):
# Test tasks with old (missing attempt) metadata
_task = await create_task(db)
_task['duration'] = None
_task['status'] = 'pending'
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
_artifact_first = await create_ok_artifact_for_task(db, _task)
_artifact_second = await create_ok_artifact_for_task(db, _task, attempt=1)
_task['status'] = 'unknown'
_task['task_ok'] = 'location'
_task['attempt_id'] = 1
_task['finished_at'] = _artifact_second['ts_epoch']
_task['duration'] = _artifact_second['ts_epoch'] - \
_task['ts_epoch']
await _test_single_resource(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}".format(**_task), 200, _task)
async def test_task_with_attempt_metadata(cli, db):
_task = await create_task(db)
_task['duration'] = None
_task['status'] = 'pending'
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
_attempt_first = await create_task_attempt_metadata(db, _task)
_artifact_first = await create_ok_artifact_for_task(db, _task)
_task['started_at'] = _attempt_first['ts_epoch']
_task['finished_at'] = _artifact_first['ts_epoch']
_task['duration'] = _task['finished_at'] - _task['started_at']
_task['status'] = 'unknown'
_task['task_ok'] = 'location'
await _test_single_resource(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}".format(**_task), 200, _task)
_attempt_done_first = await create_task_attempt_done_metadata(db, _task)
_task['status'] = 'unknown'
_task['finished_at'] = _attempt_done_first['ts_epoch']
_task['duration'] = _attempt_done_first['ts_epoch'] - _task['started_at']
await _test_single_resource(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}".format(**_task), 200, _task)
_attempt_ok_first = await create_task_attempt_ok_metadata(db, _task, 0, True) # status 'completed'
_task['status'] = 'completed'
_task['finished_at'] = _attempt_ok_first['ts_epoch']
_task['duration'] = _attempt_ok_first['ts_epoch'] - _task['started_at']
_task['task_ok'] = None # intended behavior, status refinement location field should remain empty when metadata exists.
await _test_single_resource(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}".format(**_task), 200, _task)
async def test_task_failed_status_with_heartbeat(cli, db):
_task = await create_task(db, last_heartbeat_ts=1, status="failed")
_task['finished_at'] = 1000 # should be last heartbeat in this case, due to every other timestamp missing.
_task['duration'] = _task['last_heartbeat_ts'] * 1000 - _task['ts_epoch']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
async def test_task_running_status_with_heartbeat(cli, db):
hb_freeze = get_heartbeat_ts()
_task = await create_task(db, last_heartbeat_ts=hb_freeze)
_task['finished_at'] = None # should not have a finished at for running tasks.
_task['duration'] = hb_freeze * 1000 - _task['ts_epoch']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
async def test_list_task_attempts(cli, db):
_task = await create_task(db)
_task['duration'] = None
_task['status'] = 'pending'
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
_attempt_first = await create_task_attempt_metadata(db, _task)
_artifact_first = await create_ok_artifact_for_task(db, _task)
_attempt_done_first = await create_task_attempt_done_metadata(db, _task)
_attempt_second = await create_task_attempt_metadata(db, _task, attempt=1)
_artifact_second = await create_ok_artifact_for_task(db, _task, attempt=1)
_task_first_attempt = dict(_task)
_task_second_attempt = dict(_task)
_task_first_attempt['attempt_id'] = 0
_task_first_attempt['status'] = 'unknown'
_task_first_attempt['task_ok'] = 'location'
_task_first_attempt['started_at'] = _attempt_first['ts_epoch']
_task_first_attempt['finished_at'] = _attempt_done_first['ts_epoch']
_task_first_attempt['duration'] = _task_first_attempt['finished_at'] \
- _task_first_attempt['started_at']
# Second attempt counts as completed as well due to the _task_ok existing.
_task_second_attempt['attempt_id'] = 1
_task_second_attempt['status'] = 'unknown'
_task_second_attempt['task_ok'] = 'location'
_task_second_attempt['started_at'] = _attempt_second['ts_epoch']
_task_second_attempt['finished_at'] = _artifact_second['ts_epoch']
_task_second_attempt['duration'] = _task_second_attempt['finished_at'] \
- _task_second_attempt['started_at']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks?task_id={task_id}".format(**_task), 200, [_task_second_attempt, _task_first_attempt])
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task_second_attempt, _task_first_attempt])
async def test_task_with_attempt_ok_completed(cli, db):
_task = await create_task(db)
_attempt_first = await create_task_attempt_metadata(db, _task)
_artifact_first = await create_ok_artifact_for_task(db, _task)
_attempt_ok = await create_task_attempt_ok_metadata(db, _task, 0, True) # status = 'completed'
_task['started_at'] = _attempt_first['ts_epoch']
_task['finished_at'] = _attempt_ok['ts_epoch']
_task['duration'] = _attempt_ok['ts_epoch'] - _task['started_at']
_task['status'] = 'completed'
await _test_single_resource(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}".format(**_task), 200, _task)
async def test_task_with_attempt_ok_failed(cli, db):
_task = await create_task(db)
_attempt_first = await create_task_attempt_metadata(db, _task)
_artifact_first = await create_ok_artifact_for_task(db, _task)
_task['started_at'] = _attempt_first['ts_epoch']
_task['finished_at'] = _artifact_first['ts_epoch']
_task['duration'] = _task['finished_at'] - _task['started_at']
_task['status'] = 'failed'
_attempt_ok = await create_task_attempt_ok_metadata(db, _task, 0, False) # status = 'failed'
_task['finished_at'] = _attempt_ok['ts_epoch']
_task['duration'] = _attempt_ok['ts_epoch'] - _task['started_at']
await _test_single_resource(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}".format(**_task), 200, _task)
async def test_list_task_multiple_attempts_failure(cli, db):
_task = await create_task(db)
_attempt_first = await create_task_attempt_metadata(db, _task)
_artifact_first = await create_ok_artifact_for_task(db, _task)
_attempt_done_first = await create_task_attempt_done_metadata(db, _task)
_attempt_second = await create_task_attempt_metadata(db, _task, attempt=1)
_artifact_second = await create_ok_artifact_for_task(db, _task, attempt=1)
# Mark first attempt as 'failure' and second as 'completed'
_attempt_ok_first = await create_task_attempt_ok_metadata(db, _task, 0, False) # status = 'failed'
_attempt_ok_second = await create_task_attempt_ok_metadata(db, _task, 1, True) # status = 'completed'
_task_first_attempt = dict(_task)
_task_second_attempt = dict(_task)
_task_first_attempt['attempt_id'] = 0
_task_first_attempt['status'] = 'failed'
_task_first_attempt['started_at'] = _attempt_first['ts_epoch']
_task_first_attempt['finished_at'] = _attempt_done_first['ts_epoch']
_task_first_attempt['duration'] = _task_first_attempt['finished_at'] \
- _task_first_attempt['started_at']
_task_first_attempt['finished_at'] = _attempt_ok_first['ts_epoch']
_task_first_attempt['duration'] = _attempt_ok_first['ts_epoch'] - _task_first_attempt['started_at']
# Second attempt counts as completed as well due to the _task_ok existing.
_task_second_attempt['attempt_id'] = 1
_task_second_attempt['status'] = 'completed'
_task_second_attempt['started_at'] = _attempt_second['ts_epoch']
_task_second_attempt['finished_at'] = _artifact_second['ts_epoch']
_task_second_attempt['duration'] = _task_second_attempt['finished_at'] \
- _task_second_attempt['started_at']
_task_second_attempt['finished_at'] = _attempt_ok_second['ts_epoch']
_task_second_attempt['duration'] = _attempt_ok_second['ts_epoch'] - _task_second_attempt['started_at']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks?task_id={task_id}".format(**_task), 200, [_task_second_attempt, _task_first_attempt])
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task_second_attempt, _task_first_attempt])
async def test_task_attempts_with_attempt_metadata(cli, db):
_task = await create_task(db)
_task['duration'] = None
_task['status'] = 'pending'
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
_attempt_first = await create_task_attempt_metadata(db, _task)
_artifact_first = await create_ok_artifact_for_task(db, _task)
_attempt_done_first = await create_task_attempt_done_metadata(db, _task)
# attempt metadata is written but no artifacts exist yet.
# Queries should return a second attempt at this point already!
_attempt_second = await create_task_attempt_metadata(db, _task, attempt=1)
_task_first_attempt = dict(_task)
_task_second_attempt = dict(_task)
_task_first_attempt['attempt_id'] = 0
_task_first_attempt['task_ok'] = 'location' # should have location for status artifact
_task_first_attempt['status'] = 'unknown' # 'unknown' because we cannot determine correct status from DB as attempt_ok is missing
_task_first_attempt['started_at'] = _attempt_first['ts_epoch']
_task_first_attempt['finished_at'] = _attempt_done_first['ts_epoch']
_task_first_attempt['duration'] = _task_first_attempt['finished_at'] \
- _task_first_attempt['started_at']
_task_second_attempt['attempt_id'] = 1
_task_second_attempt['status'] = 'running'
_task_second_attempt['started_at'] = _attempt_second['ts_epoch']
_task_second_attempt['duration'] = int(round(time.time() * 1000)) - _task_second_attempt['started_at']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks?task_id={task_id}".format(**_task), 200, [_task_second_attempt, _task_first_attempt], approx_keys=["duration"])
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task_second_attempt, _task_first_attempt], approx_keys=["duration"])
# Write attempt_ok data for first attempt to check for status changes.
_first_attempt_ok = await create_task_attempt_ok_metadata(db, _task, 0, False)
# NOTE: in current implementation, attempt_ok overrides attempt-done as a more accurate timestamp for finished_at.
_task_first_attempt['finished_at'] = _first_attempt_ok['ts_epoch']
_task_first_attempt['duration'] = _task_first_attempt['finished_at'] \
- _task_first_attempt['started_at']
_task_first_attempt['task_ok'] = None # should have no task_ok location, as status can be determined from db.
_task_first_attempt['status'] = 'failed' # 'failed' because now we have attempt_ok false in db.
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks?task_id={task_id}".format(**_task), 200, [_task_second_attempt, _task_first_attempt], approx_keys=["duration"])
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task_second_attempt, _task_first_attempt], approx_keys=["duration"])
async def test_task_attempt_statuses_with_attempt_ok_failed(cli, db):
_task = await create_task(db)
_task['duration'] = None
_task['status'] = 'pending'
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
_attempt_first = await create_task_attempt_metadata(db, _task)
_artifact_first = await create_ok_artifact_for_task(db, _task)
_attempt_done_first = await create_task_attempt_done_metadata(db, _task)
_attempt_ok_first = await create_task_attempt_ok_metadata(db, _task, 0, False) # status = 'failed'
_attempt_second = await create_task_attempt_metadata(db, _task, attempt=1)
_attempt_done_second = await create_task_attempt_done_metadata(db, _task, attempt=1)
_attempt_ok_second = await create_task_attempt_ok_metadata(db, _task, 1, True) # status = 'completed'
_task_first_attempt = dict(_task)
_task_second_attempt = dict(_task)
# NOTE: In the current implementation attempt_ok overrides attempt-done ts_epoch as the finished_at
# as a more accurate timestamp for when a task finished.
_task_first_attempt['attempt_id'] = 0
_task_first_attempt['status'] = 'failed'
_task_first_attempt['started_at'] = _attempt_first['ts_epoch']
_task_first_attempt['finished_at'] = _attempt_ok_first['ts_epoch']
_task_first_attempt['duration'] = _task_first_attempt['finished_at'] \
- _task_first_attempt['started_at']
_task_second_attempt['attempt_id'] = 1
_task_second_attempt['status'] = 'completed'
_task_second_attempt['started_at'] = _attempt_second['ts_epoch']
_task_second_attempt['finished_at'] = _attempt_ok_second['ts_epoch']
_task_second_attempt['duration'] = _task_second_attempt['finished_at'] \
- _task_second_attempt['started_at']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks?task_id={task_id}".format(**_task), 200, [_task_second_attempt, _task_first_attempt])
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task_second_attempt, _task_first_attempt])
# Test cases from the google docs table.
# status 'completed' tests
#
# STATUS: attempt_ok in task metadata for the attempt is set to True
# STARTED_AT: created_at property for attempt attribute for the attempt in task metadata
# FINISHED_AT: created_at property for attempt_ok attribute for the attempt in task metadata
# NOTE: for a more accurate finished_at timestamp, use the greatest timestamp out of task_ok / attempt_ok / attempt-done
# as this is the latest write_timestamp for the task
async def test_task_attempt_status_completed(cli, db):
_task = await create_task(db)
_task['duration'] = None
_task['status'] = 'pending'
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
_attempt = await create_task_attempt_metadata(db, _task, 0)
_attempt_ok = await create_task_attempt_ok_metadata(db, _task, 0, True)
_attempt_done = await create_task_attempt_done_metadata(db, _task, 0)
_task['status'] = 'completed'
_task['started_at'] = _attempt['ts_epoch']
_task['finished_at'] = _attempt_done['ts_epoch']
_task['duration'] = _task['finished_at'] - _task['started_at']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
# status 'running' tests
#
# STATUS 'running':
# Has all of
# Has a start time (NOTE: this requires 'attempt' metadata to be present)
# attempt_ok does not exist in the task metadata
# Has logged a heartbeat in the last x minutes (NOTE: we actually rely on heartbeat for running status.)
# No subsequent attempt exists
# STARTED_AT: created_at property for attempt attribute for the attempt in task metadata
# FINISHED_AT: does not apply (NULL)
async def test_task_attempt_status_running(cli, db):
_task = await create_task(db, last_heartbeat_ts=get_heartbeat_ts()) # default status: 'running'
_task['duration'] = _task['last_heartbeat_ts'] * 1000 - _task['ts_epoch']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
_attempt = await create_task_attempt_metadata(db, _task, 0)
_task['started_at'] = _attempt['ts_epoch']
_task['finished_at'] = None
_task['duration'] = _task['last_heartbeat_ts'] * 1000 - _task['started_at']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
# status 'failed' tests
#
# STATUS:
# Either of
# attempt_ok in task metadata for the attempt is set to False
# No heartbeat has been logged for the task in the last x minutes and no new attempt has started
# A newer attempt exists
# STARTED_AT: created_at property for attempt attribute for the attempt in task metadata
# FINISHED_AT:
# Either of (in priority)
# created_at property for attempt_ok attribute for the attempt in task metadata
# The timestamp in the heartbeat column for the task if no subsequent attempt is detected
# If a subsequent attempt exists, use the start time of the subsequent attempt
async def test_task_attempt_status_failed_with_existing_subsequent_attempt(cli, db):
_task = await create_task(db, last_heartbeat_ts=get_heartbeat_ts())
_task['duration'] = _task['last_heartbeat_ts'] * 1000 - _task['ts_epoch']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_task])
_first_attempt = dict(_task)
_second_attempt = dict(_task)
# we explicitly leave out attempt completion metadata for attempt 0 to test that it fails correctly
# when attempt 1 exists.
# ATTEMPT-0
_first_attempt_meta = await create_task_attempt_metadata(db, _task, 0)
_first_attempt['started_at'] = _first_attempt_meta['ts_epoch']
_first_attempt['duration'] = _first_attempt['last_heartbeat_ts'] * 1000 - _first_attempt['started_at']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_first_attempt])
# ATTEMPT-1
_second_attempt_meta = await create_task_attempt_metadata(db, _task, 1)
_second_attempt['attempt_id'] = 1
_second_attempt['started_at'] = _second_attempt_meta['ts_epoch']
_second_attempt['duration'] = _second_attempt['last_heartbeat_ts'] * 1000 - _second_attempt['started_at']
# first attempt should be failed due to second attempt existing.
# finished_at timestamp should be the started_at of the second attempt due to it existing.
_first_attempt['status'] = 'failed'
_first_attempt['finished_at'] = _second_attempt['started_at']
_first_attempt['duration'] = _first_attempt['finished_at'] - _first_attempt['started_at']
await _test_list_resources(cli, db, "/flows/{flow_id}/runs/{run_number}/steps/{step_name}/tasks/{task_id}/attempts".format(**_task), 200, [_second_attempt, _first_attempt])
# Resource Helpers / factories
async def create_ok_artifact_for_task(db, task, attempt=0):
"Creates and returns a _task_ok artifact for a task"
_task = (await add_artifact(
db,
flow_id=task.get("flow_id"),
run_number=task.get("run_number"),
run_id=task.get("run_id"),
step_name=task.get("step_name"),
task_id=task.get("task_id"),
task_name=task.get("task_name"),
artifact={
"name": "_task_ok",
"location": "location",
"ds_type": "ds_type",
"sha": "sha",
"type": "type",
"content_type": "content_type",
"attempt_id": attempt
})
).body
return _task
async def create_task(db, step=None, status="running", task_id=None, task_name=None, last_heartbeat_ts=None):
"Creates and returns a task with specific status. Optionally creates the task for a specific step if provided."
if not step:
_flow = (await add_flow(db, flow_id="HelloFlow")).body
_run = (await add_run(db, flow_id=_flow.get("flow_id"))).body
step = (await add_step(
db,
flow_id=_run.get("flow_id"),
run_number=_run.get("run_number"),
step_name="step")
).body
_task = (await add_task(
db,
flow_id=step.get("flow_id"),
run_number=step.get("run_number"),
step_name=step.get("step_name"),
task_id=task_id,
task_name=task_name,
last_heartbeat_ts=last_heartbeat_ts)
).body
_task['status'] = status
return _task
async def create_metadata_for_task(db, task, metadata={}, tags=None):
"Creates a metadata record for a task"
_meta = (await add_metadata(db,
flow_id=task.get("flow_id"),
run_number=task.get("run_number"),
run_id=task.get("run_id"),
step_name=task.get("step_name"),
task_id=task.get("task_id"),
task_name=task.get("task_name"),
tags=tags,
metadata=metadata)
).body
return _meta
async def create_task_attempt_metadata(db, task, attempt=0):
"Create 'attempt' metadata for a task"
return await create_metadata_for_task(
db,
task,
metadata={
"type": "attempt",
"field_name": "attempt",
"value": str(attempt)
}
)
async def create_task_attempt_done_metadata(db, task, attempt: int = 0):
"Create 'attempt-done' metadata for a task"
return await create_metadata_for_task(
db,
task,
metadata={
"type": "attempt-done",
"field_name": "attempt-done",
"value": str(attempt)
}
)
async def create_task_attempt_ok_metadata(db, task, attempt_id: int, attempt_ok: bool = False):
"Create 'attempt_ok' metadata for a task"
return await create_metadata_for_task(
db,
task,
tags=["attempt_id:{attempt_id}".format(attempt_id=attempt_id)],
metadata={
"type": "internal_attempt_status",
"field_name": "attempt_ok",
"value": str(attempt_ok)
}
)
| 47.084602
| 212
| 0.71215
| 3,891
| 27,827
| 4.640195
| 0.055513
| 0.052506
| 0.054057
| 0.033343
| 0.821047
| 0.77995
| 0.748934
| 0.723235
| 0.698865
| 0.684132
| 0
| 0.009302
| 0.157832
| 27,827
| 590
| 213
| 47.164407
| 0.761127
| 0.117224
| 0
| 0.619537
| 0
| 0
| 0.249612
| 0.126255
| 0
| 0
| 0
| 0
| 0.012853
| 1
| 0.002571
| false
| 0
| 0.007712
| 0.002571
| 0.028278
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
69c0d64af0daa3c05b8a8e97e012bb20be7a3134
| 147
|
py
|
Python
|
study/python-brasil/exercises/sequential-structure/sequential-structure - 006.py
|
gustavomarquezinho/python
|
e36779aa5c4bfaf88c587f05db5bd447fd41e4a2
|
[
"MIT"
] | null | null | null |
study/python-brasil/exercises/sequential-structure/sequential-structure - 006.py
|
gustavomarquezinho/python
|
e36779aa5c4bfaf88c587f05db5bd447fd41e4a2
|
[
"MIT"
] | null | null | null |
study/python-brasil/exercises/sequential-structure/sequential-structure - 006.py
|
gustavomarquezinho/python
|
e36779aa5c4bfaf88c587f05db5bd447fd41e4a2
|
[
"MIT"
] | null | null | null |
# 006 - Faça um programa que peça o raio de um círculo, calcule e mostre sua área.
print(f'Área: {3.14 * pow(float(input("Raio círculo: ")), 2)}')
| 49
| 82
| 0.673469
| 27
| 147
| 3.666667
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.057377
| 0.170068
| 147
| 3
| 83
| 49
| 0.754098
| 0.544218
| 0
| 0
| 0
| 0
| 0.80303
| 0.318182
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
69d7a315854c9efb1fc746e30bff79237346d088
| 381
|
py
|
Python
|
corehq/apps/fixtures/exceptions.py
|
SEL-Columbia/commcare-hq
|
992ee34a679c37f063f86200e6df5a197d5e3ff6
|
[
"BSD-3-Clause"
] | 1
|
2015-02-10T23:26:39.000Z
|
2015-02-10T23:26:39.000Z
|
corehq/apps/fixtures/exceptions.py
|
SEL-Columbia/commcare-hq
|
992ee34a679c37f063f86200e6df5a197d5e3ff6
|
[
"BSD-3-Clause"
] | null | null | null |
corehq/apps/fixtures/exceptions.py
|
SEL-Columbia/commcare-hq
|
992ee34a679c37f063f86200e6df5a197d5e3ff6
|
[
"BSD-3-Clause"
] | null | null | null |
class FixtureException(Exception):
pass
class FixtureUploadError(FixtureException):
pass
class DuplicateFixtureTagException(FixtureUploadError):
pass
class ExcelMalformatException(FixtureUploadError):
pass
class FixtureAPIException(Exception):
pass
class FixtureTypeCheckError(Exception):
pass
class FixtureVersionError(Exception):
pass
| 12.290323
| 55
| 0.774278
| 28
| 381
| 10.535714
| 0.357143
| 0.183051
| 0.183051
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170604
| 381
| 30
| 56
| 12.7
| 0.933544
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
388c4200cdb6866a189312d1ba76f6d3bb459c3a
| 758
|
py
|
Python
|
pyorient/ogm/commands.py
|
spy7/pyorient
|
ac2547287f9299f4eec350666da3b19797872f20
|
[
"Apache-2.0"
] | 142
|
2015-01-12T06:34:59.000Z
|
2022-01-19T10:34:30.000Z
|
pyorient/ogm/commands.py
|
spy7/pyorient
|
ac2547287f9299f4eec350666da3b19797872f20
|
[
"Apache-2.0"
] | 238
|
2015-01-04T21:05:41.000Z
|
2021-04-12T17:45:53.000Z
|
pyorient/ogm/commands.py
|
spy7/pyorient
|
ac2547287f9299f4eec350666da3b19797872f20
|
[
"Apache-2.0"
] | 107
|
2015-01-03T03:33:17.000Z
|
2021-12-07T16:48:48.000Z
|
from ..utils import to_str
class VertexCommand(object):
def __init__(self, command_text):
self.command_text = command_text
def __str__(self):
return to_str(self.__unicode__())
def __unicode__(self):
return u'{}'.format(self.command_text)
class CreateEdgeCommand(object):
def __init__(self, command_text):
self.command_text = command_text
self.retries = None
def __str__(self):
return to_str(self.__unicode__())
def __unicode__(self):
if self.retries:
return u'{} RETRY {}'.format(self.command_text, self.retries)
else:
return u'{}'.format(self.command_text)
def retry(self, retries):
self.retries = retries
return self
| 25.266667
| 73
| 0.637203
| 90
| 758
| 4.877778
| 0.255556
| 0.225513
| 0.23918
| 0.129841
| 0.583144
| 0.583144
| 0.455581
| 0.455581
| 0.455581
| 0.455581
| 0
| 0
| 0.255937
| 758
| 29
| 74
| 26.137931
| 0.778369
| 0
| 0
| 0.545455
| 0
| 0
| 0.019789
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.318182
| false
| 0
| 0.045455
| 0.136364
| 0.727273
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
38b594515a9bd74963aec29f7d6581b2994b7f2f
| 155
|
py
|
Python
|
controle/admin.py
|
jeremyrodrigues/auto-ambient-music
|
a8f622334f921741e0011ef305ac8e991f361d35
|
[
"MIT"
] | null | null | null |
controle/admin.py
|
jeremyrodrigues/auto-ambient-music
|
a8f622334f921741e0011ef305ac8e991f361d35
|
[
"MIT"
] | null | null | null |
controle/admin.py
|
jeremyrodrigues/auto-ambient-music
|
a8f622334f921741e0011ef305ac8e991f361d35
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from controle.models import Time, Music
# Register your models here.
admin.site.register(Time)
admin.site.register(Music)
| 25.833333
| 39
| 0.812903
| 23
| 155
| 5.478261
| 0.565217
| 0.142857
| 0.269841
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103226
| 155
| 6
| 40
| 25.833333
| 0.906475
| 0.167742
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
38bb581927bfd74653d9371508053b5cbf15396a
| 28
|
py
|
Python
|
textbot/action.py
|
sparwow/textbot
|
cad7ad310da8af9c826e4c52f1a8f27ae90c1462
|
[
"MIT"
] | null | null | null |
textbot/action.py
|
sparwow/textbot
|
cad7ad310da8af9c826e4c52f1a8f27ae90c1462
|
[
"MIT"
] | null | null | null |
textbot/action.py
|
sparwow/textbot
|
cad7ad310da8af9c826e4c52f1a8f27ae90c1462
|
[
"MIT"
] | null | null | null |
class EmailAction:
pass
| 9.333333
| 18
| 0.714286
| 3
| 28
| 6.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 28
| 2
| 19
| 14
| 0.952381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
2a4a2838e188c76f4a2cd11bbdf6a1bfab7e4da2
| 101
|
py
|
Python
|
python/lookout/__init__.py
|
meyskens/lookout-sdk
|
805d0d61ca97120a257283780790ff2458a6ef29
|
[
"Apache-2.0"
] | 5
|
2018-12-17T11:22:31.000Z
|
2019-03-14T02:50:43.000Z
|
python/lookout/__init__.py
|
meyskens/lookout-sdk
|
805d0d61ca97120a257283780790ff2458a6ef29
|
[
"Apache-2.0"
] | 64
|
2018-08-31T10:41:36.000Z
|
2019-12-14T15:01:13.000Z
|
python/lookout/__init__.py
|
meyskens/lookout-sdk
|
805d0d61ca97120a257283780790ff2458a6ef29
|
[
"Apache-2.0"
] | 16
|
2018-08-30T20:33:55.000Z
|
2021-08-09T05:37:06.000Z
|
"""Lookout - Assisted Code Review"""
import pkg_resources
pkg_resources.declare_namespace(__name__)
| 20.2
| 41
| 0.811881
| 12
| 101
| 6.25
| 0.833333
| 0.32
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089109
| 101
| 4
| 42
| 25.25
| 0.815217
| 0.29703
| 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 | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2a522cf24383152e1f43899c4fe827f5c6c726b0
| 6,738
|
py
|
Python
|
mayan/apps/documents/tests/test_links.py
|
bonitobonita24/Mayan-EDMS
|
7845fe0e1e83c81f5d227a16116397a3d3883b85
|
[
"Apache-2.0"
] | 343
|
2015-01-05T14:19:35.000Z
|
2018-12-10T19:07:48.000Z
|
mayan/apps/documents/tests/test_links.py
|
bonitobonita24/Mayan-EDMS
|
7845fe0e1e83c81f5d227a16116397a3d3883b85
|
[
"Apache-2.0"
] | 191
|
2015-01-03T00:48:19.000Z
|
2018-11-30T09:10:25.000Z
|
mayan/apps/documents/tests/test_links.py
|
bonitobonita24/Mayan-EDMS
|
7845fe0e1e83c81f5d227a16116397a3d3883b85
|
[
"Apache-2.0"
] | 114
|
2015-01-08T20:21:05.000Z
|
2018-12-10T19:07:53.000Z
|
from django.urls import reverse
from ..links.document_file_links import (
link_document_file_delete, link_document_file_download_quick
)
from ..links.favorite_links import (
link_document_favorites_add, link_document_favorites_remove
)
from ..links.trashed_document_links import link_document_restore
from ..models import TrashedDocument
from ..permissions import (
permission_document_file_delete, permission_document_file_download,
permission_document_view, permission_trashed_document_restore
)
from .base import GenericDocumentViewTestCase
from .mixins.favorite_document_mixins import FavoriteDocumentTestMixin
class FavoriteDocumentLinkTestCase(
FavoriteDocumentTestMixin, GenericDocumentViewTestCase
):
def test_favorite_document_add_link_no_permission(self):
self._create_test_document_stub()
self.add_test_view(test_object=self.test_document)
context = self.get_test_view()
resolved_link = link_document_favorites_add.resolve(context=context)
self.assertEqual(resolved_link, None)
def test_favorite_document_add_link_with_access(self):
self._create_test_document_stub()
self.grant_access(
obj=self.test_document_stub, permission=permission_document_view
)
self.add_test_view(test_object=self.test_document)
context = self.get_test_view()
resolved_link = link_document_favorites_add.resolve(context=context)
self.assertNotEqual(resolved_link, None)
def test_favorite_document_add_link_external_user_with_access(self):
self._create_test_user()
self._create_test_document_stub()
self.grant_access(
obj=self.test_document_stub, permission=permission_document_view
)
self._test_document_favorite_add(user=self.test_user)
self.add_test_view(test_object=self.test_document)
context = self.get_test_view()
resolved_link = link_document_favorites_add.resolve(context=context)
self.assertNotEqual(resolved_link, None)
def test_favorite_document_remove_link_no_permission(self):
self._create_test_document_stub()
self._test_document_favorite_add()
self.add_test_view(test_object=self.test_document)
context = self.get_test_view()
resolved_link = link_document_favorites_remove.resolve(context=context)
self.assertEqual(resolved_link, None)
def test_favorite_document_remove_link_with_access(self):
self._create_test_document_stub()
self.grant_access(
obj=self.test_document_stub, permission=permission_document_view
)
self._test_document_favorite_add()
self.add_test_view(test_object=self.test_document)
context = self.get_test_view()
resolved_link = link_document_favorites_remove.resolve(context=context)
self.assertNotEqual(resolved_link, None)
def test_favorite_document_remove_link_external_user_with_access(self):
self._create_test_user()
self._create_test_document_stub()
self.grant_access(
obj=self.test_document_stub, permission=permission_document_view
)
self._test_document_favorite_add(user=self.test_user)
self.add_test_view(test_object=self.test_document)
context = self.get_test_view()
resolved_link = link_document_favorites_remove.resolve(context=context)
self.assertEqual(resolved_link, None)
class DocumentsLinksTestCase(GenericDocumentViewTestCase):
def test_document_file_delete_link_no_permission(self):
self._upload_test_document_file()
self.assertTrue(self.test_document.files.count(), 2)
self.add_test_view(test_object=self.test_document.files.first())
context = self.get_test_view()
resolved_link = link_document_file_delete.resolve(context=context)
self.assertEqual(resolved_link, None)
def test_document_file_delete_link_with_permission(self):
self._upload_test_document_file()
self.assertTrue(self.test_document.files.count(), 2)
self.grant_access(
obj=self.test_document,
permission=permission_document_file_delete
)
self.add_test_view(test_object=self.test_document.files.first())
context = self.get_test_view()
resolved_link = link_document_file_delete.resolve(context=context)
self.assertNotEqual(resolved_link, None)
self.assertEqual(
resolved_link.url,
reverse(
viewname=link_document_file_delete.view,
args=(self.test_document.files.first().pk,)
)
)
def test_document_file_download_link_no_permission(self):
self.add_test_view(test_object=self.test_document.file_latest)
context = self.get_test_view()
resolved_link = link_document_file_download_quick.resolve(context=context)
self.assertEqual(resolved_link, None)
def test_document_file_download_link_with_permission(self):
self.grant_access(
obj=self.test_document,
permission=permission_document_file_download
)
self.add_test_view(test_object=self.test_document.file_latest)
context = self.get_test_view()
resolved_link = link_document_file_download_quick.resolve(context=context)
self.assertNotEqual(resolved_link, None)
self.assertEqual(
resolved_link.url,
reverse(
viewname=link_document_file_download_quick.view,
args=(self.test_document.file_latest.pk,)
)
)
class TrashedDocumentsLinksTestCase(GenericDocumentViewTestCase):
def setUp(self):
super().setUp()
self.test_document.delete()
self.test_trashed_document = TrashedDocument.objects.get(
pk=self.test_document.pk
)
self.add_test_view(test_object=self.test_trashed_document)
self.context = self.get_test_view()
def test_trashed_document_restore_link_no_permission(self):
resolved_link = link_document_restore.resolve(context=self.context)
self.assertEqual(resolved_link, None)
def test_trashed_document_restore_link_with_permission(self):
self.grant_access(
obj=self.test_document, permission=permission_trashed_document_restore
)
resolved_link = link_document_restore.resolve(context=self.context)
self.assertNotEqual(resolved_link, None)
self.assertEqual(
resolved_link.url,
reverse(
viewname=link_document_restore.view,
args=(self.test_trashed_document.pk,)
)
)
| 35.650794
| 82
| 0.723212
| 784
| 6,738
| 5.766582
| 0.082908
| 0.103517
| 0.095554
| 0.063703
| 0.797611
| 0.763548
| 0.728379
| 0.728379
| 0.713559
| 0.710905
| 0
| 0.000374
| 0.205402
| 6,738
| 188
| 83
| 35.840426
| 0.844042
| 0
| 0
| 0.569444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118056
| 1
| 0.090278
| false
| 0
| 0.055556
| 0
| 0.166667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
aa51ffea60a8f3722501b0b1a0f4252d675d1628
| 1,481
|
py
|
Python
|
airbyte-integrations/connectors/source-chargebee/unit_tests/conftest.py
|
onaio/airbyte
|
38302e82a25f1b66742c3febfbff0668556920f2
|
[
"MIT"
] | 22
|
2020-08-27T00:47:20.000Z
|
2020-09-17T15:39:39.000Z
|
airbyte-integrations/connectors/source-chargebee/unit_tests/conftest.py
|
onaio/airbyte
|
38302e82a25f1b66742c3febfbff0668556920f2
|
[
"MIT"
] | 116
|
2020-08-27T01:11:27.000Z
|
2020-09-19T02:47:52.000Z
|
airbyte-integrations/connectors/source-chargebee/unit_tests/conftest.py
|
onaio/airbyte
|
38302e82a25f1b66742c3febfbff0668556920f2
|
[
"MIT"
] | 1
|
2020-09-15T06:10:01.000Z
|
2020-09-15T06:10:01.000Z
|
#
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#
import json
import os
from pytest import fixture
def load_file(fn):
return open(os.path.join("unit_tests", "responses", fn)).read()
@fixture
def test_config_v1():
return {"site": "airbyte-test", "site_api_key": "site_api_key", "start_date": "2021-05-22T06:57:44Z", "product_catalog": "1.0"}
@fixture
def test_config_v2():
return {"site": "airbyte-test", "site_api_key": "site_api_key", "start_date": "2021-05-22T06:57:44Z", "product_catalog": "2.0"}
@fixture
def addons_response():
return json.loads(load_file("addons.json"))
@fixture
def plans_response():
return json.loads(load_file("plans.json"))
@fixture
def coupons_response():
return json.loads(load_file("coupons.json"))
@fixture
def customers_response():
return json.loads(load_file("customers.json"))
@fixture
def invoices_response():
return json.loads(load_file("invoices.json"))
@fixture
def orders_response():
return json.loads(load_file("orders.json"))
@fixture
def events_response():
return json.loads(load_file("events.json"))
@fixture
def subscriptions_response():
return json.loads(load_file("subscriptions.json"))
@fixture
def items_response():
return json.loads(load_file("items.json"))
@fixture
def item_prices_response():
return json.loads(load_file("item_prices.json"))
@fixture
def attached_items_response():
return json.loads(load_file("attached_items.json"))
| 18.987179
| 131
| 0.717083
| 207
| 1,481
| 4.917874
| 0.285024
| 0.137525
| 0.194499
| 0.248527
| 0.501965
| 0.501965
| 0.227898
| 0.157171
| 0.157171
| 0.157171
| 0
| 0.029435
| 0.128292
| 1,481
| 77
| 132
| 19.233766
| 0.759101
| 0.036462
| 0
| 0.295455
| 0
| 0
| 0.238932
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.318182
| false
| 0
| 0.068182
| 0.318182
| 0.704545
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
aa60b0079dcb6f5a27a15460a7a773255408abdc
| 91
|
py
|
Python
|
fsdviz/stocking/forms/__init__.py
|
AdamCottrill/fsdivz
|
98dd1f35a08dba26424e2951a40715e01399478c
|
[
"MIT"
] | null | null | null |
fsdviz/stocking/forms/__init__.py
|
AdamCottrill/fsdivz
|
98dd1f35a08dba26424e2951a40715e01399478c
|
[
"MIT"
] | 6
|
2020-02-12T00:03:40.000Z
|
2020-11-30T01:20:56.000Z
|
fsdviz/stocking/forms/__init__.py
|
AdamCottrill/fsdviz
|
98dd1f35a08dba26424e2951a40715e01399478c
|
[
"MIT"
] | null | null | null |
from .FindEventsForm import *
from .StockingEventForm import *
from .XlsEventForm import *
| 22.75
| 32
| 0.802198
| 9
| 91
| 8.111111
| 0.555556
| 0.273973
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131868
| 91
| 3
| 33
| 30.333333
| 0.924051
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
aabebbb877a1c20f697d7ae81aa297513ca02e1b
| 55
|
py
|
Python
|
dcstats/__init__.py
|
aplested/DC_Pyps
|
da33fc7d0e7365044e368488d1c7cbbae7473cc7
|
[
"MIT"
] | 1
|
2021-03-25T18:09:25.000Z
|
2021-03-25T18:09:25.000Z
|
dcstats/__init__.py
|
aplested/DC_Pyps
|
da33fc7d0e7365044e368488d1c7cbbae7473cc7
|
[
"MIT"
] | null | null | null |
dcstats/__init__.py
|
aplested/DC_Pyps
|
da33fc7d0e7365044e368488d1c7cbbae7473cc7
|
[
"MIT"
] | null | null | null |
from dcstats import *
from _version import __version__
| 18.333333
| 32
| 0.836364
| 7
| 55
| 5.857143
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145455
| 55
| 2
| 33
| 27.5
| 0.87234
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2a9a4d87b28f9436adbf59fa348294bf68f453a8
| 155
|
py
|
Python
|
revuo/forms/__init__.py
|
Lasanha/revuo
|
3fb2a06515194416aff3b9a9efac321f1af3209a
|
[
"BSD-3-Clause"
] | 1
|
2020-03-24T23:33:57.000Z
|
2020-03-24T23:33:57.000Z
|
revuo/forms/__init__.py
|
Lasanha/revuo
|
3fb2a06515194416aff3b9a9efac321f1af3209a
|
[
"BSD-3-Clause"
] | 26
|
2015-01-20T13:31:57.000Z
|
2020-06-05T17:26:18.000Z
|
revuo/forms/__init__.py
|
Lasanha/revuo
|
3fb2a06515194416aff3b9a9efac321f1af3209a
|
[
"BSD-3-Clause"
] | null | null | null |
from .blog_item import FormBlogItem
from .edit_profile import FormEditProfile
from .news_item import FormNewsItem
from .publication import FormPublication
| 31
| 41
| 0.870968
| 19
| 155
| 6.947368
| 0.631579
| 0.151515
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103226
| 155
| 4
| 42
| 38.75
| 0.94964
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2d5d4b0e8ee8b61a38dc6be3798b8feb193f02e1
| 61
|
py
|
Python
|
mp2ragelib/ui.py
|
ofgulban/mp2ragelib
|
3df294f02ae4aadd0c9f91e8a101305f3f5f15fe
|
[
"BSD-3-Clause"
] | 1
|
2020-09-04T19:36:58.000Z
|
2020-09-04T19:36:58.000Z
|
mp2ragelib/ui.py
|
ofgulban/mp2ragelib
|
3df294f02ae4aadd0c9f91e8a101305f3f5f15fe
|
[
"BSD-3-Clause"
] | null | null | null |
mp2ragelib/ui.py
|
ofgulban/mp2ragelib
|
3df294f02ae4aadd0c9f91e8a101305f3f5f15fe
|
[
"BSD-3-Clause"
] | null | null | null |
"""Commandline interface."""
# TODO: After scripting works.
| 15.25
| 30
| 0.704918
| 6
| 61
| 7.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131148
| 61
| 3
| 31
| 20.333333
| 0.811321
| 0.852459
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0.333333
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2dcefc70c84d3f4061e0e716788bdf5dca8ba63f
| 74
|
py
|
Python
|
lib/datatools/build/__init__.py
|
JokerWDL/PyAnomaly
|
cf93437e5d7ae87fa916141cf4b5cc2e929b8199
|
[
"Apache-2.0"
] | 1
|
2020-11-22T17:55:10.000Z
|
2020-11-22T17:55:10.000Z
|
lib/datatools/build/__init__.py
|
JokerWDL/PyAnomaly
|
cf93437e5d7ae87fa916141cf4b5cc2e929b8199
|
[
"Apache-2.0"
] | null | null | null |
lib/datatools/build/__init__.py
|
JokerWDL/PyAnomaly
|
cf93437e5d7ae87fa916141cf4b5cc2e929b8199
|
[
"Apache-2.0"
] | null | null | null |
from .. import dataclass # trigger the register in the dataclass package
| 37
| 73
| 0.783784
| 10
| 74
| 5.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.175676
| 74
| 1
| 74
| 74
| 0.95082
| 0.608108
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
93095d98ffed279b01860ac139ac53ed5312a8e1
| 206
|
py
|
Python
|
aiosnow/models/__init__.py
|
michaeldcanady/aiosnow
|
db515b1560d651fc7696a184990c2a2d68db8961
|
[
"MIT"
] | 38
|
2020-08-03T17:58:48.000Z
|
2022-03-30T19:39:24.000Z
|
aiosnow/models/__init__.py
|
michaeldcanady/aiosnow
|
db515b1560d651fc7696a184990c2a2d68db8961
|
[
"MIT"
] | 34
|
2020-01-20T10:11:46.000Z
|
2020-06-05T21:25:23.000Z
|
aiosnow/models/__init__.py
|
michaeldcanady/aiosnow
|
db515b1560d651fc7696a184990c2a2d68db8961
|
[
"MIT"
] | 5
|
2021-03-26T19:35:20.000Z
|
2022-01-23T20:09:55.000Z
|
from ._base import BaseModel, BaseModelMeta, BaseTableModel
from ._schema import BaseField, ModelSchema, ModelSchemaMeta, Pluck, fields
from .attachment import AttachmentModel
from .table import TableModel
| 41.2
| 75
| 0.84466
| 22
| 206
| 7.818182
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106796
| 206
| 4
| 76
| 51.5
| 0.934783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
933b4da8586a2940f3a4d00ebc21c1950b2eb3db
| 241
|
py
|
Python
|
website/music/views.py
|
mrsmartpants/DjangoTutorial-Beginners
|
11e64f4f982a576f814db5ed466f8b31bba5ae5c
|
[
"MIT"
] | null | null | null |
website/music/views.py
|
mrsmartpants/DjangoTutorial-Beginners
|
11e64f4f982a576f814db5ed466f8b31bba5ae5c
|
[
"MIT"
] | null | null | null |
website/music/views.py
|
mrsmartpants/DjangoTutorial-Beginners
|
11e64f4f982a576f814db5ed466f8b31bba5ae5c
|
[
"MIT"
] | null | null | null |
from django.shortcuts import render
# Python functions - user is going to request an url
# Create your views here.
from django.http import HttpResponse
def index(request):
return HttpResponse("<h1> This is the music app homepage</h1>")
| 30.125
| 67
| 0.763485
| 36
| 241
| 5.111111
| 0.805556
| 0.108696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009901
| 0.161826
| 241
| 8
| 67
| 30.125
| 0.90099
| 0.307054
| 0
| 0
| 0
| 0
| 0.242424
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.5
| 0.25
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
93717d5c39265a03944d975e47f65b92a746680b
| 84
|
py
|
Python
|
src/vpnchooser/__init__.py
|
cbrand/vpnchooser
|
0982baeb14eff1e0b7ef5dbc8f11b3a7213f341c
|
[
"MIT"
] | null | null | null |
src/vpnchooser/__init__.py
|
cbrand/vpnchooser
|
0982baeb14eff1e0b7ef5dbc8f11b3a7213f341c
|
[
"MIT"
] | null | null | null |
src/vpnchooser/__init__.py
|
cbrand/vpnchooser
|
0982baeb14eff1e0b7ef5dbc8f11b3a7213f341c
|
[
"MIT"
] | 1
|
2016-05-31T16:14:37.000Z
|
2016-05-31T16:14:37.000Z
|
# -*- encoding: utf-8 -*-
from .applicaton import app, api
from . import resources
| 16.8
| 32
| 0.678571
| 11
| 84
| 5.181818
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014493
| 0.178571
| 84
| 4
| 33
| 21
| 0.811594
| 0.27381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9373d6bbb7c1cbcacd636bf497c2f411b745ae3a
| 188
|
py
|
Python
|
8kyu/Beginner Series #2 Clock.py
|
walkgo/codewars_tasks
|
4c0ab6f0e1d2181318fc15b12dd55ef565ecd223
|
[
"MIT"
] | null | null | null |
8kyu/Beginner Series #2 Clock.py
|
walkgo/codewars_tasks
|
4c0ab6f0e1d2181318fc15b12dd55ef565ecd223
|
[
"MIT"
] | null | null | null |
8kyu/Beginner Series #2 Clock.py
|
walkgo/codewars_tasks
|
4c0ab6f0e1d2181318fc15b12dd55ef565ecd223
|
[
"MIT"
] | null | null | null |
def past(h, m, s):
h_ms = h * 3600000
m_ms = m * 60000
s_ms = s * 1000
return h_ms + m_ms + s_ms
# Best Practices
def past(h, m, s):
return (3600*h + 60*m + s) * 1000
| 18.8
| 37
| 0.537234
| 38
| 188
| 2.5
| 0.368421
| 0.063158
| 0.168421
| 0.189474
| 0.210526
| 0
| 0
| 0
| 0
| 0
| 0
| 0.204724
| 0.324468
| 188
| 10
| 37
| 18.8
| 0.543307
| 0.074468
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0.142857
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
9376fd70f43fc6254d25d8d9de6182ad6d1f30d5
| 32
|
py
|
Python
|
tests/test_placeholder.py
|
symonk/stashie-cli
|
f18eec8a8e4bcb0b947a934e25b9a9f8066335fc
|
[
"Apache-2.0"
] | null | null | null |
tests/test_placeholder.py
|
symonk/stashie-cli
|
f18eec8a8e4bcb0b947a934e25b9a9f8066335fc
|
[
"Apache-2.0"
] | null | null | null |
tests/test_placeholder.py
|
symonk/stashie-cli
|
f18eec8a8e4bcb0b947a934e25b9a9f8066335fc
|
[
"Apache-2.0"
] | null | null | null |
def test_placeholder():
...
| 10.666667
| 23
| 0.59375
| 3
| 32
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.21875
| 32
| 2
| 24
| 16
| 0.72
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
fa8ea4a787dbe3d2892d7a449c5a14c4d96bc740
| 105
|
py
|
Python
|
mak/libs/pyxx/cxx/grammar/expression/primary/requires/__init__.py
|
motor-dev/Motor
|
98cb099fe1c2d31e455ed868cc2a25eae51e79f0
|
[
"BSD-3-Clause"
] | 4
|
2015-05-13T16:28:36.000Z
|
2017-05-24T15:34:14.000Z
|
mak/libs/pyxx/cxx/grammar/expression/primary/requires/__init__.py
|
motor-dev/Motor
|
98cb099fe1c2d31e455ed868cc2a25eae51e79f0
|
[
"BSD-3-Clause"
] | null | null | null |
mak/libs/pyxx/cxx/grammar/expression/primary/requires/__init__.py
|
motor-dev/Motor
|
98cb099fe1c2d31e455ed868cc2a25eae51e79f0
|
[
"BSD-3-Clause"
] | 1
|
2017-03-21T08:28:07.000Z
|
2017-03-21T08:28:07.000Z
|
from . import general
from . import simple
from . import type
from . import compound
from . import nested
| 21
| 22
| 0.771429
| 15
| 105
| 5.4
| 0.466667
| 0.617284
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180952
| 105
| 5
| 23
| 21
| 0.94186
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
fa954cccfdb16470bfc0b5d84f0c0d0b0bc56f46
| 70
|
py
|
Python
|
task_list_dev/__main__.py
|
HenriqueLR/task-list-dev
|
a623543bbf882458bca476f7a94156cd30d544ab
|
[
"MIT"
] | null | null | null |
task_list_dev/__main__.py
|
HenriqueLR/task-list-dev
|
a623543bbf882458bca476f7a94156cd30d544ab
|
[
"MIT"
] | 5
|
2017-11-25T17:05:47.000Z
|
2017-11-28T16:06:16.000Z
|
task_list_dev/__main__.py
|
HenriqueLR/task-list-dev
|
a623543bbf882458bca476f7a94156cd30d544ab
|
[
"MIT"
] | null | null | null |
# coding: utf-8
print(__import__('task_list_dev').tools.get_list())
| 14
| 51
| 0.728571
| 11
| 70
| 4
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015625
| 0.085714
| 70
| 4
| 52
| 17.5
| 0.671875
| 0.185714
| 0
| 0
| 0
| 0
| 0.236364
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 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
| 1
| 0
| 0
| 1
|
0
| 5
|
fab1c59f92d41695f6c520dc6fa5d7c7dc7fd893
| 533
|
py
|
Python
|
documentstore_migracao/main/__init__.py
|
jamilatta/document-store-migracao
|
dc0473fb3ccf8c6c5f8d599b353f8c9caf104f55
|
[
"BSD-2-Clause"
] | null | null | null |
documentstore_migracao/main/__init__.py
|
jamilatta/document-store-migracao
|
dc0473fb3ccf8c6c5f8d599b353f8c9caf104f55
|
[
"BSD-2-Clause"
] | null | null | null |
documentstore_migracao/main/__init__.py
|
jamilatta/document-store-migracao
|
dc0473fb3ccf8c6c5f8d599b353f8c9caf104f55
|
[
"BSD-2-Clause"
] | null | null | null |
""" module to methods to main """
import sys
from .migrate_isis import migrate_isis_parser
from .migrate_articlemeta import migrate_articlemeta_parser
from .tools import tools_parser
def main_migrate_articlemeta():
""" method main to script setup.py """
sys.exit(migrate_articlemeta_parser(sys.argv[1:]))
def main_migrate_isis():
sys.exit(migrate_isis_parser(sys.argv[1:]))
def tools():
sys.exit(tools_parser(sys.argv[1:]))
if __name__ == "__main__":
sys.exit(migrate_articlemeta_parser(sys.argv[1:]))
| 21.32
| 59
| 0.739212
| 76
| 533
| 4.842105
| 0.289474
| 0.244565
| 0.141304
| 0.152174
| 0.266304
| 0.211957
| 0.211957
| 0.211957
| 0
| 0
| 0
| 0.008696
| 0.136961
| 533
| 24
| 60
| 22.208333
| 0.791304
| 0.106942
| 0
| 0.166667
| 0
| 0
| 0.017354
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.333333
| 0
| 0.583333
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
fae347d92c6318856795474c7e5ee0e6b5c0295e
| 31
|
py
|
Python
|
src/DeepReinforcementLearning/__init__.py
|
Quantum56/AlphaZero-AI
|
504522feb4e67211d5fb592f4b14a2cb8271d015
|
[
"MIT"
] | 1
|
2019-11-12T01:55:36.000Z
|
2019-11-12T01:55:36.000Z
|
src/DeepReinforcementLearning/__init__.py
|
Quantum56/AlphaZero-AI
|
504522feb4e67211d5fb592f4b14a2cb8271d015
|
[
"MIT"
] | 14
|
2019-11-12T00:09:26.000Z
|
2022-02-10T00:46:30.000Z
|
src/DeepReinforcementLearning/__init__.py
|
Quantum56/AlphaZero-AI
|
504522feb4e67211d5fb592f4b14a2cb8271d015
|
[
"MIT"
] | null | null | null |
# from AlphaZero-AI import game
| 31
| 31
| 0.806452
| 5
| 31
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 31
| 1
| 31
| 31
| 0.925926
| 0.935484
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
87dab20f9aff7e74782e7e82bc9833799c25002f
| 9,867
|
py
|
Python
|
django-ng/django_ng_project/django_ng_app/views.py
|
bounouhmahmoud/ensi
|
209e57340359af3ea063c064982198848dc36c5f
|
[
"MIT"
] | 1
|
2018-07-10T06:59:05.000Z
|
2018-07-10T06:59:05.000Z
|
django-ng/django_ng_project/django_ng_app/views.py
|
Arsalen/BusinessStrategies
|
209e57340359af3ea063c064982198848dc36c5f
|
[
"MIT"
] | null | null | null |
django-ng/django_ng_project/django_ng_app/views.py
|
Arsalen/BusinessStrategies
|
209e57340359af3ea063c064982198848dc36c5f
|
[
"MIT"
] | null | null | null |
# coding=utf-8
from django.shortcuts import render
from rest_framework import viewsets, generics, status
from .serializers import ClientSerializer, MessageSerializer, SearchSerializer, ManageSearchSerializer, PreferenceSerializer
from .models import Client, Message, Search, ManageSearch, Preference
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework.views import APIView
from django.http import Http404
import simplejson
from django.contrib.auth.models import User
from rest_framework.permissions import IsAuthenticated
class ClientList(APIView):
permission_classes = (IsAuthenticated,)
def get(self, request, format=None):
clients = Client.objects.all()
serializer = ClientSerializer(clients, many=True)
return Response(serializer.data)
def post(self, request, format=None):
serializer = ClientSerializer(data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
class ClientDetail(APIView):
permission_classes = (IsAuthenticated,)
def get_object(self, pk):
try:
return Client.objects.get(pk=pk)
except Client.DoesNotExist:
raise Http404
def get(self, request, pk, format=None):
snippet = self.get_object(pk)
serializer = ClientSerializer(snippet)
return Response(serializer.data)
def put(self, request, pk, format=None):
snippet = self.get_object(request.data['id'])
if ( int(pk) == request.data['id'] ):
if (snippet.password == request.data['oldpassword']):
serializer = ClientSerializer(snippet, data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data)
else:
serializer = ClientSerializer(snippet, data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
def delete(self, request, pk, format=None):
snippet = self.get_object(pk)
snippet.delete()
return Response(status=status.HTTP_204_NO_CONTENT)
class ClientAuth(APIView):
#permission_classes = (IsAuthenticated,)
def get_object(self, request):
try:
return Client.objects.get(email=request['email'],password=request['password'],admn=request['admin'])
except Client.DoesNotExist:
raise Http404
def post(self, request, format=None):
snippet = self.get_object(request.data)
serializer = ClientSerializer(snippet)
if(serializer.data['held'] == False):
return Response(serializer.data)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
################################################################################################################################
class MessageList(APIView):
permission_classes = (IsAuthenticated,)
def get(self, request, format=None):
messages = Message.objects.all()
serializer = MessageSerializer(messages, many=True)
return Response(serializer.data)
def post(self, request, format=None):
serializer = MessageSerializer(data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
class MessageDetail(APIView):
permission_classes = (IsAuthenticated,)
def get_object(self, pk):
try:
return Message.objects.get(pk=pk)
except Message.DoesNotExist:
raise Http404
def get(self, request, pk, format=None):
snippet = self.get_object(pk)
serializer = MessageSerializer(snippet)
return Response(serializer.data)
def put(self, request, pk, format=None):
snippet = self.get_object(pk)
serializer = MessageSerializer(snippet, data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
def delete(self, request, pk, format=None):
snippet = self.get_object(pk)
snippet.delete()
return Response(status=status.HTTP_204_NO_CONTENT)
################################################################################################################################
class SearchList(APIView):
permission_classes = (IsAuthenticated,)
def get(self, request, format=None):
searchs = Search.objects.all()
serializer = SearchSerializer(searchs, many=True)
return Response(serializer.data)
def post(self, request, format=None):
#print(simplejson.loads(request.body)['period'])
#from rest_framework import status
serializer = SearchSerializer(data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
class SearchDetail(APIView):
permission_classes = (IsAuthenticated,)
def get_object(self, pk):
try:
return Search.objects.get(pk=pk)
except Search.DoesNotExist:
raise Http404
def get(self, request, pk, format=None):
snippet = self.get_object(pk)
serializer = SearchSerializer(snippet)
return Response(serializer.data)
def put(self, request, pk, format=None):
snippet = self.get_object(pk)
serializer = SearchSerializer(snippet, data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
def delete(self, request, pk, format=None):
snippet = self.get_object(pk)
snippet.delete()
return Response(status=status.HTTP_204_NO_CONTENT)
################################################################################################################################
class ManageSearchList(APIView):
permission_classes = (IsAuthenticated,)
def get(self, request, format=None):
managesearchs = ManageSearch.objects.all()
serializer = ManageSearchSerializer(managesearchs, many=True)
return Response(serializer.data)
def post(self, request, format=None):
serializer = ManageSearchSerializer(data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
class ManageSearchDetail(APIView):
permission_classes = (IsAuthenticated,)
def get_object(self, pk):
try:
return ManageSearch.objects.get(pk=pk)
except ManageSearch.DoesNotExist:
raise Http404
def get(self, request, pk, format=None):
snippet = self.get_object(pk)
serializer = ManageSearchSerializer(snippet)
return Response(serializer.data)
def put(self, request, pk, format=None):
snippet = self.get_object(pk)
serializer = ManageSearchSerializer(snippet, data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
def delete(self, request, pk, format=None):
snippet = self.get_object(pk)
snippet.delete()
return Response(status=status.HTTP_204_NO_CONTENT)
################################################################################################################################
class PreferenceList(APIView):
permission_classes = (IsAuthenticated,)
def get(self, request, format=None):
preferences = Preference.objects.all()
serializer = PreferenceSerializer(preferences, many=True)
return Response(serializer.data)
def post(self, request, format=None):
serializer = PreferenceSerializer(data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
class PreferenceDetail(APIView):
permission_classes = (IsAuthenticated,)
def get_object(self, pk):
try:
return Preference.objects.get(pk=pk)
except Preference.DoesNotExist:
raise Http404
def get(self, request, pk, format=None):
snippet = self.get_object(pk)
serializer = PreferenceSerializer(snippet)
return Response(serializer.data)
def put(self, request, pk, format=None):
snippet = self.get_object(pk)
serializer = PreferenceSerializer(snippet, data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
def delete(self, request, pk, format=None):
snippet = self.get_object(pk)
snippet.delete()
return Response(status=status.HTTP_204_NO_CONTENT)
################################################################################################################################
| 35.365591
| 144
| 0.629371
| 991
| 9,867
| 6.156408
| 0.107972
| 0.087199
| 0.129815
| 0.100967
| 0.769218
| 0.74873
| 0.737912
| 0.737912
| 0.720374
| 0.720374
| 0
| 0.011018
| 0.218101
| 9,867
| 278
| 145
| 35.492806
| 0.77978
| 0.013277
| 0
| 0.69
| 0
| 0
| 0.00407
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.16
| false
| 0.01
| 0.055
| 0
| 0.54
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.