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
8f151ad5f9bcac8dbf9bb6dea20866cb11801fc5
23
py
Python
pynbase/odbc/api.py
miont/nitrosbase_api
00f752f214775c5f34454cbfa2841eb91ddbf8c7
[ "MIT" ]
null
null
null
pynbase/odbc/api.py
miont/nitrosbase_api
00f752f214775c5f34454cbfa2841eb91ddbf8c7
[ "MIT" ]
null
null
null
pynbase/odbc/api.py
miont/nitrosbase_api
00f752f214775c5f34454cbfa2841eb91ddbf8c7
[ "MIT" ]
null
null
null
class OdbcApi(): pass
11.5
16
0.695652
3
23
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.173913
23
2
17
11.5
0.842105
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
8f42fc2e243dbdce6b20ee0da5bc2b6cdfd51de8
185
py
Python
speech_analyser/run.py
SergioML9/emotion_recogniser
f519a1075d713c8cea0bfce9c746765e6ae0a232
[ "Apache-2.0" ]
null
null
null
speech_analyser/run.py
SergioML9/emotion_recogniser
f519a1075d713c8cea0bfce9c746765e6ae0a232
[ "Apache-2.0" ]
null
null
null
speech_analyser/run.py
SergioML9/emotion_recogniser
f519a1075d713c8cea0bfce9c746765e6ae0a232
[ "Apache-2.0" ]
null
null
null
import audio_detection.audio_receiver as audio_receiver print("Emotion recognition from speech started, say something !") # Initialize Audio audio_receiver.initializeAudioRecording()
26.428571
65
0.843243
21
185
7.238095
0.714286
0.256579
0
0
0
0
0
0
0
0
0
0
0.097297
185
6
66
30.833333
0.91018
0.086486
0
0
0
0
0.335329
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.333333
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
8f488c7b121ddd1f18686697c41259fd282143f1
744
py
Python
pcapkit/protocols/application/__init__.py
chellvs/PyPCAPKit
f8d66f9955904196b71a6143e49ff4ec4c4922dc
[ "BSD-3-Clause" ]
131
2018-10-12T09:45:44.000Z
2022-03-31T18:58:14.000Z
pcapkit/protocols/application/__init__.py
chellvs/PyPCAPKit
f8d66f9955904196b71a6143e49ff4ec4c4922dc
[ "BSD-3-Clause" ]
39
2018-08-18T12:15:04.000Z
2022-03-07T20:28:08.000Z
pcapkit/protocols/application/__init__.py
chellvs/PyPCAPKit
f8d66f9955904196b71a6143e49ff4ec4c4922dc
[ "BSD-3-Clause" ]
23
2018-10-12T09:45:52.000Z
2022-03-05T15:23:00.000Z
# -*- coding: utf-8 -*- """application layer protocols `pcapkit.protocols.application` is collection of all protocols in application layer, with detailed implementation and methods. """ # TODO: Implements BGP, DHCP, DNS, IMAP, IDAP, MQTT, NNTP, NTP, # ONC:RPC, POP, RIP, RTP, SIP, SMTP, SNMP, SSH, SSL, TELNET, TLS, XMPP. # Base Class for Internet Layer from pcapkit.protocols.application.application import Application # Utility Classes for Protocols from pcapkit.protocols.application.ftp import FTP from pcapkit.protocols.application.httpv1 import HTTPv1 from pcapkit.protocols.application.httpv2 import HTTPv2 # Deprecated / Base Classes from pcapkit.protocols.application.http import HTTP __all__ = ['FTP', 'HTTPv1', 'HTTPv2']
31
77
0.764785
96
744
5.885417
0.552083
0.169912
0.286726
0.274336
0
0
0
0
0
0
0
0.01087
0.134409
744
23
78
32.347826
0.86646
0.540323
0
0
0
0
0.045593
0
0
0
0
0.043478
0
1
0
false
0
0.833333
0
0.833333
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
1
0
1
0
0
5
8f7fb5d88a61de7aca8b29b03d171c9ef6c81323
422
py
Python
ArubaCloud/SharedStorage/Requests/__init__.py
luigidacunto/pyArubaCloud
0aa4a558739fdfd9ad93e33b5290fb0ad219e9a2
[ "Apache-2.0" ]
39
2016-01-27T17:42:33.000Z
2021-09-28T08:03:32.000Z
ArubaCloud/SharedStorage/Requests/__init__.py
luigidacunto/pyArubaCloud
0aa4a558739fdfd9ad93e33b5290fb0ad219e9a2
[ "Apache-2.0" ]
33
2016-01-13T15:52:18.000Z
2021-04-05T17:00:21.000Z
ArubaCloud/SharedStorage/Requests/__init__.py
luigidacunto/pyArubaCloud
0aa4a558739fdfd9ad93e33b5290fb0ad219e9a2
[ "Apache-2.0" ]
31
2015-11-05T14:12:59.000Z
2022-03-24T08:27:15.000Z
from GetSharedStorages import GetSharedStorages from SetEnqueuePurchaseSharedStorage import SetEnqueuePurchaseSharedStorage from SetEnqueueRemoveIQNSharedStorage import SetEnqueueRemoveIQNSharedStorage from SetEnqueueRemoveSharedStorage import SetEnqueueRemoveSharedStorage __all__ = ['GetSharedStorages', 'SetEnqueueRemoveSharedStorage', 'SetEnqueueRemoveIQNSharedStorage', 'SetEnqueuePurchaseSharedStorage']
52.75
100
0.886256
21
422
17.619048
0.333333
0
0
0
0
0
0
0
0
0
0
0
0.080569
422
7
101
60.285714
0.953608
0
0
0
0
0
0.258294
0.218009
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
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
0
0
1
0
1
0
0
5
56e7d14959a04c5efe05373492f3d24ad4e2eb1d
48
py
Python
dev/Tools/Python/2.7.13/mac/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyxb/bundles/wssplat/mimebind.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
123
2015-01-12T06:43:22.000Z
2022-03-20T18:06:46.000Z
dev/Tools/Python/2.7.13/mac/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyxb/bundles/wssplat/mimebind.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
103
2015-01-08T18:35:57.000Z
2022-01-18T01:44:14.000Z
dev/Tools/Python/2.7.13/mac/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyxb/bundles/wssplat/mimebind.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
54
2015-02-15T17:12:00.000Z
2022-03-07T23:02:32.000Z
from pyxb.bundles.wssplat.raw.mimebind import *
24
47
0.8125
7
48
5.571429
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
48
1
48
48
0.886364
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
853c76855e587f920b1dac348b6a0d53b23da49a
141
py
Python
nabu/neuralnetworks/__init__.py
AzizCode92/nabu
768988ce4c6fc470f843174d6d7d5807880feb10
[ "MIT" ]
117
2017-02-10T13:23:23.000Z
2022-02-20T05:31:04.000Z
nabu/neuralnetworks/__init__.py
AzizCode92/nabu
768988ce4c6fc470f843174d6d7d5807880feb10
[ "MIT" ]
56
2017-04-26T08:51:38.000Z
2021-08-23T11:59:19.000Z
nabu/neuralnetworks/__init__.py
AzizCode92/nabu
768988ce4c6fc470f843174d6d7d5807880feb10
[ "MIT" ]
50
2017-02-06T21:57:40.000Z
2021-05-14T23:03:07.000Z
'''@package neuralnetworks The neural network functionality ''' from . import models, trainers, decoders, evaluators, components, recognizer
28.2
76
0.794326
14
141
8
1
0
0
0
0
0
0
0
0
0
0
0
0.113475
141
4
77
35.25
0.896
0.397163
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
856610e9c5a48324a4d6b5ae451bcb70b6e25a70
43
py
Python
python/testData/inspections/unusedImport/subpackageInInitPy/package1/module_b.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2018-12-29T09:53:39.000Z
2018-12-29T09:53:42.000Z
python/testData/inspections/unusedImport/subpackageInInitPy/package1/module_b.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/inspections/unusedImport/subpackageInInitPy/package1/module_b.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
__all__ = ["ClassB"] def ClassB(): pass
14.333333
20
0.604651
5
43
4.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.209302
43
3
21
14.333333
0.647059
0
0
0
0
0
0.136364
0
0
0
0
0
0
1
0.333333
false
0.333333
0
0
0.333333
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
85742dca7df036045a353470a5c618d12268e384
249
py
Python
utils/get.py
seen-idc/image-gen
025257cde07579a634aaefca1e17482f3c02ad45
[ "MIT" ]
null
null
null
utils/get.py
seen-idc/image-gen
025257cde07579a634aaefca1e17482f3c02ad45
[ "MIT" ]
null
null
null
utils/get.py
seen-idc/image-gen
025257cde07579a634aaefca1e17482f3c02ad45
[ "MIT" ]
null
null
null
from io import BytesIO from PIL import Image from requests import get def get_raw(url, **kwargs): return get(url, stream=True, **kwargs).content def get_image(url, **kwargs): raw = get_raw(url, **kwargs) return Image.open(BytesIO(raw))
24.9
50
0.710843
39
249
4.461538
0.435897
0.155172
0.103448
0.172414
0.241379
0
0
0
0
0
0
0
0.164659
249
10
51
24.9
0.836538
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.375
0.125
0.875
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
5
857f513a9f382f0f4d8fba80dfa553599bea69f5
95
py
Python
utils/gta3sc/__init__.py
AndroidModLoader/gta3sc
07504a7334eb67cfac14e1f788331d1ba2b9343a
[ "MIT" ]
54
2016-06-22T22:26:58.000Z
2022-02-23T09:25:59.000Z
utils/gta3sc/__init__.py
GTAResources/gta3sc
a4f3f16574c4e0461ff3c14f8a2839cf3040d952
[ "MIT" ]
112
2016-06-21T22:52:17.000Z
2022-02-08T14:15:13.000Z
utils/gta3sc/__init__.py
thelink2012/gta3sc
07504a7334eb67cfac14e1f788331d1ba2b9343a
[ "MIT" ]
9
2016-06-24T22:27:55.000Z
2021-01-11T16:37:36.000Z
# -*- Python -*- from config import read_commandline, read_config from bytecode import read_ir2
31.666667
48
0.789474
13
95
5.538462
0.615385
0.277778
0
0
0
0
0
0
0
0
0
0.012048
0.126316
95
3
49
31.666667
0.855422
0.147368
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
8596bf0e29bf0a1b01fa503f3567e01e5372c727
142
py
Python
lib/datasets/__init__.py
cdluminate/advorder
30b8f6605d173842069a85b7c41bb1cf2eec47f8
[ "Apache-2.0" ]
7
2021-04-13T10:14:16.000Z
2022-03-18T16:58:16.000Z
lib/datasets/__init__.py
cdluminate/advorder
30b8f6605d173842069a85b7c41bb1cf2eec47f8
[ "Apache-2.0" ]
null
null
null
lib/datasets/__init__.py
cdluminate/advorder
30b8f6605d173842069a85b7c41bb1cf2eec47f8
[ "Apache-2.0" ]
null
null
null
''' Copyright (C) 2020-2021 Mo Zhou <cdluminate@gmail.com> Released under the Apache-2.0 License. ''' from . import fashion from . import sop
20.285714
54
0.725352
22
142
4.681818
0.909091
0.194175
0
0
0
0
0
0
0
0
0
0.082645
0.147887
142
6
55
23.666667
0.768595
0.65493
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
85988289ec571ed49c9eccfdda7ed8077faf3165
38,923
py
Python
program/source.py
TheUndercoverCEO/UK-US-english-converter
4b207e8b42894682885b12d8fd1adb4b410392c6
[ "MIT" ]
1
2021-04-02T23:39:10.000Z
2021-04-02T23:39:10.000Z
program/source.py
TheUndercoverCEO/UK-US-english-converter
4b207e8b42894682885b12d8fd1adb4b410392c6
[ "MIT" ]
null
null
null
program/source.py
TheUndercoverCEO/UK-US-english-converter
4b207e8b42894682885b12d8fd1adb4b410392c6
[ "MIT" ]
null
null
null
UK = "curb accessorise accessorised accessorises accessorising acclimatisation acclimatise acclimatised acclimatises acclimatising accoutrements aeon aeons aerogramme aerogrammes aeroplane aeroplanes aesthete aesthetes aesthetic aesthetically aesthetics aetiology ageing aggrandisement agonise agonised agonises agonising agonisingly almanack almanacks aluminium amortisable amortisation amortisations amortise amortised amortises amortising amphitheatre amphitheatres anaemia anaemic anaesthesia anaesthetic anaesthetics anaesthetise anaesthetised anaesthetises anaesthetising anaesthetist anaesthetists anaesthetize anaesthetized anaesthetizes anaesthetizing analogue analogues analyse analysed analyses analysing anglicise anglicised anglicises anglicising annualised antagonise antagonised antagonises antagonising apologise apologised apologises apologising appal appals appetiser appetisers appetising appetisingly arbour arbours archaeological archaeologically archaeologist archaeologists archaeology ardour armour armoured armourer armourers armouries armoury artefact artefacts authorise authorised authorises authorising axe backpedalled backpedalling bannister bannisters baptise baptised baptises baptising bastardise bastardised bastardises bastardising battleaxe baulk baulked baulking baulks bedevilled bedevilling behaviour behavioural behaviourism behaviourist behaviourists behaviours behove behoved behoves bejewelled belabour belaboured belabouring belabours bevelled bevvies bevvy biassed biassing bingeing bougainvillaea bougainvillaeas bowdlerise bowdlerised bowdlerises bowdlerising breathalyse breathalysed breathalyser breathalysers breathalyses breathalysing brutalise brutalised brutalises brutalising buses busing caesarean caesareans calibre calibres calliper callipers callisthenics canalise canalised canalises canalising cancellation cancellations cancelled cancelling candour cannibalise cannibalised cannibalises cannibalising canonise canonised canonises canonising capitalise capitalised capitalises capitalising caramelise caramelised caramelises caramelising carbonise carbonised carbonises carbonising carolled carolling catalogue catalogued catalogues cataloguing catalyse catalysed catalyses catalysing categorise categorised categorises categorising cauterise cauterised cauterises cauterising cavilled cavilling centigramme centigrammes centilitre centilitres centimetre centimetres centralise centralised centralises centralising centre centred centrefold centrefolds centrepiece centrepieces centres channelled channelling characterise characterised characterises characterising cheque chequebook chequebooks chequered cheques chilli chimaera chimaeras chiselled chiselling circularise circularised circularises circularising civilise civilised civilises civilising clamour clamoured clamouring clamours clangour clarinettist clarinettists collectivise collectivised collectivises collectivising colonisation colonise colonised coloniser colonisers colonises colonising colour colourant colourants coloured coloureds colourful colourfully colouring colourize colourized colourizes colourizing colourless colours commercialise commercialised commercialises commercialising compartmentalise compartmentalised compartmentalises compartmentalising computerise computerised computerises computerising conceptualise conceptualised conceptualises conceptualising connexion connexions contextualise contextualised contextualises contextualising cosier cosies cosiest cosily cosiness cosy councillor councillors counselled counselling counsellor counsellors crenellated criminalise criminalised criminalises criminalising criticise criticised criticises criticising crueller cruellest crystallisation crystallise crystallised crystallises crystallising cudgelled cudgelling customise customised customises customising cypher cyphers decentralisation decentralise decentralised decentralises decentralising decriminalisation decriminalise decriminalised decriminalises decriminalising defence defenceless defences dehumanisation dehumanise dehumanised dehumanises dehumanising demeanour demilitarisation demilitarise demilitarised demilitarises demilitarising demobilisation demobilise demobilised demobilises demobilising democratisation democratise democratised democratises democratising demonise demonised demonises demonising demoralisation demoralise demoralised demoralises demoralising denationalisation denationalise denationalised denationalises denationalising deodorise deodorised deodorises deodorising depersonalise depersonalised depersonalises depersonalising deputise deputised deputises deputising desensitisation desensitise desensitised desensitises desensitising destabilisation destabilise destabilised destabilises destabilising dialled dialling dialogue dialogues diarrhoea digitise digitised digitises digitising disc discolour discoloured discolouring discolours discs disembowelled disembowelling disfavour dishevelled dishonour dishonourable dishonourably dishonoured dishonouring dishonours disorganisation disorganised distil distils dramatisation dramatisations dramatise dramatised dramatises dramatising draught draughtboard draughtboards draughtier draughtiest draughts draughtsman draughtsmanship draughtsmen draughtswoman draughtswomen draughty drivelled drivelling duelled duelling economise economised economises economising edoema editorialise editorialised editorialises editorialising empathise empathised empathises empathising emphasise emphasised emphasises emphasising enamelled enamelling enamoured encyclopaedia encyclopaedias encyclopaedic endeavour endeavoured endeavouring endeavours energise energised energises energising enrol enrols enthral enthrals epaulette epaulettes epicentre epicentres epilogue epilogues epitomise epitomised epitomises epitomising equalisation equalise equalised equaliser equalisers equalises equalising eulogise eulogised eulogises eulogising evangelise evangelised evangelises evangelising exorcise exorcised exorcises exorcising extemporisation extemporise extemporised extemporises extemporising externalisation externalisations externalise externalised externalises externalising factorise factorised factorises factorising faecal faeces familiarisation familiarise familiarised familiarises familiarising fantasise fantasised fantasises fantasising favour favourable favourably favoured favouring favourite favourites favouritism favours feminise feminised feminises feminising fertilisation fertilise fertilised fertiliser fertilisers fertilises fertilising fervour fibre fibreglass fibres fictionalisation fictionalisations fictionalise fictionalised fictionalises fictionalising fillet filleted filleting fillets finalisation finalise finalised finalises finalising flautist flautists flavour flavoured flavouring flavourings flavourless flavours flavoursome flyer flier foetal foetid foetus foetuses formalisation formalise formalised formalises formalising fossilisation fossilise fossilised fossilises fossilising fraternisation fraternise fraternised fraternises fraternising fulfil fulfilment fulfils funnelled funnelling galvanise galvanised galvanises galvanising gambolled gambolling gaol gaolbird gaolbirds gaolbreak gaolbreaks gaoled gaoler gaolers gaoling gaols gases gauge gauged gauges gauging generalisation generalisations generalise generalised generalises generalising ghettoise ghettoised ghettoises ghettoising gipsies glamorise glamorised glamorises glamorising glamour globalisation globalise globalised globalises globalising glueing goitre goitres gonorrhoea gramme grammes gravelled grey greyed greying greyish greyness greys grovelled grovelling groyne groynes gruelling gruellingly gryphon gryphons gynaecological gynaecologist gynaecologists gynaecology haematological haematologist haematologists haematology haemoglobin haemophilia haemophiliac haemophiliacs haemorrhage haemorrhaged haemorrhages haemorrhaging haemorrhoids harbour harboured harbouring harbours harmonisation harmonise harmonised harmonises harmonising homoeopath homoeopathic homoeopaths homoeopathy homogenise homogenised homogenises homogenising honour honourable honourably honoured honouring honours hospitalisation hospitalise hospitalised hospitalises hospitalising humanise humanised humanises humanising humour humoured humouring humourless humours hybridise hybridised hybridises hybridising hypnotise hypnotised hypnotises hypnotising hypothesise hypothesised hypothesises hypothesising idealisation idealise idealised idealises idealising idolise idolised idolises idolising immobilisation immobilise immobilised immobiliser immobilisers immobilises immobilising immortalise immortalised immortalises immortalising immunisation immunise immunised immunises immunising impanelled impanelling imperilled imperilling individualise individualised individualises individualising industrialise industrialised industrialises industrialising inflexion inflexions initialise initialised initialises initialising initialled initialling instal instalment instalments instals instil instils institutionalisation institutionalise institutionalised institutionalises institutionalising intellectualise intellectualised intellectualises intellectualising internalisation internalise internalised internalises internalising internationalisation internationalise internationalised internationalises internationalising ionisation ionise ionised ioniser ionisers ionises ionising italicise italicised italicises italicising itemise itemised itemises itemising jeopardise jeopardised jeopardises jeopardising jewelled jeweller jewellers jewellery judgement kilogramme kilogrammes kilometre kilometres labelled labelling labour laboured labourer labourers labouring labours lacklustre legalisation legalise legalised legalises legalising legitimise legitimised legitimises legitimising leukaemia levelled leveller levellers levelling libelled libelling libellous liberalisation liberalise liberalised liberalises liberalising licence licenced licences licencing likeable lionisation lionise lionised lionises lionising liquidise liquidised liquidiser liquidisers liquidises liquidising litre litres localise localised localises localising louvre louvred louvres lustre magnetise magnetised magnetises magnetising manoeuvrability manoeuvrable manoeuvre manoeuvred manoeuvres manoeuvring manoeuvrings marginalisation marginalise marginalised marginalises marginalising marshalled marshalling marvelled marvelling marvellous marvellously materialisation materialise materialised materialises materialising maximisation maximise maximised maximises maximising meagre mechanisation mechanise mechanised mechanises mechanising mediaeval memorialise memorialised memorialises memorialising memorise memorised memorises memorising mesmerise mesmerised mesmerises mesmerising metabolise metabolised metabolises metabolising metre metres micrometre micrometres militarise militarised militarises militarising milligramme milligrammes millilitre millilitres millimetre millimetres miniaturisation miniaturise miniaturised miniaturises miniaturising minibuses minimise minimised minimises minimising misbehaviour misdemeanour misdemeanours misspelt mitre mitres mobilisation mobilise mobilised mobilises mobilising modelled modeller modellers modelling modernise modernised modernises modernising moisturise moisturised moisturiser moisturisers moisturises moisturising monologue monologues monopolisation monopolise monopolised monopolises monopolising moralise moralised moralises moralising motorised mould moulded moulder mouldered mouldering moulders mouldier mouldiest moulding mouldings moulds mouldy moult moulted moulting moults moustache moustached moustaches moustachioed multicoloured nationalisation nationalisations nationalise nationalised nationalises nationalising naturalisation naturalise naturalised naturalises naturalising neighbour neighbourhood neighbourhoods neighbouring neighbourliness neighbourly neighbours neutralisation neutralise neutralised neutralises neutralising normalisation normalise normalised normalises normalising odour odourless odours oesophagus oesophaguses oestrogen offence offences omelette omelettes optimise optimised optimises optimising organisation organisational organisations organise organised organiser organisers organises organising orthopaedic orthopaedics ostracise ostracised ostracises ostracising outmanoeuvre outmanoeuvred outmanoeuvres outmanoeuvring overemphasise overemphasised overemphasises overemphasising oxidisation oxidise oxidised oxidises oxidising paederast paederasts paediatric paediatrician paediatricians paediatrics paedophile paedophiles paedophilia palaeolithic palaeontologist palaeontologists palaeontology panelled panelling panellist panellists paralyse paralysed paralyses paralysing parcelled parcelling parlour parlours particularise particularised particularises particularising passivisation passivise passivised passivises passivising pasteurisation pasteurise pasteurised pasteurises pasteurising patronise patronised patronises patronising patronisingly pedalled pedalling pedestrianisation pedestrianise pedestrianised pedestrianises pedestrianising penalise penalised penalises penalising pencilled pencilling personalise personalised personalises personalising pharmacopoeia pharmacopoeias philosophise philosophised philosophises philosophising philtre philtres phoney plagiarise plagiarised plagiarises plagiarising plough ploughed ploughing ploughman ploughmen ploughs ploughshare ploughshares polarisation polarise polarised polarises polarising politicisation politicise politicised politicises politicising popularisation popularise popularised popularises popularising pouffe pouffes practise practised practises practising praesidium praesidiums pressurisation pressurise pressurised pressurises pressurising pretence pretences primaeval prioritisation prioritise prioritised prioritises prioritising privatisation privatisations privatise privatised privatises privatising professionalisation professionalise professionalised professionalises professionalising programme programmes prologue prologues propagandise propagandised propagandises propagandising proselytise proselytised proselytiser proselytisers proselytises proselytising psychoanalyse psychoanalysed psychoanalyses psychoanalysing publicise publicised publicises publicising pulverisation pulverise pulverised pulverises pulverising pummelled pummelling pyjama pyjamas pzazz quarrelled quarrelling radicalise radicalised radicalises radicalising rancour randomise randomised randomises randomising rationalisation rationalisations rationalise rationalised rationalises rationalising ravelled ravelling realisable realisation realisations realise realised realises realising recognisable recognisably recognisance recognise recognised recognises recognising reconnoitre reconnoitred reconnoitres reconnoitring refuelled refuelling regularisation regularise regularised regularises regularising remodelled remodelling remould remoulded remoulding remoulds reorganisation reorganisations reorganise reorganised reorganises reorganising revelled reveller revellers revelling revitalise revitalised revitalises revitalising revolutionise revolutionised revolutionises revolutionising rhapsodise rhapsodised rhapsodises rhapsodising rigour rigours ritualised rivalled rivalling romanticise romanticised romanticises romanticising rumour rumoured rumours sabre sabres saltpetre sanitise sanitised sanitises sanitising satirise satirised satirises satirising saviour saviours savour savoured savouries savouring savours savoury scandalise scandalised scandalises scandalising sceptic sceptical sceptically scepticism sceptics sceptre sceptres scrutinise scrutinised scrutinises scrutinising secularisation secularise secularised secularises secularising sensationalise sensationalised sensationalises sensationalising sensitise sensitised sensitises sensitising sentimentalise sentimentalised sentimentalises sentimentalising sepulchre sepulchres serialisation serialisations serialise serialised serialises serialising sermonise sermonised sermonises sermonising sheikh shovelled shovelling shrivelled shrivelling signalise signalised signalises signalising signalled signalling smoulder smouldered smouldering smoulders snivelled snivelling snorkelled snorkelling snowplough snowploughs socialisation socialise socialised socialises socialising sodomise sodomised sodomises sodomising solemnise solemnised solemnises solemnising sombre specialisation specialisations specialise specialised specialises specialising spectre spectres spiralled spiralling splendour splendours squirrelled squirrelling stabilisation stabilise stabilised stabiliser stabilisers stabilises stabilising standardisation standardise standardised standardises standardising stencilled stencilling sterilisation sterilisations sterilise sterilised steriliser sterilisers sterilises sterilising stigmatisation stigmatise stigmatised stigmatises stigmatising storey storeys subsidisation subsidise subsidised subsidiser subsidisers subsidises subsidising succour succoured succouring succours sulphate sulphates sulphide sulphides sulphur sulphurous summarise summarised summarises summarising swivelled swivelling symbolise symbolised symbolises symbolising sympathise sympathised sympathiser sympathisers sympathises sympathising synchronisation synchronise synchronised synchronises synchronising synthesise synthesised synthesiser synthesisers synthesises synthesising syphon syphoned syphoning syphons systematisation systematise systematised systematises systematising tantalise tantalised tantalises tantalising tantalisingly tasselled technicolour temporise temporised temporises temporising tenderise tenderised tenderises tenderising terrorise terrorised terrorises terrorising theatre theatregoer theatregoers theatres theorise theorised theorises theorising tonne tonnes towelled towelling toxaemia tranquillise tranquillised tranquilliser tranquillisers tranquillises tranquillising tranquillity tranquillize tranquillized tranquillizer tranquillizers tranquillizes tranquillizing tranquilly transistorised traumatise traumatised traumatises traumatising travelled traveller travellers travelling travelogue travelogues trialled trialling tricolour tricolours trivialise trivialised trivialises trivialising tumour tumours tunnelled tunnelling tyrannise tyrannised tyrannises tyrannising tyre tyres unauthorised uncivilised underutilised unequalled unfavourable unfavourably unionisation unionise unionised unionises unionising unorganised unravelled unravelling unrecognisable unrecognised unrivalled unsavoury untrammelled urbanisation urbanise urbanised urbanises urbanising utilisable utilisation utilise utilised utilises utilising valour vandalise vandalised vandalises vandalising vaporisation vaporise vaporised vaporises vaporising vapour vapours verbalise verbalised verbalises verbalising victimisation victimise victimised victimises victimising videodisc videodiscs vigour visualisation visualisations visualise visualised visualises visualising vocalisation vocalisations vocalise vocalised vocalises vocalising vulcanised vulgarisation vulgarise vulgarised vulgarises vulgarising waggon waggons watercolour watercolours weaselled weaselling westernisation westernise westernised westernises westernising womanise womanised womaniser womanisers womanises womanising woollen woollens woollies woolly worshipped worshipping worshipper yodelled yodelling yoghourt yoghourts yoghurt yoghurts".lower().split() US = "kerb accessorize accessorized accessorizes accessorizing acclimatization acclimatize acclimatized acclimatizes acclimatizing accouterments eon eons aerogram aerograms airplane airplanes esthete esthetes esthetic esthetically esthetics etiology aging aggrandizement agonize agonized agonizes agonizing agonizingly almanac almanacs aluminum amortizable amortization amortizations amortize amortized amortizes amortizing amphitheater amphitheaters anemia anemic anesthesia anesthetic anesthetics anesthetize anesthetized anesthetizes anesthetizing anesthetist anesthetists anesthetize anesthetized anesthetizes anesthetizing analog analogs analyze analyzed analyzes analyzing anglicize anglicized anglicizes anglicizing annualized antagonize antagonized antagonizes antagonizing apologize apologized apologizes apologizing appall appalls appetizer appetizers appetizing appetizingly arbor arbors archeological archeologically archeologist archeologists archeology ardor armor armored armorer armorers armories armory artifact artifacts authorize authorized authorizes authorizing ax backpedaled backpedaling banister banisters baptize baptized baptizes baptizing bastardize bastardized bastardizes bastardizing battleax balk balked balking balks bedeviled bedeviling behavior behavioral behaviorism behaviorist behaviorists behaviors behoove behooved behooves bejeweled belabor belabored belaboring belabors beveled bevies bevy biased biasing binging bougainvillea bougainvilleas bowdlerize bowdlerized bowdlerizes bowdlerizing breathalyze breathalyzed breathalyzer breathalyzers breathalyzes breathalyzing brutalize brutalized brutalizes brutalizing busses bussing cesarean cesareans caliber calibers caliper calipers calisthenics canalize canalized canalizes canalizing cancelation cancelations canceled canceling candor cannibalize cannibalized cannibalizes cannibalizing canonize canonized canonizes canonizing capitalize capitalized capitalizes capitalizing caramelize caramelized caramelizes caramelizing carbonize carbonized carbonizes carbonizing caroled caroling catalog cataloged catalogs cataloging catalyze catalyzed catalyzes catalyzing categorize categorized categorizes categorizing cauterize cauterized cauterizes cauterizing caviled caviling centigram centigrams centiliter centiliters centimeter centimeters centralize centralized centralizes centralizing center centered centerfold centerfolds centerpiece centerpieces centers channeled channeling characterize characterized characterizes characterizing check checkbook checkbooks checkered checks chili chimera chimeras chiseled chiseling circularize circularized circularizes circularizing civilize civilized civilizes civilizing clamor clamored clamoring clamors clangor clarinetist clarinetists collectivize collectivized collectivizes collectivizing colonization colonize colonized colonizer colonizers colonizes colonizing color colorant colorants colored coloreds colorful colorfully coloring colorize colorized colorizes colorizing colorless colors commercialize commercialized commercializes commercializing compartmentalize compartmentalized compartmentalizes compartmentalizing computerize computerized computerizes computerizing conceptualize conceptualized conceptualizes conceptualizing connection connections contextualize contextualized contextualizes contextualizing cozier cozies coziest cozily coziness cozy councilor councilors counseled counseling counselor counselors crenelated criminalize criminalized criminalizes criminalizing criticize criticized criticizes criticizing crueler cruelest crystallization crystallize crystallized crystallizes crystallizing cudgeled cudgeling customize customized customizes customizing cipher ciphers decentralization decentralize decentralized decentralizes decentralizing decriminalization decriminalize decriminalized decriminalizes decriminalizing defense defenseless defenses dehumanization dehumanize dehumanized dehumanizes dehumanizing demeanor demilitarization demilitarize demilitarized demilitarizes demilitarizing demobilization demobilize demobilized demobilizes demobilizing democratization democratize democratized democratizes democratizing demonize demonized demonizes demonizing demoralization demoralize demoralized demoralizes demoralizing denationalization denationalize denationalized denationalizes denationalizing deodorize deodorized deodorizes deodorizing depersonalize depersonalized depersonalizes depersonalizing deputize deputized deputizes deputizing desensitization desensitize desensitized desensitizes desensitizing destabilization destabilize destabilized destabilizes destabilizing dialed dialing dialog dialogs diarrhea digitize digitized digitizes digitizing disk discolor discolored discoloring discolors disks disemboweled disemboweling disfavor disheveled dishonor dishonorable dishonorably dishonored dishonoring dishonors disorganization disorganized distill distills dramatization dramatizations dramatize dramatized dramatizes dramatizing draft draftboard draftboards draftier draftiest drafts draftsman draftsmanship draftsmen draftswoman draftswomen drafty driveled driveling dueled dueling economize economized economizes economizing edema editorialize editorialized editorializes editorializing empathize empathized empathizes empathizing emphasize emphasized emphasizes emphasizing enameled enameling enamored encyclopedia encyclopedias encyclopedic endeavor endeavored endeavoring endeavors energize energized energizes energizing enroll enrolls enthrall enthralls epaulet epaulets epicenter epicenters epilog epilogs epitomize epitomized epitomizes epitomizing equalization equalize equalized equalizer equalizers equalizes equalizing eulogize eulogized eulogizes eulogizing evangelize evangelized evangelizes evangelizing exorcize exorcized exorcizes exorcizing extemporization extemporize extemporized extemporizes extemporizing externalization externalizations externalize externalized externalizes externalizing factorize factorized factorizes factorizing fecal feces familiarization familiarize familiarized familiarizes familiarizing fantasize fantasized fantasizes fantasizing favor favorable favorably favored favoring favorite favorites favoritism favors feminize feminized feminizes feminizing fertilization fertilize fertilized fertilizer fertilizers fertilizes fertilizing fervor fiber fiberglass fibers fictionalization fictionalizations fictionalize fictionalized fictionalizes fictionalizing filet fileted fileting filets finalization finalize finalized finalizes finalizing flutist flutists flavor flavored flavoring flavorings flavorless flavors flavorsome flier flyer fetal fetid fetus fetuses formalization formalize formalized formalizes formalizing fossilization fossilize fossilized fossilizes fossilizing fraternization fraternize fraternized fraternizes fraternizing fulfill fulfillment fulfills funneled funneling galvanize galvanized galvanizes galvanizing gamboled gamboling jail jailbird jailbirds jailbreak jailbreaks jailed jailer jailers jailing jails gasses gage gaged gages gaging generalization generalizations generalize generalized generalizes generalizing ghettoize ghettoized ghettoizes ghettoizing gypsies glamorize glamorized glamorizes glamorizing glamor globalization globalize globalized globalizes globalizing gluing goiter goiters gonorrhea gram grams graveled gray grayed graying grayish grayness grays groveled groveling groin groins grueling gruelingly griffin griffins gynecological gynecologist gynecologists gynecology hematological hematologist hematologists hematology hemoglobin hemophilia hemophiliac hemophiliacs hemorrhage hemorrhaged hemorrhages hemorrhaging hemorrhoids harbor harbored harboring harbors harmonization harmonize harmonized harmonizes harmonizing homeopath homeopathic homeopaths homeopathy homogenize homogenized homogenizes homogenizing honor honorable honorably honored honoring honors hospitalization hospitalize hospitalized hospitalizes hospitalizing humanize humanized humanizes humanizing humor humored humoring humorless humors hybridize hybridized hybridizes hybridizing hypnotize hypnotized hypnotizes hypnotizing hypothesize hypothesized hypothesizes hypothesizing idealization idealize idealized idealizes idealizing idolize idolized idolizes idolizing immobilization immobilize immobilized immobilizer immobilizers immobilizes immobilizing immortalize immortalized immortalizes immortalizing immunization immunize immunized immunizes immunizing impaneled impaneling imperiled imperiling individualize individualized individualizes individualizing industrialize industrialized industrializes industrializing inflection inflections initialize initialized initializes initializing initialed initialing install installment installments installs instill instills institutionalization institutionalize institutionalized institutionalizes institutionalizing intellectualize intellectualized intellectualizes intellectualizing internalization internalize internalized internalizes internalizing internationalization internationalize internationalized internationalizes internationalizing ionization ionize ionized ionizer ionizers ionizes ionizing italicize italicized italicizes italicizing itemize itemized itemizes itemizing jeopardize jeopardized jeopardizes jeopardizing jeweled jeweler jewelers jewelry judgment kilogram kilograms kilometer kilometers labeled labeling labor labored laborer laborers laboring labors lackluster legalization legalize legalized legalizes legalizing legitimize legitimized legitimizes legitimizing leukemia leveled leveler levelers leveling libeled libeling libelous liberalization liberalize liberalized liberalizes liberalizing license licensed licenses licensing likable lionization lionize lionized lionizes lionizing liquidize liquidized liquidizer liquidizers liquidizes liquidizing liter liters localize localized localizes localizing louver louvered louvers luster magnetize magnetized magnetizes magnetizing maneuverability maneuverable maneuver maneuvered maneuvers maneuvering maneuverings marginalization marginalize marginalized marginalizes marginalizing marshaled marshaling marveled marveling marvelous marvelously materialization materialize materialized materializes materializing maximization maximize maximized maximizes maximizing meager mechanization mechanize mechanized mechanizes mechanizing medieval memorialize memorialized memorializes memorializing memorize memorized memorizes memorizing mesmerize mesmerized mesmerizes mesmerizing metabolize metabolized metabolizes metabolizing meter meters micrometer micrometers militarize militarized militarizes militarizing milligram milligrams milliliter milliliters millimeter millimeters miniaturization miniaturize miniaturized miniaturizes miniaturizing minibusses minimize minimized minimizes minimizing misbehavior misdemeanor misdemeanors misspelled miter miters mobilization mobilize mobilized mobilizes mobilizing modeled modeler modelers modeling modernize modernized modernizes modernizing moisturize moisturized moisturizer moisturizers moisturizes moisturizing monolog monologs monopolization monopolize monopolized monopolizes monopolizing moralize moralized moralizes moralizing motorized mold molded molder moldered moldering molders moldier moldiest molding moldings molds moldy molt molted molting molts mustache mustached mustaches mustachioed multicolored nationalization nationalizations nationalize nationalized nationalizes nationalizing naturalization naturalize naturalized naturalizes naturalizing neighbor neighborhood neighborhoods neighboring neighborliness neighborly neighbors neutralization neutralize neutralized neutralizes neutralizing normalization normalize normalized normalizes normalizing odor odorless odors esophagus esophaguses estrogen offense offenses omelet omelets optimize optimized optimizes optimizing organization organizational organizations organize organized organizer organizers organizes organizing orthopedic orthopedics ostracize ostracized ostracizes ostracizing outmaneuver outmaneuvered outmaneuvers outmaneuvering overemphasize overemphasized overemphasizes overemphasizing oxidization oxidize oxidized oxidizes oxidizing pederast pederasts pediatric pediatrician pediatricians pediatrics pedophile pedophiles pedophilia paleolithic paleontologist paleontologists paleontology paneled paneling panelist panelists paralyze paralyzed paralyzes paralyzing parceled parceling parlor parlors particularize particularized particularizes particularizing passivization passivize passivized passivizes passivizing pasteurization pasteurize pasteurized pasteurizes pasteurizing patronize patronized patronizes patronizing patronizingly pedaled pedaling pedestrianization pedestrianize pedestrianized pedestrianizes pedestrianizing penalize penalized penalizes penalizing penciled penciling personalize personalized personalizes personalizing pharmacopeia pharmacopeias philosophize philosophized philosophizes philosophizing filter filters phony plagiarize plagiarized plagiarizes plagiarizing plow plowed plowing plowman plowmen plows plowshare plowshares polarization polarize polarized polarizes polarizing politicization politicize politicized politicizes politicizing popularization popularize popularized popularizes popularizing pouf poufs practice practiced practices practicing presidium presidiums pressurization pressurize pressurized pressurizes pressurizing pretense pretenses primeval prioritization prioritize prioritized prioritizes prioritizing privatization privatizations privatize privatized privatizes privatizing professionalization professionalize professionalized professionalizes professionalizing program programs prolog prologs propagandize propagandized propagandizes propagandizing proselytize proselytized proselytizer proselytizers proselytizes proselytizing psychoanalyze psychoanalyzed psychoanalyzes psychoanalyzing publicize publicized publicizes publicizing pulverization pulverize pulverized pulverizes pulverizing pummel pummeled pajama pajamas pizzazz quarreled quarreling radicalize radicalized radicalizes radicalizing rancor randomize randomized randomizes randomizing rationalization rationalizations rationalize rationalized rationalizes rationalizing raveled raveling realizable realization realizations realize realized realizes realizing recognizable recognizably recognizance recognize recognized recognizes recognizing reconnoiter reconnoitered reconnoiters reconnoitering refueled refueling regularization regularize regularized regularizes regularizing remodeled remodeling remold remolded remolding remolds reorganization reorganizations reorganize reorganized reorganizes reorganizing reveled reveler revelers reveling revitalize revitalized revitalizes revitalizing revolutionize revolutionized revolutionizes revolutionizing rhapsodize rhapsodized rhapsodizes rhapsodizing rigor rigors ritualized rivaled rivaling romanticize romanticized romanticizes romanticizing rumor rumored rumors saber sabers saltpeter sanitize sanitized sanitizes sanitizing satirize satirized satirizes satirizing savior saviors savor savored savories savoring savors savory scandalize scandalized scandalizes scandalizing skeptic skeptical skeptically skepticism skeptics scepter scepters scrutinize scrutinized scrutinizes scrutinizing secularization secularize secularized secularizes secularizing sensationalize sensationalized sensationalizes sensationalizing sensitize sensitized sensitizes sensitizing sentimentalize sentimentalized sentimentalizes sentimentalizing sepulcher sepulchers serialization serializations serialize serialized serializes serializing sermonize sermonized sermonizes sermonizing sheik shoveled shoveling shriveled shriveling signalize signalized signalizes signalizing signaled signaling smolder smoldered smoldering smolders sniveled sniveling snorkeled snorkeling snowplow snowplow socialization socialize socialized socializes socializing sodomize sodomized sodomizes sodomizing solemnize solemnized solemnizes solemnizing somber specialization specializations specialize specialized specializes specializing specter specters spiraled spiraling splendor splendors squirreled squirreling stabilization stabilize stabilized stabilizer stabilizers stabilizes stabilizing standardization standardize standardized standardizes standardizing stenciled stenciling sterilization sterilizations sterilize sterilized sterilizer sterilizers sterilizes sterilizing stigmatization stigmatize stigmatized stigmatizes stigmatizing story stories subsidization subsidize subsidized subsidizer subsidizers subsidizes subsidizing succor succored succoring succors sulfate sulfates sulfide sulfides sulfur sulfurous summarize summarized summarizes summarizing swiveled swiveling symbolize symbolized symbolizes symbolizing sympathize sympathized sympathizer sympathizers sympathizes sympathizing synchronization synchronize synchronized synchronizes synchronizing synthesize synthesized synthesizer synthesizers synthesizes synthesizing siphon siphoned siphoning siphons systematization systematize systematized systematizes systematizing tantalize tantalized tantalizes tantalizing tantalizingly tasseled technicolor temporize temporized temporizes temporizing tenderize tenderized tenderizes tenderizing terrorize terrorized terrorizes terrorizing theater theatergoer theatergoers theaters theorize theorized theorizes theorizing ton tons toweled toweling toxemia tranquilize tranquilized tranquilizer tranquilizers tranquilizes tranquilizing tranquility tranquilize tranquilized tranquilizer tranquilizers tranquilizes tranquilizing tranquility transistorized traumatize traumatized traumatizes traumatizing traveled traveler travelers traveling travelog travelogs trialed trialing tricolor tricolors trivialize trivialized trivializes trivializing tumor tumors tunneled tunneling tyrannize tyrannized tyrannizes tyrannizing tire tires unauthorized uncivilized underutilized unequaled unfavorable unfavorably unionization unionize unionized unionizes unionizing unorganized unraveled unraveling unrecognizable unrecognized unrivaled unsavory untrammeled urbanization urbanize urbanized urbanizes urbanizing utilizable utilization utilize utilized utilizes utilizing valor vandalize vandalized vandalizes vandalizing vaporization vaporize vaporized vaporizes vaporizing vapor vapors verbalize verbalized verbalizes verbalizing victimization victimize victimized victimizes victimizing videodisk videodisks vigor visualization visualizations visualize visualized visualizes visualizing vocalization vocalizations vocalize vocalized vocalizes vocalizing vulcanized vulgarization vulgarize vulgarized vulgarizes vulgarizing wagon wagons watercolor watercolors weaseled weaseling westernization westernize westernized westernizes westernizing womanize womanized womanizer womanizers womanizes womanizing woolen woolens woolies wooly worshiped worshiping worshiper yodeled yodeling yogurt yogurts yogurt yogurts".lower().split() ukUS = {} usUK = {} loopN = 0 for x in UK: ukUS[x] = US[loopN] loopN += 1 loopN = 0 for y in US: usUK[y] = UK[loopN] loopN += 1
2,780.214286
19,671
0.907869
3,510
38,923
10.067521
0.990028
0.000566
0.001981
0.002717
0.004754
0.004754
0.004754
0
0
0
0
0.000113
0.091052
38,923
14
19,672
2,780.214286
0.9987
0
0
0.333333
0
0.166667
0.995014
0
0
0
0
0
0
1
0
false
0.166667
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
a41281fad86606cc81bd78948d2080e34fb6f776
732
py
Python
src/pages/menu.py
yujhenchen/pytestBDD
05345f7130720fc3237aa9b0085676b6d82f42f7
[ "MIT" ]
null
null
null
src/pages/menu.py
yujhenchen/pytestBDD
05345f7130720fc3237aa9b0085676b6d82f42f7
[ "MIT" ]
null
null
null
src/pages/menu.py
yujhenchen/pytestBDD
05345f7130720fc3237aa9b0085676b6d82f42f7
[ "MIT" ]
null
null
null
from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from src.utils.waits import Waits class MenuPage(object): def __init__(self): super().__init__() self.home = (By) self.platform = (By) self.docs = (By) self.blog = (By) self.forum = (By) self.freeSignUp = (By) self.login = (By) def click_home(self): return self def click_platform(self): return self def click_docs(self): return self def click_blog(self): return self def click_forum(self): return self def click_freeSignUp(self): return self def click_login(self): return self
19.263158
47
0.595628
91
732
4.626374
0.285714
0.133017
0.232779
0.24228
0.313539
0
0
0
0
0
0
0
0.311475
732
37
48
19.783784
0.835317
0
0
0.259259
0
0
0
0
0
0
0
0
0
1
0.296296
false
0
0.111111
0.259259
0.703704
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
a446dac0c7fb9b5120dae8cc5513b1a8ccc40272
161
py
Python
neutronpy/logger.py
neutronpy/neutronpy
44ca74a0bef25c03397a77aafb359bb257de1fe6
[ "MIT" ]
14
2015-05-08T02:43:46.000Z
2019-05-28T03:47:32.000Z
neutronpy/logger.py
neutronpy/neutronpy
44ca74a0bef25c03397a77aafb359bb257de1fe6
[ "MIT" ]
96
2015-02-09T01:04:33.000Z
2020-12-08T22:57:37.000Z
neutronpy/logger.py
neutronpy/neutronpy
44ca74a0bef25c03397a77aafb359bb257de1fe6
[ "MIT" ]
5
2016-02-26T22:53:13.000Z
2018-07-16T07:13:04.000Z
r"""Custom Logging utilities for NeutronPy """ from logging import DEBUG, Formatter, StreamHandler, getLogger from logging.handlers import RotatingFileHandler
23
62
0.819876
18
161
7.333333
0.777778
0.166667
0
0
0
0
0
0
0
0
0
0
0.118012
161
6
63
26.833333
0.929577
0.236025
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
f11b994a5185b5b3f935a51cd2b00dd5b61f55f4
356
py
Python
tahsin/odd_even/test.py
tahsin-npx/abir
44464d3e269b28ea274a9b592be1cea44242364f
[ "MIT" ]
null
null
null
tahsin/odd_even/test.py
tahsin-npx/abir
44464d3e269b28ea274a9b592be1cea44242364f
[ "MIT" ]
null
null
null
tahsin/odd_even/test.py
tahsin-npx/abir
44464d3e269b28ea274a9b592be1cea44242364f
[ "MIT" ]
2
2022-03-19T16:37:24.000Z
2022-03-20T14:47:50.000Z
from main import isEven, isEvenList def test1(): assert isEven(2) == True def test2(): assert isEven(9) == False def test3(): assert isEven(100) == True def test4(): assert isEvenList([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])[0] == [2, 4, 6, 8, 10] def test5(): assert isEvenList([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])[1] == [1, 3, 5, 7, 9]
16.181818
77
0.536517
63
356
3.031746
0.412698
0.188482
0.17801
0.188482
0.282723
0.282723
0.282723
0.282723
0.282723
0.282723
0
0.169811
0.255618
356
21
78
16.952381
0.550943
0
0
0
0
0
0
0
0
0
0
0
0.454545
1
0.454545
true
0
0.090909
0
0.545455
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
1
0
0
5
f12470e33f5d7fd834e0e12dd599c3ce47713b1d
2,532
py
Python
tests/test_unique_file_identifier.py
kilkkij/sublime-unique-status-name
d9ce76750bd8569d8581bf858759bc35dca303dd
[ "MIT" ]
null
null
null
tests/test_unique_file_identifier.py
kilkkij/sublime-unique-status-name
d9ce76750bd8569d8581bf858759bc35dca303dd
[ "MIT" ]
null
null
null
tests/test_unique_file_identifier.py
kilkkij/sublime-unique-status-name
d9ce76750bd8569d8581bf858759bc35dca303dd
[ "MIT" ]
null
null
null
from unittest import TestCase from unique_file_identifier import * class Test_minimal_identifying_path(TestCase): def test_directory_identifier_null(self): path = 'arst/qwfp' paths = [] result = minimal_identifying_path(path, paths) self.assertEqual(result, []) def test_directory_identifier_with_namesake(self): path = 'arst/qwfp' paths = ['arst/arst/qwfp'] result = minimal_identifying_path(path, paths) self.assertEqual(result, ['arst']) class Test_minimal_identifying_path_from_lists(TestCase): def test_minimal_identifying_path_only_file(self): path = ['arst', 'qwfp', 'name'] paths = [] result = minimal_identifying_path_from_lists(path, paths) self.assertEqual(result, []) def test_minimal_identifying_path_with_unrelated_files(self): path = ['arst', 'qwfp', 'name'] paths = [['arst', 'qwfp', 'file2'], ['arst', 'yul', 'zxcv']] result = minimal_identifying_path_from_lists(path, paths) self.assertEqual(result, []) def test_minimal_identifying_path_namesake_at_same_level(self): path = ['arst', 'qwfp', 'name'] paths = [['arst', 'zxcv', 'name']] result = minimal_identifying_path_from_lists(path, paths) self.assertEqual(result, ['qwfp']) def test_minimal_identifying_path_namesake_inside_duplicate_folders(self): path = ['arst', 'qwfp', 'name'] paths = [['arst', 'qwfp', 'qwfp', 'name']] result = minimal_identifying_path_from_lists(path, paths) self.assertEqual(result, ['qwfp']) def test_minimal_identifying_path_file_inside_duplicate_folders(self): path = ['arst', 'qwfp', 'qwfp', 'name'] paths = [['arst', 'qwfp', 'name']] result = minimal_identifying_path_from_lists(path, paths) self.assertEqual(result, ['qwfp', 'qwfp']) def test_minimal_identifying_path_file_deep_inside_duplicate_folders(self): path = ['arst', 'qwfp', 'qwfp', 'qwfp', 'name'] paths = [['arst', 'qwfp', 'name']] result = minimal_identifying_path_from_lists(path, paths) self.assertEqual(result, ['qwfp', 'qwfp', 'qwfp']) def test_minimal_identifying_path_file_deep_inside(self): path = ['arst', 'qwfp', 'arst', 'yul', 'name'] paths = [['arst', 'qwfp', 'name']] result = minimal_identifying_path_from_lists(path, paths) self.assertEqual(result, ['qwfp', 'arst', 'yul']) def test_minimal_identifying_path_namesakes_deep(self): path = ['arst', 'qwfp', 'name'] paths = [['arst', 'qwfp', 'arst', 'yul', 'name'], ['brst', 'qwfp', 'riste', 'name']] result = minimal_identifying_path_from_lists(path, paths) self.assertEqual(result, ['arst', 'qwfp'])
35.661972
86
0.712875
317
2,532
5.365931
0.129338
0.21164
0.258671
0.152851
0.854791
0.738977
0.71017
0.673721
0.57672
0.508524
0
0.00045
0.122038
2,532
70
87
36.171429
0.764732
0
0
0.5
0
0
0.127373
0
0
0
0
0
0.185185
1
0.185185
false
0
0.037037
0
0.259259
0
0
0
0
null
1
1
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
f1920189c6ebef014698cc637f4e207a1b6a70aa
19
py
Python
ecs_deploy/__init__.py
jemisonf/ecs-deploy
ec5bd80ddff6645ebd4639b889961ee8ce9ea36b
[ "BSD-3-Clause" ]
668
2016-03-16T15:26:47.000Z
2022-03-23T16:36:32.000Z
ecs_deploy/__init__.py
jemisonf/ecs-deploy
ec5bd80ddff6645ebd4639b889961ee8ce9ea36b
[ "BSD-3-Clause" ]
139
2016-08-11T11:07:34.000Z
2022-03-31T15:09:11.000Z
ecs_deploy/__init__.py
jemisonf/ecs-deploy
ec5bd80ddff6645ebd4639b889961ee8ce9ea36b
[ "BSD-3-Clause" ]
144
2016-08-12T08:24:29.000Z
2022-03-31T12:20:16.000Z
VERSION = '1.12.1'
9.5
18
0.578947
4
19
2.75
0.75
0
0
0
0
0
0
0
0
0
0
0.25
0.157895
19
1
19
19
0.4375
0
0
0
0
0
0.315789
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
74bece898ae65ce0388f79458eb92f0070e76ff3
81
py
Python
utilities/__init__.py
HannahDi/EnzymeML_KineticModeling
bef23140353b984519d8e8e7f8306ecad2f1c52a
[ "BSD-2-Clause" ]
null
null
null
utilities/__init__.py
HannahDi/EnzymeML_KineticModeling
bef23140353b984519d8e8e7f8306ecad2f1c52a
[ "BSD-2-Clause" ]
null
null
null
utilities/__init__.py
HannahDi/EnzymeML_KineticModeling
bef23140353b984519d8e8e7f8306ecad2f1c52a
[ "BSD-2-Clause" ]
null
null
null
from utilities.nbhelper import NBHelper from utilities.uicreator import UICreator
40.5
41
0.888889
10
81
7.2
0.5
0.361111
0
0
0
0
0
0
0
0
0
0
0.08642
81
2
41
40.5
0.972973
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
2d02761f3012b182db18528bf810495fdba7a22e
95
py
Python
apps/documentos/admin.py
jesielcarlos/gestao_rh
8fdf155bfb772dfb4cab507ba82fca9882f0bf34
[ "MIT" ]
null
null
null
apps/documentos/admin.py
jesielcarlos/gestao_rh
8fdf155bfb772dfb4cab507ba82fca9882f0bf34
[ "MIT" ]
null
null
null
apps/documentos/admin.py
jesielcarlos/gestao_rh
8fdf155bfb772dfb4cab507ba82fca9882f0bf34
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Documento admin.site.register(Documento)
19
32
0.831579
13
95
6.076923
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.105263
95
4
33
23.75
0.929412
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
2d28d8db30bec21bab634c5fd1baea0e0e58f504
420
py
Python
models/__init__.py
billhepeng/wx_tools
64369531bd76a935eff547c50ff68150a240849d
[ "Apache-2.0" ]
1
2021-01-19T02:49:14.000Z
2021-01-19T02:49:14.000Z
models/__init__.py
billhepeng/wx_tools
64369531bd76a935eff547c50ff68150a240849d
[ "Apache-2.0" ]
null
null
null
models/__init__.py
billhepeng/wx_tools
64369531bd76a935eff547c50ff68150a240849d
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 from . import livechat_channel from . import reply_about_models from . import menu_about_models from . import wx_user from . import wx_corpuser from . import wx_autoreply_model from . import wx_config_model from . import res_partner from . import wxuser_uuid from . import corpuser_uuid from . import wx_confirm_wizard from . import mail_message from . import wx_userodoouser from . import wx_par_config
24.705882
32
0.819048
65
420
4.984615
0.415385
0.432099
0.259259
0.12963
0
0
0
0
0
0
0
0.00277
0.140476
420
16
33
26.25
0.894737
0.028571
0
0
0
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
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
745569665193faa5139a89dfdd2b312e2519445e
133
py
Python
tests/__init__.py
unclechu/py-radio-class
8f96d8bcb398693d18a4ebd732415a879047edee
[ "MIT" ]
null
null
null
tests/__init__.py
unclechu/py-radio-class
8f96d8bcb398693d18a4ebd732415a879047edee
[ "MIT" ]
null
null
null
tests/__init__.py
unclechu/py-radio-class
8f96d8bcb398693d18a4ebd732415a879047edee
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from tests import ontrigger from tests import requestreply suites = [ontrigger.suite, requestreply.suite]
16.625
46
0.736842
16
133
6.125
0.625
0.183673
0.306122
0
0
0
0
0
0
0
0
0.00885
0.150376
133
7
47
19
0.858407
0.157895
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
7484f9397fa543c222cb1ce3933a8f882d592cfb
10,818
py
Python
dexplo/_tests/test_frame_construction.py
dexplo/dexplo
2a522437d3bf848260f9772e7a8f705f534c2e2c
[ "BSD-3-Clause" ]
78
2018-01-25T21:07:17.000Z
2020-11-07T00:19:13.000Z
dexplo/_tests/test_frame_construction.py
dexplo/dexplo
2a522437d3bf848260f9772e7a8f705f534c2e2c
[ "BSD-3-Clause" ]
null
null
null
dexplo/_tests/test_frame_construction.py
dexplo/dexplo
2a522437d3bf848260f9772e7a8f705f534c2e2c
[ "BSD-3-Clause" ]
8
2018-04-15T15:28:51.000Z
2022-03-22T10:37:54.000Z
import dexplo as dx import numpy as np from numpy import array, nan import pytest from dexplo.testing import assert_frame_equal, assert_array_equal, assert_dict_list class TestFrameConstructorOneCol(object): def test_single_array_int(self): a = np.array([1, 2, 3]) df1 = dx.DataFrame({'a': a}) assert_array_equal(a, df1._data['i'][:, 0]) assert df1._column_info['a'].values == ('i', 0, 0) def test_single_array_float(self): a = np.array([1, 2.5, 3.2]) df1 = dx.DataFrame({'a': a}) assert_array_equal(a, df1._data['f'][:, 0]) assert df1._column_info['a'].values == ('f', 0, 0) def test_single_array_bool(self): a = np.array([True, False]) df1 = dx.DataFrame({'a': a}) assert_array_equal(a.astype('int8'), df1._data['b'][:, 0]) assert df1._column_info['a'].values == ('b', 0, 0) def test_single_array_string(self): a = np.array(['a', 'b']) df1 = dx.DataFrame({'a': a}) a1 = array([1, 2], dtype='uint32') assert_array_equal(a1, df1._data['S'][:, 0]) assert df1._column_info['a'].values == ('S', 0, 0) def test_single_array_dt(self): a = np.array([10, 20, 30], dtype='datetime64[ns]') df1 = dx.DataFrame({'a': a}) assert_array_equal(a, df1._data['M'][:, 0]) assert df1._column_info['a'].values == ('M', 0, 0) def test_single_array_td(self): a = np.array([10, 20, 30], dtype='timedelta64[Y]') df1 = dx.DataFrame({'a': a}) assert_array_equal(a.astype('timedelta64[ns]'), df1._data['m'][:, 0]) assert df1._column_info['a'].values == ('m', 0, 0) def test_single_list_int(self): a = np.array([1, 2, 3]) df1 = dx.DataFrame({'a': a.tolist()}) assert_array_equal(a, df1._data['i'][:, 0]) assert df1._column_info['a'].values == ('i', 0, 0) def test_single_list_float(self): a = np.array([1, 2.5, 3.2]) df1 = dx.DataFrame({'a': a.tolist()}) assert_array_equal(a, df1._data['f'][:, 0]) assert df1._column_info['a'].values == ('f', 0, 0) def test_single_list_bool(self): a = np.array([True, False]) df1 = dx.DataFrame({'a': a.tolist()}) assert_array_equal(a.astype('int8'), df1._data['b'][:, 0]) assert df1._column_info['a'].values == ('b', 0, 0) def test_single_list_string(self): a = np.array(['a', 'b']) df1 = dx.DataFrame({'a': a.tolist()}) a1 = array([1, 2], dtype='uint32') assert_array_equal(a1, df1._data['S'][:, 0]) assert df1._column_info['a'].values == ('S', 0, 0) def test_single_list_dt(self): a = [np.datetime64(x, 'ns') for x in [10, 20, 30]] df1 = dx.DataFrame({'a': a}) assert_array_equal(np.array(a), df1._data['M'][:, 0]) assert df1._column_info['a'].values == ('M', 0, 0) def test_single_list_td(self): a = [np.timedelta64(x, 'ns') for x in [10, 20, 30]] df1 = dx.DataFrame({'a': a}) assert_array_equal(np.array(a), df1._data['m'][:, 0]) assert df1._column_info['a'].values == ('m', 0, 0) class TestFrameConstructorOneColArr(object): def test_single_array_int(self): a = np.array([1, 2, 3]) df1 = dx.DataFrame(a) assert_array_equal(a, df1._data['i'][:, 0]) assert df1._column_info['a0'].values == ('i', 0, 0) def test_single_array_float(self): a = np.array([1, 2.5, 3.2]) df1 = dx.DataFrame(a) assert_array_equal(a, df1._data['f'][:, 0]) assert df1._column_info['a0'].values == ('f', 0, 0) def test_single_array_bool(self): a = np.array([True, False]) df1 = dx.DataFrame(a) assert_array_equal(a.astype('int8'), df1._data['b'][:, 0]) assert df1._column_info['a0'].values == ('b', 0, 0) def test_single_array_string(self): a = np.array(['a', 'b']) df1 = dx.DataFrame(a) a1 = array([1, 2], dtype='uint32') assert_array_equal(a1, df1._data['S'][:, 0]) assert df1._column_info['a0'].values == ('S', 0, 0) def test_single_array_dt(self): a = np.array([10, 20, 30], dtype='datetime64[ns]') df1 = dx.DataFrame(a) assert_array_equal(a, df1._data['M'][:, 0]) assert df1._column_info['a0'].values == ('M', 0, 0) def test_single_array_td(self): a = np.array([10, 20, 30], dtype='timedelta64[Y]') df1 = dx.DataFrame(a) assert_array_equal(a.astype('timedelta64[ns]'), df1._data['m'][:, 0]) assert df1._column_info['a0'].values == ('m', 0, 0) class TestFrameConstructorMultipleCol(object): def test_array_int(self): a = np.array([1, 2, 3]) b = np.array([10, 20, 30]) arr = np.column_stack((a, b)) df1 = dx.DataFrame({'a': a, 'b': b}) assert_array_equal(arr, df1._data['i']) assert df1._column_info['a'].values == ('i', 0, 0) assert df1._column_info['b'].values == ('i', 1, 1) def test_array_float(self): a = np.array([1.1, 2, 3]) b = np.array([10, 20.2, 30]) arr = np.column_stack((a, b)) df1 = dx.DataFrame({'a': a, 'b': b}) assert_array_equal(arr, df1._data['f']) assert df1._column_info['a'].values == ('f', 0, 0) assert df1._column_info['b'].values == ('f', 1, 1) def test_array_bool(self): a = np.array([True, False, True]) b = np.array([False, False, False]) arr = np.column_stack((a, b)).astype('int8') df1 = dx.DataFrame({'a': a, 'b': b}) assert_array_equal(arr, df1._data['b']) assert df1._column_info['a'].values == ('b', 0, 0) assert df1._column_info['b'].values == ('b', 1, 1) def test_array_string(self): a = np.array(['asdf', 'wer']) b = np.array(['wyw', 'xcvd']) df1 = dx.DataFrame({'a': a, 'b': b}) a1 = array([[1, 1], [2, 2]], dtype='uint32') assert_array_equal(a1, df1._data['S']) assert df1._column_info['a'].values == ('S', 0, 0) assert df1._column_info['b'].values == ('S', 1, 1) def test_array_dt(self): a = np.array([10, 20, 30], dtype='datetime64[ns]') b = np.array([100, 200, 300], dtype='datetime64[ns]') arr = np.column_stack((a, b)) df1 = dx.DataFrame({'a': a, 'b': b}) assert_array_equal(arr, df1._data['M']) assert df1._column_info['a'].values == ('M', 0, 0) assert df1._column_info['b'].values == ('M', 1, 1) def test_array_td(self): a = np.array([10, 20, 30], dtype='timedelta64[Y]') b = np.array([1, 2, 3], dtype='timedelta64[Y]') arr = np.column_stack((a, b)).astype('timedelta64[ns]') df1 = dx.DataFrame({'a': a, 'b': b}) assert_array_equal(arr, df1._data['m']) assert df1._column_info['a'].values == ('m', 0, 0) assert df1._column_info['b'].values == ('m', 1, 1) def test_array_int(self): a = np.array([1, 2]) b = np.array([10, 20, 30]) with pytest.raises(ValueError): dx.DataFrame({'a': a, 'b': b}) a = [1, 2, 5, 9, 3, 4, 5, 1] b = [1.5, 8, 9, 1, 2, 3, 2, 8] c = list('abcdefgh') d = [True, False, True, False] * 2 e = [np.datetime64(x, 'D') for x in range(8)] f = [np.timedelta64(x, 'D') for x in range(8)] df_mix = dx.DataFrame({'a': a, 'b': b, 'c': c, 'd': d, 'e': e, 'f': f}, columns=list('abcdef')) class TestAllDataTypesList: def test_all(self): assert_array_equal(np.array(a), df_mix._data['i'][:, 0]) assert_array_equal(np.array(b), df_mix._data['f'][:, 0]) a1 = array([1, 2, 3, 4, 5, 6, 7, 8], dtype='uint32') assert_array_equal(a1, df_mix._data['S'][:, 0]) assert_array_equal(np.array(d).astype('int8'), df_mix._data['b'][:, 0]) assert_array_equal(np.array(e, dtype='datetime64[ns]'), df_mix._data['M'][:, 0]) assert_array_equal(np.array(f, dtype='timedelta64[ns]'), df_mix._data['m'][:, 0]) assert df_mix._column_info['a'].values == ('i', 0, 0) assert df_mix._column_info['b'].values == ('f', 0, 1) assert df_mix._column_info['c'].values == ('S', 0, 2) assert df_mix._column_info['d'].values == ('b', 0, 3) assert df_mix._column_info['e'].values == ('M', 0, 4) assert df_mix._column_info['f'].values == ('m', 0, 5) a1 = np.array([1, 2, 5, 9, 3, 4, 5, 1]) b1 = np.array([1.5, 8, 9, 1, 2, 3, 2, 8]) c1 = np.array(list('abcdefgh'), dtype='O') d1 = np.array([True, False, True, False] * 2) e1 = np.array(range(8), dtype='datetime64[D]') f1 = np.array(range(8), dtype='timedelta64[D]') df_mix1 = dx.DataFrame({'a': a, 'b': b, 'c': c, 'd': d, 'e': e, 'f': f}, columns=list('abcdef')) class TestAllDataTypesArray: def test_all(self): assert_array_equal(a1, df_mix1._data['i'][:, 0]) assert_array_equal(b1, df_mix1._data['f'][:, 0]) arr1 = array([1, 2, 3, 4, 5, 6, 7, 8], dtype='uint32') assert_array_equal(arr1, df_mix1._data['S'][:, 0]) assert_array_equal(d1.astype('int8'), df_mix1._data['b'][:, 0]) assert_array_equal(e1, df_mix1._data['M'][:, 0]) assert_array_equal(f1, df_mix1._data['m'][:, 0]) assert df_mix1._column_info['a'].values == ('i', 0, 0) assert df_mix1._column_info['b'].values == ('f', 0, 1) assert df_mix1._column_info['c'].values == ('S', 0, 2) assert df_mix1._column_info['d'].values == ('b', 0, 3) assert df_mix1._column_info['e'].values == ('M', 0, 4) assert df_mix1._column_info['f'].values == ('m', 0, 5) arr = np.column_stack((a1, b1, c1, d1, e1, f1)) df_mix2 = dx.DataFrame(arr) class TestAllDataTypesObjectArray: def test_all(self): assert_array_equal(a1, df_mix2._data['i'][:, 0]) assert_array_equal(b1, df_mix2._data['f'][:, 0]) arr1 = array([1, 2, 3, 4, 5, 6, 7, 8], dtype='uint32') assert_array_equal(arr1, df_mix2._data['S'][:, 0]) assert_array_equal(d1.astype('int8'), df_mix2._data['b'][:, 0]) assert_array_equal(e1, df_mix2._data['M'][:, 0]) assert_array_equal(f1, df_mix2._data['m'][:, 0]) assert df_mix2._column_info['a0'].values == ('i', 0, 0) assert df_mix2._column_info['a1'].values == ('f', 0, 1) assert df_mix2._column_info['a2'].values == ('S', 0, 2) assert df_mix2._column_info['a3'].values == ('b', 0, 3) assert df_mix2._column_info['a4'].values == ('M', 0, 4) assert df_mix2._column_info['a5'].values == ('m', 0, 5)
39.054152
89
0.54169
1,651
10,818
3.341005
0.066626
0.08702
0.124728
0.103336
0.85678
0.814177
0.751813
0.705765
0.645395
0.557832
0
0.065196
0.249954
10,818
276
90
39.195652
0.614617
0
0
0.511013
0
0
0.048623
0
0
0
0
0
0.400881
1
0.123348
false
0
0.022026
0
0.171806
0
0
0
0
null
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
5
748c178ec87ff27033f498785208238195846646
198
py
Python
utils.py
Eli-pixel/Moon-v.1.1.1
e94c1332d97081c0e11435908724e792a6afe598
[ "MIT" ]
1
2020-04-23T16:35:03.000Z
2020-04-23T16:35:03.000Z
utils.py
Eli-pixel/Moon-v.1.1.1
e94c1332d97081c0e11435908724e792a6afe598
[ "MIT" ]
null
null
null
utils.py
Eli-pixel/Moon-v.1.1.1
e94c1332d97081c0e11435908724e792a6afe598
[ "MIT" ]
null
null
null
################### #IMPORTS ################## import time import os #################### #STARTING ################### def CLEAR(clear): os.system('cls' if os.name == 'nt' else 'clear')
11.647059
49
0.383838
18
198
4.222222
0.722222
0
0
0
0
0
0
0
0
0
0
0
0.146465
198
16
50
12.375
0.449704
0.075758
0
0
0
0
0.095238
0
0
0
0
0
0
1
0.25
false
0
0.5
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
749ac910eebfe3ed7676bdb2e6b492b80470ba25
271
py
Python
examples/docs_snippets_crag/docs_snippets_crag/intro_tutorial/advanced/repositories/repos.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
examples/docs_snippets_crag/docs_snippets_crag/intro_tutorial/advanced/repositories/repos.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
examples/docs_snippets_crag/docs_snippets_crag/intro_tutorial/advanced/repositories/repos.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
from dagster import repository from .complex_pipeline import complex_pipeline from .hello_cereal import hello_cereal_pipeline # start_repos_marker_0 @repository def hello_cereal_repository(): return [hello_cereal_pipeline, complex_pipeline] # end_repos_marker_0
19.357143
52
0.845018
36
271
5.916667
0.416667
0.206573
0.178404
0
0
0
0
0
0
0
0
0.008333
0.114391
271
13
53
20.846154
0.879167
0.143911
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
true
0
0.5
0.166667
0.833333
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
1
1
0
0
5
74a36c105b9c56a9b5cf6ce3d3e587e10f193b6c
69
py
Python
privacypass/__init__.py
SergeBakharev/privacypass
c21cfebf24aea8005395a4b7cb97569a15fd1a04
[ "MIT" ]
3
2022-02-24T03:41:36.000Z
2022-03-16T01:44:28.000Z
privacypass/__init__.py
SergeBakharev/privacypass
c21cfebf24aea8005395a4b7cb97569a15fd1a04
[ "MIT" ]
null
null
null
privacypass/__init__.py
SergeBakharev/privacypass
c21cfebf24aea8005395a4b7cb97569a15fd1a04
[ "MIT" ]
1
2022-02-24T03:41:40.000Z
2022-02-24T03:41:40.000Z
from .privacypass import redemption_header, redemption_token # noqa
34.5
68
0.84058
8
69
7
0.875
0
0
0
0
0
0
0
0
0
0
0
0.115942
69
1
69
69
0.918033
0.057971
0
0
0
0
0
0
0
0
0
0
0
1
0
true
1
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
1
1
0
0
0
0
5
776fc502bbbb4182190ed3e2485db3d9063ae4c3
96
py
Python
old_sph_version/set_simulation.py
skdys/thermalspin
bbe08de1db534781523cc4939a137059d4e89a90
[ "MIT" ]
3
2020-04-27T08:07:01.000Z
2020-06-11T06:03:09.000Z
old_sph_version/set_simulation.py
skdys/thermalspin
bbe08de1db534781523cc4939a137059d4e89a90
[ "MIT" ]
null
null
null
old_sph_version/set_simulation.py
skdys/thermalspin
bbe08de1db534781523cc4939a137059d4e89a90
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from thermalspin.set_simulation import set_simulation set_simulation()
16
53
0.822917
13
96
5.846154
0.692308
0.513158
0
0
0
0
0
0
0
0
0
0.011494
0.09375
96
5
54
19.2
0.862069
0.21875
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
77831422bd3ffe63f7b423a158859a93b6749fc6
5,349
py
Python
Naloge/nal13.py
vitorozman/Project-Euler
9bd5e8b71b950c4d5d27d4674f0108bb71210504
[ "MIT" ]
null
null
null
Naloge/nal13.py
vitorozman/Project-Euler
9bd5e8b71b950c4d5d27d4674f0108bb71210504
[ "MIT" ]
null
null
null
Naloge/nal13.py
vitorozman/Project-Euler
9bd5e8b71b950c4d5d27d4674f0108bb71210504
[ "MIT" ]
null
null
null
# razbi n, ki je 5000 mestno stevilo na 100 50 mestnih stevilk in najdi prvih 10 stevk vsote teh 100-tih stevil sez = [37107287533902102798797998220837590246510135740250,46376937677490009712648124896970078050417018260538,74324986199524741059474233309513058123726617309629,91942213363574161572522430563301811072406154908250,23067588207539346171171980310421047513778063246676,89261670696623633820136378418383684178734361726757,28112879812849979408065481931592621691275889832738,44274228917432520321923589422876796487670272189318,47451445736001306439091167216856844588711603153276,70386486105843025439939619828917593665686757934951,62176457141856560629502157223196586755079324193331,64906352462741904929101432445813822663347944758178,92575867718337217661963751590579239728245598838407,58203565325359399008402633568948830189458628227828,80181199384826282014278194139940567587151170094390,35398664372827112653829987240784473053190104293586,86515506006295864861532075273371959191420517255829,71693888707715466499115593487603532921714970056938,54370070576826684624621495650076471787294438377604,53282654108756828443191190634694037855217779295145,36123272525000296071075082563815656710885258350721,45876576172410976447339110607218265236877223636045,17423706905851860660448207621209813287860733969412,81142660418086830619328460811191061556940512689692,51934325451728388641918047049293215058642563049483,62467221648435076201727918039944693004732956340691,15732444386908125794514089057706229429197107928209,55037687525678773091862540744969844508330393682126,18336384825330154686196124348767681297534375946515,80386287592878490201521685554828717201219257766954,78182833757993103614740356856449095527097864797581,16726320100436897842553539920931837441497806860984,48403098129077791799088218795327364475675590848030,87086987551392711854517078544161852424320693150332,59959406895756536782107074926966537676326235447210,69793950679652694742597709739166693763042633987085,41052684708299085211399427365734116182760315001271,65378607361501080857009149939512557028198746004375,35829035317434717326932123578154982629742552737307,94953759765105305946966067683156574377167401875275,88902802571733229619176668713819931811048770190271,25267680276078003013678680992525463401061632866526,36270218540497705585629946580636237993140746255962,24074486908231174977792365466257246923322810917141,91430288197103288597806669760892938638285025333403,34413065578016127815921815005561868836468420090470,23053081172816430487623791969842487255036638784583,11487696932154902810424020138335124462181441773470,63783299490636259666498587618221225225512486764533,67720186971698544312419572409913959008952310058822,95548255300263520781532296796249481641953868218774,76085327132285723110424803456124867697064507995236,37774242535411291684276865538926205024910326572967,23701913275725675285653248258265463092207058596522,29798860272258331913126375147341994889534765745501,18495701454879288984856827726077713721403798879715,38298203783031473527721580348144513491373226651381,34829543829199918180278916522431027392251122869539,40957953066405232632538044100059654939159879593635,29746152185502371307642255121183693803580388584903,41698116222072977186158236678424689157993532961922,62467957194401269043877107275048102390895523597457,23189706772547915061505504953922979530901129967519,86188088225875314529584099251203829009407770775672,11306739708304724483816533873502340845647058077308,82959174767140363198008187129011875491310547126581,97623331044818386269515456334926366572897563400500,42846280183517070527831839425882145521227251250327,55121603546981200581762165212827652751691296897789,32238195734329339946437501907836945765883352399886,75506164965184775180738168837861091527357929701337,62177842752192623401942399639168044983993173312731,32924185707147349566916674687634660915035914677504,99518671430235219628894890102423325116913619626622,73267460800591547471830798392868535206946944540724,76841822524674417161514036427982273348055556214818,97142617910342598647204516893989422179826088076852,87783646182799346313767754307809363333018982642090,10848802521674670883215120185883543223812876952786,71329612474782464538636993009049310363619763878039,62184073572399794223406235393808339651327408011116,66627891981488087797941876876144230030984490851411,60661826293682836764744779239180335110989069790714,85786944089552990653640447425576083659976645795096,66024396409905389607120198219976047599490197230297,64913982680032973156037120041377903785566085089252,16730939319872750275468906903707539413042652315011,94809377245048795150954100921645863754710598436791,78639167021187492431995700641917969777599028300699,15368713711936614952811305876380278410754449733078,40789923115535562561142322423255033685442488917353,44889911501440648020369068063960672322193204149535,41503128880339536053299340368006977710650566631954,81234880673210146739058568557934581403627822703280,82616570773948327592232845941706525094512325230608,22918802058777319719839450180888072429661980811197,77158542502016545090413245809786882778948721859617,72107838435069186155435662884062257473692284509516,20849603980134001723930671666823555245252804609722,53503534226472524250874054075591789781264330331690] def prva_deset_mestna(sez): vsota = sum(sez) return int(str(vsota)[:10]) print(prva_deset_mestna(sez)) 5537376230
486.272727
5,107
0.968031
142
5,349
36.43662
0.93662
0.003479
0.005798
0.006958
0
0
0
0
0
0
0
0.948302
0.009161
5,349
11
5,108
486.272727
0.027925
0.020378
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.333333
0.166667
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
778562a4474fd92a0b3ba97be0dd9c9c82f1862a
76
py
Python
functions-framework/main.py
glasnt/cloudrun-python-examples
7cd35932ce77f30900af4272be008f6485d5b13b
[ "Apache-2.0" ]
2
2021-09-25T20:09:06.000Z
2021-11-03T11:53:30.000Z
functions-framework/main.py
glasnt/cloudrun-python-examples
7cd35932ce77f30900af4272be008f6485d5b13b
[ "Apache-2.0" ]
null
null
null
functions-framework/main.py
glasnt/cloudrun-python-examples
7cd35932ce77f30900af4272be008f6485d5b13b
[ "Apache-2.0" ]
null
null
null
def function(request): return "👋 Hello from python functions-framework"
25.333333
52
0.75
10
76
5.8
1
0
0
0
0
0
0
0
0
0
0
0
0.157895
76
2
53
38
0.890625
0
0
0
0
0
0.513158
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
7ada3309043bd1e2b759b5d37ecf832b8b2538a0
65
py
Python
python3/nayvy_vim_if/__init__.py
heavenshell/vim-nayvy
af29d95b6fac8229ecce5ca126a2f5e4abe500f4
[ "MIT" ]
null
null
null
python3/nayvy_vim_if/__init__.py
heavenshell/vim-nayvy
af29d95b6fac8229ecce5ca126a2f5e4abe500f4
[ "MIT" ]
null
null
null
python3/nayvy_vim_if/__init__.py
heavenshell/vim-nayvy
af29d95b6fac8229ecce5ca126a2f5e4abe500f4
[ "MIT" ]
null
null
null
from .importing import * # noqa from .testing import * # noqa
21.666667
33
0.676923
8
65
5.5
0.625
0.454545
0
0
0
0
0
0
0
0
0
0
0.230769
65
2
34
32.5
0.88
0.138462
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
7aeed265395982430c64f32fcf5e44fa94246457
62
py
Python
python/kata/8-kyu/Square(n) Sum/solution.py
Carlososuna11/codewars-handbook
a0e7c9ac5ad19cfaed3ad463c04616daa3fed82e
[ "MIT" ]
null
null
null
python/kata/8-kyu/Square(n) Sum/solution.py
Carlososuna11/codewars-handbook
a0e7c9ac5ad19cfaed3ad463c04616daa3fed82e
[ "MIT" ]
null
null
null
python/kata/8-kyu/Square(n) Sum/solution.py
Carlososuna11/codewars-handbook
a0e7c9ac5ad19cfaed3ad463c04616daa3fed82e
[ "MIT" ]
null
null
null
def square_sum(numbers): return sum(x**2 for x in numbers)
31
37
0.709677
12
62
3.583333
0.75
0
0
0
0
0
0
0
0
0
0
0.019608
0.177419
62
2
37
31
0.823529
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
bb10f3b8791a115c9a2fa5aadb2c0e806a4fe218
67
py
Python
configs/Palmira_pb/single_box_predictor/__init__.py
vivek-r-2000/Palmira_pb
9f772b31811ebcadbf1bdcd8ba872b16bb8ce5d4
[ "MIT" ]
null
null
null
configs/Palmira_pb/single_box_predictor/__init__.py
vivek-r-2000/Palmira_pb
9f772b31811ebcadbf1bdcd8ba872b16bb8ce5d4
[ "MIT" ]
null
null
null
configs/Palmira_pb/single_box_predictor/__init__.py
vivek-r-2000/Palmira_pb
9f772b31811ebcadbf1bdcd8ba872b16bb8ce5d4
[ "MIT" ]
null
null
null
from .single_box_predictor import StandardROIHeadsWithoutClassifier
67
67
0.940299
6
67
10.166667
1
0
0
0
0
0
0
0
0
0
0
0
0.044776
67
1
67
67
0.953125
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
bb2b2aee6d4835353a2eee68ebcf2bf29c3aa5ab
242
py
Python
tests/test_methods/test_search.py
jackwardell/SlackTime
c40be4854a26084e1a368a975e220d613c14d8d8
[ "Apache-2.0" ]
2
2020-09-24T00:07:13.000Z
2020-09-27T19:27:06.000Z
tests/test_methods/test_search.py
jackwardell/SlackTime
c40be4854a26084e1a368a975e220d613c14d8d8
[ "Apache-2.0" ]
null
null
null
tests/test_methods/test_search.py
jackwardell/SlackTime
c40be4854a26084e1a368a975e220d613c14d8d8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- def test_search_all(slack_time): assert slack_time.search.all def test_search_files(slack_time): assert slack_time.search.files def test_search_messages(slack_time): assert slack_time.search.messages
17.285714
37
0.756198
36
242
4.75
0.333333
0.315789
0.22807
0.350877
0.526316
0.526316
0
0
0
0
0
0.004831
0.144628
242
13
38
18.615385
0.821256
0.086777
0
0
0
0
0
0
0
0
0
0
0.5
1
0.5
false
0
0
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
5
bb4feadc8c6abc9d9ac98b6321af3970975b0ce9
9,275
py
Python
posts/tests.py
duchungvu/ServEx
83ebdb53fd3e2fba8d575dec66e0edfd5842c45f
[ "MIT" ]
1
2020-03-16T18:57:12.000Z
2020-03-16T18:57:12.000Z
posts/tests.py
duchungvu/ServEx
83ebdb53fd3e2fba8d575dec66e0edfd5842c45f
[ "MIT" ]
2
2021-03-30T12:52:17.000Z
2021-06-04T22:37:57.000Z
posts/tests.py
duchungvu/ServEx
83ebdb53fd3e2fba8d575dec66e0edfd5842c45f
[ "MIT" ]
1
2021-08-29T21:41:19.000Z
2021-08-29T21:41:19.000Z
from django.test import TestCase from .models import * from .forms import * from datetime import date class UserProfileTestCase(TestCase): def setUp(self): skill0 = Skill.objects.create( title="skill0", description="Nothing yet" ) skill1 = Skill.objects.create( title="skill1", description="Nothing yet" ) skill2 = Skill.objects.create( title="skill2", description="Nothing yet" ) user0 = UserProfile.objects.create( username="user0", email="user0@case.edu", first_name="User", last_name="Zero", date_of_birth=date(2020, 3, 27), has_skill=skill0) user1 = UserProfile.objects.create( username="user1", email="user1@case.edu", first_name="User", last_name="One", date_of_birth=date(2020, 3, 26), has_skill=skill1) user2 = UserProfile.objects.create( username="user2", email="user2@case.edu", first_name="User", last_name="Two", date_of_birth=date(2020, 3, 25), has_skill=skill2) post0 = Post.objects.create( title="post0", description="Nothing", status="PENDING", points=10, seeker=user0, req_skill=skill1 ) post1 = Post.objects.create( title="post1", description="Nothing", status="PENDING", points=1000, seeker=user1, req_skill=skill2 ) post2 = Post.objects.create( title="post2", description="Nothing", status="PENDING", points=10, seeker=user2, req_skill=skill0 ) app0 = Application.objects.create( post=post0, giver=user1, status='PENDING' ) def test_userprofile_creation(self): user = UserProfile.objects.get(username="user0") skill = Skill.objects.get(title="skill0") self.assertEqual(user.username, "user0") self.assertEqual(user.email, "user0@case.edu") self.assertEqual(user.first_name, "User") self.assertEqual(user.last_name, "Zero") self.assertEqual(user.date_of_birth, date(2020, 3, 27)) self.assertEqual(user.has_skill, skill) def test_can_accept_application_true(self): user0 = UserProfile.objects.get(username="user0") post0 = Post.objects.get(title="post0") self.assertTrue(user0.can_accept_application(post0)) def test_can_accept_application_false(self): user0 = UserProfile.objects.get(username="user0") post0 = Post.objects.get(title="post0") user1 = UserProfile.objects.get(username="user1") post1 = Post.objects.get(title="post1") self.assertFalse(user1.can_accept_application(post0)) self.assertFalse(user1.can_accept_application(post1)) def test_accept_application(self): user0 = UserProfile.objects.get(username="user0") post0 = Post.objects.get(title="post0") user0.accept_application(post0) self.assertEqual(user0.points, 90) # self.assertEqual(post0.status, 'ACCEPTED') def test_can_create_post_true(self): user0 = UserProfile.objects.get(username="user0") post0 = Post.objects.get(title="post0") self.assertTrue(user0.can_create_post(post0)) def test_can_create_post_false(self): user0 = UserProfile.objects.get(username="user0") post0 = Post.objects.get(title="post0") user1 = UserProfile.objects.get(username="user1") post1 = Post.objects.get(title="post1") self.assertFalse(user0.can_create_post(post1)) self.assertFalse(user1.can_create_post(post0)) def test_can_apply_post_true(self): user1 = UserProfile.objects.get(username="user1") post0 = Post.objects.get(title="post0") self.assertTrue(user1.can_apply_post(post0)) def test_can_apply_post_false(self): user0 = UserProfile.objects.get(username="user0") post0 = Post.objects.get(title="post0") user1 = UserProfile.objects.get(username="user1") post1 = Post.objects.get(title="post1") self.assertFalse(user0.can_apply_post(post0)) self.assertFalse(user1.can_apply_post(post1)) self.assertFalse(user0.can_apply_post(post1)) class PostTestCase(TestCase): def setUp(self): skill0 = Skill.objects.create( title="skill0", description="Nothing yet" ) skill1 = Skill.objects.create( title="skill1", description="Nothing yet" ) skill2 = Skill.objects.create( title="skill2", description="Nothing yet" ) user0 = UserProfile.objects.create( username="user0", email="user0@case.edu", first_name="User", last_name="Zero", date_of_birth=date(2020, 3, 27), has_skill=skill0) user1 = UserProfile.objects.create( username="user1", email="user1@case.edu", first_name="User", last_name="One", date_of_birth=date(2020, 3, 26), has_skill=skill1) user2 = UserProfile.objects.create( username="user2", email="user2@case.edu", first_name="User", last_name="Two", date_of_birth=date(2020, 3, 25), has_skill=skill2) post0 = Post.objects.create( title="post0", description="Nothing", status="PENDING", points=10, seeker=user0, req_skill=skill1 ) post1 = Post.objects.create( title="post1", description="Nothing", status="PENDING", points=1000, seeker=user1, req_skill=skill2 ) post2 = Post.objects.create( title="post2", description="Nothing", status="PENDING", points=10, seeker=user2, req_skill=skill0 ) def test_post_creation(self): post = Post.objects.get(title="post0") user = UserProfile.objects.get(username="user0") skill = Skill.objects.get(title="skill1") self.assertEqual(post.title, "post0") self.assertEqual(post.description, "Nothing") self.assertEqual(post.status, "PENDING") self.assertEqual(post.points, 10) self.assertEqual(post.seeker, user) self.assertEqual(post.req_skill, skill) class SkillTestCase(TestCase): def setUp(self): skill0 = Skill.objects.create( title="skill0", description="Nothing yet" ) def test_skill_creation(self): skill = Skill.objects.get(title="skill0") self.assertEqual(skill.title, "skill0") self.assertEqual(skill.description, "Nothing yet") class ApplicationTestCase(TestCase): def setUp(self): skill0 = Skill.objects.create( title="skill0", description="Nothing yet" ) skill1 = Skill.objects.create( title="skill1", description="Nothing yet" ) user0 = UserProfile.objects.create( username="user0", email="user0@case.edu", first_name="User", last_name="Zero", date_of_birth=date(2020, 3, 27), has_skill=skill0) user1 = UserProfile.objects.create( username="user1", email="user1@case.edu", first_name="User", last_name="One", date_of_birth=date(2020, 3, 26), has_skill=skill1) post0 = Post.objects.create( title="post0", description="Nothing", status="PENDING", points=10, seeker=user0, req_skill=skill1 ) app0 = Application.objects.create( post=post0, giver=user1, status='PENDING' ) def test_application_creation(self): post = Post.objects.get(title="post0") app = Application.objects.get(post=post) giver = UserProfile.objects.get(username="user1") self.assertEqual(app.post, post) self.assertEqual(app.giver, giver) self.assertEqual(app.status, "PENDING") class PostListViewTestCase(TestCase): def test_normal(self): res = self.client.get('posts:post/1') self.assertEqual(res.status_code, 404) class UserProfileCreationForm(TestCase): def setUp(self): skill0 = Skill.objects.create( title="skill0", description="Nothing yet" ) self.user0 = UserProfile.objects.create( username="user0", email="user0@case.edu", first_name="User", last_name="Zero", date_of_birth=date(2020, 3, 27), has_skill=skill0)
31.124161
63
0.568518
951
9,275
5.423764
0.090431
0.056223
0.059325
0.07309
0.794688
0.754362
0.734199
0.704343
0.667507
0.667507
0
0.041279
0.315687
9,275
298
64
31.124161
0.771388
0.004528
0
0.703125
0
0
0.084489
0
0
0
0
0
0.113281
1
0.066406
false
0
0.015625
0
0.105469
0
0
0
0
null
0
0
0
0
1
1
1
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
bb505178d4e5b0ce784d31c93c6e2406c7b220ab
218
py
Python
rvusite/rvu/admin.py
craighagan/rvumanager
b313833bd49cdb36806a4ca4a33039f3d4bcf82e
[ "Apache-2.0" ]
null
null
null
rvusite/rvu/admin.py
craighagan/rvumanager
b313833bd49cdb36806a4ca4a33039f3d4bcf82e
[ "Apache-2.0" ]
null
null
null
rvusite/rvu/admin.py
craighagan/rvumanager
b313833bd49cdb36806a4ca4a33039f3d4bcf82e
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import Provider, BillingCode, PatientVisit admin.site.register(Provider) admin.site.register(BillingCode) admin.site.register(PatientVisit)
21.8
55
0.821101
27
218
6.62963
0.481481
0.150838
0.284916
0
0
0
0
0
0
0
0
0
0.09633
218
9
56
24.222222
0.908629
0.119266
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
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
24e74e2c4272528602f09e5a3dd3a7c4a216e790
66
py
Python
person_reid/videoflow_contrib/person_reid/gluoncv_person_reid/__init__.py
videoflow/videoflow-contrib
2985fbb32ca4b0dab9deeefc6b94dadf29f88d2f
[ "CNRI-Python" ]
12
2019-05-29T12:51:24.000Z
2021-03-12T08:09:16.000Z
person_reid/videoflow_contrib/person_reid/gluoncv_person_reid/__init__.py
videoflow/videoflow-contrib
2985fbb32ca4b0dab9deeefc6b94dadf29f88d2f
[ "CNRI-Python" ]
3
2020-03-10T13:13:30.000Z
2021-01-22T23:41:52.000Z
person_reid/videoflow_contrib/person_reid/gluoncv_person_reid/__init__.py
videoflow/videoflow-contrib
2985fbb32ca4b0dab9deeefc6b94dadf29f88d2f
[ "CNRI-Python" ]
8
2019-05-29T10:07:38.000Z
2021-02-08T08:19:59.000Z
from .resnet import resnet50 from .transform import get_transform
22
36
0.848485
9
66
6.111111
0.666667
0
0
0
0
0
0
0
0
0
0
0.034483
0.121212
66
2
37
33
0.913793
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
24fc478f6ec41c91cde266b881bfad4ac4d70c15
77
py
Python
voice2vec/data/__init__.py
voice2vec/SpeechLock
5e7b8f98232390babee6b5bb0ec448bb341aa577
[ "MIT" ]
7
2017-06-23T17:08:10.000Z
2021-11-08T10:10:31.000Z
voice2vec/data/__init__.py
xenx/speech
5e7b8f98232390babee6b5bb0ec448bb341aa577
[ "MIT" ]
null
null
null
voice2vec/data/__init__.py
xenx/speech
5e7b8f98232390babee6b5bb0ec448bb341aa577
[ "MIT" ]
null
null
null
from .spectograms import get_spectrogram from .voices_data import VoicesData
25.666667
40
0.87013
10
77
6.5
0.8
0
0
0
0
0
0
0
0
0
0
0
0.103896
77
2
41
38.5
0.942029
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
563d0cadb5e969226cf26b66d9cfc1dd36aaa5f8
713
py
Python
cohesivenet/api/vns3ms/__init__.py
cohesive/python-cohesivenet-sdk
5620acfa669ff97c94d9aa04a16facda37d648c1
[ "MIT" ]
null
null
null
cohesivenet/api/vns3ms/__init__.py
cohesive/python-cohesivenet-sdk
5620acfa669ff97c94d9aa04a16facda37d648c1
[ "MIT" ]
null
null
null
cohesivenet/api/vns3ms/__init__.py
cohesive/python-cohesivenet-sdk
5620acfa669ff97c94d9aa04a16facda37d648c1
[ "MIT" ]
null
null
null
from __future__ import absolute_import # flake8: noqa # import apis into api package from cohesivenet.api.vns3ms.access_api import AccessApiRouter as AccessApi from cohesivenet.api.vns3ms.administration_api import ( AdministrationApiRouter as AdministrationApi, ) from cohesivenet.api.vns3ms.backups_api import BackupsApiRouter as BackupsApi from cohesivenet.api.vns3ms.cloud_monitoring_api import ( CloudMonitoringApiRouter as CloudMonitoringApi, ) from cohesivenet.api.vns3ms.system_api import SystemApiRouter as SystemApi from cohesivenet.api.vns3ms.user_api import UserApiRouter as UserApi from cohesivenet.api.vns3ms.vns3_management_api import ( VNS3ManagementApiRouter as VNS3ManagementApi, )
37.526316
77
0.848527
84
713
7.035714
0.428571
0.177665
0.213198
0.284264
0
0
0
0
0
0
0
0.017241
0.105189
713
18
78
39.611111
0.909091
0.057504
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.571429
0
0.571429
0
0
0
0
null
0
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
565262ba5a94f0c4e9a2c8e15c5774ca123dd078
360
py
Python
pybutton/__init__.py
button/button-client-python
82f9be86885ed87ec20dc20e87f3722cdba67fef
[ "MIT" ]
8
2016-08-12T00:21:55.000Z
2019-04-21T12:22:05.000Z
pybutton/__init__.py
button/button-client-python
82f9be86885ed87ec20dc20e87f3722cdba67fef
[ "MIT" ]
16
2016-10-03T20:13:09.000Z
2019-09-23T17:34:43.000Z
pybutton/__init__.py
button/button-client-python
82f9be86885ed87ec20dc20e87f3722cdba67fef
[ "MIT" ]
2
2017-01-09T10:18:45.000Z
2017-02-03T01:29:30.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from pybutton.client import Client # noqa: 401 from pybutton.error import ButtonClientError # noqa: 401 from pybutton.error import HTTPResponseError # noqa: 401 from pybutton.version import VERSION # noqa: 401
36
56
0.841667
47
360
6.042553
0.361702
0.140845
0.225352
0.200704
0.211268
0.211268
0
0
0
0
0
0.038095
0.125
360
9
57
40
0.863492
0.108333
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0.125
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
565ec8d5fbad815eb8bdd477977b8d7e4ae36727
4,711
py
Python
helpers/sauce.py
cshowl/ANIME_LINK_BOT
7735873ccc4904e21f7196f8dd4e9d88319744aa
[ "MIT" ]
null
null
null
helpers/sauce.py
cshowl/ANIME_LINK_BOT
7735873ccc4904e21f7196f8dd4e9d88319744aa
[ "MIT" ]
null
null
null
helpers/sauce.py
cshowl/ANIME_LINK_BOT
7735873ccc4904e21f7196f8dd4e9d88319744aa
[ "MIT" ]
2
2021-12-22T19:00:54.000Z
2021-12-31T07:05:56.000Z
import aiohttp airing_query = ''' query ($id: Int,$search: String) { Media (id: $id, type: ANIME,search: $search) { id episodes title { romaji english native } nextAiringEpisode { airingAt timeUntilAiring episode } } } ''' fav_query = """ query ($id: Int) { Media (id: $id, type: ANIME) { id title { romaji english native } } } """ anime_query = ''' query ($search: String) { Page(page: 1, perPage: 30) { pageInfo { total currentPage lastPage hasNextPage perPage } media(search: $search, type: ANIME) { id title { romaji english native } description(asHtml: false) startDate { year } episodes season type format status duration siteUrl studios { nodes { name } } trailer { id site thumbnail } averageScore genres coverImage{ medium } } } } ''' character_query = """ query ($query: String) { Character (search: $query) { id name { first last full } siteUrl image { large } description } } """ manga_query = """ query ($id: Int,$search: String) { Media (id: $id, type: MANGA,search: $search) { id title { romaji english native } description (asHtml: false) startDate{ year } type format status siteUrl averageScore genres bannerImage } } """ anime_search_query = """ query ($search: String, $page: Int, $id:[Int]) { Page(page: $page, perPage: 1) { pageInfo { total currentPage lastPage hasNextPage perPage } media(search: $search, type: ANIME, id_in: $id) { id title { romaji english native } description(asHtml: false) startDate { year } episodes season type format status duration siteUrl studios { nodes { name } } trailer { id site thumbnail } averageScore genres coverImage { medium } isAdult hashtag } } } """ url = 'https://graphql.anilist.co' async def airing_sauce(query): variables = {'search': query} async with aiohttp.ClientSession() as ses: async with ses.post( url, json={'query': airing_query, 'variables': variables} ) as resp: return await resp.json() async def fav_sauce(query): variables = {'search': query} async with aiohttp.ClientSession() as ses: async with ses.post( url, json={'query': fav_query, 'variables': variables} ) as resp: return await resp.json() async def anime_sauce(query): variables = {'search': query} async with aiohttp.ClientSession() as ses: async with ses.post( url, json={'query': anime_query, 'variables': variables} ) as resp: return await resp.json() async def anime_search(query, page): variables = {'search': query, 'page': page} async with aiohttp.ClientSession() as ses: async with ses.post( url, json={"query": anime_search_query, 'variables': variables} ) as resp: return await resp.json() async def get_anime(id): variables = {'id': id, 'page': 1} async with aiohttp.ClientSession() as ses: async with ses.post( url, json={"query": anime_search_query, 'variables': variables} ) as resp: return await resp.json() async def character_sauce(query): variables = {'search': query} async with aiohttp.ClientSession() as ses: async with ses.post( url, json={'query': character_query, 'variables': variables} ) as resp: return await resp.json() async def manga_sauce(query): variables = {'search': query} async with aiohttp.ClientSession() as ses: async with ses.post( url, json={'query': manga_query, 'variables': variables} ) as resp: return await resp.json()
19.794118
75
0.489705
426
4,711
5.359155
0.187793
0.055191
0.049058
0.088918
0.769601
0.740692
0.740692
0.725361
0.725361
0.704336
0
0.001816
0.415411
4,711
237
76
19.877637
0.82716
0
0
0.617512
0
0
0.590108
0
0
0
0
0
0
1
0
false
0
0.004608
0
0.036866
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
56882066c3f7e8df3c3d5b88afe36dab7bd1eebd
3,282
py
Python
mcts_elements/action.py
amarildolikmeta/alphazero_singleplayer
06f62c82f428dbe82afab16c1955b82aeedd8737
[ "MIT" ]
null
null
null
mcts_elements/action.py
amarildolikmeta/alphazero_singleplayer
06f62c82f428dbe82afab16c1955b82aeedd8737
[ "MIT" ]
null
null
null
mcts_elements/action.py
amarildolikmeta/alphazero_singleplayer
06f62c82f428dbe82afab16c1955b82aeedd8737
[ "MIT" ]
null
null
null
import sys sys.path.append('..') from mcts_elements.state import ThompsonSamplingState import numpy as np # # class Action(): # ''' Action object ''' # # def __init__(self, index, parent_state, Q_init=0.0): # self.index = index # self.parent_state = parent_state # self.W = 0.0 # self.n = 0 # self.Q = Q_init # # def add_child_state(self, s1, r, terminal, model): # self.child_state = State(s1, r, terminal, self, self.parent_state.na, model) # return self.child_state # # def update(self, R): # self.n += 1 # self.W += R # self.Q = self.W / self.n # # # class StochasticAction(Action): # ''' StochasticAction object ''' # # def __init__(self, index, parent_state, Q_init=0.0): # super(StochasticAction, self).__init__(index, parent_state, Q_init) # self.child_states = [] # self.n_children = 0 # self.state_indeces = {} # # def add_child_state(self, s1, r, terminal, model, signature): # child_state = StochasticState(s1, r, terminal, self, self.parent_state.na, model, signature) # self.child_states.append(child_state) # s1_hash = s1.tostring() # self.state_indeces[s1_hash] = self.n_children # self.n_children += 1 # return child_state # # def get_state_ind(self, s1): # s1_hash = s1.tostring() # try: # index = self.state_indeces[s1_hash] # return index # except KeyError: # return -1 # # def sample_state(self): # p = [] # for i, s in enumerate(self.child_states): # s = self.child_states[i] # p.append(s.n / self.n) # return self.child_states[np.random.choice(a=self.n_children, p=p)] class ThompsonSamplingAction: ''' ThompsonSamplingAction object ''' def __init__(self, index, parent_state, Q_init): self.index = index self.parent_state = parent_state self.child_states = [] self.n_children = 0 self.state_indeces = {} self.W = 0.0 self.n = 0 self.Q = Q_init def add_child_state(self, s1, r, terminal, model):#, signature child_state = ThompsonSamplingState(s1, r, terminal, self, self.parent_state.na, model)#, signature self.child_states.append(child_state) s1_hash = s1.tostring() self.state_indeces[s1_hash] = self.n_children self.n_children += 1 return child_state def get_state_ind(self, s1): s1_hash = s1.tostring() try: index = self.state_indeces[s1_hash] return index except KeyError: return -1 def q(self, stochastic): if stochastic: mu, tau = self.sampleNG(self.Q) return mu else: return self.Q[2] def sampleNG(self, alpha, beta, mu, lamb): tau = np.random.gamma(alpha, beta) R = np.random.normal(mu, 1.0 / (lamb * tau)) return R, tau def sample_state(self): p = [] for i, s in enumerate(self.child_states): s = self.child_states[i] p.append(s.n / self.n) return self.child_states[np.random.choice(a=self.n_children, p=p)]
30.110092
107
0.580743
425
3,282
4.282353
0.167059
0.038462
0.082418
0.037363
0.723626
0.723626
0.712088
0.712088
0.712088
0.626923
0
0.017361
0.297989
3,282
108
108
30.388889
0.772569
0.499391
0
0.045455
0
0
0.001264
0
0
0
0
0
0
1
0.136364
false
0
0.068182
0
0.386364
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
569073656a1d6b8349f5c670db9882e97c5c71fb
73
py
Python
src/attacks/__init__.py
lemonwaffle/nisemono
f2b32dbff63ea6de47460713aac8a768ff59f126
[ "MIT" ]
7
2021-07-08T05:17:19.000Z
2021-12-29T05:45:24.000Z
src/attacks/__init__.py
yizhe-ang/fake-detection-lab
f2b32dbff63ea6de47460713aac8a768ff59f126
[ "MIT" ]
null
null
null
src/attacks/__init__.py
yizhe-ang/fake-detection-lab
f2b32dbff63ea6de47460713aac8a768ff59f126
[ "MIT" ]
null
null
null
from .lots import PatchLOTS from .jpeg_compressor import JPEG_Compressor
24.333333
44
0.863014
10
73
6.1
0.6
0.459016
0
0
0
0
0
0
0
0
0
0
0.109589
73
2
45
36.5
0.938462
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
3b3111f71f070ef899c98127418bf308adf33bb0
168
py
Python
rbc/opening/test_opening.py
rebuildingcode/hardware
df38d4b955047fdea69dda6b662c56ac301799a2
[ "BSD-3-Clause" ]
null
null
null
rbc/opening/test_opening.py
rebuildingcode/hardware
df38d4b955047fdea69dda6b662c56ac301799a2
[ "BSD-3-Clause" ]
27
2019-09-04T06:29:34.000Z
2020-04-19T19:41:44.000Z
rbc/opening/test_opening.py
rebuildingcode/hardware
df38d4b955047fdea69dda6b662c56ac301799a2
[ "BSD-3-Clause" ]
2
2020-02-28T02:56:31.000Z
2020-02-28T03:12:07.000Z
from .opening import Opening def test_opening(): o = Opening(width=36, height=80) assert o.height == 80 assert o.width == 36 assert o.area == 36 * 80
18.666667
36
0.630952
26
168
4.038462
0.461538
0.2
0.266667
0.285714
0
0
0
0
0
0
0
0.095238
0.25
168
9
37
18.666667
0.738095
0
0
0
0
0
0
0
0
0
0
0
0.5
1
0.166667
false
0
0.166667
0
0.333333
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
1
0
0
0
0
0
0
0
0
0
5
3b738040a1eaf903db539f698cd06daf03cea844
125
py
Python
generateur/document/ligne.py
loleni/genpdf-python3
31a1dfa0ef53f3c6f7a1fa6ea6d4e775bf189890
[ "MIT" ]
null
null
null
generateur/document/ligne.py
loleni/genpdf-python3
31a1dfa0ef53f3c6f7a1fa6ea6d4e775bf189890
[ "MIT" ]
null
null
null
generateur/document/ligne.py
loleni/genpdf-python3
31a1dfa0ef53f3c6f7a1fa6ea6d4e775bf189890
[ "MIT" ]
1
2021-12-17T09:35:56.000Z
2021-12-17T09:35:56.000Z
class LigneTexte: """Une ligne de texte dans un document. """ def __init__(self, texte): self.texte = texte
20.833333
47
0.624
16
125
4.625
0.75
0.243243
0
0
0
0
0
0
0
0
0
0
0.264
125
5
48
25
0.804348
0.288
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
1
0
0
null
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
3b857406627357515a3ff877809f987017228228
18
py
Python
hhh.py
zhuoya123/Python
64d3ffd39b197dbc35ba025b1b5709fbf6939ef2
[ "Apache-2.0" ]
null
null
null
hhh.py
zhuoya123/Python
64d3ffd39b197dbc35ba025b1b5709fbf6939ef2
[ "Apache-2.0" ]
null
null
null
hhh.py
zhuoya123/Python
64d3ffd39b197dbc35ba025b1b5709fbf6939ef2
[ "Apache-2.0" ]
null
null
null
print ('hello Gi')
18
18
0.666667
3
18
4
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
18
1
18
18
0.75
0
0
0
0
0
0.421053
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
3b960c99b1e81fd93030cd4052e292315d87d2dc
1,224
py
Python
plugins/automox/icon_automox/actions/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
null
null
null
plugins/automox/icon_automox/actions/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
null
null
null
plugins/automox/icon_automox/actions/__init__.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
null
null
null
# GENERATED BY KOMAND SDK - DO NOT EDIT from .action_on_vulnerability_sync_batch.action import ActionOnVulnerabilitySyncBatch from .action_on_vulnerability_sync_task.action import ActionOnVulnerabilitySyncTask from .create_group.action import CreateGroup from .delete_device.action import DeleteDevice from .delete_group.action import DeleteGroup from .get_device_by_hostname.action import GetDeviceByHostname from .get_device_by_ip.action import GetDeviceByIp from .get_device_software.action import GetDeviceSoftware from .get_vulnerability_sync_batch.action import GetVulnerabilitySyncBatch from .list_devices.action import ListDevices from .list_groups.action import ListGroups from .list_organization_users.action import ListOrganizationUsers from .list_organizations.action import ListOrganizations from .list_policies.action import ListPolicies from .list_vulnerability_sync_batches.action import ListVulnerabilitySyncBatches from .list_vulnerability_sync_tasks.action import ListVulnerabilitySyncTasks from .run_command.action import RunCommand from .update_device.action import UpdateDevice from .update_group.action import UpdateGroup from .upload_vulnerability_sync_file.action import UploadVulnerabilitySyncFile
55.636364
85
0.892974
147
1,224
7.163265
0.387755
0.22792
0.048433
0.047483
0.103514
0
0
0
0
0
0
0
0.072712
1,224
21
86
58.285714
0.927753
0.030229
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
3b98e48efeb5eb8a9e73b803f9314a9c55402f2d
200
py
Python
campus/__init__.py
yisangwu/flask_depakin
d1b344506bd100b08583845c283b260eb9f38055
[ "MIT" ]
2
2018-10-11T11:05:35.000Z
2020-04-09T02:43:44.000Z
campus/__init__.py
yisangwu/flask_depakin
d1b344506bd100b08583845c283b260eb9f38055
[ "MIT" ]
null
null
null
campus/__init__.py
yisangwu/flask_depakin
d1b344506bd100b08583845c283b260eb9f38055
[ "MIT" ]
null
null
null
''' campus Blueprint ''' import flask from flask import Blueprint # instantiation Blueprint blue_campus = Blueprint('campus', __name__, url_prefix='/campus') # include functions from . import views
15.384615
65
0.765
23
200
6.391304
0.565217
0.204082
0
0
0
0
0
0
0
0
0
0
0.135
200
12
66
16.666667
0.849711
0.295
0
0
0
0
0.098485
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
1
0
5
8e91c92f5ba183754707f12fc3a83f7391d8f80c
160
py
Python
dataloaders/__init__.py
lixiang0526/github-segmention
8f05d0974f6153f0dcd25a2744055dbe10336294
[ "MIT" ]
1
2021-09-28T00:31:51.000Z
2021-09-28T00:31:51.000Z
dataloaders/__init__.py
FreedomLiX/github-segmention
8f05d0974f6153f0dcd25a2744055dbe10336294
[ "MIT" ]
null
null
null
dataloaders/__init__.py
FreedomLiX/github-segmention
8f05d0974f6153f0dcd25a2744055dbe10336294
[ "MIT" ]
null
null
null
from .coco import COCO from .voc import VOC from .ade20k import ADE20K from .cityscapes import CityScapes from .tianchi import TianChi from .meter import Meter
22.857143
34
0.8125
24
160
5.416667
0.333333
0
0
0
0
0
0
0
0
0
0
0.029412
0.15
160
6
35
26.666667
0.926471
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
8eb0d5e3766ee726950574f1d203cb0b1de5cbd3
180
py
Python
market.py
pieangel/Smhubot
550dc6bc44c9695399a2ef1655eaabdba76c2c1b
[ "MIT" ]
null
null
null
market.py
pieangel/Smhubot
550dc6bc44c9695399a2ef1655eaabdba76c2c1b
[ "MIT" ]
null
null
null
market.py
pieangel/Smhubot
550dc6bc44c9695399a2ef1655eaabdba76c2c1b
[ "MIT" ]
null
null
null
class SmMarket: def __init__(self): self.name = "" self.product_dic = {} def add_category(self, product): self.product_dic[product.code] = product
22.5
48
0.611111
21
180
4.904762
0.52381
0.320388
0.271845
0
0
0
0
0
0
0
0
0
0.272222
180
8
48
22.5
0.78626
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
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
1
0
0
0
0
0
0
0
5
8ebfa7f1b298812d226fe926a175d7fae6c2cd39
58
py
Python
lokbot/__main__.py
Darklightsite/lok_bot
7fadca5d3c393612a31e1feaae8700855f4f4e34
[ "MIT" ]
13
2022-02-12T19:07:37.000Z
2022-03-31T08:48:22.000Z
lokbot/__main__.py
Darklightsite/lok_bot
7fadca5d3c393612a31e1feaae8700855f4f4e34
[ "MIT" ]
19
2022-02-09T15:34:56.000Z
2022-03-28T12:19:34.000Z
lokbot/__main__.py
Darklightsite/lok_bot
7fadca5d3c393612a31e1feaae8700855f4f4e34
[ "MIT" ]
22
2022-01-18T06:43:55.000Z
2022-03-28T10:31:35.000Z
import fire from lokbot.app import main fire.Fire(main)
9.666667
27
0.775862
10
58
4.5
0.6
0
0
0
0
0
0
0
0
0
0
0
0.155172
58
5
28
11.6
0.918367
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
8ee20b214b640f622ea0f79cb64b716fd2f023df
268
py
Python
src/debugbar/debugger.py
MasoniteFramework/debugbar
62c8ba202f4b7530248c88ca2ce7aaaddcf598d9
[ "MIT" ]
5
2021-01-17T17:25:04.000Z
2022-01-24T16:52:19.000Z
src/debugbar/debugger.py
MasoniteFramework/debugbar
62c8ba202f4b7530248c88ca2ce7aaaddcf598d9
[ "MIT" ]
32
2021-01-17T15:16:52.000Z
2022-03-07T01:30:19.000Z
src/debugbar/debugger.py
MasoniteFramework/debugbar
62c8ba202f4b7530248c88ca2ce7aaaddcf598d9
[ "MIT" ]
1
2022-01-05T14:08:53.000Z
2022-01-05T14:08:53.000Z
class Debugger: def __init__(self): self.collectors = {} def add_collector(self, collector): self.collectors.update({collector.name: collector}) return self def get_collector(self, name): return self.collectors[name]
16.75
59
0.63806
29
268
5.689655
0.413793
0.254545
0
0
0
0
0
0
0
0
0
0
0.261194
268
15
60
17.866667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0
1
0.375
false
0
0
0.125
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
d97165465ecd0b97fcbaddd15bd4f397d81257c7
91
py
Python
src/data/tools/__init__.py
dmitry-s-danilov/kaggle-house-prices-advanced-regression-techniques
ab5130ea6d5b1c7373a886b9289cf0fde4f7c27d
[ "MIT" ]
1
2022-02-08T11:54:16.000Z
2022-02-08T11:54:16.000Z
src/data/tools/__init__.py
dmitry-s-danilov/kaggle-house-prices-advanced-regression-techniques
ab5130ea6d5b1c7373a886b9289cf0fde4f7c27d
[ "MIT" ]
null
null
null
src/data/tools/__init__.py
dmitry-s-danilov/kaggle-house-prices-advanced-regression-techniques
ab5130ea6d5b1c7373a886b9289cf0fde4f7c27d
[ "MIT" ]
null
null
null
from .describe import describe from .sample import sample from .transform import transform
22.75
32
0.835165
12
91
6.333333
0.416667
0
0
0
0
0
0
0
0
0
0
0
0.131868
91
3
33
30.333333
0.962025
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
d9861295799e9fe3e258f52d41c87336294f39f2
217
py
Python
py_tdlib/constructors/update_message_send_failed.py
Mr-TelegramBot/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
24
2018-10-05T13:04:30.000Z
2020-05-12T08:45:34.000Z
py_tdlib/constructors/update_message_send_failed.py
MrMahdi313/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
3
2019-06-26T07:20:20.000Z
2021-05-24T13:06:56.000Z
py_tdlib/constructors/update_message_send_failed.py
MrMahdi313/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
5
2018-10-05T14:29:28.000Z
2020-08-11T15:04:10.000Z
from ..factory import Type class updateMessageSendFailed(Type): message = None # type: "message" old_message_id = None # type: "int53" error_code = None # type: "int32" error_message = None # type: "string"
24.111111
39
0.700461
27
217
5.481481
0.555556
0.216216
0.202703
0
0
0
0
0
0
0
0
0.022599
0.184332
217
8
40
27.125
0.813559
0.267281
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.166667
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
7999a1f5dfd4791c6b80627b682a24fdfda09b14
286
py
Python
pype9/simulate/common/cells/__init__.py
tclose/Pype9
23f96c0885fd9df12d9d11ff800f816520e4b17a
[ "MIT" ]
null
null
null
pype9/simulate/common/cells/__init__.py
tclose/Pype9
23f96c0885fd9df12d9d11ff800f816520e4b17a
[ "MIT" ]
null
null
null
pype9/simulate/common/cells/__init__.py
tclose/Pype9
23f96c0885fd9df12d9d11ff800f816520e4b17a
[ "MIT" ]
1
2021-04-08T12:46:21.000Z
2021-04-08T12:46:21.000Z
from .base import Cell, CellMetaClass from .with_synapses import ( DynamicsWithSynapses, DynamicsWithSynapsesProperties, WithSynapses, MultiDynamicsWithSynapses, MultiDynamicsWithSynapsesProperties, ConnectionParameterSet, ConnectionPropertySet, Synapse, SynapseProperties)
47.666667
78
0.84965
18
286
13.444444
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.104895
286
5
79
57.2
0.945313
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
799b35122a2298cbc6128b88af0eaee5d8769af7
246
py
Python
grow/extensions/hooks/router_add_hook_test.py
akashkalal/grow
e4813efecb270e00c52c4bb1cb317766a8c92e29
[ "MIT" ]
335
2016-04-02T20:12:21.000Z
2022-03-28T18:55:26.000Z
grow/extensions/hooks/router_add_hook_test.py
akashkalal/grow
e4813efecb270e00c52c4bb1cb317766a8c92e29
[ "MIT" ]
784
2016-04-01T16:56:41.000Z
2022-03-05T01:25:34.000Z
grow/extensions/hooks/router_add_hook_test.py
akashkalal/grow
e4813efecb270e00c52c4bb1cb317766a8c92e29
[ "MIT" ]
54
2016-05-03T13:06:15.000Z
2021-09-24T04:46:23.000Z
"""Tests for router add hook.""" import unittest from grow.extensions.hooks import router_add_hook class RouterAddHookTestCase(unittest.TestCase): """Test the router add hook.""" def test_something(self): """?""" pass
18.923077
49
0.674797
29
246
5.62069
0.689655
0.165644
0.239264
0
0
0
0
0
0
0
0
0
0.203252
246
12
50
20.5
0.831633
0.219512
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.2
0.4
0
0.8
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
5
79b14ef0f138c5697d15110b7b4797f7b1cfb36b
158
py
Python
01_PythonTutorial/012_OneValueMultiplesVariables.py
EliazBobadilla/Python-Tutorial-W3Schools
0f22be2eea493c7e331d15b72847a34a4b748884
[ "MIT" ]
5
2021-05-29T23:30:57.000Z
2021-12-19T11:21:24.000Z
01_PythonTutorial/012_OneValueMultiplesVariables.py
ChromeOwO/Python-Tutorial-W3Schools
0f22be2eea493c7e331d15b72847a34a4b748884
[ "MIT" ]
null
null
null
01_PythonTutorial/012_OneValueMultiplesVariables.py
ChromeOwO/Python-Tutorial-W3Schools
0f22be2eea493c7e331d15b72847a34a4b748884
[ "MIT" ]
4
2021-06-04T20:23:48.000Z
2022-01-23T05:48:19.000Z
'''Many Values to Multiple Variables Python allows you to assign values to multiple variables in one line:''' x = y = z = "Orange" print(x) print(y) print(z)
22.571429
72
0.71519
27
158
4.185185
0.62963
0.141593
0.283186
0.442478
0
0
0
0
0
0
0
0
0.170886
158
7
73
22.571429
0.862595
0.651899
0
0
0
0
0.12
0
0
0
0
0
0
1
0
false
0
0
0
0
0.75
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
8dcb26ae120362fd9e840de395251b968a88d0cf
96
py
Python
visual_novel/cinfo/staff_roles/admin.py
dolamroth/visual_novel
c67379df395561b3bca7e91e2db6547d2e943330
[ "MIT" ]
9
2018-03-11T12:53:12.000Z
2020-12-19T14:21:53.000Z
visual_novel/cinfo/staff_roles/admin.py
dolamroth/visual_novel
c67379df395561b3bca7e91e2db6547d2e943330
[ "MIT" ]
6
2020-02-11T22:19:22.000Z
2022-03-11T23:20:10.000Z
visual_novel/cinfo/staff_roles/admin.py
dolamroth/visual_novel
c67379df395561b3bca7e91e2db6547d2e943330
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import StaffRole admin.site.register(StaffRole)
16
32
0.822917
13
96
6.076923
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.114583
96
5
33
19.2
0.929412
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
8dcf9b79811c460ddf57db38e318c0cc2b3cdfde
131
py
Python
mne/datasets/brainstorm/__init__.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
1,953
2015-01-17T20:33:46.000Z
2022-03-30T04:36:34.000Z
mne/datasets/brainstorm/__init__.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
8,490
2015-01-01T13:04:18.000Z
2022-03-31T23:02:08.000Z
mne/datasets/brainstorm/__init__.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
1,130
2015-01-08T22:39:27.000Z
2022-03-30T21:44:26.000Z
"""Brainstorm datasets.""" from . import (bst_raw, bst_resting, bst_auditory, bst_phantom_ctf, bst_phantom_elekta)
26.2
67
0.694656
16
131
5.25
0.6875
0.238095
0
0
0
0
0
0
0
0
0
0
0.198473
131
4
68
32.75
0.8
0.152672
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
8dee410fcd875f99c3cfc1af3c0506579e510902
115
py
Python
dislib/decomposition/__init__.py
alexbarcelo/dislib
989f81f235ae30b17410a8d805df258c7d931b38
[ "Apache-2.0" ]
36
2018-10-22T19:21:14.000Z
2022-03-22T12:10:01.000Z
dislib/decomposition/__init__.py
alexbarcelo/dislib
989f81f235ae30b17410a8d805df258c7d931b38
[ "Apache-2.0" ]
329
2018-11-22T18:04:57.000Z
2022-03-18T01:26:55.000Z
dislib/decomposition/__init__.py
alexbarcelo/dislib
989f81f235ae30b17410a8d805df258c7d931b38
[ "Apache-2.0" ]
21
2019-01-10T11:46:39.000Z
2022-03-17T12:59:45.000Z
from dislib.decomposition.pca.base import PCA from dislib.decomposition.qr.base import qr __all__ = ['PCA', 'qr']
23
45
0.765217
17
115
4.941176
0.470588
0.238095
0.547619
0
0
0
0
0
0
0
0
0
0.113043
115
4
46
28.75
0.823529
0
0
0
0
0
0.043478
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
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
8df954a2bc570a294a17be642117bed507e28c7b
8,255
py
Python
markov_model_tests.py
cwwang15/neural_network_cracking
2bb89da599ca0f30d868ca26ab284d559b56d301
[ "Apache-2.0" ]
196
2016-06-01T18:59:57.000Z
2022-02-10T08:19:10.000Z
markov_model_tests.py
cwwang15/neural_network_cracking
2bb89da599ca0f30d868ca26ab284d559b56d301
[ "Apache-2.0" ]
20
2016-08-15T18:51:50.000Z
2021-12-09T09:00:49.000Z
markov_model_tests.py
cwwang15/neural_network_cracking
2bb89da599ca0f30d868ca26ab284d559b56d301
[ "Apache-2.0" ]
75
2016-06-18T11:14:46.000Z
2022-03-25T04:02:15.000Z
import unittest from unittest.mock import Mock, MagicMock import string import tempfile import io import numpy as np import pwd_guess as pg import markov_model as mm class MarkovModelTest(unittest.TestCase): def test_train_one_pwd_no_smoothing(self): config = Mock() config.char_bag = string.ascii_lowercase + pg.PASSWORD_END m = mm.MarkovModel(config, smoothing='none', order=2) m.train([('pass', 1)]) self.assertAlmostEqual(m.probability_next_char('p', 'a'), 1) self.assertAlmostEqual(m.probability_next_char('pa', 's'), 1) self.assertAlmostEqual( m.probability_next_char('pass', pg.PASSWORD_END), .5) self.assertAlmostEqual(m.probability_next_char('pas', 's'), .5) self.assertAlmostEqual(m.probability_next_char('', 'p'), 1) self.assertAlmostEqual(m.probability_next_char('pas', 'k'), 0) self.assertAlmostEqual(m.probability_next_char('', 'j'), 0) def test_train_two_pwd_no_smoothing(self): config = Mock() config.char_bag = string.ascii_lowercase + pg.PASSWORD_END m = mm.MarkovModel(config, smoothing='none', order=2) m.train([('pass', 1), ('past', 1)]) self.assertAlmostEqual(m.probability_next_char('', 'p'), 1) self.assertAlmostEqual(m.probability_next_char('p', 'a'), 1) self.assertAlmostEqual(m.probability_next_char('pa', 's'), 1) self.assertAlmostEqual( m.probability_next_char('pass', pg.PASSWORD_END), 1/3.) self.assertAlmostEqual(m.probability_next_char('pas', 's'), 1/3.) self.assertAlmostEqual(m.probability_next_char('pas', 't'), 1/3.) self.assertAlmostEqual(m.probability_next_char('pas', 'k'), 0) self.assertAlmostEqual(m.probability_next_char('', 'j'), 0) def test_train_pwd_long(self): config = Mock() config.char_bag = string.ascii_lowercase + pg.PASSWORD_END m = mm.MarkovModel(config, smoothing='none', order=4) m.train([('pa', 1)]) self.assertEqual(m.freq_dict, { 'p' : 1, 'pa' : 1, 'pa' + pg.PASSWORD_END : 1 }) def test_train_high_order_no_smoothing(self): config = Mock() config.char_bag = string.ascii_lowercase + pg.PASSWORD_END m = mm.MarkovModel(config, smoothing='none', order=3) m.train([('pass', 1), ('past', 1), ('ashen', 1)]) self.assertAlmostEqual(m.probability_next_char('', 'p'), 2./3.) self.assertAlmostEqual(m.probability_next_char('p', 'a'), 1) self.assertAlmostEqual(m.probability_next_char('pa', 's'), 1) self.assertAlmostEqual( m.probability_next_char('pass', pg.PASSWORD_END), 1) self.assertAlmostEqual(m.probability_next_char('pas', 's'), 1./3.) self.assertAlmostEqual(m.probability_next_char('pas', 't'), 1./3.) self.assertAlmostEqual(m.probability_next_char('as', 'h'), 1./3.) self.assertAlmostEqual(m.probability_next_char('as', 't'), 1./3.) self.assertAlmostEqual(m.probability_next_char('pas', 'k'), 0) self.assertAlmostEqual(m.probability_next_char('', 'j'), 0) def test_save_load_model(self): config = Mock() config.char_bag = string.ascii_lowercase + pg.PASSWORD_END m = mm.MarkovModel(config, smoothing='none', order=2) m.train([('pass', 1), ('past', 1), ('ashen', 1)]) self.assertAlmostEqual(m.probability_next_char('', 'p'), 2./3.) with tempfile.NamedTemporaryFile('w') as tempf: m.saveModel(tempf.name) new_model = mm.MarkovModel.fromModelFile( tempf.name, config, smoothing='none', order=2) self.assertAlmostEqual(new_model.probability_next_char('', 'p'), 2./3.) def test_predict(self): config = Mock() config.char_bag = pg.PASSWORD_END + 'aehnpst' m = mm.MarkovModel(config, smoothing='none', order=2) m.train([('pass', 1), ('past', 1), ('ashen', 1)]) answer = np.zeros((len(config.char_bag), ), dtype=np.float64) m.predict('pa', answer) np.testing.assert_array_equal(answer, np.array([ 0, 0, 0, 0, 0, 0, 1, 0 ])) class MarkovGuesserTest(unittest.TestCase): def test_build(self): config = pg.ModelDefaults(char_bag = pg.PASSWORD_END + 'aehnpst', guesser_class = 'markov_model') pg.GuesserBuilder.other_class_builders[ 'markov_model'] = mm.MarkovGuesser model = mm.MarkovModel(config, smoothing='none', order=2) model.train([('pass', 1), ('past', 1), ('ashen', 1)]) guesser_builder = pg.GuesserBuilder(config) guesser_builder.add_model(model) ostream = io.StringIO() guesser_builder.add_stream(ostream) guesser = guesser_builder.build() self.assertEqual(type(guesser), mm.MarkovGuesser) np.testing.assert_array_almost_equal( guesser.conditional_probs_many(['pa']), np.array([[[ 0, 0, 0, 0, 0, 0, 1, 0 ]]], dtype=np.float64)) class AdditiveSmoothingTest(unittest.TestCase): def test_predict(self): config = Mock() config.char_bag = 'abc' config.additive_smoothing_amount = 1 sm = mm.AdditiveSmoothingSmoother({ 'a' : 1, 'b' : 2 }, config) answer = np.zeros((3, ), dtype=np.float64) sm.predict('', answer) np.testing.assert_array_almost_equal( answer, np.array([1/3., 1/2., 1/6.], dtype=np.float64)) class BackoffMarkovModelTest(unittest.TestCase): def test_train_one(self): config = Mock() config.char_bag = ( string.ascii_lowercase + pg.PASSWORD_END) m = mm.BackoffMarkovModel(config, order=2) m.train([('pass', 1)]) self.assertEqual(set(m.freq_dict.items()), set([ (mm.PASSWORD_START, 1), ('p', 1), ('a', 1), ('s', 2), (pg.PASSWORD_END, 1), (mm.PASSWORD_START + 'p', 1), ('pa', 1), ('as', 1), ('ss', 1), ('s' + pg.PASSWORD_END, 1) ])) def test_train_two(self): config = Mock() config.char_bag = ( string.ascii_lowercase + pg.PASSWORD_END) m = mm.BackoffMarkovModel(config, order=2) m.train([('pass', 1), ('task', 1)]) self.assertEqual(set(m.freq_dict.items()), set([ (mm.PASSWORD_START, 2), (pg.PASSWORD_END, 2), ('p', 1), ('a', 2), ('s', 3), ('k', 1), ('t', 1), (mm.PASSWORD_START + 'p', 1), ('pa', 1), ('as', 2), ('ss', 1), ('s' + pg.PASSWORD_END, 1), (mm.PASSWORD_START + 't', 1), ('ta', 1), ('sk', 1), ('k' + pg.PASSWORD_END, 1) ])) def test_predict_short_context(self): config = Mock() config.char_bag = ('abc' + pg.PASSWORD_END) config.backoff_smoothing_threshold = 0 config.additive_smoothing_amount = 0 m = mm.BackoffMarkovModel(config, order=2) m.train([('abc', 1)]) answer = np.zeros((len(config.char_bag), ), dtype=np.float64) m.predict('ab', answer) np.testing.assert_array_almost_equal( answer, np.array([0., 0., 0., 1.], dtype=np.float64)) answer.fill(0) m.predict('ba', answer) np.testing.assert_array_almost_equal( answer, np.array([0., 0., 1., 0.], dtype=np.float64)) def test_predict_longer_context(self): config = Mock() config.char_bag = ('abc' + pg.PASSWORD_END) config.backoff_smoothing_threshold = 0 config.additive_smoothing_amount = 0 m = mm.BackoffMarkovModel(config, order=3) m.train([('abc', 1), ('aaa', 1)]) answer = np.zeros((len(config.char_bag), ), dtype=np.float64) m.predict('ab', answer) np.testing.assert_array_almost_equal( answer, np.array([0., 0., 0., 1.], dtype=np.float64)) answer.fill(0) m.predict('ba', answer) np.testing.assert_array_almost_equal( answer, np.array([.25, .5, .25, 0.], dtype=np.float64)) if __name__=='__main__': unittest.main()
40.072816
79
0.588855
1,028
8,255
4.540856
0.129377
0.121465
0.109897
0.183805
0.770351
0.759426
0.720223
0.675878
0.664739
0.627035
0
0.02749
0.250878
8,255
205
80
40.268293
0.727361
0
0
0.461111
0
0
0.035978
0
0
0
0
0
0.211111
1
0.066667
false
0.177778
0.044444
0
0.133333
0
0
0
0
null
0
0
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
8dfa116ffc10442a2f8a54d3a774af0a6ef507b0
180
py
Python
uniset/_category/zs.py
hukkinj1/uniset
eb1b5831bf282504585c8a384bf649780708f9ad
[ "MIT" ]
null
null
null
uniset/_category/zs.py
hukkinj1/uniset
eb1b5831bf282504585c8a384bf649780708f9ad
[ "MIT" ]
null
null
null
uniset/_category/zs.py
hukkinj1/uniset
eb1b5831bf282504585c8a384bf649780708f9ad
[ "MIT" ]
null
null
null
Zs = frozenset((' ', '\xa0', '\u1680', '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200a', '\u202f', '\u205f', '\u3000'))
90
179
0.494444
18
180
4.944444
1
0
0
0
0
0
0
0
0
0
0
0.3625
0.111111
180
1
180
180
0.19375
0
0
0
0
0
0.527778
0
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
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
5c13c13aaafa9105adc8721dd3bc0301535e7664
495
py
Python
environments/sparseMuJoCo/sparseMuJoCo/envs/mujoco/__init__.py
smileyenot983/PPO-pytorch
14fa91e0ac204fcba768f5e24f744f1ef9472488
[ "MIT" ]
null
null
null
environments/sparseMuJoCo/sparseMuJoCo/envs/mujoco/__init__.py
smileyenot983/PPO-pytorch
14fa91e0ac204fcba768f5e24f744f1ef9472488
[ "MIT" ]
null
null
null
environments/sparseMuJoCo/sparseMuJoCo/envs/mujoco/__init__.py
smileyenot983/PPO-pytorch
14fa91e0ac204fcba768f5e24f744f1ef9472488
[ "MIT" ]
null
null
null
from gym.envs.mujoco.mujoco_env import MujocoEnv # ^^^^^ so that user gets the correct error # message if mujoco is not installed correctly from sparseMuJoCo.envs.mujoco.ant import AntEnv from sparseMuJoCo.envs.mujoco.half_cheetah import HalfCheetahEnv from sparseMuJoCo.envs.mujoco.hopper import HopperEnv from sparseMuJoCo.envs.mujoco.walker2d import Walker2dEnv from sparseMuJoCo.envs.mujoco.humanoid import HumanoidEnv from sparseMuJoCo.envs.mujoco.humanoidstandup import HumanoidStandupEnv
49.5
71
0.852525
65
495
6.461538
0.523077
0.166667
0.285714
0.371429
0
0
0
0
0
0
0
0.004444
0.090909
495
9
72
55
0.928889
0.173737
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
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
5c23c3a937eafa0bf1032d4a69e492ec54e67523
55
py
Python
pydolphin/utils/__init__.py
dolphinorg/pydolphin
412aa6197d7df821be93f6375be16725030ca0e4
[ "MIT" ]
5
2021-03-11T17:57:13.000Z
2022-03-16T11:37:49.000Z
pydolphin/utils/__init__.py
dolphinorg/pydolphin
412aa6197d7df821be93f6375be16725030ca0e4
[ "MIT" ]
null
null
null
pydolphin/utils/__init__.py
dolphinorg/pydolphin
412aa6197d7df821be93f6375be16725030ca0e4
[ "MIT" ]
2
2021-03-11T17:19:50.000Z
2021-03-12T08:22:07.000Z
from .main_ping import ping from .get_host import _host
27.5
27
0.836364
10
55
4.3
0.6
0
0
0
0
0
0
0
0
0
0
0
0.127273
55
2
28
27.5
0.895833
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
5c2b39e634db419d59982613e796725d0a3baf2a
284
py
Python
site/megaMan/admin/__init__.py
TylerRudie/frcRobotMaster
fe32fe999e391e92ab0048139f0d541949ef17fe
[ "MIT" ]
null
null
null
site/megaMan/admin/__init__.py
TylerRudie/frcRobotMaster
fe32fe999e391e92ab0048139f0d541949ef17fe
[ "MIT" ]
5
2021-03-18T23:59:20.000Z
2021-09-22T18:37:10.000Z
site/megaMan/admin/__init__.py
TylerRudie/frcRobotMaster
fe32fe999e391e92ab0048139f0d541949ef17fe
[ "MIT" ]
null
null
null
from .categoryAdmin import categoryAdmin from .itemAdmin import itemAdmin from .locationAdmin import locationAdmin from .manufacturerAdmin import manufacturerAdmin from .materialAdmin import materialAdmin from .teamAdmin import teamAdmin from .partDetailAdmin import partDetailAdmin
31.555556
48
0.873239
28
284
8.857143
0.321429
0
0
0
0
0
0
0
0
0
0
0
0.102113
284
8
49
35.5
0.972549
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
5c384842ae7c205d6ab4ab84e18bf803c00f8f2f
224
py
Python
src/snooker_ball_tracker/ball_tracker/__init__.py
dcrblack/snooker-ball-tracker
292b307e48914ebc42227e371ca0114ea944c8cd
[ "MIT" ]
6
2020-08-10T14:00:52.000Z
2022-02-03T10:23:20.000Z
src/snooker_ball_tracker/ball_tracker/__init__.py
dcrblack/snooker-ball-tracker
292b307e48914ebc42227e371ca0114ea944c8cd
[ "MIT" ]
3
2021-04-30T14:11:06.000Z
2021-05-21T21:05:11.000Z
src/snooker_ball_tracker/ball_tracker/__init__.py
dcrblack/snooker-ball-tracker
292b307e48914ebc42227e371ca0114ea944c8cd
[ "MIT" ]
1
2020-10-14T06:07:13.000Z
2020-10-14T06:07:13.000Z
from .ball_tracker import BallTracker from .logger import Logger from .settings import (BallDetectionSettingGroup, BallDetectionSettings, ColourDetectionSettings) from .video_player import VideoPlayer
37.333333
72
0.78125
20
224
8.65
0.65
0
0
0
0
0
0
0
0
0
0
0
0.183036
224
5
73
44.8
0.945355
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.8
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
eb860860c19c8b4178135f707b53a9d3223459f5
305
py
Python
tests/test_pct_y_what_pct_of_x.py
thobiast/pcof
f94883b372a79014efdb4d28e3bde6eeb1a54d5a
[ "MIT" ]
1
2020-08-06T23:03:03.000Z
2020-08-06T23:03:03.000Z
tests/test_pct_y_what_pct_of_x.py
thobiast/pcof
f94883b372a79014efdb4d28e3bde6eeb1a54d5a
[ "MIT" ]
16
2020-06-02T17:51:32.000Z
2020-09-02T17:59:04.000Z
tests/test_pct_y_what_pct_of_x.py
thobiast/pcof
f94883b372a79014efdb4d28e3bde6eeb1a54d5a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Test y_what_pct_of_x function.""" import pytest from pcof import pct def test_y_what_pct_of_x(): assert pct.y_what_pct_of_x(10, 100) == "10.00%" assert pct.y_what_pct_of_x(10, 50) == "20.00%" assert pct.y_what_pct_of_x(10, 50, precision=0) == "20%" # vim: ts=4
20.333333
60
0.655738
60
305
2.983333
0.433333
0.139665
0.223464
0.27933
0.581006
0.581006
0.413408
0.413408
0.290503
0.290503
0
0.102767
0.170492
305
14
61
21.785714
0.604743
0.206557
0
0
0
0
0.06383
0
0
0
0
0
0.5
1
0.166667
true
0
0.333333
0
0.5
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
0
1
0
1
0
0
0
0
5
ccf0615263cd8ad3d4cc9dfad97b49650d728e35
100
py
Python
arxiv/sitemap/app.py
arXiv/arxiv-markdown
e653204d93f10417e9bd4cd8001e5bfe97762bc2
[ "MIT" ]
3
2019-05-26T22:49:26.000Z
2021-11-05T12:30:29.000Z
arxiv/sitemap/app.py
arXiv/arxiv-marxdown
385b08f8b83b302f89a2116ea99644eb617630aa
[ "MIT" ]
6
2019-02-21T13:52:15.000Z
2022-02-16T00:54:06.000Z
arxiv/sitemap/app.py
arXiv/arxiv-markdown
e653204d93f10417e9bd4cd8001e5bfe97762bc2
[ "MIT" ]
4
2019-05-26T22:49:08.000Z
2021-11-05T12:30:21.000Z
"""Flask dev app for sitemap.""" from sitemap.factory import create_web_app app = create_web_app()
20
42
0.76
16
100
4.5
0.625
0.25
0.333333
0
0
0
0
0
0
0
0
0
0.13
100
4
43
25
0.827586
0.26
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
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
15c21a40c63915c8f4628453c2cdbcfb348ea199
56
py
Python
tictactoe/log/__init__.py
luisds95/tictactoe-python
9765556372e303943bea82b85264e3fdca25a254
[ "MIT" ]
null
null
null
tictactoe/log/__init__.py
luisds95/tictactoe-python
9765556372e303943bea82b85264e3fdca25a254
[ "MIT" ]
null
null
null
tictactoe/log/__init__.py
luisds95/tictactoe-python
9765556372e303943bea82b85264e3fdca25a254
[ "MIT" ]
null
null
null
from tictactoe.log.logger import Logger, TrainingLogger
28
55
0.857143
7
56
6.857143
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.089286
56
1
56
56
0.941176
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
15f2ca3131dc99b58cf9ae917b5b5a75ec2b3f73
83
py
Python
danksales/__init__.py
OofChair/AndyCogs
0ccc6c3eba6f66051a9acf85fee765aae62c985b
[ "MIT" ]
8
2021-01-26T19:44:13.000Z
2021-08-03T00:11:39.000Z
danksales/__init__.py
OofChair/AndyCogs
0ccc6c3eba6f66051a9acf85fee765aae62c985b
[ "MIT" ]
6
2021-03-02T16:59:40.000Z
2021-07-21T06:26:00.000Z
danksales/__init__.py
OofChair/AndyCogs
0ccc6c3eba6f66051a9acf85fee765aae62c985b
[ "MIT" ]
6
2021-02-11T20:35:10.000Z
2021-08-07T07:40:17.000Z
from .danksales import DankSales def setup(bot): bot.add_cog(DankSales(bot))
13.833333
32
0.73494
12
83
5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.156627
83
5
33
16.6
0.857143
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
c6509838278ae9b240d9001c370d70b03a1abf08
121
py
Python
datasets/__init__.py
ryanhe312/ABAW2-FPNMAA
012ea1071647ae9d7ba65548792f40018644097b
[ "MIT" ]
12
2021-07-09T07:10:08.000Z
2022-03-18T01:52:23.000Z
datasets/__init__.py
ryanhe312/ABAW2-FPNMAA
012ea1071647ae9d7ba65548792f40018644097b
[ "MIT" ]
null
null
null
datasets/__init__.py
ryanhe312/ABAW2-FPNMAA
012ea1071647ae9d7ba65548792f40018644097b
[ "MIT" ]
1
2021-07-12T08:28:08.000Z
2021-07-12T08:28:08.000Z
from .affwild2 import AffWild2DataModule from .unified import UnifiedDataModule from .balanced import BalancedDataModule
30.25
40
0.876033
12
121
8.833333
0.666667
0
0
0
0
0
0
0
0
0
0
0.018349
0.099174
121
3
41
40.333333
0.954128
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
c65829143d09b8de8624d022069fddcd1c9abd4d
79
py
Python
webook/modules/__init__.py
jancr/webook
d1e7e290f5eb3d576874625b9c258d494e8ca6ba
[ "MIT" ]
null
null
null
webook/modules/__init__.py
jancr/webook
d1e7e290f5eb3d576874625b9c258d494e8ca6ba
[ "MIT" ]
null
null
null
webook/modules/__init__.py
jancr/webook
d1e7e290f5eb3d576874625b9c258d494e8ca6ba
[ "MIT" ]
1
2020-04-14T06:37:19.000Z
2020-04-14T06:37:19.000Z
from .fanfiction import FanFictionEBook from .wordpress import WordPressEBook
19.75
39
0.860759
8
79
8.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.113924
79
3
40
26.333333
0.971429
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
d6889594888c3bf020468f77594dfb7c97d52d36
58
py
Python
examplepackage/__init__.py
best-practice-and-impact/example-package-python
77f3aab1c6ad83b98952c10b9ac8523ee68e55f9
[ "MIT" ]
1
2021-03-24T14:24:58.000Z
2021-03-24T14:24:58.000Z
examplepackage/__init__.py
best-practice-and-impact/example-package-python
77f3aab1c6ad83b98952c10b9ac8523ee68e55f9
[ "MIT" ]
null
null
null
examplepackage/__init__.py
best-practice-and-impact/example-package-python
77f3aab1c6ad83b98952c10b9ac8523ee68e55f9
[ "MIT" ]
1
2021-02-19T17:14:06.000Z
2021-02-19T17:14:06.000Z
from examplepackage.example_module import example_function
58
58
0.931034
7
58
7.428571
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.051724
58
1
58
58
0.945455
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
d6b8c1eb8ad353913e25e07cbd4e18b21e230e72
5,452
py
Python
dnlinv/forward_models.py
LarsonLab/dnlinv
4355403d8438bb1888cd148490e3210da19977d3
[ "BSD-3-Clause" ]
null
null
null
dnlinv/forward_models.py
LarsonLab/dnlinv
4355403d8438bb1888cd148490e3210da19977d3
[ "BSD-3-Clause" ]
null
null
null
dnlinv/forward_models.py
LarsonLab/dnlinv
4355403d8438bb1888cd148490e3210da19977d3
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.distributions import fastMRI.data.transforms as transforms class ForwardModel(nn.Module): def __init__(self, noise_sigma, num_channels, img_shape, mask, mps, device='cpu'): super(ForwardModel, self).__init__() self.num_channels = num_channels self.C = transforms.to_tensor(mps).unsqueeze(0).to(device) self.img_shape = img_shape self.device = device self.mask = mask self.rng = torch.zeros([1, self.num_channels, self.img_shape[0], self.img_shape[1], 2]).to(device) def forward(self, image, noise_sigma): y = transforms.fft2(transforms.complex_mul(self.C.unsqueeze(0), image.unsqueeze(1))) \ + noise_sigma * self.rng.normal_() return y[self.mask.expand_as(y)].reshape(image.shape[0], -1) class ForwardModelCoilEstimated(nn.Module): def __init__(self, noise_sigma, num_channels, img_shape, mask, maximum_likelihood=False, device='cpu', n_mps=1): super(ForwardModelCoilEstimated, self).__init__() self.num_channels = num_channels self.img_shape = img_shape self.device = device self.mask = mask.to(device) self.n_mps = n_mps self.rng = torch.zeros([self.n_mps, self.num_channels, self.img_shape[0], self.img_shape[1], 2]).to(device) self.rng.requires_grad = False self.maximum_likelihood = maximum_likelihood def forward(self, image, coil_est, noise_sigma): if self.maximum_likelihood: y = transforms.fft2(transforms.complex_mul(coil_est, image.unsqueeze(2))) y = torch.sum(y, dim=1) # Reduce Soft SENSE dim else: y = transforms.fft2(transforms.complex_mul(coil_est, image.unsqueeze(2))) y = torch.sum(y, dim=1) # Reduce Soft SENSE dim y = y + noise_sigma * self.rng.normal_() return y[self.mask.expand_as(y)].reshape(image.shape[0], self.num_channels, -1) class ForwardModelCoilEstimatedNoiseCovariance(nn.Module): def __init__(self, noise_sigma, num_channels, img_shape, mask, maximum_likelihood=False, device='cpu', n_mps=1): super(ForwardModelCoilEstimatedNoiseCovariance, self).__init__() self.num_channels = num_channels self.img_shape = img_shape self.device = device self.mask = mask.to(device) self.n_mps = n_mps self.rng = torch.zeros([self.n_mps, self.num_channels, self.img_shape[0], self.img_shape[1], 2]).to(device) self.rng.requires_grad = False self.maximum_likelihood = maximum_likelihood def forward(self, image, coil_est, cholesky_noise_sigma): # cholesky_noise_sigma is the cholesky decomposition of the noise covariance matrix if self.maximum_likelihood: # y = transforms.fft2(coil_est * image.unsqueeze(2)) y = transforms.fft2(transforms.complex_mul(coil_est, image.unsqueeze(2))) y = torch.sum(y, dim=1) # Reduce Soft SENSE dim else: # y = transforms.fft2(coil_est * image.unsqueeze(2)) y = transforms.fft2(transforms.complex_mul(coil_est, image.unsqueeze(2))) y = torch.sum(y, dim=1) # Reduce Soft SENSE dim y = y + torch.matmul(cholesky_noise_sigma, self.rng.normal_().reshape(self.num_channels, -1)).reshape(self.rng.shape).unsqueeze(0) return y[self.mask.expand_as(y)].reshape(image.shape[0], self.num_channels, -1) # y has shape [num_samples, num_channels, -1] class ForwardModelCoilEstimatedNoiseCovarianceSoftSENSE(nn.Module): def __init__(self, noise_sigma, num_channels, img_shape, num_mps, mask, maximum_likelihood=False, device='cpu'): super(ForwardModelCoilEstimatedNoiseCovarianceSoftSENSE, self).__init__() self.num_channels = num_channels self.img_shape = img_shape self.num_mps = num_mps self.device = device self.mask = mask.to(device) self.rng = torch.zeros([self.num_mps, self.num_channels, self.img_shape[0], self.img_shape[1], 2]).to(device) self.rng.requires_grad = False self.maximum_likelihood = maximum_likelihood def forward(self, image, coil_est, cholesky_noise_sigma): # cholesky_noise_sigma is the cholesky decomposition of the noise covariance matrix if self.maximum_likelihood: y = transforms.fft2(transforms.complex_mul(coil_est * image.unsqueeze(2))) else: y = transforms.fft2(transforms.complex_mul(coil_est * image.unsqueeze(2))) \ + torch.matmul(cholesky_noise_sigma, self.rng.normal_().reshape(self.num_channels, -1)).reshape(self.rng.shape).unsqueeze(0) # Reduce sum soft SENSE dimension y = torch.sum(y, dim=1) return y[self.mask.expand_as(y)].reshape(image.shape[0], self.num_channels, -1) # y has shape [num_samples, num_channels, -1] # Soft SENSE has dimensions [samples, coil_images, coil_channels, z, y, x, complex_channels]
46.20339
142
0.629861
687
5,452
4.774381
0.117904
0.077134
0.059451
0.05122
0.795427
0.790244
0.764634
0.764634
0.753049
0.740854
0
0.01347
0.264674
5,452
117
143
46.598291
0.804689
0.103448
0
0.663043
0
0
0.002462
0
0
0
0
0
0
1
0.086957
false
0
0.065217
0
0.23913
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
ba48311de554dabbbebe960ff018cfd3ff1d0cca
112
py
Python
django_dynamicadmin/settings_test.py
seht/django-dynamic-admin
5b476da2875ef182339a07ae603bbcf5fa1d9adc
[ "BSD-3-Clause" ]
1
2019-10-17T11:53:22.000Z
2019-10-17T11:53:22.000Z
django_dynamicadmin/settings_test.py
seht/django-dynamic-admin
5b476da2875ef182339a07ae603bbcf5fa1d9adc
[ "BSD-3-Clause" ]
null
null
null
django_dynamicadmin/settings_test.py
seht/django-dynamic-admin
5b476da2875ef182339a07ae603bbcf5fa1d9adc
[ "BSD-3-Clause" ]
null
null
null
TESTS_BUNDLE_MODEL = 'TestBundle' TESTS_BUNDLE_APP = 'tests_bundle_app' TESTS_DYNAMIC_APP = 'tests_dynamic_app'
28
39
0.839286
16
112
5.25
0.375
0.392857
0.333333
0.452381
0
0
0
0
0
0
0
0
0.080357
112
3
40
37.333333
0.815534
0
0
0
0
0
0.383929
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
ba65bc711de533b95ea44a190f0c52783e09d80f
255
py
Python
gong/models.py
code-dot-org/curriculumbuilder
e40330006145b8528f777a8aec2abff5b309d1c7
[ "Apache-2.0" ]
3
2019-10-22T20:21:15.000Z
2022-01-12T19:38:48.000Z
gong/models.py
code-dot-org/curriculumbuilder
e40330006145b8528f777a8aec2abff5b309d1c7
[ "Apache-2.0" ]
67
2019-09-27T17:04:52.000Z
2022-03-21T22:16:23.000Z
gong/models.py
code-dot-org/curriculumbuilder
e40330006145b8528f777a8aec2abff5b309d1c7
[ "Apache-2.0" ]
1
2019-10-18T16:06:31.000Z
2019-10-18T16:06:31.000Z
from django.db import models from django_extensions.db.models import TimeStampedModel class Record(TimeStampedModel): user = models.CharField(max_length=255, blank=True, null=True) reason = models.CharField(max_length=255, blank=True, null=True)
36.428571
68
0.792157
35
255
5.685714
0.514286
0.100503
0.180905
0.241206
0.442211
0.442211
0.442211
0.442211
0.442211
0
0
0.026549
0.113725
255
7
68
36.428571
0.853982
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.4
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
ba9d17c0d2c5f3845434edbd14009b82abd68b91
59
py
Python
python--learnings/multi-module/cls/randomfunc.py
jekhokie/scriptbox
93c03d8ab9b7e7cd9c5c6a65b444392ffe92fd70
[ "MIT" ]
11
2020-03-29T09:12:25.000Z
2022-03-24T01:01:50.000Z
python--learnings/multi-module/cls/randomfunc.py
jekhokie/scriptbox
93c03d8ab9b7e7cd9c5c6a65b444392ffe92fd70
[ "MIT" ]
5
2021-06-02T03:41:51.000Z
2022-02-26T03:48:50.000Z
python--learnings/multi-module/cls/randomfunc.py
jekhokie/scriptbox
93c03d8ab9b7e7cd9c5c6a65b444392ffe92fd70
[ "MIT" ]
8
2019-02-01T13:33:14.000Z
2021-12-14T20:16:03.000Z
def random_func(): print("Hello from random function")
19.666667
39
0.711864
8
59
5.125
0.875
0
0
0
0
0
0
0
0
0
0
0
0.169492
59
2
40
29.5
0.836735
0
0
0
0
0
0.440678
0
0
0
0
0
0
1
0.5
true
0
0
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
1
0
5
baa510c702ccb77a55722abbf54f3762c9530bf5
83
py
Python
lib_database/postgres/__init__.py
jfuruness/lib_database
9671ae13ba7475db236617ff3030059b29b3b473
[ "BSD-3-Clause" ]
null
null
null
lib_database/postgres/__init__.py
jfuruness/lib_database
9671ae13ba7475db236617ff3030059b29b3b473
[ "BSD-3-Clause" ]
null
null
null
lib_database/postgres/__init__.py
jfuruness/lib_database
9671ae13ba7475db236617ff3030059b29b3b473
[ "BSD-3-Clause" ]
null
null
null
from .postgres import Postgres from .postgres_defaults import DEFAULT_CONF_SECTION
27.666667
51
0.879518
11
83
6.363636
0.636364
0.342857
0
0
0
0
0
0
0
0
0
0
0.096386
83
2
52
41.5
0.933333
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
baacc91266cc94569d2f01c7c0750dd2e2dfb785
118
py
Python
dangidongi/dangidongi/mixins.py
mrtaalebi/dangi-dongi
4a306ec6893b5b3076d09fb4f1380b495df8ee62
[ "MIT" ]
null
null
null
dangidongi/dangidongi/mixins.py
mrtaalebi/dangi-dongi
4a306ec6893b5b3076d09fb4f1380b495df8ee62
[ "MIT" ]
null
null
null
dangidongi/dangidongi/mixins.py
mrtaalebi/dangi-dongi
4a306ec6893b5b3076d09fb4f1380b495df8ee62
[ "MIT" ]
null
null
null
class MultiSerializerMixin: def get_serializer_class(self): return self.serializer_classes[self.action]
19.666667
51
0.762712
13
118
6.692308
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.169492
118
5
52
23.6
0.887755
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
240dd24da08ec4ea3ae97b07119c82fefa4b790b
32
py
Python
biu/progress/__init__.py
danihae/bio-image-unet
6cc74ec45ea5f03430920ae880e1e413db70e4fc
[ "MIT" ]
1
2021-10-04T15:58:47.000Z
2021-10-04T15:58:47.000Z
biu/progress/__init__.py
danihae/bio-image-unet
6cc74ec45ea5f03430920ae880e1e413db70e4fc
[ "MIT" ]
null
null
null
biu/progress/__init__.py
danihae/bio-image-unet
6cc74ec45ea5f03430920ae880e1e413db70e4fc
[ "MIT" ]
null
null
null
from .progressnotifier import *
16
31
0.8125
3
32
8.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.125
32
1
32
32
0.928571
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
24360a27fa263414e1cac6f96f352b1250862741
41
py
Python
ycalc/__init__.py
yadhu621/ycalc
a7805865b7ff8272acf19fa2b7300f87905afde1
[ "MIT" ]
null
null
null
ycalc/__init__.py
yadhu621/ycalc
a7805865b7ff8272acf19fa2b7300f87905afde1
[ "MIT" ]
null
null
null
ycalc/__init__.py
yadhu621/ycalc
a7805865b7ff8272acf19fa2b7300f87905afde1
[ "MIT" ]
null
null
null
from ycalc.calculator import Calculator
20.5
40
0.853659
5
41
7
0.8
0
0
0
0
0
0
0
0
0
0
0
0.121951
41
1
41
41
0.972222
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
034cdebc2f34dc81a296d00f54c25c821c817a82
6,988
py
Python
pymic/layer/convolution.py
vincentme/PyMIC
5cbbca7d0a19232be647086d4686ceea523f45ee
[ "Apache-2.0" ]
147
2019-12-23T02:52:04.000Z
2022-03-06T16:30:43.000Z
pymic/layer/convolution.py
vincentme/PyMIC
5cbbca7d0a19232be647086d4686ceea523f45ee
[ "Apache-2.0" ]
4
2020-12-18T12:47:21.000Z
2021-05-21T02:18:01.000Z
pymic/layer/convolution.py
vincentme/PyMIC
5cbbca7d0a19232be647086d4686ceea523f45ee
[ "Apache-2.0" ]
32
2020-01-08T13:48:50.000Z
2022-03-12T06:31:13.000Z
# -*- coding: utf-8 -*- from __future__ import print_function, division import torch import torch.nn as nn class ConvolutionLayer(nn.Module): """ A compose layer with the following components: convolution -> (batch_norm / layer_norm / group_norm / instance_norm) -> activation -> (dropout) batch norm and dropout are optional """ def __init__(self, in_channels, out_channels, kernel_size, dim = 3, stride = 1, padding = 0, dilation = 1, conv_group = 1, bias = True, norm_type = 'batch_norm', norm_group = 1, acti_func = None): super(ConvolutionLayer, self).__init__() self.n_in_chns = in_channels self.n_out_chns = out_channels self.norm_type = norm_type self.norm_group = norm_group self.acti_func = acti_func assert(dim == 2 or dim == 3) if(dim == 2): self.conv = nn.Conv2d(in_channels, out_channels, kernel_size, stride, padding, dilation, conv_group, bias) if(self.norm_type == 'batch_norm'): self.bn = nn.BatchNorm2d(out_channels) elif(self.norm_type == 'group_norm'): self.bn = nn.GroupNorm(self.norm_group, out_channels) elif(self.norm_type is not None): raise ValueError("unsupported normalization method {0:}".format(norm_type)) else: self.conv = nn.Conv3d(in_channels, out_channels, kernel_size, stride, padding, dilation, conv_group, bias) if(self.norm_type == 'batch_norm'): self.bn = nn.BatchNorm3d(out_channels) elif(self.norm_type == 'group_norm'): self.bn = nn.GroupNorm(self.norm_group, out_channels) elif(self.norm_type is not None): raise ValueError("unsupported normalization method {0:}".format(norm_type)) def forward(self, x): f = self.conv(x) if(self.norm_type is not None): f = self.bn(f) if(self.acti_func is not None): f = self.acti_func(f) return f class DepthSeperableConvolutionLayer(nn.Module): """ A compose layer with the following components: convolution -> (batch_norm) -> activation -> (dropout) batch norm and dropout are optional """ def __init__(self, in_channels, out_channels, kernel_size, dim = 3, stride = 1, padding = 0, dilation =1, conv_group = 1, bias = True, norm_type = 'batch_norm', norm_group = 1, acti_func = None): super(DepthSeperableConvolutionLayer, self).__init__() self.n_in_chns = in_channels self.n_out_chns = out_channels self.norm_type = norm_type self.norm_group = norm_group self.acti_func = acti_func assert(dim == 2 or dim == 3) if(dim == 2): self.conv1x1 = nn.Conv2d(in_channels, out_channels, kernel_size = 1, stride = stride, padding = 0, dilation = dilation, groups = conv_group, bias = bias) self.conv = nn.Conv2d(out_channels, out_channels, kernel_size, stride, padding, dilation, groups = out_channels, bias = bias) if(self.norm_type == 'batch_norm'): self.bn = nn.BatchNorm2d(out_channels) elif(self.norm_type == 'group_norm'): self.bn = nn.GroupNorm(self.norm_group, out_channels) elif(self.norm_type is not None): raise ValueError("unsupported normalization method {0:}".format(norm_type)) else: self.conv1x1 = nn.Conv3d(in_channels, out_channels, kernel_size = 1, stride = stride, padding = 0, dilation = dilation, groups = conv_group, bias = bias) self.conv = nn.Conv3d(out_channels, out_channels, kernel_size, stride, padding, dilation, groups = out_channels, bias = bias) if(self.norm_type == 'batch_norm'): self.bn = nn.BatchNorm3d(out_channels) elif(self.norm_type == 'group_norm'): self.bn = nn.GroupNorm(self.norm_group, out_channels) elif(self.norm_type is not None): raise ValueError("unsupported normalization method {0:}".format(norm_type)) def forward(self, x): f = self.conv1x1(x) f = self.conv(f) if(self.norm_type is not None): f = self.bn(f) if(self.acti_func is not None): f = self.acti_func(f) return f class ConvolutionSepAll3DLayer(nn.Module): """ A compose layer with the following components: convolution -> (batch_norm) -> activation -> (dropout) batch norm and dropout are optional """ def __init__(self, in_channels, out_channels, kernel_size, dim = 3, stride = 1, padding = 0, dilation =1, groups = 1, bias = True, batch_norm = True, acti_func = None): super(ConvolutionSepAll3DLayer, self).__init__() self.n_in_chns = in_channels self.n_out_chns = out_channels self.batch_norm = batch_norm self.acti_func = acti_func assert(dim == 3) chn = min(in_channels, out_channels) self.conv_intra_plane1 = nn.Conv2d(chn, chn, kernel_size, stride, padding, dilation, chn, bias) self.conv_intra_plane2 = nn.Conv2d(chn, chn, kernel_size, stride, padding, dilation, chn, bias) self.conv_intra_plane3 = nn.Conv2d(chn, chn, kernel_size, stride, padding, dilation, chn, bias) self.conv_space_wise = nn.Conv2d(in_channels, out_channels, 1, stride, 0, dilation, 1, bias) if(self.batch_norm): self.bn = nn.BatchNorm3d(out_channels) def forward(self, x): in_shape = list(x.shape) assert(len(in_shape) == 5) [B, C, D, H, W] = in_shape f0 = x.permute(0, 2, 1, 3, 4) #[B, D, C, H, W] f0 = f0.contiguous().view([B*D, C, H, W]) Cc = min(self.n_in_chns, self.n_out_chns) Co = self.n_out_chns if(self.n_in_chns > self.n_out_chns): f0 = self.conv_space_wise(f0) #[B*D, Cc, H, W] f1 = self.conv_intra_plane1(f0) f2 = f1.contiguous().view([B, D, Cc, H, W]) f2 = f2.permute(0, 3, 2, 1, 4) #[B, H, Cc, D, W] f2 = f2.contiguous().view([B*H, Cc, D, W]) f2 = self.conv_intra_plane2(f2) f3 = f2.contiguous().view([B, H, Cc, D, W]) f3 = f3.permute(0, 4, 2, 3, 1) #[B, W, Cc, D, H] f3 = f3.contiguous().view([B*W, Cc, D, H]) f3 = self.conv_intra_plane3(f3) if(self.n_in_chns <= self.n_out_chns): f3 = self.conv_space_wise(f3) #[B*W, Co, D, H] f3 = f3.contiguous().view([B, W, Co, D, H]) f3 = f3.permute([0, 2, 3, 4, 1]) #[B, Co, D, H, W] if(self.batch_norm): f3 = self.bn(f3) if(self.acti_func is not None): f3 = self.acti_func(f3) return f3
42.351515
120
0.586148
943
6,988
4.128314
0.11877
0.076291
0.049319
0.048549
0.794503
0.788852
0.776265
0.759825
0.713075
0.700231
0
0.02438
0.29565
6,988
164
121
42.609756
0.766558
0.082284
0
0.589147
0
0
0.039135
0
0
0
0
0
0.031008
1
0.046512
false
0
0.023256
0
0.116279
0.007752
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
035c89e0848defa3c08e9b1edbe25747cd98df61
12,590
py
Python
tests/models/affiliation_address/training_data_test.py
elifesciences/sciencebeam-parser
66964f283612b8d6fa8a23ad8790292c1ec07651
[ "MIT" ]
13
2021-08-04T12:11:17.000Z
2022-03-28T20:41:20.000Z
tests/models/affiliation_address/training_data_test.py
elifesciences/sciencebeam-parser
66964f283612b8d6fa8a23ad8790292c1ec07651
[ "MIT" ]
33
2021-08-05T08:37:59.000Z
2022-03-29T18:42:09.000Z
tests/models/affiliation_address/training_data_test.py
elifesciences/sciencebeam-parser
66964f283612b8d6fa8a23ad8790292c1ec07651
[ "MIT" ]
1
2022-01-05T14:53:06.000Z
2022-01-05T14:53:06.000Z
import logging from lxml import etree from sciencebeam_parser.document.layout_document import ( LayoutBlock, LayoutDocument, LayoutLine ) from sciencebeam_parser.document.tei.common import get_tei_xpath_text_content_list, tei_xpath from sciencebeam_parser.models.data import ( DEFAULT_DOCUMENT_FEATURES_CONTEXT ) from sciencebeam_parser.models.affiliation_address.data import AffiliationAddressDataGenerator from sciencebeam_parser.models.affiliation_address.training_data import ( AffiliationAddressTeiTrainingDataGenerator ) from sciencebeam_parser.utils.xml import get_text_content from tests.models.training_data_test_utils import ( get_labeled_model_data_list, get_labeled_model_data_list_list, get_model_data_list_for_layout_document, get_next_layout_line_for_text ) LOGGER = logging.getLogger(__name__) TEXT_1 = 'this is text 1' TEXT_2 = 'this is text 2' AFFILIATION_XPATH = ( 'tei:teiHeader/tei:fileDesc/tei:sourceDesc/tei:biblStruct' '/tei:analytic/tei:author/tei:affiliation' ) def get_data_generator() -> AffiliationAddressDataGenerator: return AffiliationAddressDataGenerator(DEFAULT_DOCUMENT_FEATURES_CONTEXT) class TestAffiliationAddressTeiTrainingDataGenerator: def test_should_include_layout_document_text_in_tei_output(self): training_data_generator = AffiliationAddressTeiTrainingDataGenerator() layout_document = LayoutDocument.for_blocks([LayoutBlock.for_text(TEXT_1)]) xml_root = training_data_generator.get_training_tei_xml_for_model_data_iterable( get_model_data_list_for_layout_document( layout_document, data_generator=get_data_generator() ) ) LOGGER.debug('xml: %r', etree.tostring(xml_root)) aff_nodes = tei_xpath(xml_root, AFFILIATION_XPATH) assert len(aff_nodes) == 1 assert get_text_content(aff_nodes[0]).rstrip() == TEXT_1 def test_should_keep_original_whitespace(self): training_data_generator = AffiliationAddressTeiTrainingDataGenerator() text = 'Token1, Token2 ,Token3' layout_document = LayoutDocument.for_blocks([LayoutBlock(lines=[ LayoutLine.for_text(text, tail_whitespace='\n') ])]) xml_root = training_data_generator.get_training_tei_xml_for_model_data_iterable( get_model_data_list_for_layout_document( layout_document, data_generator=get_data_generator() ) ) aff_nodes = tei_xpath(xml_root, AFFILIATION_XPATH) assert len(aff_nodes) == 1 assert get_text_content(aff_nodes[0]).rstrip() == text def test_should_add_line_feeds(self): training_data_generator = AffiliationAddressTeiTrainingDataGenerator() layout_document = LayoutDocument.for_blocks([LayoutBlock(lines=[ LayoutLine.for_text(TEXT_1, tail_whitespace='\n'), LayoutLine.for_text(TEXT_2, tail_whitespace='\n') ])]) xml_root = training_data_generator.get_training_tei_xml_for_model_data_iterable( get_model_data_list_for_layout_document( layout_document, data_generator=get_data_generator() ) ) aff_nodes = tei_xpath(xml_root, AFFILIATION_XPATH) assert len(aff_nodes) == 1 assert get_text_content(aff_nodes[0]).rstrip() == '\n'.join([TEXT_1, TEXT_2]) def test_should_lb_elements_before_line_feeds(self): training_data_generator = AffiliationAddressTeiTrainingDataGenerator() layout_document = LayoutDocument.for_blocks([LayoutBlock(lines=[ LayoutLine.for_text(TEXT_1, tail_whitespace='\n'), LayoutLine.for_text(TEXT_2, tail_whitespace='\n') ])]) xml_root = training_data_generator.get_training_tei_xml_for_model_data_iterable( get_model_data_list_for_layout_document( layout_document, data_generator=get_data_generator() ) ) aff_nodes = tei_xpath(xml_root, AFFILIATION_XPATH) assert len(aff_nodes) == 1 lb_nodes = tei_xpath(aff_nodes[0], 'tei:lb') assert len(lb_nodes) == 2 assert lb_nodes[0].getparent().text == TEXT_1 assert lb_nodes[0].tail == '\n' + TEXT_2 def test_should_generate_tei_from_model_data(self): layout_document = LayoutDocument.for_blocks([LayoutBlock(lines=[ get_next_layout_line_for_text(TEXT_1), get_next_layout_line_for_text(TEXT_2) ])]) data_generator = get_data_generator() model_data_iterable = data_generator.iter_model_data_for_layout_document( layout_document ) training_data_generator = AffiliationAddressTeiTrainingDataGenerator() xml_root = training_data_generator.get_training_tei_xml_for_model_data_iterable( model_data_iterable ) LOGGER.debug('xml: %r', etree.tostring(xml_root)) aff_nodes = tei_xpath(xml_root, AFFILIATION_XPATH) assert len(aff_nodes) == 1 lb_nodes = tei_xpath(aff_nodes[0], 'tei:lb') assert len(lb_nodes) == 2 assert lb_nodes[0].getparent().text == TEXT_1 assert lb_nodes[0].tail == '\n' + TEXT_2 def test_should_generate_tei_from_model_data_using_model_labels(self): label_and_layout_line_list = [ ('<marker>', get_next_layout_line_for_text(TEXT_1)), ('<institution>', get_next_layout_line_for_text(TEXT_2)) ] labeled_model_data_list = get_labeled_model_data_list( label_and_layout_line_list, data_generator=get_data_generator() ) training_data_generator = AffiliationAddressTeiTrainingDataGenerator() xml_root = training_data_generator.get_training_tei_xml_for_model_data_iterable( labeled_model_data_list ) LOGGER.debug('xml: %r', etree.tostring(xml_root)) aff_nodes = tei_xpath(xml_root, AFFILIATION_XPATH) assert len(aff_nodes) == 1 assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:marker' ) == [TEXT_1] assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:orgName[@type="institution"]' ) == [TEXT_2] assert get_text_content(aff_nodes[0]) == f'{TEXT_1}\n{TEXT_2}\n' def test_should_generate_tei_for_most_labels(self): label_and_layout_line_list = [ ('<marker>', get_next_layout_line_for_text('Marker 1')), ('<institution>', get_next_layout_line_for_text('Institution 1')), ('<department>', get_next_layout_line_for_text('Department 1')), ('<laboratory>', get_next_layout_line_for_text('Laboratory 1')), ('<addrLine>', get_next_layout_line_for_text('AddrLine 1')), ('O', get_next_layout_line_for_text(',')), ('<postCode>', get_next_layout_line_for_text('PostCode 1')), ('O', get_next_layout_line_for_text(',')), ('<postBox>', get_next_layout_line_for_text('PostBox 1')), ('O', get_next_layout_line_for_text(',')), ('<region>', get_next_layout_line_for_text('Region 1')), ('O', get_next_layout_line_for_text(',')), ('<settlement>', get_next_layout_line_for_text('Settlement 1')), ('O', get_next_layout_line_for_text(',')), ('<country>', get_next_layout_line_for_text('Country 1')) ] labeled_model_data_list = get_labeled_model_data_list( label_and_layout_line_list, data_generator=get_data_generator() ) training_data_generator = AffiliationAddressTeiTrainingDataGenerator() xml_root = training_data_generator.get_training_tei_xml_for_model_data_iterable( labeled_model_data_list ) LOGGER.debug('xml: %r', etree.tostring(xml_root)) aff_nodes = tei_xpath(xml_root, AFFILIATION_XPATH) assert len(aff_nodes) == 1 assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:marker' ) == ['Marker 1'] assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:orgName[@type="institution"]' ) == ['Institution 1'] assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:orgName[@type="department"]' ) == ['Department 1'] assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:orgName[@type="laboratory"]' ) == ['Laboratory 1'] assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:address/tei:addrLine' ) == ['AddrLine 1'] assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:address/tei:postCode' ) == ['PostCode 1'] assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:address/tei:postBox' ) == ['PostBox 1'] assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:address/tei:region' ) == ['Region 1'] assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:address/tei:settlement' ) == ['Settlement 1'] assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:address/tei:country' ) == ['Country 1'] assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:address' ) == ['\n,\n'.join([ 'AddrLine 1', 'PostCode 1', 'PostBox 1', 'Region 1', 'Settlement 1', 'Country 1' ])] def test_should_map_unknown_label_to_note(self): label_and_layout_line_list = [ ('<unknown>', get_next_layout_line_for_text(TEXT_1)) ] labeled_model_data_list = get_labeled_model_data_list( label_and_layout_line_list, data_generator=get_data_generator() ) training_data_generator = AffiliationAddressTeiTrainingDataGenerator() xml_root = training_data_generator.get_training_tei_xml_for_model_data_iterable( labeled_model_data_list, ) LOGGER.debug('xml: %r', etree.tostring(xml_root)) aff_nodes = tei_xpath(xml_root, AFFILIATION_XPATH) assert len(aff_nodes) == 1 assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:note[@type="unknown"]' ) == [TEXT_1] assert get_text_content(aff_nodes[0]) == f'{TEXT_1}\n' def test_should_not_join_separate_labels(self): label_and_layout_line_list = [ ('<institution>', get_next_layout_line_for_text(TEXT_1)), ('<institution>', get_next_layout_line_for_text(TEXT_2)) ] labeled_model_data_list = get_labeled_model_data_list( label_and_layout_line_list, data_generator=get_data_generator() ) training_data_generator = AffiliationAddressTeiTrainingDataGenerator() xml_root = training_data_generator.get_training_tei_xml_for_model_data_iterable( labeled_model_data_list ) LOGGER.debug('xml: %r', etree.tostring(xml_root)) aff_nodes = tei_xpath(xml_root, AFFILIATION_XPATH) assert len(aff_nodes) == 1 assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:orgName[@type="institution"]' ) == [TEXT_1, TEXT_2] assert get_text_content(aff_nodes[0]) == f'{TEXT_1}\n{TEXT_2}\n' def test_should_generate_tei_from_multiple_model_data_lists_using_model_labels(self): label_and_layout_line_list_list = [ [ ('<institution>', get_next_layout_line_for_text(TEXT_1)) ], [ ('<institution>', get_next_layout_line_for_text(TEXT_2)) ] ] labeled_model_data_list_list = get_labeled_model_data_list_list( label_and_layout_line_list_list, data_generator=get_data_generator() ) training_data_generator = AffiliationAddressTeiTrainingDataGenerator() xml_root = training_data_generator.get_training_tei_xml_for_multiple_model_data_iterables( labeled_model_data_list_list ) LOGGER.debug('xml: %r', etree.tostring(xml_root)) aff_nodes = tei_xpath(xml_root, AFFILIATION_XPATH) assert len(aff_nodes) == 2 assert get_tei_xpath_text_content_list( aff_nodes[0], './tei:orgName[@type="institution"]' ) == [TEXT_1] assert get_tei_xpath_text_content_list( aff_nodes[1], './tei:orgName[@type="institution"]' ) == [TEXT_2]
43.867596
98
0.670929
1,518
12,590
5.057971
0.078393
0.046887
0.042329
0.055353
0.81701
0.795129
0.756838
0.711904
0.678953
0.66658
0
0.011048
0.230739
12,590
286
99
44.020979
0.781724
0
0
0.515152
0
0
0.094678
0.040747
0
0
0
0
0.147727
1
0.041667
false
0
0.034091
0.003788
0.083333
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
0365c46444b452560d1b3a1428d0786f9b0b51c5
157
py
Python
register/api/pagination.py
LucasHiago/pede_ja
62609a32d045b167a96be79cc93113d32dcfe917
[ "MIT" ]
null
null
null
register/api/pagination.py
LucasHiago/pede_ja
62609a32d045b167a96be79cc93113d32dcfe917
[ "MIT" ]
null
null
null
register/api/pagination.py
LucasHiago/pede_ja
62609a32d045b167a96be79cc93113d32dcfe917
[ "MIT" ]
null
null
null
from rest_framework.pagination import LimitOffsetPagination, PageNumberPagination class EstablishmentSetPagination(PageNumberPagination): page_size = 4
31.4
81
0.866242
13
157
10.307692
0.923077
0
0
0
0
0
0
0
0
0
0
0.007042
0.095541
157
4
82
39.25
0.93662
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
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
0
0
1
0
1
0
0
5
036f53dbe7606d8bb7f87813619763c310b0e2d9
88
py
Python
scripts/fac-fma-profile.py
lnls-fac/fieldmaptrack
b2437744d4aa19fa260b5faa6d0fbd63c18df6ba
[ "MIT" ]
3
2015-04-13T23:20:11.000Z
2015-10-30T12:01:46.000Z
scripts/fac-fma-profile.py
lnls-fac/fieldmaptrack
b2437744d4aa19fa260b5faa6d0fbd63c18df6ba
[ "MIT" ]
2
2015-04-14T01:49:40.000Z
2017-11-25T11:10:58.000Z
scripts/fac-fma-profile.py
lnls-fac/fieldmaptrack
b2437744d4aa19fa260b5faa6d0fbd63c18df6ba
[ "MIT" ]
null
null
null
#!/usr/bin/env python-sirius import fieldmaptrack.profile fieldmaptrack.profile.run()
14.666667
28
0.795455
11
88
6.363636
0.818182
0.571429
0
0
0
0
0
0
0
0
0
0
0.079545
88
5
29
17.6
0.864198
0.306818
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
03708e48637abad4c441591a46b78cf9160be2a9
50
py
Python
hello.py
dgustafson58/pynet
8e877db0dc5e55ae1bbe2785631785f1843d0d95
[ "Apache-2.0" ]
null
null
null
hello.py
dgustafson58/pynet
8e877db0dc5e55ae1bbe2785631785f1843d0d95
[ "Apache-2.0" ]
null
null
null
hello.py
dgustafson58/pynet
8e877db0dc5e55ae1bbe2785631785f1843d0d95
[ "Apache-2.0" ]
null
null
null
print 'Hello world' print 'Hello again' # comment
12.5
19
0.74
7
50
5.285714
0.714286
0.540541
0
0
0
0
0
0
0
0
0
0
0.16
50
3
20
16.666667
0.880952
0.14
0
0
0
0
0.536585
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
1
0
5
037548cdf2b1a36b590e2e9f81253b11d0fd15ed
54
py
Python
data/__init__.py
zheang01/FACT
a877cc86acc4d29fb7589c8ac571c8aef09e5fd8
[ "MIT" ]
65
2021-06-14T16:16:40.000Z
2022-03-30T03:10:52.000Z
data/__init__.py
zheang01/FACT
a877cc86acc4d29fb7589c8ac571c8aef09e5fd8
[ "MIT" ]
5
2021-07-14T06:58:38.000Z
2021-11-29T10:52:27.000Z
data/__init__.py
zheang01/FACT
a877cc86acc4d29fb7589c8ac571c8aef09e5fd8
[ "MIT" ]
13
2021-06-14T16:16:40.000Z
2022-03-14T12:29:19.000Z
from .data_utils import * from .DGDataLoader import *
27
27
0.777778
7
54
5.857143
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.148148
54
2
27
27
0.891304
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
cef9d4ee6370d5af5c8b299469034961a3ceeaa8
160
py
Python
app/sub_app2/tests2.py
darklab8/darklab_fastapi
595bd0ec63977349fb7dedc3d91b93923d3ef4e8
[ "MIT" ]
null
null
null
app/sub_app2/tests2.py
darklab8/darklab_fastapi
595bd0ec63977349fb7dedc3d91b93923d3ef4e8
[ "MIT" ]
null
null
null
app/sub_app2/tests2.py
darklab8/darklab_fastapi
595bd0ec63977349fb7dedc3d91b93923d3ef4e8
[ "MIT" ]
null
null
null
def test_endpoint_with_var2(client): response = client.get("/items2/2") assert response.status_code == 200 assert response.json() == {"item_id": 2}
32
44
0.6875
22
160
4.772727
0.772727
0.266667
0
0
0
0
0
0
0
0
0
0.052239
0.1625
160
4
45
40
0.731343
0
0
0
0
0
0.1
0
0
0
0
0
0.5
1
0.25
false
0
0
0
0.25
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
1
0
1
0
0
0
0
0
0
0
5
301af26843e625522263e1198320829a1cc1997b
7,777
py
Python
somnium/tests/test_core.py
ivallesp/somnium
dc628cf18d7b4b4475106cf2a390df4ab5d2ff19
[ "MIT" ]
2
2019-09-04T10:26:03.000Z
2019-10-28T15:34:18.000Z
somnium/tests/test_core.py
ivallesp/somnium
dc628cf18d7b4b4475106cf2a390df4ab5d2ff19
[ "MIT" ]
null
null
null
somnium/tests/test_core.py
ivallesp/somnium
dc628cf18d7b4b4475106cf2a390df4ab5d2ff19
[ "MIT" ]
null
null
null
from unittest import TestCase import numpy as np import random from somnium.core import SOM, find_bmu from somnium.exceptions import ModelNotTrainedError, InvalidValuesInDataSet class TestGeneralTraining(TestCase): def test_fit_rect(self): # Check that the training process effectively reduces the errors data = np.random.rand(100, 10) model = SOM(neighborhood="gaussian", normalization="standard", mapsize=[15, 10], lattice="rect", distance_metric="euclidean", n_jobs=1) model.codebook.random_initialization(data) # Manually initialize the codebook model.data_norm = model.normalizer.normalize(data) model.model_is_unfitted = False e_q, e_t = model.calculate_quantization_error(), model.calculate_topographic_error() f1_0 = 1/(1/e_q + 1/e_t) model.fit(data, epochs=10, radiusin=10, radiusfin=3) e_q, e_t = model.calculate_quantization_error(), model.calculate_topographic_error() f1_1 = 1/(1/e_q + 1/e_t) self.assertGreater(f1_0, f1_1) def test_fit_hexa(self): # Check that the training process effectively reduces the errors data = np.random.rand(100, 10) model = SOM(neighborhood="gaussian", normalization="standard", mapsize=[15, 10], lattice="hexa", distance_metric="euclidean", n_jobs=1) model.codebook.random_initialization(data) # Manually initialize the codebook model.data_norm = model.normalizer.normalize(data) model.model_is_unfitted = False e_q, e_t = model.calculate_quantization_error(), model.calculate_topographic_error() f1_0 = 1/(1/e_q + 1/e_t) model.fit(data, epochs=10, radiusin=10, radiusfin=3) e_q, e_t = model.calculate_quantization_error(), model.calculate_topographic_error() f1_1 = 1/(1/e_q + 1/e_t) self.assertGreater(f1_0, f1_1) def test_predict(self): data = np.random.rand(100, 10) model = SOM(neighborhood="gaussian", normalization="standard", mapsize=[15, 10], lattice="hexa", distance_metric="euclidean", n_jobs=1) model.fit(data, epochs=10, radiusin=10, radiusfin=3) bmus_predict = model.predict(data) self.assertTrue((model.bmu[0] == bmus_predict).all()) def test_fit_different_parameters(self): # Check that the training process effectively reduces the errors for multiple metrics. # The criterion has been relaxed, we check the max(topographic_error, quantization_error) reduces data = np.random.rand(1000, 5) for neighborhood in ["gaussian", "cut_gaussian", "bubble", "epanechicov"]: for normalization in ["standard", "minmax", "log", "logistic", "boxcox"]: for distance_metric in ["euclidean", "cityblock"]: for lattice in ["rect", "hexa"]: model = SOM(neighborhood=neighborhood, normalization=normalization, mapsize=[15, 10], lattice=lattice, distance_metric=distance_metric, n_jobs=1) model.codebook.random_initialization(data) # Manually initialize the codebook model.data_norm = model.normalizer.normalize(data) model.model_is_unfitted = False e_q, e_t = model.calculate_quantization_error(), model.calculate_topographic_error() max_error_0 = max(e_q, e_t) model.fit(data, epochs=10, radiusin=10, radiusfin=3) e_q, e_t = model.calculate_quantization_error(), model.calculate_topographic_error() max_error_1 = max(e_q, e_t) self.assertGreater(max_error_0, max_error_1) def test_find_first_bmus(self): data = np.random.rand(1000, 5) model = SOM(neighborhood="gaussian", normalization="standard", mapsize=[15, 10], lattice="hexa", distance_metric="euclidean", n_jobs=1) model.codebook.random_initialization(data) # Manually initialize the codebook model.data_norm = model.normalizer.normalize(data) model.model_is_unfitted = False i = random.sample(range(150), 50) input_data = model.codebook.matrix[i, :] # Single thread bmus = find_bmu(codebook=model.codebook, input_matrix=input_data, metric="euclidean", njb=1) self.assertTrue((bmus[0] == i).all()) self.assertTrue((bmus[1] == 0).all()) # Multi thread bmus = find_bmu(codebook=model.codebook, input_matrix=input_data, metric="euclidean", njb=6) self.assertTrue((bmus[0] == i).all()) self.assertTrue((bmus[1] == 0).all()) def test_find_second_bmus(self): data = np.random.rand(1000, 230) model = SOM(neighborhood="gaussian", normalization="standard", mapsize=[15, 10], lattice="hexa", distance_metric="euclidean", n_jobs=1) model.codebook.random_initialization(data) # Manually initialize the codebook model.data_norm = model.normalizer.normalize(data) model.model_is_unfitted = False i = random.sample(range(148), 50) j = [x + 1 for x in i] input_data = model.codebook.matrix[i, :]*0.6 + model.codebook.matrix[j, :]*0.4 # Single thread bmus = find_bmu(codebook=model.codebook, input_matrix=input_data, metric="euclidean", njb=1, nth=1) self.assertTrue((bmus[0] == i).all()) bmus = find_bmu(codebook=model.codebook, input_matrix=input_data, metric="euclidean", njb=1, nth=2) self.assertTrue((bmus[0] == j).all()) # Multi thread bmus = find_bmu(codebook=model.codebook, input_matrix=input_data, metric="euclidean", njb=6, nth=1) self.assertTrue((bmus[0] == i).all()) bmus = find_bmu(codebook=model.codebook, input_matrix=input_data, metric="euclidean", njb=6, nth=2) self.assertTrue((bmus[0] == j).all()) class TestModelExceptions(TestCase): def test_raises_exception_when_model_unfitted(self): # Assure an exception is dropped when trying to calculate errors before training model = SOM(neighborhood="gaussian", normalization="standard", mapsize=[15, 10], lattice="hexa", distance_metric="euclidean", n_jobs=1) self.assertRaises(ModelNotTrainedError, model.calculate_topographic_error) self.assertRaises(ModelNotTrainedError, model.calculate_quantization_error) def test_nans_catching(self): # Assure it drops an error when a NaN value is introduced in the data data = np.random.rand(1000, 230) data[25, 21] = np.nan model = SOM(neighborhood="gaussian", normalization="standard", mapsize=[15, 10], lattice="hexa", distance_metric="euclidean", n_jobs=1) self.assertRaises(InvalidValuesInDataSet, model.fit, data=data, epochs=10, radiusin=10, radiusfin=3) def test_infs_catching(self): # Assure it drops an error when a Inf value is introduced in the data data = np.random.rand(1000, 230) data[25, 21] = np.Inf model = SOM(neighborhood="gaussian", normalization="standard", mapsize=[15, 10], lattice="hexa", distance_metric="euclidean", n_jobs=1) self.assertRaises(InvalidValuesInDataSet, model.fit, data=data, epochs=10, radiusin=10, radiusfin=3) data = np.random.rand(1000, 230) data[25, 21] = -np.Inf model = SOM(neighborhood="gaussian", normalization="standard", mapsize=[15, 10], lattice="hexa", distance_metric="euclidean", n_jobs=1) self.assertRaises(InvalidValuesInDataSet, model.fit, data=data, epochs=10, radiusin=10, radiusfin=3)
51.846667
109
0.651022
968
7,777
5.066116
0.14876
0.045881
0.040783
0.036705
0.796697
0.776305
0.75938
0.747961
0.738785
0.716558
0
0.036522
0.23248
7,777
149
110
52.194631
0.785056
0.095152
0
0.607143
0
0
0.058262
0
0
0
0
0
0.151786
1
0.080357
false
0
0.044643
0
0.142857
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
3025ed21094a8efd4ebf3fdbb611965d8d0f2bbc
87
py
Python
project_name/sample_module/sample_class.py
endjin/Endjin.RecommendedPractices.AzureDevopsPipelines.Python
a8521206816b012b0e0b034c0e4b50520533221a
[ "Apache-2.0" ]
1
2021-01-28T18:33:56.000Z
2021-01-28T18:33:56.000Z
project_name/sample_module/sample_class.py
endjin/Endjin.RecommendedPractices.AzureDevopsPipelines.Python
a8521206816b012b0e0b034c0e4b50520533221a
[ "Apache-2.0" ]
4
2021-01-10T13:46:28.000Z
2021-09-14T12:57:03.000Z
project_name/sample_module/sample_class.py
endjin/Endjin.RecommendedPractices.AzureDevopsPipelines.Python
a8521206816b012b0e0b034c0e4b50520533221a
[ "Apache-2.0" ]
1
2020-12-31T15:59:02.000Z
2020-12-31T15:59:02.000Z
class SampleClass: @staticmethod def sample_method(a, b): return a + b
17.4
28
0.62069
11
87
4.818182
0.818182
0.075472
0
0
0
0
0
0
0
0
0
0
0.298851
87
4
29
21.75
0.868852
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
303daa8ec385af45c8a65a2a961902b7141593c2
73
py
Python
crispy/rules/__init__.py
thegreathippo/crispy
e648a25ff8ec24a3fac3931ba28660b8e22f3020
[ "MIT" ]
null
null
null
crispy/rules/__init__.py
thegreathippo/crispy
e648a25ff8ec24a3fac3931ba28660b8e22f3020
[ "MIT" ]
null
null
null
crispy/rules/__init__.py
thegreathippo/crispy
e648a25ff8ec24a3fac3931ba28660b8e22f3020
[ "MIT" ]
null
null
null
from .core import Event, SubjectProperty from .behaviors import Behavior
24.333333
40
0.835616
9
73
6.777778
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.123288
73
2
41
36.5
0.953125
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
062e9033d5e8173df4a9f133e73ff3a235498946
160
py
Python
testovani/scitani.py
messa/pyladies-materials
5cc5753495d35e7a9737a10bd3cc29356ce7e30b
[ "MIT" ]
2
2018-11-13T13:31:43.000Z
2020-03-20T12:37:07.000Z
testovani/scitani.py
messa/pyladies-materials
5cc5753495d35e7a9737a10bd3cc29356ce7e30b
[ "MIT" ]
null
null
null
testovani/scitani.py
messa/pyladies-materials
5cc5753495d35e7a9737a10bd3cc29356ce7e30b
[ "MIT" ]
null
null
null
def secti(a, b): return a + b if __name__ == '__main__': print(secti(1, 2)) # https://stackoverflow.com/questions/419163/what-does-if-name-main-do
22.857143
74
0.65
25
160
3.84
0.76
0.041667
0.208333
0
0
0
0
0
0
0
0
0.060606
0.175
160
6
75
26.666667
0.666667
0.425
0
0
0
0
0.088889
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.5
0.25
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
1
0
0
0
1
0
0
0
5
ebfe280055b912789057dc816079c55ff45d48df
5,178
py
Python
slgnn/tests/test_metrics.py
thomasly/slgnn
caa1e7814498da41ad025b4e62c569fe511848ff
[ "MIT" ]
2
2020-08-31T00:55:31.000Z
2020-09-01T19:59:30.000Z
slgnn/tests/test_metrics.py
thomasly/slgnn
caa1e7814498da41ad025b4e62c569fe511848ff
[ "MIT" ]
null
null
null
slgnn/tests/test_metrics.py
thomasly/slgnn
caa1e7814498da41ad025b4e62c569fe511848ff
[ "MIT" ]
null
null
null
from unittest import TestCase import torch from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss from sklearn.metrics import roc_auc_score, average_precision_score from slgnn.metrics.metrics import ( MaskedBCEWithLogitsLoss, Accuracy, F1, ROC_AUC, AP, FocalLoss, ) class TestMaskedLoss(TestCase): def test_masked_bce_loss(self): criterion = MaskedBCEWithLogitsLoss() pred = torch.tensor([-1.0, 0.9, 0.1]) target = torch.tensor([0.0, 1.0, -1.0]) masked_loss = criterion(pred, target).item() expected_loss = BCEWithLogitsLoss()(pred[:2], target[:2]).item() self.assertEqual(masked_loss, expected_loss) def test_masked_focal_loss(self): criterion = FocalLoss() pred = torch.tensor([[1.0, -2.0], [0.9, 2.0], [0.1, 0.1]]) target = torch.tensor([0, 1, -1]) masked_loss = criterion(pred, target).item() expected_loss = CrossEntropyLoss()(pred[:2], target[:2]).item() self.assertEqual(masked_loss, expected_loss) pred = torch.tensor([[1.0, -2.0], [0.9, 2.0], [0.1, 0.1]]) target = torch.tensor([0, 1, 1]) loss = criterion(pred, target).item() expected_loss = CrossEntropyLoss()(pred, target).item() self.assertEqual(loss, expected_loss) alpha = 0.3 gamma = 1.5 criterion = FocalLoss(alpha=alpha, gamma=gamma) pred = torch.tensor([[1.0, -2.0], [0.9, 2.0], [0.1, 0.1]]) target = torch.tensor([0, 1, -1]) masked_loss = criterion(pred, target).item() a = torch.log_softmax(pred, 1)[0, 0] a = alpha * (-((1 - a.exp()) ** gamma) * a) b = torch.log_softmax(pred, 1)[1, 1] b = (1 - alpha) * (-((1 - b.exp()) ** gamma) * b) expected_loss = ((a + b) / 2).item() self.assertAlmostEqual(masked_loss, expected_loss) def test_masked_acc(self): metric = Accuracy() pred = torch.tensor([[1.0, -1.0, 1.0, -0.1, 0.8]]) target = torch.tensor([[-1, 0, 0, 0, 1]]) masked_acc = metric(pred, target) self.assertEqual(masked_acc, 0.75) pred = torch.tensor([[1.0, -1.0, 1.0, -0.1, 0.8]]) target = torch.tensor([[1, 0, 0, 0, 1]]) masked_acc = metric(pred, target) self.assertEqual(masked_acc, 0.8) pred = torch.tensor([[1.0, -1.0, 1.0, -0.1, -0.8]]) target = torch.tensor([[-1, 0, -1, 0, 1]]) masked_acc = metric(pred, target) self.assertAlmostEqual(masked_acc, 0.6666, places=3) def test_masked_f1(self): metric = F1() pred = torch.tensor([[1.0, -1.0, 1.0, -0.1, 0.8]]) target = torch.tensor([[-1, 0, 0, 0, 1]]) masked_acc = metric(pred, target) self.assertAlmostEqual(masked_acc, 0.75) pred = torch.tensor([[1.0, -1.0, 1.0, -0.1, 0.8]]) target = torch.tensor([[1, 0, 0, 0, 1]]) masked_acc = metric(pred, target) self.assertAlmostEqual(masked_acc, 0.8) pred = torch.tensor([[1.0, -1.0, 1.0, -0.1, -0.8]]) target = torch.tensor([[-1, 0, -1, 0, 1]]) masked_acc = metric(pred, target) self.assertAlmostEqual(masked_acc, 0.6666, places=3) def test_masked_roc(self): metric = ROC_AUC() pred = torch.tensor([[1.0, -1.0, 1.0, -0.1, 0.8]]) target = torch.tensor([[-1, 0, 0, 0, 1]]) masked_acc = metric(pred, target) expected = roc_auc_score([0, 0, 0, 1], torch.sigmoid(pred[0, 1:]).detach()) self.assertAlmostEqual(masked_acc, expected) pred = torch.tensor([[1.0, -1.0, 1.0, -0.1, 0.8]]) target = torch.tensor([[1, 0, 0, 0, 1]]) masked_acc = metric(pred, target) expected = roc_auc_score(target[0].detach(), torch.sigmoid(pred[0, :]).detach()) self.assertAlmostEqual(masked_acc, expected) pred = torch.tensor([[1.0, -1.0, 1.0, -0.1, -0.8]]) target = torch.tensor([[-1, 0, -1, 0, 1]]) masked_acc = metric(pred, target) expected = roc_auc_score([0, 0, 1], torch.sigmoid(pred[0, [1, 3, 4]]).detach()) self.assertAlmostEqual(masked_acc, expected, places=3) def test_masked_ap(self): metric = AP() pred = torch.tensor([[1.0, -1.0, 1.0, -0.1, 0.8]]) target = torch.tensor([[-1, 0, 0, 0, 1]]) masked_acc = metric(pred, target) expected = average_precision_score( [0, 0, 0, 1], torch.sigmoid(pred[0, 1:]).detach() ) self.assertAlmostEqual(masked_acc, expected) pred = torch.tensor([[1.0, -1.0, 1.0, -0.1, 0.8]]) target = torch.tensor([[1, 0, 0, 0, 1]]) masked_acc = metric(pred, target) expected = average_precision_score( target[0].detach(), torch.sigmoid(pred[0, :]).detach() ) self.assertAlmostEqual(masked_acc, expected) pred = torch.tensor([[1.0, -1.0, 1.0, -0.1, -0.8]]) target = torch.tensor([[-1, 0, -1, 0, 1]]) masked_acc = metric(pred, target) expected = average_precision_score( [0, 0, 1], torch.sigmoid(pred[0, [1, 3, 4]]).detach() ) self.assertAlmostEqual(masked_acc, expected, places=3)
39.227273
88
0.564117
748
5,178
3.808824
0.080214
0.051948
0.047385
0.040716
0.790804
0.764128
0.757108
0.74026
0.724465
0.693928
0
0.080704
0.25338
5,178
131
89
39.526718
0.656234
0
0
0.508929
0
0
0
0
0
0
0
0
0.142857
1
0.053571
false
0
0.044643
0
0.107143
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
23037e949c9e664d9b50e6a748bfaad486e9dbb4
178
py
Python
Programming building blocks/programming with functions.py
marcosamos/Python-tasks-and-proyects
00426323647639016a407c40af1fd00f35ea2229
[ "MIT" ]
null
null
null
Programming building blocks/programming with functions.py
marcosamos/Python-tasks-and-proyects
00426323647639016a407c40af1fd00f35ea2229
[ "MIT" ]
null
null
null
Programming building blocks/programming with functions.py
marcosamos/Python-tasks-and-proyects
00426323647639016a407c40af1fd00f35ea2229
[ "MIT" ]
null
null
null
def sum(number1, number2): total = number1 + number2 print(total) print("suma de 1 + 50") sum(1,50) print("suma de 1 + 500") sum(500,1) print("programa terminado")
11.866667
29
0.634831
28
178
4.035714
0.464286
0.247788
0.19469
0.212389
0
0
0
0
0
0
0
0.12766
0.207865
178
15
30
11.866667
0.673759
0
0
0
0
0
0.26257
0
0
0
0
0
0
1
0.125
false
0
0
0
0.125
0.5
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
232cb7fca5af9d0430c8596df23021cc8852d58b
140
py
Python
aanalytics2/__init__.py
mrpotatoserver/adobe_analytics_api_2.0_0_2_3
19ae7f48dd986feaaaf920c5013563d96e678c5e
[ "Apache-2.0" ]
17
2019-11-01T18:27:37.000Z
2021-02-25T20:41:32.000Z
aanalytics2/__init__.py
mrpotatoserver/adobe_analytics_api_2.0_0_2_3
19ae7f48dd986feaaaf920c5013563d96e678c5e
[ "Apache-2.0" ]
45
2019-11-03T14:08:49.000Z
2021-03-26T11:40:55.000Z
aanalytics2/__init__.py
mrpotatoserver/adobe_analytics_api_2.0_0_2_3
19ae7f48dd986feaaaf920c5013563d96e678c5e
[ "Apache-2.0" ]
15
2019-10-14T08:15:28.000Z
2021-02-09T21:28:11.000Z
from .__version__ import __version__ from .aanalytics2 import * from .aanalytics14 import * from .configs import * from .projects import *
20
36
0.785714
16
140
6.375
0.4375
0.294118
0
0
0
0
0
0
0
0
0
0.02521
0.15
140
6
37
23.333333
0.831933
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
2335ddd4adcd90bc6c9e77f748cdb141970cf3b1
113
py
Python
OpenGLCffi/GL/EXT/PGI/misc_hints.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
OpenGLCffi/GL/EXT/PGI/misc_hints.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
OpenGLCffi/GL/EXT/PGI/misc_hints.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
from OpenGLCffi.GL import params @params(api='gl', prms=['target', 'mode']) def glHintPGI(target, mode): pass
16.142857
42
0.699115
16
113
4.9375
0.75
0.253165
0
0
0
0
0
0
0
0
0
0
0.123894
113
6
43
18.833333
0.79798
0
0
0
0
0
0.108108
0
0
0
0
0
0
1
0.25
false
0.25
0.25
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
0
1
0
0
0
0
0
5
233f2dbf84aa1b0d702237cbe6a08a13ecf7376b
107
py
Python
tests/test_example.py
lsetiawan/mypackage
d4beef0905d4c0607fabcbefe25a0303af56809c
[ "Apache-2.0" ]
10
2018-08-24T15:31:05.000Z
2021-07-22T19:33:27.000Z
tests/test_example.py
lsetiawan/mypackage
d4beef0905d4c0607fabcbefe25a0303af56809c
[ "Apache-2.0" ]
4
2018-09-14T02:59:11.000Z
2019-02-27T02:39:47.000Z
tests/test_example.py
lsetiawan/mypackage
d4beef0905d4c0607fabcbefe25a0303af56809c
[ "Apache-2.0" ]
3
2018-09-13T06:15:09.000Z
2020-02-05T10:14:33.000Z
# -*- coding: utf-8 -*- def test_hello_world(): text = 'Hello World' assert text == 'Hello World'
17.833333
32
0.588785
14
107
4.357143
0.642857
0.491803
0.459016
0
0
0
0
0
0
0
0
0.012195
0.233645
107
5
33
21.4
0.731707
0.196262
0
0
0
0
0.261905
0
0
0
0
0
0.333333
1
0.333333
false
0
0
0
0.333333
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
1
0
0
0
0
0
0
0
5
2342832e540f54bc94cc9a6f02c6a33bc004250f
240
py
Python
RVFS/account/admin.py
cahudson94/Raven-Valley-Forge-Shop
52f46381eafa9410d8e9c759366ef7490dcb1de9
[ "MIT" ]
2
2018-02-12T01:32:16.000Z
2021-08-23T19:29:08.000Z
RVFS/account/admin.py
cahudson94/Raven-Valley-Forge-Shop
52f46381eafa9410d8e9c759366ef7490dcb1de9
[ "MIT" ]
1
2018-05-23T03:42:20.000Z
2018-05-23T03:42:20.000Z
RVFS/account/admin.py
cahudson94/Raven-Valley-Forge-Shop
52f46381eafa9410d8e9c759366ef7490dcb1de9
[ "MIT" ]
null
null
null
""".""" from django.contrib import admin from account.models import Account, ShippingInfo, Order, SlideShowImage admin.site.register(Account) admin.site.register(ShippingInfo) admin.site.register(Order) admin.site.register(SlideShowImage)
26.666667
71
0.8125
29
240
6.724138
0.413793
0.184615
0.348718
0
0
0
0
0
0
0
0
0
0.070833
240
8
72
30
0.874439
0.004167
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
88f63f9888f306759e4b976219b6a0236c291a6d
15,840
py
Python
src/ui/params.py
nilax97/DL-Sys-Perf-Project
bb6d2e8587272e37903f0f7e30ba38f98690c899
[ "MIT" ]
null
null
null
src/ui/params.py
nilax97/DL-Sys-Perf-Project
bb6d2e8587272e37903f0f7e30ba38f98690c899
[ "MIT" ]
1
2022-02-09T23:43:36.000Z
2022-02-09T23:43:36.000Z
src/ui/params.py
nilax97/DL-Sys-Perf-Project
bb6d2e8587272e37903f0f7e30ba38f98690c899
[ "MIT" ]
null
null
null
import ipywidgets as widgets from IPython.display import display, clear_output from ipywidgets import Layout import functools from ui.utils import * def create_initial_model_input(init_model_type): model_types = ['VGG', 'ResNet', 'Inception', 'FC'] model_type_dropdown = widgets.Dropdown( options=model_types, value=init_model_type, description='Model Type:', disabled=False, ) dropdown = model_type_dropdown.observe(create_inputs, names = 'value') display(model_type_dropdown) def create_vgg_inputs(): inp_shape_dropdown = widgets.Dropdown( options=[128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024], description='Input Shape (s x s x 3): ', style = {'description_width': '150px'}, disabled=False, ) inp_shape_dropdown.value = inp_shape_dropdown.options[0] inp_size_dropdown = widgets.Dropdown( options=[1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288], description='Input Size: ', style = {'description_width': '150px'}, disabled=False, ) inp_size_dropdown.value = inp_size_dropdown.options[0] vgg_layer_size_dropdown = widgets.Dropdown( options=[1, 2, 3, 4, 5, 6, 7], description='VGG Layer Size: ', style = {'description_width': '150px'}, disabled=False, ) vgg_layer_size_dropdown.value = vgg_layer_size_dropdown.options[0] vgg_layers_dropdown = widgets.Dropdown( options=[2, 3, 4, 5, 6, 7, 8, 9, 10], description='VGG Layers: ', style = {'description_width': '150px'}, disabled=False, ) vgg_layers_dropdown.value = vgg_layers_dropdown.options[0] hidden_layers_dropdown = widgets.Dropdown( options=[100, 316, 1000, 3162], description='Hidden Layers: ', style = {'description_width': '150px'}, disabled=False, ) hidden_layers_dropdown.value = hidden_layers_dropdown.options[0] hidden_layer_size_dropdown = widgets.Dropdown( options=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], description='Hidden Layer Size: ', style = {'description_width': '150px'}, disabled=False, ) hidden_layer_size_dropdown.value = hidden_layer_size_dropdown.options[0] filters_dropdown = widgets.Dropdown( options=[16, 32, 64, 128, 256, 512, 1024], description='Number of Filters: ', style = {'description_width': '150px'}, disabled=False, ) filters_dropdown.value = filters_dropdown.options[0] out_shape_dropdown = widgets.Dropdown( options=[2, 4, 8, 16, 32, 64, 128, 256, 512, 1024], description='Desired Output Shape: ', style = {'description_width': '150px'}, disabled=False, ) out_shape_dropdown.value = out_shape_dropdown.options[0] batch_size_dropdown = widgets.Dropdown( options=[8, 16, 32, 64, 128, 256, 512, 1024], description='Batch Size: ', style = {'description_width': '150px'}, disabled=False, ) batch_size_dropdown.value = batch_size_dropdown.options[0] epochs_txtbox = widgets.BoundedIntText( value=100, min=0, max=1000000, step=1, description='Epochs:', style = {'description_width': '150px'}, disabled=False ) run_button = widgets.Button(description = "Let's Calculate!") run_button.on_click(functools.partial(run_vgg_model_and_get_output, \ inputs = [ inp_shape_dropdown, inp_size_dropdown, vgg_layer_size_dropdown, vgg_layers_dropdown, hidden_layer_size_dropdown, hidden_layers_dropdown, filters_dropdown, out_shape_dropdown, batch_size_dropdown, epochs_txtbox ])) display(inp_shape_dropdown) display(inp_size_dropdown) display(vgg_layer_size_dropdown) display(vgg_layers_dropdown) display(hidden_layer_size_dropdown) display(hidden_layers_dropdown) display(filters_dropdown) display(out_shape_dropdown) display(batch_size_dropdown) display(epochs_txtbox) display(run_button) def run_vgg_model_and_get_output(btn, inputs): config = dict() config['input_shape'] = int(inputs[0].value) config['input_size'] = int(inputs[1].value) config['vgg_layers'] = int(inputs[3].value) config['vgg_layers_size'] = int(inputs[2].value) config['filters'] = int(inputs[6].value) config['hidden_layers_size'] = int(inputs[4].value) config['hidden_layers'] = int(inputs[5].value) config['output_shape'] = int(inputs[7].value) config['batch_size'] = int(inputs[8].value) config['epochs'] = int(inputs[9].value) # Model Run function training_time = get_training_time(config,'vgg') print(f"Training Time: {training_time}") def create_resnet_inputs(): inp_shape_dropdown = widgets.Dropdown( options=[128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024], description='Input Shape (s x s x 3): ', style = {'description_width': '150px'}, disabled=False, ) inp_shape_dropdown.value = inp_shape_dropdown.options[0] inp_size_dropdown = widgets.Dropdown( options=[1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288], description='Input Size: ', style = {'description_width': '150px'}, disabled=False, ) inp_size_dropdown.value = inp_size_dropdown.options[0] resnet_layers_dropdown = widgets.Dropdown( options=[3, 4, 5, 6, 7], description='ResNet Layers: ', style = {'description_width': '150px'}, disabled=False, ) resnet_layers_dropdown.value = resnet_layers_dropdown.options[0] hidden_layers_dropdown = widgets.Dropdown( options=[100, 316, 1000, 3162], description='Hidden Layers: ', style = {'description_width': '150px'}, disabled=False, ) hidden_layers_dropdown.value = hidden_layers_dropdown.options[0] hidden_layer_size_dropdown = widgets.Dropdown( options=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], description='Hidden Layer Size: ', style = {'description_width': '150px'}, disabled=False, ) hidden_layer_size_dropdown.value = hidden_layer_size_dropdown.options[0] out_shape_dropdown = widgets.Dropdown( options=[2, 4, 8, 16, 32, 64, 128, 256, 512, 1024], description='Desired Output Shape: ', style = {'description_width': '150px'}, disabled=False, ) out_shape_dropdown.value = out_shape_dropdown.options[0] batch_size_dropdown = widgets.Dropdown( options=[8, 16, 32, 64, 128, 256, 512, 1024], description='Batch Size: ', style = {'description_width': '150px'}, disabled=False, ) batch_size_dropdown.value = batch_size_dropdown.options[0] epochs_txtbox = widgets.BoundedIntText( value=100, min=0, max=1000000, step=1, description='Epochs:', style = {'description_width': '150px'}, disabled=False ) run_button = widgets.Button(description = "Let's Calculate!") run_button.on_click(functools.partial(run_resnet_model_and_get_output, \ inputs = [ inp_shape_dropdown, inp_size_dropdown, resnet_layers_dropdown, hidden_layer_size_dropdown, hidden_layers_dropdown, out_shape_dropdown, batch_size_dropdown, epochs_txtbox ])) display(inp_shape_dropdown) display(inp_size_dropdown) display(resnet_layers_dropdown) display(hidden_layer_size_dropdown) display(hidden_layers_dropdown) display(out_shape_dropdown) display(batch_size_dropdown) display(epochs_txtbox) display(run_button) def run_resnet_model_and_get_output(btn, inputs): config = dict() config['input_shape'] = int(inputs[0].value) config['input_size'] = int(inputs[1].value) config['resnet_layers'] = int(inputs[2].value) config['hidden_layers_size'] = int(inputs[3].value) config['hidden_layers'] = int(inputs[4].value) config['output_shape'] = int(inputs[5].value) config['batch_size'] = int(inputs[6].value) config['epochs'] = int(inputs[7].value) # Model Run function training_time = get_training_time(config,'resnet') print(f"Training Time: {training_time}") def create_inception_inputs(): inp_shape_dropdown = widgets.Dropdown( options=[128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024], description='Input Shape (s x s x 3): ', style = {'description_width': '150px'}, disabled=False, ) inp_shape_dropdown.value = inp_shape_dropdown.options[0] inp_size_dropdown = widgets.Dropdown( options=[1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288], description='Input Size: ', style = {'description_width': '150px'}, disabled=False, ) inp_size_dropdown.value = inp_size_dropdown.options[0] inception_layers_dropdown = widgets.Dropdown( options=[1, 2, 3, 4, 5], description='Inception Layers: ', style = {'description_width': '150px'}, disabled=False, ) inception_layers_dropdown.value = inception_layers_dropdown.options[0] f1_dropdown = widgets.Dropdown( options=[64, 128, 192, 256, 320], description='F1 Layers: ', style = {'description_width': '150px'}, disabled=False, ) f1_dropdown.value = f1_dropdown.options[0] f2_in_dropdown = widgets.Dropdown( options=[128, 192, 256, 320, 384], description='F2 In Layers: ', style = {'description_width': '150px'}, disabled=False, ) f2_in_dropdown.value = f2_in_dropdown.options[0] f2_out_dropdown = widgets.Dropdown( options=[192, 256, 320, 384, 448], description='F2 Out Layers: ', style = {'description_width': '150px'}, disabled=False, ) f2_out_dropdown.value = f2_out_dropdown.options[0] f3_in_dropdown = widgets.Dropdown( options=[32, 64, 96, 128, 160], description='F3 In Layers: ', style = {'description_width': '150px'}, disabled=False, ) f3_in_dropdown.value = f3_in_dropdown.options[0] f3_out_dropdown = widgets.Dropdown( options=[32, 64, 96, 128, 160], description='F3 Out Layers: ', style = {'description_width': '150px'}, disabled=False, ) f3_out_dropdown.value = f3_out_dropdown.options[0] f4_out_dropdown = widgets.Dropdown( options=[32, 64, 96, 128, 160], description='F4 Out Layers: ', style = {'description_width': '150px'}, disabled=False, ) f4_out_dropdown.value = f4_out_dropdown.options[0] hidden_layer_size_dropdown = widgets.Dropdown( options=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], description='Hidden Layer Size: ', style = {'description_width': '150px'}, disabled=False, ) hidden_layer_size_dropdown.value = hidden_layer_size_dropdown.options[0] hidden_layers_dropdown = widgets.Dropdown( options=[100, 316, 1000, 3162], description='Hidden Layers: ', style = {'description_width': '150px'}, disabled=False, ) hidden_layers_dropdown.value = hidden_layers_dropdown.options[0] out_shape_dropdown = widgets.Dropdown( options=[2, 4, 8, 16, 32, 64, 128, 256, 512, 1024], description='Desired Output Shape: ', style = {'description_width': '150px'}, disabled=False, ) out_shape_dropdown.value = out_shape_dropdown.options[0] batch_size_dropdown = widgets.Dropdown( options=[8, 16, 32, 64, 128, 256, 512, 1024], description='Batch Size: ', style = {'description_width': '150px'}, disabled=False, ) batch_size_dropdown.value = batch_size_dropdown.options[0] epochs_txtbox = widgets.BoundedIntText( value=100, min=0, max=1000000, step=1, description='Epochs:', style = {'description_width': '150px'}, disabled=False ) run_button = widgets.Button(description = "Let's Calculate!") run_button.on_click(functools.partial(run_inception_model_and_get_output, \ inputs = [ inp_shape_dropdown, inp_size_dropdown, inception_layers_dropdown, f1_dropdown, f2_in_dropdown, f2_out_dropdown, f3_in_dropdown, f3_out_dropdown, f4_out_dropdown, hidden_layer_size_dropdown, hidden_layers_dropdown, out_shape_dropdown, batch_size_dropdown, epochs_txtbox ])) display(inp_shape_dropdown) display(inp_size_dropdown) display(inception_layers_dropdown) display(f1_dropdown) display(f2_in_dropdown) display(f2_out_dropdown) display(f3_in_dropdown) display(f3_out_dropdown) display(f4_out_dropdown) display(hidden_layer_size_dropdown) display(hidden_layers_dropdown) display(out_shape_dropdown) display(batch_size_dropdown) display(epochs_txtbox) display(run_button) def run_inception_model_and_get_output(btn, inputs): config = dict() config['input_shape'] = int(inputs[0].value) config['input_size'] = int(inputs[1].value) config['inception_layers'] = int(inputs[2].value) config['f1'] = int(inputs[3].value) config['f2_in'] = int(inputs[4].value) config['f2_out'] = int(inputs[5].value) config['f3_in'] = int(inputs[6].value) config['f3_out'] = int(inputs[7].value) config['f4_out'] = int(inputs[8].value) config['hidden_layers_size'] = int(inputs[9].value) config['hidden_layers'] = int(inputs[10].value) config['output_shape'] = int(inputs[11].value) config['batch_size'] = int(inputs[12].value) config['epochs'] = int(inputs[13].value) # Model Run function training_time = get_training_time(config,'inception') print(f"Training Time: {training_time}") def create_fc_inputs(): inp_shape_dropdown = widgets.Dropdown( options=[128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024], description='Input Shape (s x s x 3): ', style = {'description_width': '150px'}, disabled=False, ) inp_shape_dropdown.value = inp_shape_dropdown.options[0] inp_size_dropdown = widgets.Dropdown( options=[1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288], description='Input Size: ', style = {'description_width': '150px'}, disabled=False, ) inp_size_dropdown.value = inp_size_dropdown.options[0] hidden_layers_dropdown = widgets.Dropdown( options=[1, 2, 3, 4, 5, 6, 7, 8, 9], description='FC Hidden Layers: ', style = {'description_width': '150px'}, disabled=False, ) hidden_layers_dropdown.value = hidden_layers_dropdown.options[0] out_shape_dropdown = widgets.Dropdown( options=[2, 4, 8, 16, 32, 64, 128, 256, 512, 1024], description='Desired Output Shape: ', style = {'description_width': '150px'}, disabled=False, ) out_shape_dropdown.value = out_shape_dropdown.options[0] batch_size_dropdown = widgets.Dropdown( options=[8, 16, 32, 64, 128, 256, 512, 1024], description='Batch Size: ', style = {'description_width': '150px'}, disabled=False, ) batch_size_dropdown.value = batch_size_dropdown.options[0] epochs_txtbox = widgets.BoundedIntText( value=100, min=0, max=1000000, step=1, description='Epochs:', style = {'description_width': '150px'}, disabled=False ) run_button = widgets.Button(description = "Let's Calculate!") run_button.on_click(functools.partial(run_fc_model_and_get_output, \ inputs = [ inp_shape_dropdown, inp_size_dropdown, hidden_layers_dropdown, out_shape_dropdown, batch_size_dropdown, epochs_txtbox ])) display(inp_shape_dropdown) display(inp_size_dropdown) display(hidden_layers_dropdown) display(out_shape_dropdown) display(batch_size_dropdown) display(epochs_txtbox) display(run_button) def run_fc_model_and_get_output(btn, inputs): config = dict() config['input_shape'] = int(inputs[0].value) config['input_size'] = int(inputs[1].value) config['hidden_layers'] = int(inputs[2].value) config['output_shape'] = int(inputs[3].value) config['batch_size'] = int(inputs[4].value) config['epochs'] = int(inputs[5].value) # Model Run function training_time = get_training_time(config,'fc') print(f"Training Time: {training_time}") def create_inputs(change): if change.new == "VGG": clear_output() create_initial_model_input("VGG") create_vgg_inputs() elif change.new == "ResNet": clear_output() create_initial_model_input("ResNet") create_resnet_inputs() elif change.new == "Inception": clear_output() create_initial_model_input("Inception") create_inception_inputs() else: clear_output() create_initial_model_input("FC") create_fc_inputs()
30.229008
87
0.710795
2,091
15,840
5.117647
0.063606
0.09672
0.074572
0.092328
0.856929
0.8174
0.756098
0.728623
0.683768
0.673675
0
0.077837
0.154861
15,840
523
88
30.286807
0.721521
0.004735
0
0.617391
0
0
0.133448
0
0
0
0
0
0
1
0.021739
false
0
0.01087
0
0.032609
0.008696
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
00159945c43215a5835cff23a410fc327f9036d9
66
py
Python
src/models/__init__.py
ikecoglu/DL-SR
5e4c794f1434cd4a9b2b1aecf3738065b11bede1
[ "MIT" ]
46
2021-01-07T03:38:07.000Z
2022-03-24T19:11:23.000Z
src/models/__init__.py
ikecoglu/DL-SR
5e4c794f1434cd4a9b2b1aecf3738065b11bede1
[ "MIT" ]
7
2021-02-06T14:23:18.000Z
2022-02-13T04:08:45.000Z
src/models/__init__.py
ikecoglu/DL-SR
5e4c794f1434cd4a9b2b1aecf3738065b11bede1
[ "MIT" ]
16
2021-01-26T16:22:49.000Z
2022-02-26T03:21:08.000Z
import models.common import models.DFCAN16 import models.DFGAN50
13.2
21
0.848485
9
66
6.222222
0.555556
0.642857
0
0
0
0
0
0
0
0
0
0.067797
0.106061
66
4
22
16.5
0.881356
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
cc98a8763e4dd603d471288c780fad6dab63c0af
1,237
py
Python
factories.py
msoedov/flask-graphql-example
f76aad23e9a4d22363b477007ce2c4b05dfe2818
[ "MIT" ]
55
2015-11-28T18:43:41.000Z
2021-07-02T09:11:51.000Z
factories.py
msoedov/flask-graphql-example
f76aad23e9a4d22363b477007ce2c4b05dfe2818
[ "MIT" ]
4
2015-12-10T19:37:04.000Z
2018-07-13T12:52:41.000Z
factories.py
msoedov/flask-graphql-example
f76aad23e9a4d22363b477007ce2c4b05dfe2818
[ "MIT" ]
6
2016-07-16T14:36:59.000Z
2021-06-24T07:53:05.000Z
import factory from faker import Factory from models import * fake = Factory.create() class UserFactory(factory.mongoengine.MongoEngineFactory): class Meta: model = User @factory.lazy_attribute def email(self): return fake.email() @factory.lazy_attribute def first_name(self): return fake.first_name() @factory.lazy_attribute def last_name(self): return fake.last_name() class CommentFactory(factory.mongoengine.MongoEngineFactory): @factory.lazy_attribute def name(self): return fake.first_name() @factory.lazy_attribute def content(self): return fake.text() class Meta: model = Comment class PostFactory(factory.mongoengine.MongoEngineFactory): class Meta: model = Post @factory.lazy_attribute def title(self): return fake.job() @factory.lazy_attribute def author(self): return fake.name() @factory.lazy_attribute def tags(self): return [fake.user_name() for _ in range(3)] @factory.lazy_attribute def comments(self): return CommentFactory.create_batch(5) @factory.lazy_attribute def content(self): return fake.text()
19.030769
61
0.664511
141
1,237
5.702128
0.283688
0.136816
0.248756
0.28607
0.373134
0.339552
0.215174
0.215174
0.215174
0.124378
0
0.002146
0.246564
1,237
64
62
19.328125
0.860515
0
0
0.44186
0
0
0
0
0
0
0
0
0
1
0.232558
false
0
0.069767
0.232558
0.674419
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
cc9c74e781907f799f7907fc740b85bd0284e6e0
254
py
Python
create_superuser.py
unnati-xyz/guby
2ae17498563c1bd2596a763b3fdb35d24c8b27da
[ "MIT" ]
null
null
null
create_superuser.py
unnati-xyz/guby
2ae17498563c1bd2596a763b3fdb35d24c8b27da
[ "MIT" ]
11
2020-06-27T11:05:14.000Z
2021-09-22T18:59:42.000Z
create_superuser.py
unnati-xyz/guby
2ae17498563c1bd2596a763b3fdb35d24c8b27da
[ "MIT" ]
null
null
null
#!/usr/bin/env python import django django.setup() from django.contrib.auth import get_user_model import os User = get_user_model() User.objects.create_superuser(os.getenv('DJANGO_SU_NAME'), os.getenv('DJANGO_SU_EMAIL'), os.getenv('DJANGO_SU_PASSWORD'))
31.75
121
0.799213
41
254
4.682927
0.536585
0.125
0.21875
0.25
0
0
0
0
0
0
0
0
0.066929
254
8
121
31.75
0.810127
0.07874
0
0
0
0
0.200855
0
0
0
0
0
0
1
0
false
0.166667
0.5
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
5
ccb23b22a776610ffb19fb0484753c762d4b283a
114
py
Python
__main__.py
M9SCO/DiceRoller
0a53a43c4846117a9d153891f673efb7a26c0808
[ "BSD-3-Clause" ]
4
2021-11-24T15:52:10.000Z
2022-03-03T03:40:27.000Z
__main__.py
M9SCO/DiceRoller
0a53a43c4846117a9d153891f673efb7a26c0808
[ "BSD-3-Clause" ]
1
2021-12-22T16:20:24.000Z
2021-12-22T16:20:24.000Z
__main__.py
M9SCO/DiceRoller
0a53a43c4846117a9d153891f673efb7a26c0808
[ "BSD-3-Clause" ]
null
null
null
from asyncio import run from src import get_result while True: print(run(get_result(input())).total_formula)
19
49
0.77193
18
114
4.722222
0.722222
0.211765
0
0
0
0
0
0
0
0
0
0
0.140351
114
6
49
19
0.867347
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.25
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5