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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b568fe1ea866d458a047b8793ed07ebd2d9cbfff
| 357
|
py
|
Python
|
eventstore_grpc/operations/restart_persistent_subscritions.py
|
jmshnds/eventstore_grpc
|
cf6a5978bcdf5bb725a569b7373ce15ee4babb25
|
[
"MIT"
] | 6
|
2021-02-04T15:48:28.000Z
|
2021-12-26T03:04:26.000Z
|
eventstore_grpc/operations/restart_persistent_subscritions.py
|
jmshnds/eventstore_grpc
|
cf6a5978bcdf5bb725a569b7373ce15ee4babb25
|
[
"MIT"
] | 1
|
2021-04-14T00:06:25.000Z
|
2021-04-14T07:28:34.000Z
|
eventstore_grpc/operations/restart_persistent_subscritions.py
|
jmshnds/eventstore_grpc
|
cf6a5978bcdf5bb725a569b7373ce15ee4babb25
|
[
"MIT"
] | 1
|
2021-04-14T17:22:54.000Z
|
2021-04-14T17:22:54.000Z
|
"""
Restart persistent subscriptions.
"""
from eventstore_grpc.proto import operations_pb2, operations_pb2_grpc, shared_pb2
def restart_persistent_subscriptions(stub: operations_pb2_grpc.OperationsStub, **kwargs) -> shared_pb2.Empty:
"""Restart persistent subscriptions."""
return stub.RestartPersistentSubscriptions(shared_pb2.Empty(), **kwargs)
| 35.7
| 109
| 0.803922
| 38
| 357
| 7.263158
| 0.473684
| 0.184783
| 0.326087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018519
| 0.092437
| 357
| 9
| 110
| 39.666667
| 0.833333
| 0.187675
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
b5b073eeda24aaa4281d4d4dd9db876df510c294
| 134
|
py
|
Python
|
FoodScan/__init__.py
|
danielBreitlauch/FoodScan
|
cf84209c4da84a8cb56deccdbde9c305eee1b8c3
|
[
"MIT"
] | 1
|
2017-03-16T00:59:01.000Z
|
2017-03-16T00:59:01.000Z
|
FoodScan/__init__.py
|
danielBreitlauch/FoodScan
|
cf84209c4da84a8cb56deccdbde9c305eee1b8c3
|
[
"MIT"
] | null | null | null |
FoodScan/__init__.py
|
danielBreitlauch/FoodScan
|
cf84209c4da84a8cb56deccdbde9c305eee1b8c3
|
[
"MIT"
] | null | null | null |
from .items import Item, ShopItem
from .antiCaptcha import AntiCaptcha
from FoodScan.ShopList.ShoppingLists.BringList import BringList
| 44.666667
| 63
| 0.865672
| 16
| 134
| 7.25
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089552
| 134
| 3
| 63
| 44.666667
| 0.95082
| 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
|
b5b66dfd511bdca02b407986c0083ce7a1f65409
| 27
|
py
|
Python
|
SpectroscoPy/__init__.py
|
faradaymahe/Phonopy-Spectroscopy
|
faa5b414f6e62d5441e099dfb02cdca6d804d6d5
|
[
"MIT"
] | 94
|
2017-11-19T10:12:31.000Z
|
2022-03-15T16:55:51.000Z
|
SpectroscoPy/__init__.py
|
faradaymahe/Phonopy-Spectroscopy
|
faa5b414f6e62d5441e099dfb02cdca6d804d6d5
|
[
"MIT"
] | 7
|
2018-04-09T07:26:44.000Z
|
2022-03-16T06:36:52.000Z
|
SpectroscoPy/__init__.py
|
faradaymahe/Phonopy-Spectroscopy
|
faa5b414f6e62d5441e099dfb02cdca6d804d6d5
|
[
"MIT"
] | 43
|
2018-02-19T22:35:54.000Z
|
2022-03-10T04:03:03.000Z
|
# SpectroscoPy/__init__.py
| 13.5
| 26
| 0.814815
| 3
| 27
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 27
| 1
| 27
| 27
| 0.72
| 0.888889
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a9310c648d863b90d906e74cb0554a47ef35f2cf
| 7,131
|
py
|
Python
|
studio/tools_test.py
|
phpc0de/idea-android
|
79e20f027ca1d047b91aa7acd92fb71fa2968a09
|
[
"Apache-2.0"
] | null | null | null |
studio/tools_test.py
|
phpc0de/idea-android
|
79e20f027ca1d047b91aa7acd92fb71fa2968a09
|
[
"Apache-2.0"
] | null | null | null |
studio/tools_test.py
|
phpc0de/idea-android
|
79e20f027ca1d047b91aa7acd92fb71fa2968a09
|
[
"Apache-2.0"
] | null | null | null |
import os
import io
import unittest
import stamper
import zipfile
def read_file(path, mode = "r"):
with open(path, mode) as f:
return f.read()
def get_path(name):
return os.path.join(os.getenv("TEST_TMPDIR"), name)
def create_file(name, content):
path = get_path(name)
with open(path, "w") as f:
f.write(content)
return path
def create_zip(name, contents):
path = get_path(name)
tmp = 0
with zipfile.ZipFile(path, "w") as zip:
for e, v in contents.items():
if isinstance(v, str):
zip.writestr(e, v)
else:
tmp_path = create_zip("%s.%d.zip" % (name, tmp), v)
zip.write(tmp_path, e)
os.remove(tmp_path)
return path
def read_zip_data(data):
res = {}
with zipfile.ZipFile(io.BytesIO(data)) as zip:
for name in zip.namelist():
data = zip.read(name)
if name.endswith(".jar") or name.endswith(".zip"):
res[name] = read_zip_data(data)
else:
res[name] = data
return res
def read_zip(path):
return read_zip_data(read_file(path, "rb"))
class ToolsTest(unittest.TestCase):
"""Tests tools used to bundle Android Studio."""
def test_change_version(self):
stable = create_file("info.txt", "BUILD_EMBED_LABEL 3333")
volatile = create_file("volatile.txt", "BUILD_TIMESTAMP 1597877532")
platform = create_zip("platform.zip", {
"build.txt": "AI-1234.__BUILD_NUMBER__"
})
before = create_zip("plugin.zip", {
"plugin/a/lib/a.jar": {
"META-INF/plugin.xml": "<version>1</version>"
}
})
res = get_path("res.zip")
stamper.main([
"--os", "linux",
"--info_file", stable,
"--version_file", volatile,
"--platform", platform,
"--stamp_plugin", before, res,
])
self.assertEqual({
"plugin/a/lib/a.jar": {
"META-INF/plugin.xml": "<version>1234.3333</version>"
}
}, read_zip(res))
def test_change_since_until(self):
stable = create_file("info.txt", "BUILD_EMBED_LABEL 3333")
volatile = create_file("volatile.txt", "BUILD_TIMESTAMP 1597877532")
platform = create_zip("platform.zip", {
"build.txt": "AI-1234.__BUILD_NUMBER__"
})
before = create_zip("plugin.zip", {
"plugin/a/lib/a.jar": {
"META-INF/plugin.xml": "<idea-version since-build=\"1.1\" until-build=\"2.1\">"
}
})
res = get_path("res.zip")
stamper.main([
"--os", "linux",
"--info_file", stable,
"--version_file", volatile,
"--platform", platform,
"--stamp_plugin", before, res,
])
self.assertEqual({
"plugin/a/lib/a.jar": {
"META-INF/plugin.xml": "<idea-version since-build=\"1234.3333\" until-build=\"1234.3333\">"
}
}, read_zip(res))
def test_change_since(self):
stable = create_file("info.txt", "BUILD_EMBED_LABEL 3333")
volatile = create_file("volatile.txt", "BUILD_TIMESTAMP 1597877532")
platform = create_zip("platform.zip", {
"build.txt": "AI-1234.__BUILD_NUMBER__"
})
before = create_zip("plugin.zip", {
"plugin/a/lib/a.jar": {
"META-INF/plugin.xml": "<idea-version since-build=\"1.1\">"
}
})
res = get_path("res.zip")
stamper.main([
"--os", "linux",
"--info_file", stable,
"--version_file", volatile,
"--platform", platform,
"--stamp_plugin", before, res,
])
self.assertEqual({
"plugin/a/lib/a.jar": {
"META-INF/plugin.xml": "<idea-version since-build=\"1234.3333\">"
}
}, read_zip(res))
def test_stamp_linux_platform(self):
stable = create_file("info.txt", "BUILD_EMBED_LABEL 3333")
volatile = create_file("volatile.txt", "BUILD_TIMESTAMP 1597877532")
platform = create_zip("platform.zip", {
"build.txt": "AI-1234.__BUILD_NUMBER__",
"product-info.json": "Info __BUILD_NUMBER__ __BUILD_NUMBER__",
"lib/resources.jar": {
"idea/AndroidStudioApplicationInfo.xml": """
<build number="AI-__BUILD__" date="__BUILD_DATE__">
<version major="4" minor="3" micro="2" patch="1" full="a" eap="false" >"""
}
})
res = get_path("res.zip")
stamper.main([
"--os", "linux",
"--info_file", stable,
"--version_file", volatile,
"--platform", platform,
"--version_micro", "33",
"--version_patch", "44",
"--version_full", "{0} Canary 5",
"--eap", "true",
"--stamp_platform", res,
])
self.assertEqual({
"build.txt": "AI-1234.3333",
"product-info.json": "Info 3333 3333",
"lib/resources.jar": {
"idea/AndroidStudioApplicationInfo.xml": """
<build number="AI-1234.3333" date="202008192252">
<version major="4" minor="3" micro="33" patch="44" full="{0} Canary 5" eap="true" >"""
}
}, read_zip(res))
def test_stamp_mac_platform(self):
stable = create_file("info.txt", "BUILD_EMBED_LABEL 3333")
volatile = create_file("volatile.txt", "BUILD_TIMESTAMP 1597877532")
platform = create_zip("platform.zip", {
"Contents/Resources/build.txt": "AI-1234.__BUILD_NUMBER__",
"Contents/Info.plist": "Info __BUILD_NUMBER__ __BUILD_NUMBER__",
"Contents/lib/resources.jar": {
"idea/AndroidStudioApplicationInfo.xml": """
<build number="AI-__BUILD__" date="__BUILD_DATE__">
<version major="4" minor="3" micro="2" patch="1" full="a" eap="false" >"""
}
})
res = get_path("res.zip")
stamper.main([
"--os", "mac",
"--info_file", stable,
"--version_file", volatile,
"--platform", platform,
"--version_micro", "33",
"--version_patch", "44",
"--version_full", "{0} Canary 5",
"--eap", "true",
"--stamp_platform", res,
])
self.assertEqual({
"Contents/Resources/build.txt": "AI-1234.3333",
"Contents/Info.plist": "Info 3333 3333",
"Contents/lib/resources.jar": {
"idea/AndroidStudioApplicationInfo.xml": """
<build number="AI-1234.3333" date="202008192252">
<version major="4" minor="3" micro="33" patch="44" full="{0} Canary 5" eap="true" >"""
}
}, read_zip(res))
def test_inject(self):
stable = create_file("info.txt", "BUILD_EMBED_LABEL 3333")
volatile = create_file("volatile.txt", "BUILD_TIMESTAMP 1597877532")
platform = create_zip("platform.zip", {
"build.txt": "AI-1234.__BUILD_NUMBER__"
})
before = create_zip("plugin.zip", {
"plugin/a/lib/a.jar": {
"META-INF/plugin.xml": "<id>x</id>"
}
})
res = get_path("res.zip")
stamper.main([
"--os", "linux",
"--info_file", stable,
"--version_file", volatile,
"--platform", platform,
"--stamp_plugin", before, res,
])
self.assertEqual({
"plugin/a/lib/a.jar": {
"META-INF/plugin.xml": "<id>x</id>\n" +
" <idea-version since-build=\"1234.3333\" until-build=\"1234.3333\"/>\n" +
" <version>1234.3333</version>"
}
}, read_zip(res))
if __name__ == "__main__":
unittest.main()
| 30.216102
| 101
| 0.583509
| 868
| 7,131
| 4.580645
| 0.139401
| 0.038732
| 0.020121
| 0.028169
| 0.777414
| 0.758803
| 0.737928
| 0.716298
| 0.707746
| 0.707746
| 0
| 0.051254
| 0.233908
| 7,131
| 235
| 102
| 30.344681
| 0.676551
| 0.00589
| 0
| 0.645631
| 0
| 0.019417
| 0.413102
| 0.082451
| 0
| 0
| 0
| 0
| 0.029126
| 1
| 0.058252
| false
| 0
| 0.024272
| 0.009709
| 0.116505
| 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
|
a941ceb1debdc918a5a1bbf84c4bd70cfe4f1628
| 294
|
py
|
Python
|
expool/__init__.py
|
scanfactory/execution-pool
|
00dc827bb8d4ad64ba971ec4ed76879685b40bc4
|
[
"MIT"
] | 3
|
2021-04-01T13:39:45.000Z
|
2022-03-29T20:55:58.000Z
|
expool/__init__.py
|
scanfactory/execution-pool
|
00dc827bb8d4ad64ba971ec4ed76879685b40bc4
|
[
"MIT"
] | null | null | null |
expool/__init__.py
|
scanfactory/execution-pool
|
00dc827bb8d4ad64ba971ec4ed76879685b40bc4
|
[
"MIT"
] | null | null | null |
from expool.execution_pool import ExecutionPool
from expool.execution_pool_open import ExecutionPoolOpen
from expool.execution_pool_simple import ExecutionPoolSimple
from expool.execution_pool_capped import ExecutionPoolCapped
from expool.execution_pool_monitored import ExecutionPoolMonitored
| 49
| 66
| 0.914966
| 34
| 294
| 7.647059
| 0.411765
| 0.192308
| 0.365385
| 0.442308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068027
| 294
| 5
| 67
| 58.8
| 0.948905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 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
|
8d0f0f0fd2fe01e525773031c0bf67225daeaf8b
| 138
|
py
|
Python
|
ex007.py
|
almmessias/CursoPython
|
4cec6946f32002cbd5d3b802df11ea1ba74169f5
|
[
"MIT"
] | null | null | null |
ex007.py
|
almmessias/CursoPython
|
4cec6946f32002cbd5d3b802df11ea1ba74169f5
|
[
"MIT"
] | null | null | null |
ex007.py
|
almmessias/CursoPython
|
4cec6946f32002cbd5d3b802df11ea1ba74169f5
|
[
"MIT"
] | null | null | null |
n1 = int(input ('Digite a nota1: '))
n2 = int(input ('Digite a nota2: '))
t = (n1 + n2) / 2
#m = t / 2
print ('A média é {}'.format(t))
| 17.25
| 36
| 0.521739
| 25
| 138
| 2.88
| 0.6
| 0.222222
| 0.388889
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.07619
| 0.23913
| 138
| 7
| 37
| 19.714286
| 0.609524
| 0.065217
| 0
| 0
| 0
| 0
| 0.34375
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 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
|
8da04dd59e030ba19bb833b4b3b79ddb6f6d0bad
| 254
|
py
|
Python
|
feature_extractor/EmptyFeature.py
|
ussaema/CapsGeR
|
be54379e02bd3ac1291c7d6076d55c994c2fa9c8
|
[
"MIT"
] | 1
|
2021-02-06T16:50:31.000Z
|
2021-02-06T16:50:31.000Z
|
feature_extractor/EmptyFeature.py
|
ussaema/EMGCaps
|
be54379e02bd3ac1291c7d6076d55c994c2fa9c8
|
[
"MIT"
] | null | null | null |
feature_extractor/EmptyFeature.py
|
ussaema/EMGCaps
|
be54379e02bd3ac1291c7d6076d55c994c2fa9c8
|
[
"MIT"
] | null | null | null |
from . import FeatureExtractor
class EmptyFeature(FeatureExtractor):
"""
Raw EMG window samples
"""
def extract_feature_point(self, raw_samples):
return raw_samples
def global_setup(self, all_raw_samples):
pass
| 19.538462
| 49
| 0.677165
| 28
| 254
| 5.892857
| 0.678571
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.251969
| 254
| 13
| 50
| 19.538462
| 0.868421
| 0.086614
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.166667
| 0.166667
| 0.166667
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
a5cb66309e68d7e751dd54cddaaf16663e2b17dc
| 307
|
py
|
Python
|
src/dl/models/modules/__init__.py
|
okunator/Dippa
|
dcbb7056511dd6f66bcc7b095716c385d0b0a8bb
|
[
"MIT"
] | 13
|
2021-01-25T07:47:03.000Z
|
2022-01-20T16:02:51.000Z
|
src/dl/models/modules/__init__.py
|
okunator/Dippa
|
dcbb7056511dd6f66bcc7b095716c385d0b0a8bb
|
[
"MIT"
] | 1
|
2022-02-12T15:03:23.000Z
|
2022-02-12T15:03:23.000Z
|
src/dl/models/modules/__init__.py
|
okunator/Dippa
|
dcbb7056511dd6f66bcc7b095716c385d0b0a8bb
|
[
"MIT"
] | null | null | null |
from .activations import Mish, Swish
from .normalization import BCNorm, GroupNorm
from .upsampling import FixedUnpool
from .conv import (
WSConv2dStaticSamePadding, WSConv2d, ResidualConvBlockPreact,
ResidualConvBlock, DenseConvBlockPreact, DenseConvBlock,
BasicConvBlockPreact, BasicConvBlock
)
| 38.375
| 65
| 0.827362
| 25
| 307
| 10.16
| 0.76
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007435
| 0.123779
| 307
| 8
| 66
| 38.375
| 0.936803
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a5f93fe60cb56ad3e3b57990da1bf9feaf366055
| 1,637
|
py
|
Python
|
tests/test_pds_release.py
|
seignovert/pypds
|
ef0c83b86364f60d3a030ceaf17dc3555f044d20
|
[
"MIT"
] | null | null | null |
tests/test_pds_release.py
|
seignovert/pypds
|
ef0c83b86364f60d3a030ceaf17dc3555f044d20
|
[
"MIT"
] | null | null | null |
tests/test_pds_release.py
|
seignovert/pypds
|
ef0c83b86364f60d3a030ceaf17dc3555f044d20
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import pytest
import os
import datetime
from pypds import RELEASE, IMG
@pytest.fixture
def instrument():
return 'vims'
@pytest.fixture
def release_md5():
return 'covims_0064_md5.txt'
@pytest.fixture
def release_int():
return 64
@pytest.fixture
def release_str():
return 'covims_0064'
@pytest.fixture
def release_url():
return 'https://pds-imaging.jpl.nasa.gov/data/cassini/cassini_orbiter/covims_0064/'
def test_release(release_int, release_str, instrument):
assert str(RELEASE(release_int, instrument)) == release_str
assert int(RELEASE(release_str, instrument)) == release_int
def test_md5(release_int, instrument, release_md5):
assert RELEASE(release_int, instrument).md5 == release_md5
def test_url(release_int, instrument, release_url):
assert RELEASE(release_int, instrument).url == release_url
def test_nb_folders(release_int, instrument):
nb_folders = RELEASE(release_int, instrument).nb_folders
assert type(nb_folders) is int
assert nb_folders > 0
def test_nb_imgs(release_int, instrument):
nb_imgs = RELEASE(release_int, instrument).nb_imgs
assert type(nb_imgs) is int
assert nb_imgs > 0
def test_start(release_int, instrument):
assert type(RELEASE(release_int, instrument).start) is datetime.datetime
def test_end(release_int, instrument):
assert type(RELEASE(release_int, instrument).end) is datetime.datetime
def test_first(release_int, instrument):
assert type(RELEASE(release_int, instrument).first) is IMG
def test_last(release_int, instrument):
assert type(RELEASE(release_int, instrument).last) is IMG
| 26.836066
| 87
| 0.761148
| 231
| 1,637
| 5.160173
| 0.194805
| 0.167785
| 0.285235
| 0.203859
| 0.392617
| 0.191275
| 0.191275
| 0.191275
| 0.191275
| 0
| 0
| 0.016324
| 0.139279
| 1,637
| 60
| 88
| 27.283333
| 0.829666
| 0.012828
| 0
| 0.119048
| 0
| 0
| 0.066915
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 1
| 0.333333
| false
| 0
| 0.095238
| 0.119048
| 0.547619
| 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
|
570b85bfb4d4cd47b5d2fb1f9035a61b1d38042d
| 73
|
py
|
Python
|
torrs_hammers/__init__.py
|
PyTorr/torrs_hammers
|
aefe106aea8e34b9af7c07a0004d0a18d3fe951c
|
[
"MIT"
] | null | null | null |
torrs_hammers/__init__.py
|
PyTorr/torrs_hammers
|
aefe106aea8e34b9af7c07a0004d0a18d3fe951c
|
[
"MIT"
] | null | null | null |
torrs_hammers/__init__.py
|
PyTorr/torrs_hammers
|
aefe106aea8e34b9af7c07a0004d0a18d3fe951c
|
[
"MIT"
] | null | null | null |
from .notifications import *
from .plotting import *
from .tools import *
| 24.333333
| 28
| 0.767123
| 9
| 73
| 6.222222
| 0.555556
| 0.357143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150685
| 73
| 3
| 29
| 24.333333
| 0.903226
| 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
|
57252f1b17364d4b0b18f7eab2c53ffac6901f67
| 72
|
py
|
Python
|
tsai/callback/all.py
|
MOREDataset/tsai
|
54987a579365ca7722475fff2fc4a24dc054e82c
|
[
"Apache-2.0"
] | null | null | null |
tsai/callback/all.py
|
MOREDataset/tsai
|
54987a579365ca7722475fff2fc4a24dc054e82c
|
[
"Apache-2.0"
] | null | null | null |
tsai/callback/all.py
|
MOREDataset/tsai
|
54987a579365ca7722475fff2fc4a24dc054e82c
|
[
"Apache-2.0"
] | null | null | null |
from .core import *
from .semi_supervised import *
from .gblend import *
| 24
| 30
| 0.763889
| 10
| 72
| 5.4
| 0.6
| 0.37037
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152778
| 72
| 3
| 31
| 24
| 0.885246
| 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
|
574b736fcbc11a5677f368641bda297768a65989
| 145
|
py
|
Python
|
ck_widgets/widgets/__init__.py
|
Cvaniak/CvaniaksTextualWidgets
|
d3e79624e70a8e1eced5b26da54ee5f926a7cf00
|
[
"MIT"
] | null | null | null |
ck_widgets/widgets/__init__.py
|
Cvaniak/CvaniaksTextualWidgets
|
d3e79624e70a8e1eced5b26da54ee5f926a7cf00
|
[
"MIT"
] | null | null | null |
ck_widgets/widgets/__init__.py
|
Cvaniak/CvaniaksTextualWidgets
|
d3e79624e70a8e1eced5b26da54ee5f926a7cf00
|
[
"MIT"
] | null | null | null |
from .debug_window import DebugWindow, DebugStatus
from .value_bar import ValueBarV, ValueBarH, ValueBarChange
from .list_view import ListViewUo
| 36.25
| 59
| 0.855172
| 18
| 145
| 6.722222
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103448
| 145
| 3
| 60
| 48.333333
| 0.930769
| 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
|
9e1003345685ee65b7602bec240b604590eede89
| 187
|
py
|
Python
|
dds/local_spider_manager/urls.py
|
htrueman/data-delivery-system
|
667681f09df4b4cd0adfbaae86b878d08e3a08c6
|
[
"Apache-2.0"
] | null | null | null |
dds/local_spider_manager/urls.py
|
htrueman/data-delivery-system
|
667681f09df4b4cd0adfbaae86b878d08e3a08c6
|
[
"Apache-2.0"
] | null | null | null |
dds/local_spider_manager/urls.py
|
htrueman/data-delivery-system
|
667681f09df4b4cd0adfbaae86b878d08e3a08c6
|
[
"Apache-2.0"
] | null | null | null |
from django.urls import path
from . import views
app_name = 'local_spider_manager'
urlpatterns = [
path('<pk>/', views.GitRepoController.as_view(), name='local_spider_manager'),
]
| 18.7
| 82
| 0.73262
| 24
| 187
| 5.458333
| 0.666667
| 0.137405
| 0.229008
| 0.335878
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13369
| 187
| 9
| 83
| 20.777778
| 0.808642
| 0
| 0
| 0
| 0
| 0
| 0.240642
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 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
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
f50d549099e3f5d47f52d449721978733442af00
| 64
|
py
|
Python
|
azure_fa/__init__.py
|
Dahk/cloud-button-azure-plugin
|
8232f811996ca301170b8c42416fc76cc78ad129
|
[
"Apache-2.0"
] | 1
|
2018-12-12T10:42:51.000Z
|
2018-12-12T10:42:51.000Z
|
azure_fa/__init__.py
|
Dahk/cloud-button-azure-plugin
|
8232f811996ca301170b8c42416fc76cc78ad129
|
[
"Apache-2.0"
] | 1
|
2021-03-31T19:57:29.000Z
|
2021-03-31T19:57:29.000Z
|
azure_fa/__init__.py
|
cloudbutton/azure-plugin
|
501703913dd130cac9298daa0b2a7460d0fb573d
|
[
"Apache-2.0"
] | 2
|
2019-09-16T10:09:45.000Z
|
2019-09-16T10:31:33.000Z
|
from .azure_fa import AzureFunctionAppBackend as ComputeBackend
| 32
| 63
| 0.890625
| 7
| 64
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 64
| 1
| 64
| 64
| 0.965517
| 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
|
f514a7e0fb7316dd8910d78f240f12ae1e3b929c
| 101
|
py
|
Python
|
pandasmt/__init__.py
|
inteplus/pandasmt
|
114dfaaaf5e9c7f9f6a68c137736d7857e318588
|
[
"MIT"
] | null | null | null |
pandasmt/__init__.py
|
inteplus/pandasmt
|
114dfaaaf5e9c7f9f6a68c137736d7857e318588
|
[
"MIT"
] | null | null | null |
pandasmt/__init__.py
|
inteplus/pandasmt
|
114dfaaaf5e9c7f9f6a68c137736d7857e318588
|
[
"MIT"
] | null | null | null |
from mt.base import logger
logger.warn_module_move('pandasmt', 'mt.pandas')
from mt.pandas import *
| 20.2
| 48
| 0.772277
| 16
| 101
| 4.75
| 0.625
| 0.157895
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108911
| 101
| 4
| 49
| 25.25
| 0.844444
| 0
| 0
| 0
| 0
| 0
| 0.168317
| 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
|
1911ec5a0323161d344ae581045ebfc3e1f5128b
| 91
|
py
|
Python
|
Chapter 02/ch2_48.py
|
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
|
f6a4194684515495d00aa38347a725dd08f39a0c
|
[
"MIT"
] | null | null | null |
Chapter 02/ch2_48.py
|
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
|
f6a4194684515495d00aa38347a725dd08f39a0c
|
[
"MIT"
] | null | null | null |
Chapter 02/ch2_48.py
|
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
|
f6a4194684515495d00aa38347a725dd08f39a0c
|
[
"MIT"
] | null | null | null |
import random
print(random.choice([20,50,3,11,13])
# using print() to print the result
| 22.75
| 37
| 0.703297
| 16
| 91
| 4
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116883
| 0.153846
| 91
| 4
| 38
| 22.75
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
1950b41e1c522f01dd735f20a3f21cbfe1a5b78b
| 314
|
py
|
Python
|
IOMC/EventVertexGenerators/python/VtxSmearedRealistic25ns900GeV2021Collision_cfi.py
|
PKUfudawei/cmssw
|
8fbb5ce74398269c8a32956d7c7943766770c093
|
[
"Apache-2.0"
] | 1
|
2018-08-28T16:51:36.000Z
|
2018-08-28T16:51:36.000Z
|
IOMC/EventVertexGenerators/python/VtxSmearedRealistic25ns900GeV2021Collision_cfi.py
|
PKUfudawei/cmssw
|
8fbb5ce74398269c8a32956d7c7943766770c093
|
[
"Apache-2.0"
] | 25
|
2016-06-24T20:55:32.000Z
|
2022-02-01T19:24:45.000Z
|
IOMC/EventVertexGenerators/python/VtxSmearedRealistic25ns900GeV2021Collision_cfi.py
|
PKUfudawei/cmssw
|
8fbb5ce74398269c8a32956d7c7943766770c093
|
[
"Apache-2.0"
] | 8
|
2016-03-25T07:17:43.000Z
|
2021-07-08T17:11:21.000Z
|
import FWCore.ParameterSet.Config as cms
from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import Realistic25ns900GeV2021CollisionVtxSmearingParameters,VtxSmearedCommon
VtxSmeared = cms.EDProducer("BetafuncEvtVtxGenerator",
Realistic25ns900GeV2021CollisionVtxSmearingParameters,
VtxSmearedCommon
)
| 39.25
| 134
| 0.88535
| 20
| 314
| 13.85
| 0.8
| 0.498195
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061856
| 0.073248
| 314
| 7
| 135
| 44.857143
| 0.890034
| 0
| 0
| 0
| 0
| 0
| 0.073248
| 0.073248
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
1993208ff4730768bf371c0ab44794d6646e5a58
| 4,381
|
py
|
Python
|
tests/test_models_park.py
|
purwin/Parks-Database
|
98cb06dbfacf73c300f32d55f0872fb63ff4a906
|
[
"MIT"
] | null | null | null |
tests/test_models_park.py
|
purwin/Parks-Database
|
98cb06dbfacf73c300f32d55f0872fb63ff4a906
|
[
"MIT"
] | 2
|
2021-03-09T19:47:01.000Z
|
2022-02-10T19:41:33.000Z
|
tests/test_models_park.py
|
purwin/Parks-Database
|
98cb06dbfacf73c300f32d55f0872fb63ff4a906
|
[
"MIT"
] | null | null | null |
import unittest
from base import BaseTests
from app import db
from app.parks_db import Park
class TestModelsPark(BaseTests):
default_park = dict(
name='NY Park',
park_id='W450',
borough='Queens',
address='30 Broadway',
cb='04'
)
@staticmethod
def create_park(**kwargs):
"""
Static method to add park class object to database
Takes the following string args: name, park_id, borough, address, cb
Adds class to Park database, commits session, and flushes to get id val
Returns the created class instance
"""
park = Park(**kwargs)
db.session.add(park)
db.session.commit()
db.session.flush()
return park
# Test CREATE park valid
def test_valid_park_create(self):
# print self.default_park
self.create_park(
name=self.default_park['name'],
park_id=self.default_park['park_id'],
borough=self.default_park['borough'],
address=self.default_park['address'],
cb=self.default_park['cb']
)
park_object = Park.query.filter_by(name=self.default_park['name']).first()
self.assertEqual(park_object.id, 1)
self.assertEqual(park_object.name, self.default_park['name'])
self.assertEqual(park_object.park_id, self.default_park['park_id'])
self.assertEqual(park_object.borough, self.default_park['borough'])
self.assertEqual(park_object.address, self.default_park['address'])
self.assertEqual(park_object.cb, self.default_park['cb'])
# Test CREATE park valid
def test_valid_park_create_name(self):
# print self.default_park
self.create_park(name=self.default_park['name'])
park_object = Park.query.filter_by(name=self.default_park['name']).first()
self.assertEqual(park_object.id, 1)
self.assertEqual(park_object.name, self.default_park['name'])
self.assertEqual(park_object.park_id, '')
self.assertEqual(park_object.borough, '')
self.assertEqual(park_object.address, '')
self.assertEqual(park_object.cb, '')
# Test CREATE park with no name value added
def test_invalid_park_create_empty(self):
self.create_park(name=False)
self.assertRaises(AttributeError)
# Test UPDATING park
def test_valid_park_update(self):
park = self.create_park(
name=self.default_park['name'],
park_id=self.default_park['park_id'],
borough=self.default_park['borough'],
address=self.default_park['address'],
cb=self.default_park['cb']
)
park.borough = 'Brooklyn'
db.session.add(park)
db.session.commit()
park_object = Park.query.filter_by(name=self.default_park['name']).first()
self.assertEqual(park_object.id, 1)
self.assertEqual(park_object.name, self.default_park['name'])
self.assertEqual(park_object.park_id, self.default_park['park_id'])
self.assertEqual(park_object.borough, 'Brooklyn')
self.assertEqual(park_object.address, self.default_park['address'])
self.assertEqual(park_object.cb, self.default_park['cb'])
# Test DELETING park
def test_valid_park_delete(self):
park = self.create_park(
name=self.default_park['name'],
park_id=self.default_park['park_id'],
borough=self.default_park['borough'],
address=self.default_park['address'],
cb=self.default_park['cb']
)
park_object = Park.query.filter_by(name=self.default_park['name']).first()
self.assertEqual(park_object.name, self.default_park['name'])
db.session.delete(park)
db.session.commit()
park_object = Park.query.filter_by(name=self.default_park['name']).first()
self.assertIsNone(park_object)
# Test Park.serialize
def test_valid_park_serialize(self):
self.create_park(
name=self.default_park['name'],
park_id=self.default_park['park_id'],
borough=self.default_park['borough'],
address=self.default_park['address'],
cb=self.default_park['cb']
)
park_object = Park.query.filter_by(name='NY Park').first()
self.assertEqual(
park_object.serialize,
{
'id': 1,
'name': self.default_park['name'],
'park_id': self.default_park['park_id'],
'borough': self.default_park['borough'],
'address': self.default_park['address'],
'cb': self.default_park['cb']
}
)
if __name__ == '__main__':
unittest.main()
| 30.213793
| 78
| 0.681123
| 580
| 4,381
| 4.918966
| 0.137931
| 0.173502
| 0.231335
| 0.175254
| 0.754644
| 0.71714
| 0.709078
| 0.680336
| 0.667718
| 0.632317
| 0
| 0.003083
| 0.185574
| 4,381
| 144
| 79
| 30.423611
| 0.796525
| 0.096097
| 0
| 0.47
| 0
| 0
| 0.077452
| 0
| 0
| 0
| 0
| 0
| 0.22
| 1
| 0.07
| false
| 0
| 0.04
| 0
| 0.14
| 0
| 0
| 0
| 0
| null | 0
| 1
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
19a9e9878625cd67e1da650841722dc68152fabd
| 336
|
py
|
Python
|
src/Core/Actions/Branch.py
|
flexiooss/flexio-flow
|
47491c7e5b49a02dc859028de0d486edc0014b26
|
[
"Apache-2.0"
] | null | null | null |
src/Core/Actions/Branch.py
|
flexiooss/flexio-flow
|
47491c7e5b49a02dc859028de0d486edc0014b26
|
[
"Apache-2.0"
] | 44
|
2019-04-05T06:08:15.000Z
|
2021-09-13T19:37:49.000Z
|
src/Core/Actions/Branch.py
|
flexiooss/flexio-flow
|
47491c7e5b49a02dc859028de0d486edc0014b26
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import annotations
from Core.ConfigHandler import ConfigHandler
class Branch:
def __init__(self, config_handler: ConfigHandler):
self.config_handler: ConfigHandler = config_handler
def __config_handler(self) -> ConfigHandler:
return self.config_handler
def process(self):
return
| 22.4
| 59
| 0.741071
| 36
| 336
| 6.5
| 0.416667
| 0.277778
| 0.217949
| 0.25641
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.202381
| 336
| 14
| 60
| 24
| 0.873134
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.222222
| 0.222222
| 0.888889
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
274d74e8af33f91b67121866d9cef332944add20
| 15,317
|
py
|
Python
|
game_stats.py
|
divyamkakkar24/tic-tac-toe
|
c4a67a94c1f0e4f37ecae7a307730f8d6f873c7b
|
[
"MIT"
] | 1
|
2020-05-22T10:38:58.000Z
|
2020-05-22T10:38:58.000Z
|
game_stats.py
|
divyamkakkar24/tic-tac-toe
|
c4a67a94c1f0e4f37ecae7a307730f8d6f873c7b
|
[
"MIT"
] | null | null | null |
game_stats.py
|
divyamkakkar24/tic-tac-toe
|
c4a67a94c1f0e4f37ecae7a307730f8d6f873c7b
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'game_stats.ui'
#
# Created by: PyQt5 UI code generator 5.13.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
import sqlite3
class Ui_stats(object):
def setupUi(self, stats):
stats.setObjectName("stats")
stats.resize(690, 144)
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 0, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
brush = QtGui.QBrush(QtGui.QColor(213, 127, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(191, 63, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
brush = QtGui.QBrush(QtGui.QColor(85, 0, 127))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush)
brush = QtGui.QBrush(QtGui.QColor(113, 0, 170))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 0, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush)
brush = QtGui.QBrush(QtGui.QColor(212, 127, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.PlaceholderText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 0, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
brush = QtGui.QBrush(QtGui.QColor(213, 127, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(191, 63, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
brush = QtGui.QBrush(QtGui.QColor(85, 0, 127))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush)
brush = QtGui.QBrush(QtGui.QColor(113, 0, 170))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 0, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush)
brush = QtGui.QBrush(QtGui.QColor(212, 127, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.PlaceholderText, brush)
brush = QtGui.QBrush(QtGui.QColor(85, 0, 127))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 0, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
brush = QtGui.QBrush(QtGui.QColor(213, 127, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(191, 63, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
brush = QtGui.QBrush(QtGui.QColor(85, 0, 127))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush)
brush = QtGui.QBrush(QtGui.QColor(113, 0, 170))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
brush = QtGui.QBrush(QtGui.QColor(85, 0, 127))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush)
brush = QtGui.QBrush(QtGui.QColor(85, 0, 127))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 0, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 0, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 0, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.PlaceholderText, brush)
stats.setPalette(palette)
stats.setAcceptDrops(False)
self.gridLayout = QtWidgets.QGridLayout(stats)
self.gridLayout.setObjectName("gridLayout")
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.label = QtWidgets.QLabel(stats)
font = QtGui.QFont()
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName("label")
self.verticalLayout.addWidget(self.label)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.s1 = QtWidgets.QLineEdit(stats)
self.s1.setAlignment(QtCore.Qt.AlignCenter)
self.s1.setObjectName("s1")
self.horizontalLayout.addWidget(self.s1)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem1)
self.verticalLayout.addLayout(self.horizontalLayout)
self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.label_2 = QtWidgets.QLabel(stats)
font = QtGui.QFont()
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.label_2.setFont(font)
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
self.label_2.setObjectName("label_2")
self.verticalLayout_2.addWidget(self.label_2)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem2)
self.s2 = QtWidgets.QLineEdit(stats)
self.s2.setAlignment(QtCore.Qt.AlignCenter)
self.s2.setObjectName("s2")
self.horizontalLayout_2.addWidget(self.s2)
spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem3)
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
self.gridLayout.addLayout(self.verticalLayout_2, 0, 1, 1, 1)
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.label_3 = QtWidgets.QLabel(stats)
font = QtGui.QFont()
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.label_3.setFont(font)
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
self.label_3.setObjectName("label_3")
self.verticalLayout_3.addWidget(self.label_3)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem4)
self.s3 = QtWidgets.QLineEdit(stats)
self.s3.setAlignment(QtCore.Qt.AlignCenter)
self.s3.setObjectName("s3")
self.horizontalLayout_3.addWidget(self.s3)
spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem5)
self.verticalLayout_3.addLayout(self.horizontalLayout_3)
self.gridLayout.addLayout(self.verticalLayout_3, 0, 2, 1, 1)
self.buttonBox = QtWidgets.QDialogButtonBox(stats)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setCenterButtons(True)
self.buttonBox.setObjectName("buttonBox")
self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 3)
self.display1()
self.display2()
self.display3()
self.retranslateUi(stats)
self.buttonBox.accepted.connect(stats.accept)
self.buttonBox.rejected.connect(stats.reject)
QtCore.QMetaObject.connectSlotsByName(stats)
def display1(self):
MyDisplay = sqlite3.connect('Game_stats.db')
k = 'Player'
sql = "SELECT * from stats WHERE Result = '"+k+"';"
curd = MyDisplay.cursor()
curd.execute(sql)
rec = curd.fetchone()
self.s1.setText(str(rec[1]))
print('display1')
return
def display2(self):
MyDisplay = sqlite3.connect('Game_stats.db')
k = 'Computer'
sql = "SELECT * from stats WHERE Result = '"+k+"';"
curd = MyDisplay.cursor()
curd.execute(sql)
rec = curd.fetchone()
self.s2.setText(str(rec[1]))
print('display2')
return
def display3(self):
MyDisplay = sqlite3.connect('Game_stats.db')
k = 'Draw'
sql = "SELECT * from stats WHERE Result = '"+k+"';"
curd = MyDisplay.cursor()
curd.execute(sql)
rec = curd.fetchone()
self.s3.setText(str(rec[1]))
print('display3')
return
def retranslateUi(self, stats):
_translate = QtCore.QCoreApplication.translate
stats.setWindowTitle(_translate("stats", "Stats"))
self.label.setText(_translate("stats", "Games won by Player"))
self.label_2.setText(_translate("stats", "Games won by Computer"))
self.label_3.setText(_translate("stats", "Draw"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
stats = QtWidgets.QDialog()
ui = Ui_stats()
ui.setupUi(stats)
stats.show()
sys.exit(app.exec_())
| 50.887043
| 113
| 0.686819
| 1,752
| 15,317
| 5.97032
| 0.102169
| 0.120554
| 0.073423
| 0.096367
| 0.749809
| 0.722562
| 0.705163
| 0.705163
| 0.693977
| 0.688337
| 0
| 0.036977
| 0.193119
| 15,317
| 300
| 114
| 51.056667
| 0.80937
| 0.012013
| 0
| 0.448399
| 1
| 0
| 0.027701
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.017794
| false
| 0
| 0.010676
| 0
| 0.042705
| 0.010676
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
274f85268a10113e874f5288ef77c05a0f3f3e92
| 10,291
|
py
|
Python
|
herramientas/indice_contagio_por_comunas/indiceContagioComunas.py
|
DiazSalinas/COVID-19
|
c79bc5487363a76baa2b9eb282991077eaeddf14
|
[
"MIT"
] | 24
|
2020-04-02T04:35:32.000Z
|
2020-08-11T00:48:06.000Z
|
herramientas/indice_contagio_por_comunas/indiceContagioComunas.py
|
DiazSalinas/COVID-19
|
c79bc5487363a76baa2b9eb282991077eaeddf14
|
[
"MIT"
] | 26
|
2020-04-03T15:07:15.000Z
|
2020-09-01T08:12:08.000Z
|
herramientas/indice_contagio_por_comunas/indiceContagioComunas.py
|
DiazSalinas/COVID-19
|
c79bc5487363a76baa2b9eb282991077eaeddf14
|
[
"MIT"
] | 21
|
2020-04-02T21:29:08.000Z
|
2020-09-01T19:25:22.000Z
|
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 31 11:55:42 2020
@author: esteban
"""
# Este script necesita que instales
# conda install geopandas
#conda install -c conda-forge descartes
fechaAAnalizar='2020-05-04'
alFecha=" al 04/05"
cuarentena_total=['Arica',
'Estación Central',
'Independencia',
'El Bosque',
'Quinta Normal',
'Pedro Aguirre Cerda',
'Angol','Victoria',
'Punta Arenas']
cuarentena_parcial=['San Ramón',
'La Pintana',
'Ñuñoa',
'Santiago',
'Puente Alto',
'San Bernardo']
import geopandas as gp
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import sys
import unicodedata
def strip_accents(text):
try:
text = unicode(text, 'utf-8')
except NameError: # unicode is a default on python 3
pass
text = unicodedata.normalize('NFD', text)\
.encode('ascii', 'ignore')\
.decode("utf-8")
return str(text)
s = strip_accents('àéêöhello')
#print(s)
#reload(sys)
#sys.setdefaultencoding('utf8')
## Primero necesitamos cargar los polígonos de las comunas.
# poligonos descargados desde https://www.bcn.cl/siit/mapas_vectoriales/index_html
shp_path = "../../fuentes/geometrias_comunas/comunas.shp"
comunasChile = gp.read_file(shp_path)
#aprovechamos al toque de calcular la superficie de cada comuna en km2
comunasChile['superficie']=comunasChile.to_crs({'init': 'epsg:3035'}).area/10**6
## Luego cargamos los datos del COVID19
datos_path="../../Consolidado_COVID19_Chile_Comunas.CSV"
#datos_path="../../COVID19_Chile_Comunas-casos_totales.CSV"
datosComunas = pd.read_csv(datos_path)
df=datosComunas
#################################### Aumento porcentual
############ Idea 1
fechas=df.fecha.unique()
i=1
df_old=df
while i<len(fechas):
old=df[df.fecha==fechas[i-1]][['id_comuna','casos_totales']]
old=old.rename(columns={'casos_totales':'casos_totales_old'})
# Si mantenemos la fecha del new, donde vamos a calcular los casos nuevos
new=df[df.fecha==fechas[i]][['fecha','id_comuna','casos_totales']]
new=new.rename(columns={'casos_totales':'casos_totales_new'})
old_new=pd.merge(old,new,on=['id_comuna'])
old_new['var%1periodo']=(old_new.casos_totales_new-old_new.casos_totales_old)*100/old_new.casos_totales_old
old_new=old_new[['fecha','id_comuna','var%1periodo']]
if (i==1):
#para el primero hacemos merge, porque la columna casos_nuevos no existe en df
df=pd.merge(df,old_new,how='left',on=['fecha','id_comuna'])
else:
df_aporte=pd.merge(df_old,old_new,how='left',on=['fecha','id_comuna'])
#para todo el resto tenemos que sobreescribir los datos
df[df.fecha==fechas[i]]=df_aporte[df_aporte.fecha==fechas[i]]
i=i+1
df['var%1periodo']=df['var%1periodo'].fillna(0)
df['var%1periodo']=df['var%1periodo'].replace([np.inf, -np.inf], np.nan).fillna(0)
########### Idea 2
df=df[df.fecha==fechaAAnalizar]
'''
comunasChile.columns =
Index(['objectid', 'shape_leng', 'dis_elec', 'cir_sena', 'cod_comuna',
'codregion', 'st_area_sh', 'st_length_', 'Region', 'Comuna',
'Provincia', 'geometry'],
dtype='object')
'''
## Necesitamos que las columnas tengan el mismo nombre:
comunasChile['nombre_comuna']=comunasChile.Comuna
############################################################
df=comunasChile.merge(df, on='nombre_comuna')
'''
df.columns=
Index(['id_region', 'nombre_region', 'id_comuna', 'nombre_comuna', 'poblacion',
'casos_totales', 'tasa', 'objectid', 'shape_leng', 'dis_elec',
'cir_sena', 'cod_comuna', 'codregion', 'st_area_sh', 'st_length_',
'Region', 'Comuna', 'Provincia', 'geometry'],
dtype='object')
### Los datos por Comuna tienen que ser arreglados.
# Primero, a partir de la columna de tasa y la de población, hay que
# reconstruir los datos de los casos (porque sólo informan cuando hay más
# de 4 casos)
df['casos_totales']=df.casos_totales.replace('-',0)
df['casos_totales']=df.casos_totales.fillna(0)
df['casos_totales']=df.casos_totales.astype(int)
df['tasa']=df.tasa.fillna(0)
df['tasa']=df.tasa.astype(float)
df['poblacion']=df.poblacion.fillna(0)
##Ahora corregimos los datos de los casos totales.
df['casos_totales']=(df.tasa*df.poblacion/100000).round(0).astype(int)
'''
df['nombre_comuna']=df.nombre_comuna.replace('San Juan de la Costa','S.J. de la Costa')
######################################
######################################
######################################
######################################
# CALCULO DE RIESGO = casos*poblacion/superficie
######################################
######################################
######################################
######################################
df['riesgo']=df['casos_totales']*df['poblacion']/df['superficie']
# Lo normalizamos!
df['riesgo']=df['riesgo']/df['riesgo'].max()
df['casos_pp']=df['casos_totales']/df['poblacion']*100000
df['casos_totales']=df['casos_totales'].astype(int)
df['casos_activos']=df['casos_activos'].astype(int)
df['riesgo_activos']=df['casos_activos']*df['poblacion']/df['superficie']
# Lo normalizamos!
df['riesgo_activos']=df['riesgo_activos']/df['riesgo_activos'].max()
df['casos_activos_pp']=df['casos_activos']/df['poblacion']*100000
import seaborn as sns
casos=[['casos_totales','Casos Totales','%i'],
['riesgo','Indice de Riesgo','%.2f'],
['casos_pp','Casos por 100.000 habitantes','%i'],
['riesgo_activos','Índice de Riesgo Activo','%.2f'],
['casos_activos','Casos Activos','%i'],
['casos_activos_pp','Casos Activos por 100.000 hbs.','%i'],
['var%1periodo','Variacion % 1 periodo','%i'],
]
#Datos al 18 de Abril
for caso in casos:
caracteristica=caso[0]
titulo=caso[1]
t=caso[2]
#top10=df[df.nombre_region!='Metropolitana'][['nombre_comuna',caracteristica]].sort_values(caracteristica,ascending=False).head(10)
top10=df[['nombre_comuna',caracteristica]].sort_values(caracteristica,ascending=False).head(10)
top10=top10.reset_index(drop=True)
print(top10)
paleta_rojos=['red']*10#sns.color_palette("Reds",10)#sns.color_palette("bwr",50)[40:50]
paleta_verdes=['lime']*10#sns.color_palette("Greens_r",20)[0:10]
yellow=[(255/255, 198/255, 0/255)]*10
paleta_naranjos=yellow#['yellow']*10#sns.color_palette("Oranges_r",20)[0:10]
paleta=paleta_verdes#['green']*10 #sns.color_palette("winter",10)
i=0
for bool in top10.nombre_comuna.isin(cuarentena_total):
if bool:
paleta[i]=paleta_rojos[i]#'tomato'
i+=1
i=0
for bool in top10.nombre_comuna.isin(cuarentena_parcial):
if bool:
paleta[i]=paleta_naranjos[i]#'lightyellow'
i+=1
sns.set(font_scale=2)
# sns.set_style("ticks")
sns.set_style("whitegrid")
alto=11
ancho=8
f, ax = plt.subplots(figsize=(ancho, alto))
sns.barplot(x=caracteristica, y='nombre_comuna',data=top10,palette=paleta)
sns.despine(left=True, bottom=True)
#ax.set_xticklabels(top10[caracteristica])
for p in ax.patches:
ax.annotate(t % p.get_width(), (p.get_x() + p.get_width(), p.get_y() + 1.2),
xytext=(5, 40), textcoords='offset points')
plt.xlabel(titulo)
plt.title("Top 10 Comunas según "+titulo + alFecha)
plt.ylabel('')
#plt.yticks(rotation=45)
plt.show()
plt.tight_layout()
plt.savefig('indice_comunas'+caracteristica+'.png')
#plt.figure(figsize=(12,8))
# plot barh chart with index as x values
#ax = sns.barplot(top15.index, top10.casos_totales)
#ax.get_yaxis().set_major_formatter(plt.FuncFormatter(lambda x, loc: "{:,}".format(int(x))))
#ax.set(xlabel="Dim", ylabel='Count')
# add proper Dim values as x labels
#ax.set_xticklabels(top15.nombre_comuna)
#for item in ax.get_xticklabels(): item.set_rotation(90)
#for i, v in enumerate(top15["nombre_comuna"].iteritems()):
# ax.text(i ,v[1], "{:,}".format(v[1]), color='m', va ='bottom', rotation=45)
#plt.tight_layout()
#plt.show()
rm= df[df.Region=='Región Metropolitana de Santiago']
gran_stgo_path="../../fuentes/gran_stgo/gran_stgo.csv"
#datos_path="../../COVID19_Chile_Comunas-casos_totales.CSV"
gran_stgo = pd.read_csv(gran_stgo_path)
rm=rm.merge(gran_stgo, left_on='nombre_comuna', right_on='nombre_comuna', sort='False')
stgo= rm[rm.gran_stgo==1]
# Control del tamaño de la figura del mapa
fig, ax = plt.subplots(figsize=(30, 30))
# Control del título y los ejes
ax.set_title(u'Comunas del Gran Santiago por Índice de Riesgo de Contagio',
pad = 20,
fontdict={'fontsize':20, 'color': 'black'})
# Control del título y los ejes
#ax.set_xlabel('Longitud')
#ax.set_ylabel('Latitud')
plt.axis('off')
#ax.legend(fontsize=1000)
# Añadir la leyenda separada del mapa
from mpl_toolkits.axes_grid1 import make_axes_locatable
divider = make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.2)
#map_STGO[(map_STGO.NOMBRE!='Santiago')&(map_STGO.NOMBRE!='Providencia')&(map_STGO.NOMBRE!='Ñuñoa')&(map_STGO.NOMBRE!='Las Condes')]
# Mostrar el mapa finalizado
stgo.plot(column='riesgo',
cmap='Reds', ax=ax,
legend=True,
legend_kwds={'label': "Riesgo de Contagio"},
cax=cax, zorder=5,#
missing_kwds={"color": "lightgrey",
"edgecolor": "black",
"hatch": "///"
#"label": "Missing values",
})
fig, ax = plt.subplots(figsize=(30, 30))
'''
stgo.plot(column='riesgo',cmap='Reds', ax=ax,
legend=Truelegend_kwds={'label': "Riesgo de Contagio"},
cax=cax, zorder=5,
missing_kwds={"color": "lightgrey",
"edgecolor": "black",
"hatch": "///" })#,
#"label": "Missing values",})
'''
| 10,291
| 10,291
| 0.611797
| 1,339
| 10,291
| 4.560119
| 0.320388
| 0.053063
| 0.025221
| 0.018343
| 0.275467
| 0.224206
| 0.192925
| 0.179168
| 0.145758
| 0.10547
| 0
| 0.027931
| 0.189389
| 10,291
| 1
| 10,291
| 10,291
| 0.704028
| 0.956758
| 0
| 0.057554
| 0
| 0
| 0.252801
| 0.021053
| 0
| 0
| 0
| 1
| 0
| 1
| 0.007194
| false
| 0.007194
| 0.057554
| 0
| 0.071942
| 0.007194
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
276e6ab041ea545347285662f843dae36274c6da
| 5,658
|
py
|
Python
|
armageddon/mapping.py
|
PozzettiAndrea/Armageddon-ODE-Solver
|
99820df79b2f500aa60f8db97bb50ffbdd743a0c
|
[
"MIT"
] | null | null | null |
armageddon/mapping.py
|
PozzettiAndrea/Armageddon-ODE-Solver
|
99820df79b2f500aa60f8db97bb50ffbdd743a0c
|
[
"MIT"
] | null | null | null |
armageddon/mapping.py
|
PozzettiAndrea/Armageddon-ODE-Solver
|
99820df79b2f500aa60f8db97bb50ffbdd743a0c
|
[
"MIT"
] | null | null | null |
import folium
import numpy as np
def plot_circle(lat, lon, radii, map=None, **kwargs):
"""
Plot a circle on a map (creating a new folium map instance if necessary).
Parameters
----------
lat: float
latitude of circle to plot (degrees)
lon: float
longitude of circle to plot (degrees)
radii: list
radii of blast zones (we only need to plot the first for our example)
map: folium.Map
existing map object
Returns
-------
Folium map object
Examples
--------
>>> import folium
>>> armageddon.plot_circle(52.79, -2.95, 1e3, map=None)
"""
# lat = 51.5073219
# lon = -0.1276474
lat_c = 53.2744122
lon_c = -9.0490632
if not map:
# map = folium.Map(location=[lat, lon], control_scale=True)
# folium.Circle([lat, lon], radius, fill=True, fillOpacity=0.6, **kwargs).add_to(map)
map_UK = folium.Map(location=[lat_c, lon_c], zoom_start=5.5, control_scale=True)
folium.Circle(
[lat, lon],
radius = radii[0],
fill=True,
fillOpacity=0.1,
fill_color='blue',
color='blue',parse_html=False).add_to(map_UK)
map_UK.save('plot_data.html')
return map_UK
def plot_line(lat, lon, angle, distance, map_UK=None, **kwargs):
lat_c = 53.2744122
lon_c = -9.0490632
if not map_UK:
# map = folium.Map(location=[lat, lon], control_scale=True)
# folium.Circle([lat, lon], radius, fill=True, fillOpacity=0.6, **kwargs).add_to(map)
map_UK = folium.Map(location=[lat_c, lon_c], zoom_start=5.5, control_scale=True)
dx_lat = distance*np.sin(20)/11132
dx_lon = distance*np.cos(20)/10000
ls = folium.PolyLine(locations=[[lat,lon],[lat + dx_lat, lon - dx_lon]],
color='black')
ls.add_to(map_UK)
map_UK.save('plot_data.html')
return map_UK
def plot_outcome(lat, lon, radii, bearing, distance, map=None, **kwargs):
"""
Plot a circle on a map (creating a new folium map instance if necessary).
Parameters
----------
lat: float
latitude of circle to plot (degrees)
lon: float
longitude of circle to plot (degrees)
radii: list
radii of blast zones
bearing: float
bearing of trajectory
distance: float
distance traversed by meteor before bursting
map: folium.Map
existing map object
Returns
-------
Folium map object
Examples
--------
>>> import folium
>>> armageddon.plot_circle(52.79, -2.95, 1e3, map=None)
"""
# lat = 51.5073219
# lon = -0.1276474
lat_c = 53.2744122
lon_c = -9.0490632
if not map:
# map = folium.Map(location=[lat, lon], control_scale=True)
# folium.Circle([lat, lon], radius, fill=True, fillOpacity=0.6, **kwargs).add_to(map)
map_UK = folium.Map(location=[lat_c, lon_c], zoom_start=5.5, control_scale=True)
folium.Circle(
[lat, lon],
radius = radii[3],
fill=False,
fillOpacity=1.5,
weight = 2,
popup=folium.Popup(max_width=450),
fill_color='red',
color='red',parse_html=False).add_to(map_UK)
folium.Circle(
[lat, lon],
radius = radii[2],
fill=False,
fillOpacity=1,
weight = 2,
popup=folium.Popup(max_width=450),
fill_color='yellow',
color='yellow',parse_html=False).add_to(map_UK)
folium.Circle(
[lat, lon],
radius = radii[1],
fill=True,
fillOpacity=0.2,
fill_color='green',
color='green',parse_html=False).add_to(map_UK)
folium.Circle(
[lat, lon],
radius = radii[0],
fill=True,
fillOpacity=0.1,
fill_color='blue',
color='blue',parse_html=False).add_to(map_UK)
folium.Marker([lat, lon],
popup='Place',
clustered_marker = True,
color = 'yellow',
icon=folium.Icon(color = 'beige')).add_to(map_UK)
ls = folium.PolyLine(locations=[[lat,lon],[lat+2,lon-2]],
color='black')
ls.add_to(map_UK)
map_UK.save('plot_data.html')
return map_UK
def multiple_plots(latlon_array, map=None, **kwargs):
"""
Plot many circle on a map (creating a new folium map instance if necessary).
Parameters
----------
latlon_array: list
list of lists, each containing latitude, longitude and radius of our randomised blasts.
map: folium.Map
existing map object
Returns
-------
Folium map object
Examples
--------
>>> import folium
>>> armageddon.plot_circle([[52.79, -2.95, 10e3],[52.78, -2.94, 12e3],[52.785, -2.943, 11e3]], map=None)
"""
# lat = 51.5073219
# lon = -0.1276474
lat_c = 53.2744122
lon_c = -9.0490632
if not map:
# map = folium.Map(location=[lat, lon], control_scale=True)
# folium.Circle([lat, lon], radius, fill=True, fillOpacity=0.6, **kwargs).add_to(map)
map_UK = folium.Map(location=[lat_c, lon_c], zoom_start=5.5, control_scale=True)
length = len(latlon_array)
for lat, lon, radius in latlon_array:
folium.Circle(
[lat, lon],
radius = radius,
fill=True,
fillOpacity=0.1,
fill_color='blue',
color='blue',parse_html=False).add_to(map_UK)
# ls = folium.PolyLine(locations=[[lat,lon],[lat+2,lon-2]],
# color='black')
# ls.add_to(map_UK)
map_UK.save('plot_multiple.html')
return map_UK
| 25.60181
| 108
| 0.577413
| 763
| 5,658
| 4.150721
| 0.179554
| 0.037891
| 0.035365
| 0.056836
| 0.768551
| 0.759078
| 0.759078
| 0.748342
| 0.746448
| 0.746448
| 0
| 0.056119
| 0.285083
| 5,658
| 220
| 109
| 25.718182
| 0.726823
| 0.38936
| 0
| 0.648352
| 0
| 0
| 0.043274
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.043956
| false
| 0
| 0.021978
| 0
| 0.10989
| 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
|
27854f041498e4948cf536ef29c26bab3993539a
| 123
|
py
|
Python
|
BOJ/01000~01999/1200~1299/1269.py
|
shinkeonkim/today-ps
|
f3e5e38c5215f19579bb0422f303a9c18c626afa
|
[
"Apache-2.0"
] | 2
|
2020-01-29T06:54:41.000Z
|
2021-11-07T13:23:27.000Z
|
BOJ/01000~01999/1200~1299/1269.py
|
shinkeonkim/Today_PS
|
bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44
|
[
"Apache-2.0"
] | null | null | null |
BOJ/01000~01999/1200~1299/1269.py
|
shinkeonkim/Today_PS
|
bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44
|
[
"Apache-2.0"
] | null | null | null |
n,m=list(map(int,input().split()))
A=set(map(int,input().split()))
B=set(map(int,input().split()))
print(len(A-B)+len(B-A))
| 30.75
| 34
| 0.626016
| 26
| 123
| 2.961538
| 0.461538
| 0.233766
| 0.428571
| 0.623377
| 0.493506
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02439
| 123
| 4
| 35
| 30.75
| 0.641667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 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
|
2786bfa6c012e714a314073fd1d6998361e1aba3
| 14,715
|
py
|
Python
|
tests/components/demo/test_media_player.py
|
pcaston/core
|
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
|
[
"Apache-2.0"
] | 1
|
2021-07-08T20:09:55.000Z
|
2021-07-08T20:09:55.000Z
|
tests/components/demo/test_media_player.py
|
pcaston/core
|
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
|
[
"Apache-2.0"
] | 47
|
2021-02-21T23:43:07.000Z
|
2022-03-31T06:07:10.000Z
|
tests/components/demo/test_media_player.py
|
OpenPeerPower/core
|
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
|
[
"Apache-2.0"
] | null | null | null |
"""The tests for the Demo Media player platform."""
from unittest.mock import patch
import pytest
import voluptuous as vol
import openpeerpower.components.media_player as mp
from openpeerpower.const import (
ATTR_ENTITY_ID,
ATTR_ENTITY_PICTURE,
ATTR_SUPPORTED_FEATURES,
STATE_OFF,
STATE_PAUSED,
STATE_PLAYING,
)
from openpeerpower.helpers.aiohttp_client import DATA_CLIENTSESSION
from openpeerpower.setup import async_setup_component
TEST_ENTITY_ID = "media_player.walkman"
@pytest.fixture(name="mock_media_seek")
def media_player_media_seek_fixture():
"""Mock demo YouTube player media seek."""
with patch(
"openpeerpower.components.demo.media_player.DemoYoutubePlayer.media_seek",
autospec=True,
) as seek:
yield seek
async def test_source_select(opp):
"""Test the input source service."""
entity_id = "media_player.lounge_room"
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
state = opp.states.get(entity_id)
assert state.attributes.get(mp.ATTR_INPUT_SOURCE) == "dvd"
with pytest.raises(vol.Invalid):
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_SELECT_SOURCE,
{ATTR_ENTITY_ID: entity_id, mp.ATTR_INPUT_SOURCE: None},
blocking=True,
)
state = opp.states.get(entity_id)
assert state.attributes.get(mp.ATTR_INPUT_SOURCE) == "dvd"
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_SELECT_SOURCE,
{ATTR_ENTITY_ID: entity_id, mp.ATTR_INPUT_SOURCE: "xbox"},
blocking=True,
)
state = opp.states.get(entity_id)
assert state.attributes.get(mp.ATTR_INPUT_SOURCE) == "xbox"
async def test_repeat_set(opp):
"""Test the repeat set service."""
entity_id = "media_player.walkman"
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
state = opp.states.get(entity_id)
assert state.attributes.get(mp.ATTR_MEDIA_REPEAT) == mp.const.REPEAT_MODE_OFF
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_REPEAT_SET,
{ATTR_ENTITY_ID: entity_id, mp.ATTR_MEDIA_REPEAT: mp.const.REPEAT_MODE_ALL},
blocking=True,
)
state = opp.states.get(entity_id)
assert state.attributes.get(mp.ATTR_MEDIA_REPEAT) == mp.const.REPEAT_MODE_ALL
async def test_clear_playlist(opp):
"""Test clear playlist."""
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_PLAYING
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_CLEAR_PLAYLIST,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_OFF
async def test_volume_services(opp):
"""Test the volume service."""
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
state = opp.states.get(TEST_ENTITY_ID)
assert state.attributes.get(mp.ATTR_MEDIA_VOLUME_LEVEL) == 1.0
with pytest.raises(vol.Invalid):
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_VOLUME_SET,
{ATTR_ENTITY_ID: TEST_ENTITY_ID, mp.ATTR_MEDIA_VOLUME_LEVEL: None},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.attributes.get(mp.ATTR_MEDIA_VOLUME_LEVEL) == 1.0
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_VOLUME_SET,
{ATTR_ENTITY_ID: TEST_ENTITY_ID, mp.ATTR_MEDIA_VOLUME_LEVEL: 0.5},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.attributes.get(mp.ATTR_MEDIA_VOLUME_LEVEL) == 0.5
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_VOLUME_DOWN,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.attributes.get(mp.ATTR_MEDIA_VOLUME_LEVEL) == 0.4
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_VOLUME_UP,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.attributes.get(mp.ATTR_MEDIA_VOLUME_LEVEL) == 0.5
assert state.attributes.get(mp.ATTR_MEDIA_VOLUME_MUTED) is False
with pytest.raises(vol.Invalid):
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_VOLUME_MUTE,
{ATTR_ENTITY_ID: TEST_ENTITY_ID, mp.ATTR_MEDIA_VOLUME_MUTED: None},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.attributes.get(mp.ATTR_MEDIA_VOLUME_MUTED) is False
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_VOLUME_MUTE,
{ATTR_ENTITY_ID: TEST_ENTITY_ID, mp.ATTR_MEDIA_VOLUME_MUTED: True},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.attributes.get(mp.ATTR_MEDIA_VOLUME_MUTED) is True
async def test_turning_off_and_on(opp):
"""Test turn_on and turn_off."""
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_PLAYING
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_TURN_OFF,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_OFF
assert not mp.is_on(opp, TEST_ENTITY_ID)
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_TURN_ON,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_PLAYING
assert mp.is_on(opp, TEST_ENTITY_ID)
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_TOGGLE,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_OFF
assert not mp.is_on(opp, TEST_ENTITY_ID)
async def test_playing_pausing(opp):
"""Test media_pause."""
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_PLAYING
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_MEDIA_PAUSE,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_PAUSED
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_MEDIA_PLAY_PAUSE,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_PLAYING
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_MEDIA_PLAY_PAUSE,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_PAUSED
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_MEDIA_PLAY,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_PLAYING
async def test_prev_next_track(opp):
"""Test media_next_track and media_previous_track ."""
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
state = opp.states.get(TEST_ENTITY_ID)
assert state.attributes.get(mp.ATTR_MEDIA_TRACK) == 1
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_MEDIA_NEXT_TRACK,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.attributes.get(mp.ATTR_MEDIA_TRACK) == 2
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_MEDIA_NEXT_TRACK,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.attributes.get(mp.ATTR_MEDIA_TRACK) == 3
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_MEDIA_PREVIOUS_TRACK,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.attributes.get(mp.ATTR_MEDIA_TRACK) == 2
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
ent_id = "media_player.lounge_room"
state = opp.states.get(ent_id)
assert state.attributes.get(mp.ATTR_MEDIA_EPISODE) == 1
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_MEDIA_NEXT_TRACK,
{ATTR_ENTITY_ID: ent_id},
blocking=True,
)
state = opp.states.get(ent_id)
assert state.attributes.get(mp.ATTR_MEDIA_EPISODE) == 2
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_MEDIA_PREVIOUS_TRACK,
{ATTR_ENTITY_ID: ent_id},
blocking=True,
)
state = opp.states.get(ent_id)
assert state.attributes.get(mp.ATTR_MEDIA_EPISODE) == 1
async def test_play_media(opp):
"""Test play_media ."""
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
ent_id = "media_player.living_room"
state = opp.states.get(ent_id)
assert mp.SUPPORT_PLAY_MEDIA & state.attributes.get(ATTR_SUPPORTED_FEATURES) > 0
assert state.attributes.get(mp.ATTR_MEDIA_CONTENT_ID) is not None
with pytest.raises(vol.Invalid):
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_PLAY_MEDIA,
{ATTR_ENTITY_ID: ent_id, mp.ATTR_MEDIA_CONTENT_ID: "some_id"},
blocking=True,
)
state = opp.states.get(ent_id)
assert mp.SUPPORT_PLAY_MEDIA & state.attributes.get(ATTR_SUPPORTED_FEATURES) > 0
assert state.attributes.get(mp.ATTR_MEDIA_CONTENT_ID) != "some_id"
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_PLAY_MEDIA,
{
ATTR_ENTITY_ID: ent_id,
mp.ATTR_MEDIA_CONTENT_TYPE: "youtube",
mp.ATTR_MEDIA_CONTENT_ID: "some_id",
},
blocking=True,
)
state = opp.states.get(ent_id)
assert mp.SUPPORT_PLAY_MEDIA & state.attributes.get(ATTR_SUPPORTED_FEATURES) > 0
assert state.attributes.get(mp.ATTR_MEDIA_CONTENT_ID) == "some_id"
async def test_seek(opp, mock_media_seek):
"""Test seek."""
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
ent_id = "media_player.living_room"
state = opp.states.get(ent_id)
assert state.attributes[ATTR_SUPPORTED_FEATURES] & mp.SUPPORT_SEEK
assert not mock_media_seek.called
with pytest.raises(vol.Invalid):
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_MEDIA_SEEK,
{
ATTR_ENTITY_ID: ent_id,
mp.ATTR_MEDIA_SEEK_POSITION: None,
},
blocking=True,
)
assert not mock_media_seek.called
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_MEDIA_SEEK,
{
ATTR_ENTITY_ID: ent_id,
mp.ATTR_MEDIA_SEEK_POSITION: 100,
},
blocking=True,
)
assert mock_media_seek.called
async def test_stop(opp):
"""Test stop."""
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_PLAYING
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_MEDIA_STOP,
{ATTR_ENTITY_ID: TEST_ENTITY_ID},
blocking=True,
)
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_OFF
async def test_media_image_proxy(opp, opp_client):
"""Test the media server image proxy server ."""
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
fake_picture_data = "test.test"
class MockResponse:
"""Test response."""
def __init__(self):
"""Test response init."""
self.status = 200
self.headers = {"Content-Type": "sometype"}
async def read(self):
"""Test response read."""
return fake_picture_data.encode("ascii")
async def release(self):
"""Test response release."""
class MockWebsession:
"""Test websession."""
async def get(self, url):
"""Test websession get."""
return MockResponse()
def detach(self):
"""Test websession detach."""
opp.data[DATA_CLIENTSESSION] = MockWebsession()
state = opp.states.get(TEST_ENTITY_ID)
assert state.state == STATE_PLAYING
client = await opp_client()
req = await client.get(state.attributes.get(ATTR_ENTITY_PICTURE))
assert req.status == 200
assert await req.text() == fake_picture_data
async def test_grouping(opp):
"""Test the join/unjoin services."""
walkman = "media_player.walkman"
kitchen = "media_player.kitchen"
assert await async_setup_component(
opp, mp.DOMAIN, {"media_player": {"platform": "demo"}}
)
await opp.async_block_till_done()
state = opp.states.get(walkman)
assert state.attributes.get(mp.ATTR_GROUP_MEMBERS) == []
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_JOIN,
{
ATTR_ENTITY_ID: walkman,
mp.ATTR_GROUP_MEMBERS: [
kitchen,
],
},
blocking=True,
)
state = opp.states.get(walkman)
assert state.attributes.get(mp.ATTR_GROUP_MEMBERS) == [walkman, kitchen]
await opp.services.async_call(
mp.DOMAIN,
mp.SERVICE_UNJOIN,
{ATTR_ENTITY_ID: walkman},
blocking=True,
)
state = opp.states.get(walkman)
assert state.attributes.get(mp.ATTR_GROUP_MEMBERS) == []
| 29.371257
| 84
| 0.656609
| 1,927
| 14,715
| 4.714582
| 0.076803
| 0.07661
| 0.06208
| 0.074849
| 0.790424
| 0.778426
| 0.772262
| 0.7694
| 0.7694
| 0.751128
| 0
| 0.002764
| 0.237853
| 14,715
| 500
| 85
| 29.43
| 0.807312
| 0.010737
| 0
| 0.619289
| 0
| 0
| 0.046685
| 0.011867
| 0
| 0
| 0
| 0
| 0.164975
| 1
| 0.007614
| false
| 0
| 0.017767
| 0
| 0.035533
| 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
|
27df599c0defed046f49cedfaa131c5424386d60
| 172
|
py
|
Python
|
libs/kermes-infra/kermes_infra/queues/__init__.py
|
jtompkins/kermes
|
c59fe890759e0ce67bcf127870a43c57b477c695
|
[
"MIT"
] | null | null | null |
libs/kermes-infra/kermes_infra/queues/__init__.py
|
jtompkins/kermes
|
c59fe890759e0ce67bcf127870a43c57b477c695
|
[
"MIT"
] | null | null | null |
libs/kermes-infra/kermes_infra/queues/__init__.py
|
jtompkins/kermes
|
c59fe890759e0ce67bcf127870a43c57b477c695
|
[
"MIT"
] | null | null | null |
from .sqs_producer import SQSProducer
from .sqs_consumer import SQSConsumer
from .supports_consumption import SupportsConsumption
from .signal_handler import SignalHandler
| 34.4
| 53
| 0.883721
| 20
| 172
| 7.4
| 0.65
| 0.094595
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093023
| 172
| 4
| 54
| 43
| 0.948718
| 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
|
fda56df4f752b9a28e82986ff4d52f0f9c1dad17
| 3,371
|
py
|
Python
|
matbal/undersaturated.py
|
wassemalward/pyreservoir
|
2ea31a323b80c3b100c53f8d6c5a91595e96e602
|
[
"MIT"
] | 1
|
2021-05-02T12:49:22.000Z
|
2021-05-02T12:49:22.000Z
|
matbal/undersaturated.py
|
wassemalward/pyreservoir
|
2ea31a323b80c3b100c53f8d6c5a91595e96e602
|
[
"MIT"
] | null | null | null |
matbal/undersaturated.py
|
wassemalward/pyreservoir
|
2ea31a323b80c3b100c53f8d6c5a91595e96e602
|
[
"MIT"
] | null | null | null |
"""
Undersaturated (Volatile and Non-volatile) Oil Material Balance
@author: Yohanes Nuwara
@email: ign.nuwara97@gmail.com
"""
import numpy as np
import matplotlib.pyplot as plt
class mbplot():
"""
Undersaturated Oil Material Balance Plot
Ideal Data
"""
def plot1(self, p, Bg, Bo, Np, Gp, Gi, cf, cw, swi, Rs, Rv, output=None):
"""
Plot 1: F vs Eo+(Bti* Efw)
"""
# initial conditions
pi = p[0]
Boi = Bo[0]
Rsi = Rs[0]
Bto = []
F = []
for i in range(len(p)):
if Rv[i] == 0:
# reservoir is non-volatile undersaturated
Bto_ = Bo[i] + Bg[i] * (Rsi - Rs[i])
F_ = Np[i](Bo[i] - Rs[i] * Bg[i]) + ((Gp[i] - Gi[i]) * Bg[i])
Bto.append(Bto_)
F.append(F_)
if Rv[i] != 0:
# reservoir is volatile undersaturated
Bto_ = ((Bo[i] * (1 - (Rv[i] * Rsi))) + (Bg[i] * (Rsi - Rs[i]))) / (1 - (Rv[i] * Rs[i]))
F_ = (Np * ((Bo - (Rs * Bg)) / (1 - (Rv * Rs)))) + ((Gp[i] - Gi[i]) * ((Bg - (Rv * Bo)) / (1 - (Rv * Rs))))
Bto.append(Bto_)
F.append(F_)
Bto = np.array(Bto)
F = np.array(F)
# calculate Eo+(Boi*Efw)
Efw = ((cf + (cw * swi)) / (1 - swi)) * (pi - p)
Eo = Bto - Boi
Eo_Boi_Efw = Eo + Boi * Efw
if output == 'allparams':
return(Bto, Efw, Eo, F)
if output == None:
# plot
plt.plot(Eo_Boi_Efw, F, '.')
plt.title('Plot 1: F vs Eo+(Bti* Efw)')
plt.xlim(xmin=0);
plt.ylim(ymin=0)
plt.xlabel('Eo+(Bti*Efw) (RB/STB)')
plt.ylabel('F (res bbl)')
plt.show()
return(Eo_Boi_Efw, F)
def plot2(self, p, Bg, Bo, Np, Gp, cf, cw, swi, Rs, Rv, output=None):
"""
Plot 2: F/Eo+(Bti* Efw) vs Np
"""
# initial conditions
pi = p[0]
Boi = Bo[0]
Rsi = Rs[0]
Bto = []
F = []
for i in range(len(p)):
if Rv[i] == 0:
# reservoir is non-volatile undersaturated
Bto_ = Bo[i] + Bg[i] * (Rsi - Rs[i])
F_ = Np[i](Bo[i] - Rs[i] * Bg[i]) + ((Gp[i] - Gi[i]) * Bg[i])
Bto.append(Bto_)
F.append(F_)
if Rv[i] != 0:
# reservoir is volatile undersaturated
Bto_ = ((Bo[i] * (1 - (Rv[i] * Rsi))) + (Bg[i] * (Rsi - Rs[i]))) / (1 - (Rv[i] * Rs[i]))
F_ = (Np * ((Bo - (Rs * Bg)) / (1 - (Rv * Rs)))) + ((Gp[i] - Gi[i]) * ((Bg - (Rv * Bo)) / (1 - (Rv * Rs))))
Bto.append(Bto_)
F.append(F_)
Bto = np.array(Bto)
F = np.array(F)
# calculate Eo+(Boi*Efw)
Efw = ((cf + (cw * swi)) / (1 - swi)) * (pi - p)
Eo = Bto - Boi
Eo_Boi_Efw = Eo + Boi * Efw
N = F / Eo_Boi_Efw
if output == 'allparams':
return(Bto, Efw, Eo, F)
if output == None:
# plot
plt.plot(Np, N, '.')
plt.title('Plot 2: F/Eo+(Bti* Efw) vs Np')
plt.xlim(xmin=0);
plt.ylim(ymin=0)
plt.xlabel('Np (STB)')
plt.ylabel('F/Eo+(Bti* Efw) (STB)')
plt.show()
return(Np, N)
| 29.313043
| 123
| 0.409967
| 459
| 3,371
| 2.954248
| 0.180828
| 0.033186
| 0.053097
| 0.017699
| 0.752212
| 0.752212
| 0.733038
| 0.712389
| 0.651917
| 0.651917
| 0
| 0.015992
| 0.406408
| 3,371
| 114
| 124
| 29.570175
| 0.661669
| 0.142094
| 0
| 0.771429
| 0
| 0
| 0.048399
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.028571
| false
| 0
| 0.028571
| 0
| 0.071429
| 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
|
fdc6f06c8a800c2c2e982fe632d9ab1ea893eb34
| 169
|
py
|
Python
|
tf_al/wrapper/__init__.py
|
ExLeonem/active-learning
|
0c4527fccb01c43e40a476fe93fda901a35a61e8
|
[
"MIT"
] | 1
|
2021-11-23T03:30:04.000Z
|
2021-11-23T03:30:04.000Z
|
tf_al/wrapper/__init__.py
|
ExLeonem/tf-al
|
0c4527fccb01c43e40a476fe93fda901a35a61e8
|
[
"MIT"
] | null | null | null |
tf_al/wrapper/__init__.py
|
ExLeonem/tf-al
|
0c4527fccb01c43e40a476fe93fda901a35a61e8
|
[
"MIT"
] | null | null | null |
from .checkpoint import Checkpoint
from .utils import disable_batch_norm, predict_n, batch_predict_n, measures
from .model import Model
from .mc_dropout import McDropout
| 42.25
| 75
| 0.852071
| 25
| 169
| 5.52
| 0.56
| 0.115942
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106509
| 169
| 4
| 76
| 42.25
| 0.913907
| 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
|
8bf90c4f5160f13008c55594523560b3c4b32e34
| 39
|
py
|
Python
|
tests/components/image/__init__.py
|
tbarbette/core
|
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
|
[
"Apache-2.0"
] | 30,023
|
2016-04-13T10:17:53.000Z
|
2020-03-02T12:56:31.000Z
|
tests/components/image/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 31,101
|
2020-03-02T13:00:16.000Z
|
2022-03-31T23:57:36.000Z
|
tests/components/image/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 11,956
|
2016-04-13T18:42:31.000Z
|
2020-03-02T09:32:12.000Z
|
"""Tests for the Image integration."""
| 19.5
| 38
| 0.692308
| 5
| 39
| 5.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128205
| 39
| 1
| 39
| 39
| 0.794118
| 0.820513
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e318b0050dcf9e10efe3f52c198b2551956c3e4f
| 266
|
py
|
Python
|
search/models.py
|
FMajesty/rst-test
|
81f3e1aed9566c7608a3a6f2daf75b4b9fe7f92a
|
[
"Unlicense"
] | null | null | null |
search/models.py
|
FMajesty/rst-test
|
81f3e1aed9566c7608a3a6f2daf75b4b9fe7f92a
|
[
"Unlicense"
] | 5
|
2021-03-19T08:43:38.000Z
|
2022-02-10T09:09:07.000Z
|
search/models.py
|
FMajesty/rst-test
|
81f3e1aed9566c7608a3a6f2daf75b4b9fe7f92a
|
[
"Unlicense"
] | null | null | null |
from django.db import models
class Company(models.Model):
title = models.CharField(max_length=256, verbose_name="Название компании")
address = models.CharField(max_length=352, verbose_name="Адрес компании")
def __str__(self):
return self.title
| 29.555556
| 78
| 0.740602
| 35
| 266
| 5.4
| 0.685714
| 0.15873
| 0.190476
| 0.253968
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.026786
| 0.157895
| 266
| 9
| 79
| 29.555556
| 0.816964
| 0
| 0
| 0
| 0
| 0
| 0.116105
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.166667
| 0.166667
| 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
| 0
| 1
| 1
| 0
|
0
| 5
|
e362c708b27c348fec5daafb4a7d6092a313e38f
| 127
|
py
|
Python
|
markplates/__init__.py
|
cltrudeau/markplates
|
f0cc35a4c74f1559c821ee7affedffbdad1fdfe2
|
[
"MIT"
] | 23
|
2019-04-03T06:01:02.000Z
|
2022-02-08T11:29:52.000Z
|
markplates/__init__.py
|
cltrudeau/markplates
|
f0cc35a4c74f1559c821ee7affedffbdad1fdfe2
|
[
"MIT"
] | 23
|
2019-05-07T18:25:49.000Z
|
2022-02-28T17:28:21.000Z
|
markplates/__init__.py
|
cltrudeau/markplates
|
f0cc35a4c74f1559c821ee7affedffbdad1fdfe2
|
[
"MIT"
] | 3
|
2020-08-01T17:50:44.000Z
|
2021-06-28T16:11:52.000Z
|
from .__main__ import condense_ranges
from .__main__ import process_template
from .__main__ import main
__version__ = "1.7.0"
| 21.166667
| 38
| 0.811024
| 18
| 127
| 4.722222
| 0.611111
| 0.282353
| 0.494118
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027027
| 0.125984
| 127
| 5
| 39
| 25.4
| 0.738739
| 0
| 0
| 0
| 0
| 0
| 0.03937
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 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
|
8b5bc7e335710c29c386677dcbf7641d1005a3fe
| 202
|
py
|
Python
|
djangosige/apps/cadastro/admin.py
|
MateusMolina/lunoERP
|
0880adb93b3a2d3169c6780efa60a229272f927a
|
[
"MIT"
] | null | null | null |
djangosige/apps/cadastro/admin.py
|
MateusMolina/lunoERP
|
0880adb93b3a2d3169c6780efa60a229272f927a
|
[
"MIT"
] | null | null | null |
djangosige/apps/cadastro/admin.py
|
MateusMolina/lunoERP
|
0880adb93b3a2d3169c6780efa60a229272f927a
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import *
admin.site.register(Pessoa)
admin.site.register(Cliente)
admin.site.register(Fornecedor)
admin.site.register(Aluno)
admin.site.register(Professor)
| 25.25
| 32
| 0.821782
| 28
| 202
| 5.928571
| 0.464286
| 0.271084
| 0.512048
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064356
| 202
| 8
| 33
| 25.25
| 0.878307
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.285714
| 0
| 0.285714
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8b6a0a8a01fe626f865f7d1e9e47f8092107623c
| 115
|
py
|
Python
|
LeapMotionBlender/UI/Panels/__init__.py
|
ALucatero03/Blender-Puppet-Motion
|
ce3beea7d681966a17aeaf6382424efaa3f05f5d
|
[
"MIT"
] | 21
|
2020-11-05T23:11:28.000Z
|
2022-03-22T16:01:08.000Z
|
LeapMotionBlender/UI/Panels/__init__.py
|
ALucatero03/Blender-Puppet-Motion
|
ce3beea7d681966a17aeaf6382424efaa3f05f5d
|
[
"MIT"
] | 6
|
2019-10-08T20:55:22.000Z
|
2019-12-17T07:05:22.000Z
|
LeapMotionBlender/UI/Panels/__init__.py
|
ALucatero03/Blender-Puppet-Motion
|
ce3beea7d681966a17aeaf6382424efaa3f05f5d
|
[
"MIT"
] | 5
|
2019-10-09T18:08:44.000Z
|
2019-12-24T10:46:43.000Z
|
from .hand_select import HandSelect
from .track_settings import TrackSettings
from .main_panel import MainLeapPanel
| 38.333333
| 41
| 0.878261
| 15
| 115
| 6.533333
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095652
| 115
| 3
| 42
| 38.333333
| 0.942308
| 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
|
8bd5a320550fa22dc717fb723f6a973b7480333e
| 47
|
py
|
Python
|
dashboard/forms.py
|
macc-uece/devpath
|
b8e3290ac62c568721aa40e1359cbe61892411e9
|
[
"MIT"
] | 1
|
2018-10-13T19:50:01.000Z
|
2018-10-13T19:50:01.000Z
|
dashboard/forms.py
|
macc-uece/devpath
|
b8e3290ac62c568721aa40e1359cbe61892411e9
|
[
"MIT"
] | 1
|
2018-10-19T23:56:46.000Z
|
2018-10-19T23:56:46.000Z
|
dashboard/forms.py
|
macc-uece/devpath
|
b8e3290ac62c568721aa40e1359cbe61892411e9
|
[
"MIT"
] | null | null | null |
from django import forms
# Ṕut your forms here
| 15.666667
| 24
| 0.787234
| 8
| 47
| 4.625
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191489
| 47
| 3
| 25
| 15.666667
| 0.973684
| 0.404255
| 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
|
4749cf63ebe1dfec11750fec803200d6a96e1368
| 167
|
py
|
Python
|
atlas/atlas/projects/errors.py
|
brainy-minds/brainy-atlas
|
a86ac4c4b0a6c2603949bb998994953995a4f71e
|
[
"MIT"
] | null | null | null |
atlas/atlas/projects/errors.py
|
brainy-minds/brainy-atlas
|
a86ac4c4b0a6c2603949bb998994953995a4f71e
|
[
"MIT"
] | 1
|
2015-12-24T16:21:23.000Z
|
2015-12-24T16:21:23.000Z
|
atlas/atlas/projects/errors.py
|
brainy-minds/brainy-atlas
|
a86ac4c4b0a6c2603949bb998994953995a4f71e
|
[
"MIT"
] | null | null | null |
from brainy.errors import BrainyProjectError
class ProjectViewError(BrainyProjectError):
'''Raised when something goes error while trying to present projects'''
| 27.833333
| 75
| 0.808383
| 18
| 167
| 7.5
| 0.944444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131737
| 167
| 5
| 76
| 33.4
| 0.931034
| 0.389222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4788fbae9bb7ba2019136de664fb6dfb5216877f
| 133
|
py
|
Python
|
tests/test_spectral.py
|
elmanuelito/pyDatView
|
3516ffaff601c122d62ffc94abd842958354ece8
|
[
"MIT"
] | 50
|
2018-10-15T18:10:15.000Z
|
2022-03-15T15:53:50.000Z
|
tests/test_spectral.py
|
elmanuelito/pyDatView
|
3516ffaff601c122d62ffc94abd842958354ece8
|
[
"MIT"
] | 99
|
2018-10-31T16:30:28.000Z
|
2022-02-18T04:25:07.000Z
|
tests/test_spectral.py
|
elmanuelito/pyDatView
|
3516ffaff601c122d62ffc94abd842958354ece8
|
[
"MIT"
] | 20
|
2018-10-23T21:44:32.000Z
|
2022-02-09T17:21:37.000Z
|
import unittest
import numpy as np
from pydatview.tools.spectral import TestSpectral
if __name__ == '__main__':
unittest.main()
| 19
| 49
| 0.774436
| 17
| 133
| 5.588235
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150376
| 133
| 6
| 50
| 22.166667
| 0.840708
| 0
| 0
| 0
| 0
| 0
| 0.06015
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
479688e541f5a651424f3c20c25ca27a5c92dfd5
| 77
|
py
|
Python
|
3.2.0/Security Events/On Click/Get SW_CONTEXT INFO/Get SW_CONTEXT INFO.py
|
PhoenixNAP-SecuritySrvs/Swimlane-Intergrations
|
3403a62ded50c872dd2aba049030fdbb25efd0c7
|
[
"MIT"
] | null | null | null |
3.2.0/Security Events/On Click/Get SW_CONTEXT INFO/Get SW_CONTEXT INFO.py
|
PhoenixNAP-SecuritySrvs/Swimlane-Intergrations
|
3403a62ded50c872dd2aba049030fdbb25efd0c7
|
[
"MIT"
] | 1
|
2018-10-22T16:32:36.000Z
|
2018-10-22T16:32:36.000Z
|
3.2.0/Security Events/On Click/Get SW_CONTEXT INFO/Get SW_CONTEXT INFO.py
|
PhoenixNAP-SecuritySrvs/Swimlane-Intergrations
|
3403a62ded50c872dd2aba049030fdbb25efd0c7
|
[
"MIT"
] | 1
|
2020-01-15T11:44:04.000Z
|
2020-01-15T11:44:04.000Z
|
print sw_context.user, sw_context.state, sw_context.config, sw_context.inputs
| 77
| 77
| 0.857143
| 13
| 77
| 4.769231
| 0.538462
| 0.580645
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.051948
| 77
| 1
| 77
| 77
| 0.849315
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
47c5cb38d3d238ab7a323e4e5c89685492f4b0e0
| 1,607
|
py
|
Python
|
calaccess_processed/models/filings/base.py
|
dwillis/django-calaccess-processed-data
|
f228252df1b390967468b41d336839f1bd9ca192
|
[
"MIT"
] | 1
|
2021-01-13T12:06:25.000Z
|
2021-01-13T12:06:25.000Z
|
calaccess_processed/models/filings/base.py
|
anthonyjpesce/django-calaccess-processed-data
|
d99b461abb7b7f7973f90b49634c9262efcbe7bf
|
[
"MIT"
] | null | null | null |
calaccess_processed/models/filings/base.py
|
anthonyjpesce/django-calaccess-processed-data
|
d99b461abb7b7f7973f90b49634c9262efcbe7bf
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Filing-related models, managers and mixins.
"""
from time import sleep
import requests
class FilingMixin(object):
"""
Mixin to add custom methods and properties to Filing objects.
"""
@property
def pdf_url(self):
"""
Returns the url for pdf of the most recent version of the CAL-ACCESS filing.
"""
return 'http://cal-access.sos.ca.gov/PDFGen/pdfgen.prg?filingid={0}&amendid={1}'.format(
self.filing_id,
self.amendment_count
)
@property
def has_pdf(self):
"""
Make a HEAD request filing's pdf, return True if response status code is 200.
Pause for half a second before making the request.
"""
sleep(0.5)
r = requests.head(self.pdf_url)
return r.status_code == 200
class FilingVersionMixin(object):
"""
Mixin to add custom methods and properties to FilingVersion objects.
"""
@property
def pdf_url(self):
"""
Returns the url for pdf of the version of the CAL-ACCESS filing.
"""
return 'http://cal-access.sos.ca.gov/PDFGen/pdfgen.prg?filingid={0}&amendid={1}'.format(
self.filing.filing_id,
self.amend_id
)
@property
def has_pdf(self):
"""
Make a HEAD request filing version's pdf, return True if response status code is 200.
Pause for half a second before making the request.
"""
sleep(0.5)
r = requests.head(self.pdf_url)
return r.status_code == 200
| 25.109375
| 96
| 0.598631
| 213
| 1,607
| 4.460094
| 0.375587
| 0.046316
| 0.027368
| 0.033684
| 0.781053
| 0.781053
| 0.781053
| 0.781053
| 0.781053
| 0.688421
| 0
| 0.018551
| 0.295582
| 1,607
| 63
| 97
| 25.507937
| 0.820671
| 0.390168
| 0
| 0.615385
| 0
| 0.076923
| 0.170468
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.153846
| false
| 0
| 0.076923
| 0
| 0.461538
| 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
|
47ddd7a2e4f399b5841d5f43460d7fd86122cae7
| 80
|
py
|
Python
|
pasa/parse/analyzer/__init__.py
|
sonoisa/pasa
|
90dbcd72890bfe390d2a58f2a4cdb79d42a9f9f8
|
[
"MIT"
] | 5
|
2018-07-23T05:45:24.000Z
|
2021-04-04T14:59:15.000Z
|
pasa/parse/analyzer/__init__.py
|
sonoisa/pasa
|
90dbcd72890bfe390d2a58f2a4cdb79d42a9f9f8
|
[
"MIT"
] | 2
|
2019-01-28T04:33:12.000Z
|
2019-11-20T14:30:27.000Z
|
pasa/parse/analyzer/__init__.py
|
sonoisa/pasa
|
90dbcd72890bfe390d2a58f2a4cdb79d42a9f9f8
|
[
"MIT"
] | 1
|
2020-02-07T08:09:12.000Z
|
2020-02-07T08:09:12.000Z
|
# -*- coding: utf-8 -*-
from .analyzer import Analyzer
from .basic import Basic
| 20
| 30
| 0.7
| 11
| 80
| 5.090909
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014925
| 0.1625
| 80
| 3
| 31
| 26.666667
| 0.820896
| 0.2625
| 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
|
9a59eeff3b0f599302d6d719df143e7f6c62a1ad
| 120
|
py
|
Python
|
meetups/admin.py
|
niomwungeri-fabrice/questionnaire-api
|
bd280a30d12daf61c403ae3a58df7027398e80c2
|
[
"MIT"
] | null | null | null |
meetups/admin.py
|
niomwungeri-fabrice/questionnaire-api
|
bd280a30d12daf61c403ae3a58df7027398e80c2
|
[
"MIT"
] | 9
|
2021-03-19T03:26:15.000Z
|
2022-03-11T23:58:06.000Z
|
meetups/admin.py
|
niomwungeri-fabrice/questionnaire-api
|
bd280a30d12daf61c403ae3a58df7027398e80c2
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import MeetUp, Tag
admin.site.register(MeetUp)
admin.site.register(Tag)
| 17.142857
| 32
| 0.8
| 18
| 120
| 5.333333
| 0.555556
| 0.1875
| 0.354167
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108333
| 120
| 6
| 33
| 20
| 0.897196
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
9a6bc0cae31f730174d25363b9f2d3f58747bbb7
| 263
|
py
|
Python
|
snowplow_tracker/__init__.py
|
dbt-labs/snowplow-python-tracker
|
0da61e73134f4892b91d67f9ce170bc1490bf9ad
|
[
"Apache-2.0"
] | 2
|
2018-08-03T11:10:44.000Z
|
2019-02-13T07:28:13.000Z
|
snowplow_tracker/__init__.py
|
dbt-labs/snowplow-python-tracker
|
0da61e73134f4892b91d67f9ce170bc1490bf9ad
|
[
"Apache-2.0"
] | 1
|
2018-07-11T19:57:10.000Z
|
2018-07-11T19:57:10.000Z
|
snowplow_tracker/__init__.py
|
fishtown-analytics/snowplow-python-tracker
|
0da61e73134f4892b91d67f9ce170bc1490bf9ad
|
[
"Apache-2.0"
] | 1
|
2021-11-05T17:50:39.000Z
|
2021-11-05T17:50:39.000Z
|
from snowplow_tracker._version import __version__
from snowplow_tracker.subject import Subject
from snowplow_tracker.emitters import logger, Emitter
from snowplow_tracker.self_describing_json import SelfDescribingJson
from snowplow_tracker.tracker import Tracker
| 43.833333
| 68
| 0.897338
| 33
| 263
| 6.787879
| 0.393939
| 0.267857
| 0.424107
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.079848
| 263
| 5
| 69
| 52.6
| 0.92562
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 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
|
7bd89178412c3770fe864b1fdb41dab6b58bcf15
| 96
|
py
|
Python
|
hatespeech_core/modules/pattern_classifier/__init__.py
|
JherezTaylor/thesis-preprocessing
|
7b52ee05af90b451c8bd07c29610cce36e08aa94
|
[
"MIT"
] | 13
|
2018-02-14T13:59:23.000Z
|
2021-04-16T10:05:59.000Z
|
hatespeech_core/modules/pattern_classifier/__init__.py
|
JherezTaylor/hatespeech_codewords
|
7b52ee05af90b451c8bd07c29610cce36e08aa94
|
[
"MIT"
] | 13
|
2016-12-15T09:56:36.000Z
|
2016-12-20T04:58:48.000Z
|
hatespeech_core/modules/pattern_classifier/__init__.py
|
JherezTaylor/thesis-preprocessing
|
7b52ee05af90b451c8bd07c29610cce36e08aa94
|
[
"MIT"
] | 4
|
2019-08-12T13:33:33.000Z
|
2020-08-26T07:54:44.000Z
|
from .SimpleClassifier import SimpleClassifier
from .PatternVectorizer import PatternVectorizer
| 32
| 48
| 0.895833
| 8
| 96
| 10.75
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 96
| 2
| 49
| 48
| 0.977273
| 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
|
7be5168453c483eabca1290a4103af51eb1f1f8f
| 54
|
py
|
Python
|
interpreter/__init__.py
|
brian-joseph-petersen/oply
|
b30212492c7657903a88d1026b17beda0a1b9ce3
|
[
"MIT"
] | null | null | null |
interpreter/__init__.py
|
brian-joseph-petersen/oply
|
b30212492c7657903a88d1026b17beda0a1b9ce3
|
[
"MIT"
] | null | null | null |
interpreter/__init__.py
|
brian-joseph-petersen/oply
|
b30212492c7657903a88d1026b17beda0a1b9ce3
|
[
"MIT"
] | null | null | null |
from .execute import execute
from .stdin import stdin
| 27
| 29
| 0.814815
| 8
| 54
| 5.5
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 54
| 2
| 30
| 27
| 0.956522
| 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
|
d01a8af7e5a09804e8401aa947fd6434052b7b84
| 130
|
py
|
Python
|
backend/vote/admin.py
|
a-samir97/medium-clone
|
e1a410d694858d23286812effa4eeac663ce3707
|
[
"MIT"
] | null | null | null |
backend/vote/admin.py
|
a-samir97/medium-clone
|
e1a410d694858d23286812effa4eeac663ce3707
|
[
"MIT"
] | 34
|
2020-11-04T07:37:50.000Z
|
2021-02-08T00:13:43.000Z
|
backend/vote/admin.py
|
a-samir97/medium-clone
|
e1a410d694858d23286812effa4eeac663ce3707
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Upvote, Downvote
admin.site.register(Upvote)
admin.site.register(Downvote)
| 18.571429
| 36
| 0.815385
| 18
| 130
| 5.888889
| 0.555556
| 0.169811
| 0.320755
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 130
| 6
| 37
| 21.666667
| 0.905983
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d04aea4c790fa105946da03f7997810f6856bb05
| 45
|
py
|
Python
|
src/kgmk/vision/__init__.py
|
kagemeka/python
|
486ce39d97360b61029527bacf00a87fdbcf552c
|
[
"MIT"
] | null | null | null |
src/kgmk/vision/__init__.py
|
kagemeka/python
|
486ce39d97360b61029527bacf00a87fdbcf552c
|
[
"MIT"
] | null | null | null |
src/kgmk/vision/__init__.py
|
kagemeka/python
|
486ce39d97360b61029527bacf00a87fdbcf552c
|
[
"MIT"
] | null | null | null |
from .color_from_id import (
ColorFromId,
)
| 15
| 28
| 0.755556
| 6
| 45
| 5.333333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155556
| 45
| 3
| 29
| 15
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 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
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d0674ad080f7580d931fde0f2ce449f0eca0fd8d
| 48
|
py
|
Python
|
tests/__init__.py
|
kai490952010/trading_alerts
|
d1c75f57784d998b332f58e0c9c0790d9e7d97df
|
[
"Apache-2.0"
] | null | null | null |
tests/__init__.py
|
kai490952010/trading_alerts
|
d1c75f57784d998b332f58e0c9c0790d9e7d97df
|
[
"Apache-2.0"
] | null | null | null |
tests/__init__.py
|
kai490952010/trading_alerts
|
d1c75f57784d998b332f58e0c9c0790d9e7d97df
|
[
"Apache-2.0"
] | null | null | null |
"""Unit test package for ohlc_data_pipeline."""
| 24
| 47
| 0.75
| 7
| 48
| 4.857143
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104167
| 48
| 1
| 48
| 48
| 0.790698
| 0.854167
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d0754f6798ebdc94893cf840fce194e65e3e7c7e
| 846
|
py
|
Python
|
app/upload/predicates.py
|
S3Infosoft/s3-payment-autoaudit
|
8854d263778bd03c0fbba28c438629b1c78a3654
|
[
"MIT"
] | null | null | null |
app/upload/predicates.py
|
S3Infosoft/s3-payment-autoaudit
|
8854d263778bd03c0fbba28c438629b1c78a3654
|
[
"MIT"
] | 6
|
2019-09-14T06:36:48.000Z
|
2020-05-02T04:03:58.000Z
|
app/upload/predicates.py
|
S3Infosoft/s3-payment-autoaudit
|
8854d263778bd03c0fbba28c438629b1c78a3654
|
[
"MIT"
] | null | null | null |
import rules
from math import floor
MMT_Commission_Percentage = 0.2
@rules.predicate
def MMT1_Commission_Check(obj):
return obj['MMT_Commission'] == floor(MMT_Commission_Percentage * obj['Hotel_Gross_Price'])
@rules.predicate
def MMT2_Commission_Check(obj):
return float(obj['Commission_Charges']) == MMT_Commission_Percentage * obj['Room_Charges']
@rules.predicate
def Booking_Commission_Check(obj):
return float(obj['Commission_amount']) == round((obj['Commission'] / 100) * obj['Final_amount'],2)
@rules.predicate
def Razorpay_Commission_Check(obj):
return False
@rules.predicate
def Mswipe_Commission_Check(obj):
return False
@rules.predicate
def Atom_Commission_Check(obj):
return False
@rules.predicate
def Bank_Commission_Check(obj):
if obj['Deposit_Amt'] == 0.00:
return True
return False
| 24.171429
| 103
| 0.755319
| 112
| 846
| 5.455357
| 0.339286
| 0.160393
| 0.194763
| 0.235679
| 0.363339
| 0.363339
| 0.363339
| 0.225859
| 0
| 0
| 0
| 0.015007
| 0.13357
| 846
| 34
| 104
| 24.882353
| 0.818554
| 0
| 0
| 0.423077
| 0
| 0
| 0.131206
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.269231
| false
| 0
| 0.076923
| 0.230769
| 0.653846
| 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
|
d0d332894f78b89f5ca1c095a9feb1f7087f6821
| 118
|
py
|
Python
|
Python Script Tools/14.0 Number Of Cores Available On The PC.py
|
juan1305/0.11-incremento_descremento
|
954ddb32180c3197e5b01cf95d20f5325ada8a29
|
[
"MIT"
] | 1
|
2020-04-13T00:16:16.000Z
|
2020-04-13T00:16:16.000Z
|
Python Script Tools/14.0 Number Of Cores Available On The PC.py
|
juan1305/0.11-incremento_descremento
|
954ddb32180c3197e5b01cf95d20f5325ada8a29
|
[
"MIT"
] | null | null | null |
Python Script Tools/14.0 Number Of Cores Available On The PC.py
|
juan1305/0.11-incremento_descremento
|
954ddb32180c3197e5b01cf95d20f5325ada8a29
|
[
"MIT"
] | null | null | null |
# Importamos multiprocessing
import multiprocessing
# accedemos al conteo de CPUs
print(multiprocessing.cpu_count())
| 29.5
| 34
| 0.830508
| 13
| 118
| 7.461538
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110169
| 118
| 4
| 34
| 29.5
| 0.92381
| 0.466102
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 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
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
d0e2646a5f3e73da0e0558ec8d8998028f3dd69e
| 256
|
py
|
Python
|
ig/two_step_verification/__init__.py
|
ashvardanian/instagram-scraper
|
7e725c6bc0d493d45f69efdaaea3de3f4c84dfc0
|
[
"MIT"
] | 2
|
2020-04-15T19:38:13.000Z
|
2020-04-15T19:38:16.000Z
|
ig/two_step_verification/__init__.py
|
ashvardanian/PyScrapeIg
|
7e725c6bc0d493d45f69efdaaea3de3f4c84dfc0
|
[
"MIT"
] | null | null | null |
ig/two_step_verification/__init__.py
|
ashvardanian/PyScrapeIg
|
7e725c6bc0d493d45f69efdaaea3de3f4c84dfc0
|
[
"MIT"
] | null | null | null |
from ig.two_step_verification.two_step_verification_abstract_class import TwoStepVerificationAbstractClass
from ig.two_step_verification.console_verification import ConsoleVerification
__all__ = ["TwoStepVerificationAbstractClass", "ConsoleVerification"]
| 51.2
| 106
| 0.902344
| 24
| 256
| 9.083333
| 0.5
| 0.09633
| 0.261468
| 0.119266
| 0.229358
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.050781
| 256
| 4
| 107
| 64
| 0.897119
| 0
| 0
| 0
| 0
| 0
| 0.199219
| 0.125
| 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
|
1900b64c5e1548b02a09c22e5e620004a2b00c36
| 4,742
|
py
|
Python
|
app/mim/Content.py
|
anotherlizwong/mim
|
524a3fe5fcd8af7e7851a42e1e6f1708c00bae5f
|
[
"Apache-2.0"
] | 1
|
2018-11-17T22:10:05.000Z
|
2018-11-17T22:10:05.000Z
|
app/mim/Content.py
|
anotherlizwong/mim
|
524a3fe5fcd8af7e7851a42e1e6f1708c00bae5f
|
[
"Apache-2.0"
] | null | null | null |
app/mim/Content.py
|
anotherlizwong/mim
|
524a3fe5fcd8af7e7851a42e1e6f1708c00bae5f
|
[
"Apache-2.0"
] | null | null | null |
class Content():
def __init__(self):
self.content_type = "video"
self.title = "sample title"
self.author = {"url": "", "name": "James"}
self.time_estimate = "(15 min)"
self.url = "http://mim-rec-engine.heroku.com"
self.thumbnail_url = "static/imgs/document.png"
self.thumbnail_width = 498
self.thumbnail_height = 354
self.duration = ""
self.description = "Bulbasaur Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ivysaur Lorem ipsum dolor sit amet, consectetur adipiscing elit. Venusaur Lorem ipsum dolor sit amet, consectetur adipiscing elit. Charmander Lorem ipsum dolor sit amet, consectetur adipiscing elit. Charmeleon Lorem ipsum dolor sit amet, consectetur adipiscing elit. Charizard Lorem ipsum dolor sit amet, consectetur adipiscing elit. Squirtle Lorem ipsum dolor sit amet, consectetur adipiscing elit. Wartortle Lorem ipsum dolor sit amet, consectetur adipiscing elit. Blastoise Lorem ipsum dolor sit amet, consectetur adipiscing elit. Caterpie Lorem ipsum dolor sit amet, consectetur adipiscing elit. Metapod Lorem ipsum dolor sit amet, consectetur adipiscing elit. Butterfree Lorem ipsum dolor sit amet, consectetur adipiscing elit. Weedle Lorem ipsum dolor sit amet, consectetur adipiscing elit. Kakuna Lorem ipsum dolor sit amet, consectetur adipiscing elit. Beedrill Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pidgey Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pidgeotto Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pidgeot Lorem ipsum dolor sit amet, consectetur adipiscing elit. Rattata Lorem ipsum dolor sit amet, consectetur adipiscing elit. Raticate Lorem ipsum dolor sit amet, consectetur adipiscing elit. Spearow Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fearow Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ekans Lorem ipsum dolor sit amet, consectetur adipiscing elit. Arbok Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pikachu Lorem ipsum dolor sit amet, consectetur adipiscing elit. Raichu Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sandshrew Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sandslash Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nidoran Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nidorina Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nidoqueen Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nidoran Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nidorino Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nidoking Lorem ipsum dolor sit amet, consectetur adipiscing elit. Clefairy Lorem ipsum dolor sit amet, consectetur adipiscing elit. Clefable Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vulpix Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ninetales Lorem ipsum dolor sit amet, consectetur adipiscing elit. Jigglypuff Lorem ipsum dolor sit amet, consectetur adipiscing elit. Wigglytuff Lorem ipsum dolor sit amet, consectetur adipiscing elit. Zubat Lorem ipsum dolor sit amet, consectetur adipiscing elit. Golbat Lorem ipsum dolor sit amet, consectetur adipiscing elit. Oddish Lorem ipsum dolor sit amet, consectetur adipiscing elit. Gloom Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vileplume Lorem ipsum dolor sit amet, consectetur adipiscing elit. Paras Lorem ipsum dolor sit amet, consectetur adipiscing elit."
def set(self, content_type, title, author, time_estimate, url, thumbnail_url, thumbnail_width, thumbnail_height, description):
self.content_type = content_type
self.title = title
self.author = author
self.time_estimate = time_estimate
self.url = url
self.thumbnail_url = thumbnail_url
self.thumbnail_width = thumbnail_width
self.thumbnail_height = thumbnail_height
self.description = description
def build(self, from_engine):
self.id = from_engine["id"]
self.content_type = from_engine["content_type"]
self.title = from_engine["title"]
self.author = from_engine["author"]["name"]
if "author_url" in from_engine["author"]:
self.author_url = from_engine["author"]["author_url"]
self.url = from_engine["url"]
self.description = from_engine["description"]
if "thumbnail" in from_engine:
self.thumbnail_url = from_engine["thumbnail"]["url"]
self.thumbnail_height = from_engine["thumbnail"]["height"]
self.thumbnail_width = from_engine["thumbnail"]["width"]
if "duration" in from_engine:
self.duration = from_engine["duration"]
def set_id(self, id):
self.id = id
| 110.27907
| 3,045
| 0.757275
| 615
| 4,742
| 5.760976
| 0.15122
| 0.129833
| 0.19475
| 0.2337
| 0.614169
| 0.614169
| 0.614169
| 0.614169
| 0.057014
| 0.057014
| 0
| 0.002058
| 0.180304
| 4,742
| 43
| 3,046
| 110.27907
| 0.909442
| 0
| 0
| 0
| 0
| 0.025641
| 0.68522
| 0.00506
| 0
| 0
| 0
| 0
| 0
| 1
| 0.102564
| false
| 0
| 0
| 0
| 0.128205
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ef81152bec398038f9fe5748edb1421496e193e7
| 2,386
|
py
|
Python
|
masci_tools/tests/test_plot_methods.py
|
JPchico/masci-tools
|
a950f492ecebcc1b15100e5dc891f5a6fa6c1a5b
|
[
"MIT"
] | 1
|
2021-06-26T20:37:12.000Z
|
2021-06-26T20:37:12.000Z
|
masci_tools/tests/test_plot_methods.py
|
RubelMozumder/masci-tools
|
a950f492ecebcc1b15100e5dc891f5a6fa6c1a5b
|
[
"MIT"
] | null | null | null |
masci_tools/tests/test_plot_methods.py
|
RubelMozumder/masci-tools
|
a950f492ecebcc1b15100e5dc891f5a6fa6c1a5b
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
from builtins import range
from builtins import object
import pytest
# prevent issue with not having a display on travis-ci
# this needs to go *before* pyplot imports
import matplotlib
matplotlib.use('Agg')
from matplotlib.pyplot import gcf, title
#from masci_tools.io.kkr_read_shapefun_info import read_shapefun
#from masci_tools.vis.kkr_plot_shapefun import plot_shapefun
#from masci_tools.vis.kkr_plot_dos import dosplot
#from masci_tools.vis.kkr_plot_bandstruc_qdos import dispersionplot
#from masci_tools.vis.kkr_plot_FS_qdos import FSqdos2D
# TODO: test if interfaces stay the same...
# I do not write extensive testing, since plot_methods should be redesigned anyway....
class Test_plot_methods_imports(object):
"""
Test plotting functions
"""
#from masci_tools.vis.plot_methods import *
from masci_tools.vis.plot_methods import set_plot_defaults
from masci_tools.vis.plot_methods import single_scatterplot
from masci_tools.vis.plot_methods import multiple_scatterplots
from masci_tools.vis.plot_methods import multi_scatter_plot
from masci_tools.vis.plot_methods import waterfall_plot
from masci_tools.vis.plot_methods import multiplot_moved
from masci_tools.vis.plot_methods import histogram
from masci_tools.vis.plot_methods import default_histogram
from masci_tools.vis.plot_methods import plot_convex_hull2d
from masci_tools.vis.plot_methods import plot_residuen
from masci_tools.vis.plot_methods import plot_convergence_results
from masci_tools.vis.plot_methods import plot_convergence_results_m
from masci_tools.vis.plot_methods import plot_lattice_constant
from masci_tools.vis.plot_methods import plot_relaxation_results
from masci_tools.vis.plot_methods import plot_dos
from masci_tools.vis.plot_methods import plot_bands
from masci_tools.vis.plot_methods import plot_one_element_corelv
from masci_tools.vis.plot_methods import construct_corelevel_spectrum
from masci_tools.vis.plot_methods import plot_corelevel_spectra
from masci_tools.vis.plot_methods import plot_fleur_bands
def test_set_defaults(self):
from masci_tools.vis.plot_methods import linewidth_g
from masci_tools.vis.plot_methods import set_plot_defaults
set_plot_defaults(linewidth=3.0)
assert(linewidth_g==2.0) # if worked should be 3.0
| 45.884615
| 86
| 0.813495
| 361
| 2,386
| 5.072022
| 0.301939
| 0.13763
| 0.214091
| 0.250683
| 0.566357
| 0.566357
| 0.540142
| 0.375205
| 0.139268
| 0.114691
| 0
| 0.003893
| 0.138726
| 2,386
| 51
| 87
| 46.784314
| 0.887105
| 0.259849
| 0
| 0.0625
| 0
| 0
| 0.001725
| 0
| 0
| 0
| 0
| 0.019608
| 0.03125
| 1
| 0.03125
| false
| 0
| 0.875
| 0
| 0.9375
| 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
|
efc44033ee9b7a987c9335747517265a09887acf
| 58
|
py
|
Python
|
pyroma/testdata/complete/complete/__init__.py
|
cthoyt/pyroma
|
7a129e147bcba0b2099d0c3fcd7cd3cf4b2f88d1
|
[
"MIT"
] | null | null | null |
pyroma/testdata/complete/complete/__init__.py
|
cthoyt/pyroma
|
7a129e147bcba0b2099d0c3fcd7cd3cf4b2f88d1
|
[
"MIT"
] | null | null | null |
pyroma/testdata/complete/complete/__init__.py
|
cthoyt/pyroma
|
7a129e147bcba0b2099d0c3fcd7cd3cf4b2f88d1
|
[
"MIT"
] | null | null | null |
import zope.event
# Stop pyflakes complaining:
zope.event
| 14.5
| 28
| 0.810345
| 8
| 58
| 5.875
| 0.75
| 0.382979
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12069
| 58
| 3
| 29
| 19.333333
| 0.921569
| 0.448276
| 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
|
3229678953164d6c118c0ec01981df17c0abe620
| 14
|
py
|
Python
|
test/integration/ListPop/list pop.py
|
HighSchoolHacking/GLS-Draft
|
9e418b6290e7c8e3f2da87668784bdba1cde5a76
|
[
"MIT"
] | 30
|
2019-10-29T12:47:50.000Z
|
2022-02-12T06:41:39.000Z
|
test/integration/ListPop/list pop.py
|
HighSchoolHacking/GLS-Draft
|
9e418b6290e7c8e3f2da87668784bdba1cde5a76
|
[
"MIT"
] | 247
|
2017-09-21T17:11:18.000Z
|
2019-10-08T12:59:07.000Z
|
test/integration/ListPop/list pop.py
|
HighSchoolHacking/GLS-Draft
|
9e418b6290e7c8e3f2da87668784bdba1cde5a76
|
[
"MIT"
] | 17
|
2017-10-01T16:53:20.000Z
|
2018-11-28T07:20:35.000Z
|
#
aaa.pop()
#
| 3.5
| 9
| 0.428571
| 2
| 14
| 3
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.214286
| 14
| 3
| 10
| 4.666667
| 0.545455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3229c8c6e97a7b1b29145da37b8b9f2e682a658d
| 388
|
py
|
Python
|
app/main/errors.py
|
Jerry-Wemisiko/Blog
|
8b48c2a4a0d7931b93d9f901ef87c2f62c705869
|
[
"MIT"
] | null | null | null |
app/main/errors.py
|
Jerry-Wemisiko/Blog
|
8b48c2a4a0d7931b93d9f901ef87c2f62c705869
|
[
"MIT"
] | null | null | null |
app/main/errors.py
|
Jerry-Wemisiko/Blog
|
8b48c2a4a0d7931b93d9f901ef87c2f62c705869
|
[
"MIT"
] | null | null | null |
from flask import render_template
from . import main
@main.errorhandler(403)
def forbidden_access(error):
return render_template('error.html',error = 'page')
@main.errorhandler(404)
def four_Ow_four(error):
return render_template('error.html',error = 'page')
@main.errorhandler(500)
def server_error(error):
return render_template('error.html',error = 'page')
| 21.555556
| 56
| 0.726804
| 51
| 388
| 5.372549
| 0.392157
| 0.20438
| 0.186131
| 0.273723
| 0.587591
| 0.587591
| 0.587591
| 0.587591
| 0.430657
| 0.430657
| 0
| 0.02719
| 0.146907
| 388
| 18
| 57
| 21.555556
| 0.800604
| 0
| 0
| 0.272727
| 0
| 0
| 0.107969
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0.181818
| 0.272727
| 0.727273
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
326b21e66f360e58855f03d031fdbcf0b0b75f68
| 232
|
py
|
Python
|
src/webserver/celeryconfig.py
|
saketkc/moca_web
|
38dfbdd9eeb739322ff3722727e43f1f4da07d3f
|
[
"BSD-2-Clause"
] | null | null | null |
src/webserver/celeryconfig.py
|
saketkc/moca_web
|
38dfbdd9eeb739322ff3722727e43f1f4da07d3f
|
[
"BSD-2-Clause"
] | 4
|
2016-03-14T00:39:41.000Z
|
2016-03-21T19:05:32.000Z
|
src/webserver/celeryconfig.py
|
saketkc/moca_web
|
38dfbdd9eeb739322ff3722727e43f1f4da07d3f
|
[
"BSD-2-Clause"
] | null | null | null |
CELERY_IMPORTS=("app", )
CELERY_BROKER_URL="amqp://saket:fedora13@localhost//"
CELERY_RESULT_BACKEND="amqp://saket:fedora13@localhost//"
SQLALCHEMY_DATABASE_URI="mysql://saket:fedora13@localhost/moca"
CELERYD_MAX_TASKS_PER_CHILD=10
| 38.666667
| 63
| 0.818966
| 31
| 232
| 5.774194
| 0.709677
| 0.217877
| 0.368715
| 0.290503
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035398
| 0.025862
| 232
| 5
| 64
| 46.4
| 0.756637
| 0
| 0
| 0
| 0
| 0
| 0.456897
| 0.443966
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
326c0226adc2b43dcbcdaed6f51deeb69f8b260a
| 169
|
py
|
Python
|
sla_cli/src/db/accessors/__init__.py
|
DavidWalshe93/SL-CLI
|
c92ca8a6e57eb51bf9c9433013ce16d443f8d152
|
[
"MIT"
] | 2
|
2022-01-07T09:59:32.000Z
|
2022-01-25T12:04:06.000Z
|
sla_cli/src/db/accessors/__init__.py
|
DavidWalshe93/SL-CLI
|
c92ca8a6e57eb51bf9c9433013ce16d443f8d152
|
[
"MIT"
] | null | null | null |
sla_cli/src/db/accessors/__init__.py
|
DavidWalshe93/SL-CLI
|
c92ca8a6e57eb51bf9c9433013ce16d443f8d152
|
[
"MIT"
] | 1
|
2021-04-07T17:14:37.000Z
|
2021-04-07T17:14:37.000Z
|
"""
Author: David Walshe
Date: 08 April 2021
"""
from .datasets import Datasets
from .abbreviations import Abbreviations
from .factory import AccessorFactory
| 18.777778
| 40
| 0.745562
| 19
| 169
| 6.631579
| 0.684211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043796
| 0.189349
| 169
| 8
| 41
| 21.125
| 0.875912
| 0.295858
| 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
|
327994c601cfee79804849aac5736456e8d4dc34
| 2,397
|
py
|
Python
|
udacity-program_self_driving_car_engineer_v2.0/Project01-Fusion-Sensor/student/filter.py
|
linksdl/futuretec-project-self_driving_cars_projects
|
38e8f14543132ec86a8bada8d708eefaef23fee8
|
[
"MIT"
] | null | null | null |
udacity-program_self_driving_car_engineer_v2.0/Project01-Fusion-Sensor/student/filter.py
|
linksdl/futuretec-project-self_driving_cars_projects
|
38e8f14543132ec86a8bada8d708eefaef23fee8
|
[
"MIT"
] | null | null | null |
udacity-program_self_driving_car_engineer_v2.0/Project01-Fusion-Sensor/student/filter.py
|
linksdl/futuretec-project-self_driving_cars_projects
|
38e8f14543132ec86a8bada8d708eefaef23fee8
|
[
"MIT"
] | null | null | null |
# ---------------------------------------------------------------------
# Project "Track 3D-Objects Over Time"
# Copyright (C) 2020, Dr. Antje Muntzinger / Dr. Andreas Haja.
#
# Purpose of this file : Kalman filter class
#
# You should have received a copy of the Udacity license together with this program.
#
# https://www.udacity.com/course/self-driving-car-engineer-nanodegree--nd013
# ----------------------------------------------------------------------
#
# imports
import numpy as np
# add project directory to python path to enable relative imports
import os
import sys
PACKAGE_PARENT = '..'
SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__))))
sys.path.append(os.path.normpath(os.path.join(SCRIPT_DIR, PACKAGE_PARENT)))
import misc.params as params
class Filter:
'''Kalman filter class'''
def __init__(self):
pass
def F(self):
############
# TODO Step 1: implement and return system matrix F
############
return 0
############
# END student code
############
def Q(self):
############
# TODO Step 1: implement and return process noise covariance Q
############
return 0
############
# END student code
############
def predict(self, track):
############
# TODO Step 1: predict state x and estimation error covariance P to next timestep, save x and P in track
############
pass
############
# END student code
############
def update(self, track, meas):
############
# TODO Step 1: update state x and covariance P with associated measurement, save x and P in track
############
############
# END student code
############
track.update_attributes(meas)
def gamma(self, track, meas):
############
# TODO Step 1: calculate and return residual gamma
############
return 0
############
# END student code
############
def S(self, track, meas, H):
############
# TODO Step 1: calculate and return covariance of residual S
############
return 0
############
# END student code
############
| 26.054348
| 112
| 0.470171
| 244
| 2,397
| 4.565574
| 0.45082
| 0.032316
| 0.048474
| 0.061041
| 0.247756
| 0.228905
| 0.055655
| 0
| 0
| 0
| 0
| 0.010645
| 0.294535
| 2,397
| 92
| 113
| 26.054348
| 0.648137
| 0.440968
| 0
| 0.272727
| 0
| 0
| 0.001957
| 0
| 0
| 0
| 0
| 0.01087
| 0
| 1
| 0.318182
| false
| 0.090909
| 0.181818
| 0.181818
| 0.727273
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
32898f1e1b01b4570810d29e443776f0b1078d66
| 244
|
py
|
Python
|
tests/conftest.py
|
crowdcomms/pytest-sqlalchemy
|
9096cb6b962e26339e008e50bfd359125a9366b3
|
[
"MIT"
] | 3
|
2018-12-28T00:15:43.000Z
|
2020-05-01T16:04:50.000Z
|
tests/conftest.py
|
crowdcomms/pytest-sqlalchemy
|
9096cb6b962e26339e008e50bfd359125a9366b3
|
[
"MIT"
] | null | null | null |
tests/conftest.py
|
crowdcomms/pytest-sqlalchemy
|
9096cb6b962e26339e008e50bfd359125a9366b3
|
[
"MIT"
] | null | null | null |
import pytest
pytest_plugins = 'pytester'
from example_app.db import Base, Session
@pytest.fixture(scope='session')
def sqlalchemy_base():
return Base
@pytest.fixture(scope='session')
def sqlalchemy_session_class():
return Session
| 16.266667
| 40
| 0.762295
| 31
| 244
| 5.83871
| 0.516129
| 0.143646
| 0.198895
| 0.276243
| 0.41989
| 0.41989
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135246
| 244
| 14
| 41
| 17.428571
| 0.85782
| 0
| 0
| 0.222222
| 0
| 0
| 0.090164
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.222222
| 0.222222
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
329232478189d7050d6827fe28c26bba9fcb32cf
| 882
|
py
|
Python
|
JABA/service/visualization/maps/__init__.py
|
futotta-risu/JATS
|
4f034b56d98731fa6185add1b9d1d353d28a6310
|
[
"Apache-2.0"
] | null | null | null |
JABA/service/visualization/maps/__init__.py
|
futotta-risu/JATS
|
4f034b56d98731fa6185add1b9d1d353d28a6310
|
[
"Apache-2.0"
] | 43
|
2021-06-14T20:58:53.000Z
|
2021-07-16T06:40:15.000Z
|
JABA/service/visualization/maps/__init__.py
|
futotta-risu/JATS
|
4f034b56d98731fa6185add1b9d1d353d28a6310
|
[
"Apache-2.0"
] | null | null | null |
from service.visualization.maps.GenericMap import GenericMap
# General maps
from service.visualization.maps.general.CountMap import CountMap
# Numeric maps
from service.visualization.maps.numeric.GroupByCountMap import GroupByCountMap
from service.visualization.maps.numeric.GroupByMeanMap import GroupByMeanMap
from service.visualization.maps.numeric.GroupBySumMap import GroupBySumMap
from service.visualization.maps.numeric.SqrtMap import SqrtMap
from service.visualization.maps.numeric.SumConstMap import SumConstMap
from service.visualization.maps.numeric.LogMap import LogMap
from service.visualization.maps.numeric.Log2Map import Log2Map
from service.visualization.maps.numeric.MultiplyMap import MultiplyMap
from service.visualization.maps.numeric.PCTChangeMap import PCTChangeMap
# Datetime maps
from service.visualization.maps.datetime.RoundDateMap import RoundDateMap
| 46.421053
| 78
| 0.875283
| 101
| 882
| 7.643564
| 0.19802
| 0.170984
| 0.373057
| 0.435233
| 0.496114
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002433
| 0.068027
| 882
| 18
| 79
| 49
| 0.93674
| 0.044218
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
329e974136e01898585fc8e558e3d5750c67a4f5
| 134
|
py
|
Python
|
amplitude_sdk/__init__.py
|
TheWeatherCompany/amplitude
|
1a04549e5d3d9e89a2ec5f6d2acd7b094678eca8
|
[
"MIT"
] | null | null | null |
amplitude_sdk/__init__.py
|
TheWeatherCompany/amplitude
|
1a04549e5d3d9e89a2ec5f6d2acd7b094678eca8
|
[
"MIT"
] | null | null | null |
amplitude_sdk/__init__.py
|
TheWeatherCompany/amplitude
|
1a04549e5d3d9e89a2ec5f6d2acd7b094678eca8
|
[
"MIT"
] | 1
|
2021-06-09T13:50:32.000Z
|
2021-06-09T13:50:32.000Z
|
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
from amplitude_sdk.clients import BehavioralCohortsClient
| 26.8
| 57
| 0.865672
| 16
| 134
| 6.3125
| 0.625
| 0.19802
| 0.277228
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097015
| 134
| 4
| 58
| 33.5
| 0.834711
| 0
| 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
|
32b203c28eb0f40367de1fab02a53674f7e6aa5e
| 5,222
|
py
|
Python
|
plots/plots/e2e_time.py
|
pps-lab/rofl-project-code
|
eaa9f1aeca3a40ca939c0f723af0186af0f95f9b
|
[
"MIT"
] | 12
|
2021-07-08T13:27:54.000Z
|
2021-12-25T14:53:26.000Z
|
plots/plots/e2e_time.py
|
pps-lab/rofl-project-code
|
eaa9f1aeca3a40ca939c0f723af0186af0f95f9b
|
[
"MIT"
] | 1
|
2021-10-15T09:48:18.000Z
|
2022-03-31T12:41:15.000Z
|
plots/plots/e2e_time.py
|
pps-lab/rofl-project-code
|
eaa9f1aeca3a40ca939c0f723af0186af0f95f9b
|
[
"MIT"
] | 1
|
2021-11-24T19:21:38.000Z
|
2021-11-24T19:21:38.000Z
|
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
import numpy as np
from common import get_colorful_styles, output_dir
def setup_plt():
fig_width_pt = 220 # Get this from LaTeX using \showthe
inches_per_pt = 1.0 / 72.27 * 2 # Convert pt to inches
golden_mean = ((np.math.sqrt(5) - 1.0) / 2.0) * .8 # Aesthetic ratio
fig_width = fig_width_pt * inches_per_pt # width in inches
fig_height = (fig_width * golden_mean) # height in inches
fig_size = [fig_width, fig_height]
plt_params = {
'backend': 'ps',
'axes.labelsize': 20,
'legend.fontsize': 16,
'xtick.labelsize': 18,
'ytick.labelsize': 18,
'font.size': 18,
'figure.figsize': fig_size,
'font.family': 'Times New Roman'
}
plt.rcParams.update(plt_params)
plt.rc('pdf', fonttype=42) # IMPORTANT to get rid of Type 3
def build_fig_e2e_mnist_time(df, name="e2e_mnist_time"):
colors, _ = get_colorful_styles()
configs = {
"u": {"label": "plain", "color": (0.44, 0.44, 0.44, 1), "linestyle": "--", "marker": "x"},
"l8": {"label": "$L_{\infty}$", "color": colors[1], "linestyle": "-", "marker": "x"},
"l8p": {"label": "$L_{\infty}^{(p)}$", "color": colors[1], "linestyle": "--", "marker": "x"},
"l2": {"label": "$L_2$", "color": colors[2], "linestyle": "-", "marker": "x"},
"l2rst": {"label": "$L_2^{(rsl)}$", "color": colors[2], "linestyle": "--", "marker": "x"}
}
setup_plt()
with PdfPages(f"{output_dir}/{name}.pdf") as pdf:
fig, ax = plt.subplots()
##########################
# Draw all the lines
##########################
# lineplot
for suffix in configs.keys():
values = df[f"accuracy_{suffix}"]
labels = df[f"cumtime_{suffix}"]
config = configs[suffix]
plt.plot(labels, values, label=config["label"], color=config["color"], linestyle=config["linestyle"], marker=config["marker"], linewidth=2, markersize=8)
##########################
# General Format
##########################
# ax.set_title("Hello World")
ax.legend(loc="best") # 'best', 'upper right', 'upper left', 'lower left',
# 'lower right', 'right', 'center left', 'center right',
# 'lower center', 'upper center', 'center'
ax.grid(True, axis="y", linestyle=':', color='0.6', zorder=0, linewidth=1.2)
##########################
# Y - Axis Format
##########################
ax.set_ylim(ymin=0, ymax=None)
ax.set_ylabel("Accuracy")
ax.set_yticks([0 ,0.25 ,0.5 ,0.75 ,1])
# ax.set_yticklabels(labels, fontsize=16, rotation=345)
##########################
# X - Axis Format
##########################
# ax.set_xlim(xmin=-30, xmax=1000)
ax.set_xlabel("Time [s] (log)")
ax.set_xscale("log")
# ax.set_xticks(xticks)
# ax.set_xticklabels(labels, fontsize=16, rotation=345)
pdf.savefig(bbox_inches='tight', pad_inches=0)
plt.close()
return fig
def build_fig_e2e_cifar_time(df, name="e2e_cifar_time"):
colors, _ = get_colorful_styles()
configs = {
"u": {"label": "plain", "color": (0.44, 0.44, 0.44, 1), "linestyle": "--", "marker": "x"},
"l8p": {"label": "$L_{\infty}^{(p)}$", "color": colors[1], "linestyle": "--", "marker": "x"}
}
setup_plt()
with PdfPages(f"{output_dir}/{name}.pdf") as pdf:
fig, ax = plt.subplots()
##########################
# Draw all the lines
##########################
# lineplot
for suffix in configs.keys():
values = df[f"accuracy_{suffix}"]
labels = df[f"cumtime_{suffix}"]
config = configs[suffix]
plt.plot(labels, values, label=config["label"], color=config["color"], linestyle=config["linestyle"], marker=config["marker"], linewidth=2, markersize=8)
##########################
# General Format
##########################
# ax.set_title("Hello World")
ax.legend(loc="upper left") # 'best', 'upper right', 'upper left', 'lower left',
# 'lower right', 'right', 'center left', 'center right',
# 'lower center', 'upper center', 'center'
ax.grid(True, axis="y", linestyle=':', color='0.6', zorder=0, linewidth=1.2)
##########################
# Y - Axis Format
##########################
ax.set_ylim(ymin=0, ymax=None)
ax.set_ylabel("Accuracy")
ax.set_yticks([0 ,0.25 ,0.5 ,0.75 ,1])
# ax.set_yticklabels(labels, fontsize=16, rotation=345)
##########################
# X - Axis Format
##########################
# ax.set_xlim(xmin=-30, xmax=1000)
ax.set_xlabel("Time [s] (log)")
ax.set_xscale("log")
# ax.set_xticks(xticks)
# ax.set_xticklabels(labels, fontsize=16, rotation=345)
pdf.savefig(bbox_inches='tight', pad_inches=0)
plt.close()
return fig
| 34.582781
| 165
| 0.501915
| 605
| 5,222
| 4.201653
| 0.277686
| 0.039339
| 0.04406
| 0.033438
| 0.72856
| 0.72856
| 0.708497
| 0.708497
| 0.708497
| 0.708497
| 0
| 0.034875
| 0.258713
| 5,222
| 151
| 166
| 34.582781
| 0.621803
| 0.184412
| 0
| 0.540541
| 0
| 0
| 0.17874
| 0.012073
| 0
| 0
| 0
| 0
| 0
| 1
| 0.040541
| false
| 0
| 0.054054
| 0
| 0.121622
| 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
|
08868548c7ccc7fd0a744cbe23e9a26d4cdeec4c
| 35,881
|
py
|
Python
|
dbcollection/datasets/mpii_pose/val_image_ids.py
|
dbcollection/dbcollection
|
a36f57a11bc2636992e26bba4406914162773dd9
|
[
"MIT"
] | 23
|
2017-09-20T19:23:26.000Z
|
2022-01-09T16:18:11.000Z
|
dbcollection/datasets/mpii_pose/val_image_ids.py
|
dbcollection/dbcollection
|
a36f57a11bc2636992e26bba4406914162773dd9
|
[
"MIT"
] | 148
|
2017-07-23T14:28:28.000Z
|
2022-01-13T00:35:17.000Z
|
dbcollection/datasets/mpii_pose/val_image_ids.py
|
dbcollection/dbcollection
|
a36f57a11bc2636992e26bba4406914162773dd9
|
[
"MIT"
] | 6
|
2018-01-12T15:47:57.000Z
|
2021-02-09T06:32:39.000Z
|
"""
List of image ids for the validation split of the
full training set of the MPII Pose dataset.
The image file ids have been randomly generated and are set to
have a split of 70-30 w.r.t. all available person detections
with all pose detections for the custom training and validation
splits.
"""
val_images_ids = [4, 7, 13, 14, 17, 18, 21, 23, 28, 31, 38, 40, 42, 46, 56, 70, 72, 88, 89, 94, 104, 106, 107, 116, 118, 120, 122, 124, 127, 130, 136, 138, 140, 144, 147, 150, 153, 155, 167, 168, 172, 176, 179, 181, 189, 190, 193, 206, 207, 208, 223, 227, 229, 230, 231, 232, 234, 239, 240, 257, 270, 273, 277, 286, 290, 302, 305, 311, 313, 328, 333, 338, 342, 347, 354, 356, 358, 359, 368, 373, 374, 375, 376, 378, 379, 381, 382, 386, 387, 391, 394, 398, 409, 420, 422, 427, 429, 430, 437, 447, 455, 460, 461, 463, 464, 475, 477, 479, 482, 486, 487, 488, 491, 496, 498, 500, 502, 503, 508, 512, 513, 530, 531, 533, 544, 545, 559, 561, 562, 563, 565, 571, 572, 579, 589, 593, 595, 596, 597, 608, 610, 612, 617, 618, 622, 631, 635, 638, 642, 647, 648, 656, 660, 661, 665, 672, 680, 685, 701, 704, 705, 711, 727, 760, 767, 769, 771, 775, 777, 780, 784, 785, 787, 788, 789, 793, 796, 798, 814, 817, 822, 823, 827, 833, 842, 850, 854, 858, 865, 869, 873, 874, 882, 888, 891, 898, 906, 913, 924, 938, 942, 950, 952, 960, 962, 965, 969, 970, 973, 977, 981, 982, 984, 986, 992, 993, 997, 1024, 1033, 1036, 1053, 1059, 1060, 1061, 1070, 1092, 1095, 1097, 1098, 1101, 1102, 1104, 1107, 1116, 1118, 1121, 1124, 1135, 1136, 1140, 1141, 1142, 1145, 1148, 1149, 1150, 1151, 1152, 1159, 1164, 1166, 1168, 1170, 1171, 1172, 1175, 1177, 1204, 1210, 1212, 1213, 1215, 1217, 1237, 1242, 1246, 1247, 1252, 1254, 1258, 1259, 1262, 1266, 1267, 1272, 1287, 1292, 1294, 1298, 1299, 1300, 1306, 1309, 1313, 1314, 1315, 1319, 1328, 1329, 1333, 1337, 1338, 1340, 1341, 1347, 1352, 1353, 1367, 1370, 1374, 1378, 1396, 1403, 1409, 1414, 1417, 1425, 1429, 1436, 1450, 1453, 1458, 1462, 1469, 1472, 1476, 1478, 1482, 1483, 1492, 1493, 1499, 1500, 1504, 1507, 1510, 1512, 1513, 1515, 1517, 1520, 1524, 1526, 1540, 1551, 1553, 1554, 1558, 1560, 1562, 1567, 1579, 1581, 1593, 1595, 1598, 1602, 1610, 1620, 1622, 1639, 1647, 1655, 1659, 1665, 1666, 1668, 1672, 1679, 1694, 1696, 1703, 1705, 1706, 1709, 1722, 1725, 1738, 1749, 1753, 1755, 1770, 1777, 1782, 1784, 1793, 1794, 1796, 1803, 1805, 1808, 1810, 1814, 1816, 1817, 1818, 1820, 1839, 1843, 1860, 1863, 1872, 1877, 1887, 1890, 1891, 1893, 1895, 1898, 1924, 1926, 1948, 1949, 1957, 1971, 1976, 1983, 1989, 1990, 1993, 1994, 1996, 1997, 2002, 2003, 2005, 2006, 2008, 2009, 2016, 2019, 2028, 2029, 2030, 2034, 2040, 2041, 2044, 2048, 2051, 2054, 2055, 2056, 2061, 2063, 2064, 2065, 2066, 2085, 2091, 2093, 2098, 2100, 2121, 2122, 2125, 2129, 2149, 2157, 2161, 2164, 2166, 2168, 2171, 2174, 2180, 2184, 2185, 2189, 2190, 2215, 2228, 2230, 2231, 2234, 2239, 2256, 2257, 2258, 2259, 2261, 2262, 2296, 2316, 2318, 2320, 2326, 2332, 2340, 2341, 2343, 2348, 2350, 2358, 2381, 2384, 2389, 2391, 2393, 2399, 2407, 2415, 2419, 2427, 2428, 2440, 2441, 2442, 2463, 2467, 2468, 2486, 2489, 2491, 2496, 2497, 2500, 2524, 2526, 2543, 2553, 2554, 2562, 2564, 2567, 2568, 2570, 2571, 2580, 2581, 2585, 2590, 2591, 2598, 2599, 2600, 2601, 2605, 2609, 2612, 2613, 2618, 2626, 2630, 2633, 2638, 2640, 2641, 2642, 2648, 2650, 2655, 2662, 2666, 2670, 2673, 2674, 2691, 2692, 2695, 2696, 2699, 2701, 2702, 2703, 2708, 2711, 2712, 2713, 2715, 2724, 2726, 2733, 2746, 2749, 2753, 2756, 2757, 2765, 2770, 2777, 2784, 2796, 2797, 2799, 2800, 2801, 2802, 2803, 2821, 2822, 2825, 2838, 2840, 2842, 2843, 2859, 2860, 2861, 2863, 2869, 2874, 2881, 2882, 2884, 2887, 2900, 2902, 2905, 2912, 2914, 2923, 2925, 2930, 2932, 2933, 2941, 2947, 2955, 2965, 2969, 2974, 2977, 2978, 2979, 2991, 3004, 3007, 3009, 3010, 3011, 3012, 3016, 3018, 3021, 3027, 3028, 3030, 3035, 3039, 3041, 3045, 3047, 3048, 3050, 3062, 3067, 3071, 3084, 3086, 3087, 3088, 3091, 3092, 3100, 3101, 3114, 3115, 3119, 3120, 3128, 3130, 3139, 3146, 3149, 3151, 3155, 3162, 3169, 3171, 3172, 3176, 3177, 3178, 3179, 3182, 3183, 3185, 3187, 3190, 3192, 3193, 3194, 3199, 3238, 3240, 3243, 3249, 3250, 3252, 3256, 3262, 3263, 3273, 3274, 3276, 3278, 3282, 3284, 3288, 3303, 3304, 3305, 3315, 3316, 3317, 3323, 3325, 3327, 3330, 3339, 3343, 3344, 3357, 3359, 3366, 3368, 3370, 3371, 3382, 3383, 3386, 3403, 3414, 3422, 3433, 3439, 3446, 3451, 3454, 3458, 3464, 3468, 3471, 3475, 3482, 3487, 3492, 3493, 3519, 3520, 3529, 3530, 3537, 3538, 3539, 3552, 3577, 3580, 3583, 3584, 3592, 3593, 3594, 3595, 3596, 3598, 3599, 3616, 3620, 3621, 3623, 3624, 3625, 3628, 3631, 3636, 3637, 3641, 3642, 3643, 3645, 3647, 3648, 3653, 3655, 3656, 3658, 3662, 3663, 3665, 3666, 3676, 3681, 3684, 3689, 3690, 3696, 3699, 3702, 3703, 3705, 3706, 3716, 3719, 3726, 3727, 3728, 3749, 3754, 3757, 3758, 3760, 3761, 3763, 3768, 3778, 3779, 3783, 3784, 3785, 3791, 3792, 3793, 3796, 3801, 3805, 3811, 3813, 3815, 3816, 3818, 3833, 3834, 3836, 3838, 3841, 3846, 3848, 3855, 3856, 3861, 3866, 3869, 3873, 3883, 3887, 3891, 3892, 3893, 3906, 3916, 3917, 3924, 3928, 3929, 3930, 3931, 3940, 3941, 3952, 3954, 3955, 3956, 3970, 3973, 3980, 3981, 3983, 3996, 3997, 4002, 4004, 4006, 4007, 4015, 4018, 4020, 4029, 4031, 4033, 4034, 4044, 4048, 4063, 4064, 4067, 4072, 4074, 4077, 4079, 4103, 4104, 4131, 4133, 4137, 4139, 4144, 4146, 4154, 4158, 4160, 4162, 4165, 4166, 4180, 4187, 4196, 4197, 4198, 4200, 4201, 4209, 4212, 4216, 4217, 4218, 4222, 4228, 4231, 4234, 4237, 4241, 4242, 4248, 4263, 4265, 4269, 4274, 4278, 4298, 4303, 4306, 4308, 4314, 4321, 4323, 4324, 4326, 4328, 4330, 4335, 4343, 4361, 4362, 4368, 4375, 4377, 4379, 4398, 4405, 4407, 4409, 4416, 4419, 4422, 4424, 4426, 4427, 4431, 4432, 4434, 4435, 4436, 4439, 4442, 4443, 4445, 4450, 4453, 4465, 4472, 4477, 4481, 4483, 4485, 4496, 4498, 4502, 4504, 4509, 4533, 4559, 4562, 4568, 4571, 4572, 4574, 4581, 4591, 4592, 4604, 4610, 4611, 4615, 4617, 4629, 4631, 4633, 4636, 4639, 4640, 4641, 4654, 4656, 4657, 4658, 4661, 4664, 4668, 4669, 4670, 4674, 4675, 4690, 4693, 4717, 4719, 4724, 4725, 4726, 4728, 4729, 4750, 4757, 4758, 4772, 4779, 4791, 4799, 4802, 4819, 4822, 4823, 4824, 4825, 4827, 4828, 4833, 4834, 4840, 4842, 4846, 4864, 4868, 4871, 4872, 4874, 4878, 4879, 4885, 4887, 4893, 4895, 4900, 4905, 4916, 4917, 4918, 4930, 4939, 4940, 4962, 4969, 4970, 4986, 4990, 4993, 4996, 5012, 5014, 5025, 5026, 5030, 5034, 5035, 5043, 5049, 5050, 5051, 5061, 5071, 5072, 5079, 5100, 5101, 5104, 5112, 5113, 5118, 5124, 5126, 5128, 5136, 5138, 5146, 5149, 5151, 5152, 5159, 5162, 5164, 5165, 5168, 5169, 5171, 5173, 5185, 5187, 5190, 5191, 5195, 5203, 5205, 5206, 5211, 5214, 5217, 5221, 5231, 5246, 5251, 5253, 5261, 5307, 5313, 5338, 5343, 5347, 5348, 5349, 5351, 5353, 5357, 5363, 5386, 5387, 5391, 5398, 5405, 5406, 5408, 5415, 5421, 5422, 5423, 5424, 5425, 5428, 5432, 5441, 5447, 5451, 5452, 5455, 5459, 5463, 5466, 5468, 5469, 5470, 5477, 5478, 5483, 5485, 5486, 5487, 5496, 5498, 5504, 5506, 5530, 5532, 5534, 5539, 5562, 5563, 5564, 5574, 5575, 5576, 5577, 5580, 5592, 5593, 5596, 5599, 5607, 5608, 5609, 5610, 5621, 5624, 5625, 5637, 5642, 5643, 5644, 5645, 5646, 5650, 5652, 5654, 5655, 5657, 5660, 5663, 5666, 5673, 5675, 5676, 5680, 5681, 5683, 5684, 5687, 5688, 5689, 5690, 5692, 5698, 5699, 5700, 5703, 5705, 5708, 5709, 5711, 5729, 5736, 5741, 5743, 5744, 5746, 5752, 5753, 5754, 5756, 5763, 5766, 5767, 5769, 5770, 5773, 5775, 5777, 5782, 5783, 5791, 5792, 5794, 5812, 5814, 5817, 5821, 5823, 5833, 5836, 5837, 5840, 5842, 5843, 5847, 5849, 5852, 5853, 5855, 5859, 5863, 5864, 5865, 5869, 5871, 5872, 5873, 5879, 5880, 5884, 5887, 5891, 5892, 5893, 5894, 5896, 5897, 5915, 5918, 5919, 5926, 5932, 5934, 5935, 5942, 5944, 5960, 5961, 5962, 5965, 5969, 5970, 5978, 5979, 5986, 5987, 5988, 5990, 5997, 5998, 6008, 6010, 6014, 6018, 6022, 6030, 6031, 6045, 6047, 6049, 6051, 6052, 6054, 6062, 6063, 6065, 6068, 6083, 6086, 6093, 6095, 6096, 6097, 6105, 6113, 6115, 6139, 6141, 6147, 6156, 6157, 6159, 6162, 6164, 6166, 6174, 6177, 6179, 6180, 6182, 6184, 6186, 6188, 6189, 6192, 6196, 6198, 6200, 6203, 6204, 6209, 6217, 6218, 6227, 6229, 6234, 6239, 6241, 6248, 6250, 6254, 6265, 6267, 6276, 6285, 6297, 6302, 6313, 6326, 6329, 6332, 6345, 6347, 6353, 6362, 6365, 6366, 6367, 6368, 6377, 6381, 6382, 6404, 6407, 6411, 6412, 6427, 6430, 6431, 6434, 6436, 6442, 6444, 6447, 6448, 6452, 6455, 6463, 6465, 6466, 6482, 6487, 6488, 6489, 6497, 6528, 6530, 6531, 6533, 6549, 6551, 6555, 6560, 6564, 6565, 6567, 6568, 6569, 6574, 6578, 6579, 6580, 6581, 6583, 6593, 6596, 6597, 6600, 6605, 6620, 6621, 6643, 6652, 6659, 6660, 6664, 6665, 6666, 6672, 6683, 6684, 6687, 6688, 6720, 6723, 6724, 6725, 6727, 6729, 6744, 6745, 6746, 6751, 6752, 6753, 6758, 6759, 6761, 6764, 6767, 6768, 6769, 6782, 6784, 6785, 6786, 6792, 6800, 6801, 6804, 6814, 6826, 6828, 6835, 6842, 6843, 6857, 6862, 6865, 6872, 6891, 6896, 6899, 6901, 6904, 6910, 6915, 6916, 6917, 6920, 6922, 6924, 6927, 6932, 6933, 6936, 6939, 6940, 6942, 6944, 6957, 6961, 6973, 6976, 6981, 7006, 7007, 7009, 7010, 7011, 7029, 7032, 7033, 7054, 7058, 7064, 7065, 7071, 7083, 7094, 7098, 7099, 7100, 7101, 7108, 7109, 7110, 7111, 7113, 7122, 7123, 7124, 7139, 7141, 7144, 7151, 7152, 7155, 7158, 7182, 7185, 7186, 7188, 7189, 7197, 7202, 7204, 7207, 7210, 7211, 7222, 7226, 7227, 7228, 7241, 7244, 7246, 7254, 7257, 7258, 7261, 7262, 7266, 7275, 7279, 7281, 7283, 7284, 7287, 7294, 7296, 7300, 7302, 7304, 7305, 7316, 7317, 7319, 7320, 7332, 7336, 7339, 7342, 7343, 7351, 7352, 7356, 7357, 7360, 7363, 7364, 7366, 7368, 7373, 7381, 7385, 7388, 7394, 7397, 7401, 7402, 7405, 7408, 7416, 7417, 7420, 7426, 7428, 7430, 7431, 7433, 7435, 7438, 7440, 7444, 7446, 7449, 7455, 7456, 7459, 7460, 7461, 7473, 7474, 7477, 7486, 7488, 7506, 7507, 7513, 7515, 7529, 7535, 7537, 7541, 7544, 7546, 7554, 7567, 7575, 7579, 7580, 7588, 7591, 7597, 7600, 7601, 7602, 7605, 7606, 7609, 7622, 7623, 7624, 7625, 7627, 7646, 7648, 7658, 7660, 7663, 7664, 7669, 7670, 7692, 7694, 7698, 7699, 7704, 7715, 7716, 7717, 7720, 7723, 7744, 7746, 7751, 7754, 7759, 7766, 7770, 7771, 7774, 7775, 7776, 7777, 7783, 7786, 7788, 7823, 7840, 7844, 7849, 7852, 7855, 7856, 7857, 7859, 7861, 7862, 7863, 7864, 7870, 7873, 7874, 7875, 7876, 7879, 7880, 7886, 7887, 7890, 7894, 7901, 7915, 7917, 7918, 7921, 7924, 7941, 7943, 7947, 7954, 7955, 7969, 7970, 7994, 8008, 8012, 8014, 8015, 8017, 8019, 8020, 8024, 8039, 8040, 8045, 8047, 8050, 8054, 8058, 8065, 8067, 8068, 8069, 8076, 8077, 8079, 8080, 8082, 8088, 8090, 8098, 8102, 8105, 8111, 8113, 8128, 8133, 8140, 8143, 8165, 8172, 8176, 8185, 8186, 8188, 8189, 8191, 8192, 8194, 8195, 8211, 8212, 8214, 8226, 8229, 8245, 8251, 8253, 8262, 8264, 8266, 8268, 8273, 8276, 8277, 8279, 8283, 8284, 8285, 8286, 8288, 8293, 8295, 8298, 8303, 8305, 8307, 8309, 8312, 8328, 8332, 8334, 8337, 8338, 8342, 8346, 8349, 8353, 8369, 8370, 8379, 8380, 8382, 8384, 8388, 8389, 8390, 8393, 8395, 8404, 8405, 8407, 8408, 8414, 8415, 8418, 8421, 8423, 8424, 8446, 8447, 8456, 8459, 8461, 8465, 8467, 8468, 8470, 8472, 8475, 8478, 8485, 8487, 8488, 8495, 8503, 8504, 8507, 8510, 8515, 8519, 8524, 8525, 8529, 8532, 8534, 8536, 8551, 8561, 8571, 8572, 8573, 8578, 8579, 8580, 8585, 8587, 8589, 8607, 8608, 8613, 8637, 8638, 8640, 8648, 8651, 8653, 8655, 8656, 8659, 8662, 8663, 8665, 8681, 8683, 8686, 8689, 8691, 8706, 8710, 8713, 8714, 8716, 8717, 8718, 8719, 8722, 8725, 8726, 8737, 8740, 8741, 8747, 8751, 8752, 8768, 8773, 8774, 8777, 8782, 8783, 8784, 8793, 8796, 8797, 8804, 8807, 8810, 8814, 8817, 8818, 8820, 8827, 8829, 8830, 8832, 8835, 8838, 8853, 8857, 8862, 8865, 8873, 8876, 8882, 8904, 8907, 8908, 8911, 8912, 8914, 8925, 8927, 8931, 8937, 8938, 8961, 8962, 8964, 8966, 8968, 8973, 8974, 8977, 8983, 8999, 9000, 9005, 9012, 9013, 9014, 9016, 9020, 9030, 9044, 9056, 9059, 9066, 9070, 9071, 9072, 9077, 9107, 9111, 9119, 9121, 9123, 9127, 9128, 9130, 9133, 9134, 9138, 9143, 9152, 9156, 9159, 9178, 9179, 9180, 9185, 9207, 9209, 9213, 9215, 9219, 9221, 9229, 9230, 9241, 9244, 9252, 9253, 9255, 9256, 9257, 9260, 9262, 9270, 9271, 9275, 9278, 9279, 9280, 9283, 9286, 9303, 9305, 9309, 9314, 9320, 9324, 9327, 9332, 9335, 9336, 9341, 9368, 9369, 9370, 9378, 9384, 9390, 9396, 9400, 9401, 9406, 9407, 9411, 9418, 9423, 9428, 9429, 9431, 9442, 9443, 9444, 9445, 9447, 9448, 9450, 9482, 9489, 9492, 9497, 9499, 9504, 9505, 9509, 9510, 9512, 9513, 9535, 9536, 9537, 9540, 9541, 9543, 9544, 9548, 9551, 9552, 9553, 9560, 9568, 9583, 9586, 9589, 9611, 9613, 9614, 9619, 9620, 9622, 9623, 9626, 9628, 9630, 9632, 9633, 9634, 9657, 9664, 9676, 9688, 9690, 9692, 9694, 9697, 9699, 9704, 9705, 9708, 9714, 9724, 9725, 9728, 9743, 9744, 9747, 9755, 9758, 9765, 9768, 9770, 9773, 9780, 9785, 9789, 9792, 9793, 9799, 9800, 9804, 9805, 9808, 9809, 9810, 9815, 9816, 9821, 9827, 9834, 9836, 9838, 9839, 9842, 9843, 9844, 9848, 9852, 9853, 9856, 9857, 9862, 9863, 9869, 9879, 9880, 9886, 9888, 9901, 9902, 9929, 9930, 9932, 9934, 9936, 9938, 9961, 9969, 9971, 9974, 9975, 9978, 9979, 9993, 9994, 9997, 9998, 10000, 10003, 10004, 10007, 10008, 10021, 10036, 10038, 10040, 10042, 10050, 10062, 10063, 10066, 10076, 10078, 10081, 10083, 10097, 10098, 10102, 10103, 10104, 10105, 10106, 10107, 10110, 10114, 10119, 10121, 10139, 10141, 10147, 10150, 10151, 10153, 10158, 10159, 10162, 10164, 10172, 10175, 10177, 10180, 10191, 10192, 10195, 10200, 10203, 10207, 10208, 10209, 10210, 10211, 10213, 10216, 10218, 10219, 10220, 10222, 10224, 10255, 10278, 10280, 10283, 10288, 10289, 10297, 10310, 10314, 10315, 10320, 10327, 10330, 10333, 10336, 10358, 10374, 10376, 10377, 10378, 10383, 10385, 10386, 10391, 10394, 10401, 10404, 10407, 10432, 10433, 10437, 10440, 10441, 10456, 10457, 10477, 10478, 10479, 10481, 10482, 10490, 10494, 10496, 10504, 10505, 10509, 10510, 10536, 10539, 10540, 10546, 10547, 10548, 10571, 10573, 10579, 10580, 10581, 10592, 10594, 10601, 10602, 10603, 10611, 10613, 10619, 10626, 10631, 10632, 10637, 10639, 10643, 10644, 10646, 10649, 10650, 10652, 10654, 10655, 10657, 10659, 10663, 10665, 10677, 10678, 10679, 10681, 10685, 10686, 10688, 10690, 10691, 10695, 10709, 10710, 10711, 10713, 10724, 10725, 10732, 10733, 10734, 10742, 10747, 10754, 10757, 10758, 10767, 10769, 10770, 10773, 10774, 10775, 10776, 10778, 10779, 10780, 10786, 10789, 10797, 10800, 10801, 10802, 10807, 10808, 10810, 10811, 10823, 10824, 10837, 10838, 10842, 10846, 10847, 10848, 10852, 10856, 10865, 10866, 10867, 10869, 10878, 10880, 10887, 10908, 10910, 10915, 10916, 10930, 10935, 10937, 10940, 10941, 10947, 10948, 10950, 10951, 10956, 10963, 10970, 10972, 10973, 10979, 10981, 10983, 10984, 10998, 10999, 11008, 11011, 11013, 11016, 11017, 11021, 11025, 11030, 11031, 11047, 11048, 11051, 11059, 11061, 11062, 11063, 11064, 11067, 11070, 11072, 11073, 11078, 11083, 11093, 11098, 11099, 11100, 11101, 11102, 11105, 11107, 11112, 11113, 11115, 11118, 11120, 11123, 11128, 11137, 11138, 11147, 11148, 11154, 11156, 11199, 11202, 11206, 11210, 11211, 11214, 11215, 11218, 11230, 11234, 11238, 11242, 11243, 11250, 11252, 11259, 11262, 11265, 11269, 11276, 11297, 11300, 11304, 11306, 11313, 11314, 11315, 11320, 11323, 11328, 11329, 11332, 11333, 11334, 11349, 11357, 11359, 11371, 11373, 11375, 11377, 11383, 11389, 11390, 11396, 11398, 11399, 11400, 11403, 11404, 11406, 11407, 11428, 11436, 11439, 11444, 11448, 11454, 11455, 11459, 11462, 11467, 11474, 11482, 11486, 11488, 11489, 11494, 11496, 11497, 11498, 11513, 11516, 11517, 11526, 11528, 11532, 11537, 11547, 11550, 11552, 11555, 11556, 11558, 11561, 11573, 11583, 11588, 11601, 11603, 11604, 11609, 11617, 11629, 11638, 11640, 11641, 11642, 11655, 11656, 11661, 11664, 11665, 11667, 11670, 11682, 11687, 11688, 11689, 11690, 11691, 11693, 11713, 11725, 11737, 11738, 11742, 11745, 11746, 11756, 11757, 11758, 11760, 11763, 11764, 11775, 11785, 11789, 11793, 11796, 11798, 11800, 11801, 11803, 11806, 11815, 11817, 11826, 11829, 11830, 11833, 11834, 11838, 11839, 11841, 11842, 11845, 11847, 11848, 11862, 11864, 11899, 11900, 11902, 11906, 11914, 11917, 11919, 11926, 11928, 11932, 11935, 11939, 11960, 11961, 11964, 11977, 11978, 11985, 11988, 11991, 11992, 11994, 11995, 12000, 12002, 12003, 12011, 12020, 12023, 12024, 12028, 12049, 12052, 12056, 12067, 12070, 12075, 12077, 12079, 12082, 12090, 12095, 12097, 12098, 12100, 12102, 12104, 12109, 12113, 12122, 12124, 12126, 12130, 12137, 12138, 12141, 12172, 12175, 12181, 12190, 12193, 12207, 12209, 12210, 12217, 12218, 12231, 12237, 12238, 12252, 12253, 12255, 12267, 12272, 12273, 12280, 12281, 12282, 12284, 12292, 12311, 12316, 12317, 12319, 12332, 12335, 12345, 12353, 12355, 12356, 12360, 12383, 12384, 12386, 12388, 12389, 12390, 12404, 12405, 12407, 12408, 12411, 12415, 12417, 12418, 12420, 12421, 12426, 12430, 12431, 12432, 12442, 12443, 12444, 12445, 12448, 12450, 12455, 12456, 12458, 12459, 12466, 12467, 12468, 12470, 12477, 12481, 12483, 12493, 12494, 12496, 12499, 12502, 12503, 12504, 12506, 12507, 12510, 12516, 12517, 12520, 12529, 12530, 12536, 12540, 12541, 12543, 12557, 12558, 12562, 12567, 12575, 12578, 12579, 12581, 12585, 12588, 12589, 12590, 12593, 12594, 12595, 12601, 12603, 12604, 12616, 12617, 12633, 12637, 12638, 12639, 12642, 12644, 12649, 12653, 12654, 12656, 12659, 12660, 12662, 12670, 12675, 12676, 12679, 12681, 12711, 12712, 12714, 12720, 12721, 12724, 12726, 12729, 12730, 12732, 12738, 12740, 12743, 12746, 12757, 12764, 12765, 12770, 12776, 12779, 12781, 12783, 12790, 12791, 12795, 12796, 12797, 12806, 12807, 12810, 12813, 12815, 12824, 12826, 12827, 12829, 12838, 12843, 12848, 12849, 12851, 12859, 12860, 12862, 12868, 12870, 12887, 12889, 12891, 12892, 12898, 12902, 12909, 12912, 12913, 12918, 12919, 12934, 12939, 12942, 12946, 12950, 12951, 12956, 12957, 12958, 12980, 12987, 12989, 12991, 12995, 12996, 12998, 13008, 13009, 13011, 13013, 13035, 13038, 13039, 13045, 13049, 13050, 13058, 13060, 13061, 13068, 13069, 13082, 13083, 13086, 13090, 13091, 13098, 13106, 13109, 13111, 13137, 13148, 13152, 13158, 13159, 13160, 13161, 13164, 13171, 13180, 13181, 13185, 13186, 13190, 13193, 13200, 13205, 13217, 13228, 13231, 13235, 13236, 13253, 13258, 13260, 13261, 13264, 13268, 13270, 13274, 13277, 13279, 13281, 13285, 13296, 13300, 13302, 13309, 13311, 13313, 13317, 13319, 13339, 13341, 13343, 13347, 13348, 13352, 13355, 13358, 13368, 13370, 13389, 13394, 13395, 13397, 13409, 13414, 13417, 13422, 13426, 13428, 13430, 13434, 13437, 13438, 13440, 13441, 13445, 13452, 13453, 13475, 13498, 13499, 13503, 13505, 13507, 13509, 13510, 13511, 13516, 13523, 13524, 13550, 13553, 13560, 13562, 13566, 13570, 13571, 13574, 13575, 13578, 13585, 13587, 13588, 13589, 13608, 13609, 13618, 13620, 13622, 13623, 13625, 13627, 13629, 13631, 13632, 13634, 13639, 13640, 13644, 13661, 13668, 13670, 13673, 13677, 13681, 13682, 13689, 13690, 13691, 13697, 13698, 13699, 13710, 13716, 13717, 13739, 13744, 13745, 13748, 13751, 13753, 13754, 13757, 13758, 13761, 13765, 13777, 13779, 13787, 13793, 13794, 13796, 13804, 13808, 13815, 13819, 13820, 13821, 13830, 13831, 13836, 13852, 13854, 13856, 13857, 13858, 13860, 13862, 13863, 13866, 13868, 13880, 13885, 13886, 13898, 13899, 13900, 13907, 13908, 13910, 13916, 13918, 13921, 13928, 13930, 13935, 13936, 13944, 13947, 13949, 13951, 13954, 13955, 13957, 13960, 13963, 13966, 13990, 13993, 13999, 14006, 14009, 14010, 14013, 14014, 14017, 14020, 14024, 14035, 14037, 14048, 14049, 14052, 14055, 14058, 14060, 14063, 14065, 14067, 14070, 14073, 14074, 14075, 14080, 14083, 14084, 14087, 14088, 14095, 14096, 14106, 14115, 14118, 14119, 14120, 14123, 14126, 14127, 14128, 14130, 14135, 14136, 14148, 14152, 14157, 14159, 14163, 14174, 14180, 14185, 14189, 14191, 14192, 14194, 14220, 14225, 14228, 14230, 14231, 14244, 14245, 14257, 14259, 14270, 14277, 14281, 14284, 14285, 14287, 14288, 14318, 14322, 14334, 14339, 14344, 14347, 14349, 14352, 14356, 14363, 14365, 14366, 14371, 14373, 14374, 14400, 14401, 14405, 14406, 14409, 14410, 14414, 14415, 14417, 14418, 14419, 14422, 14423, 14426, 14475, 14477, 14478, 14483, 14484, 14485, 14490, 14499, 14502, 14508, 14510, 14511, 14512, 14517, 14539, 14543, 14549, 14553, 14555, 14556, 14567, 14588, 14590, 14591, 14596, 14600, 14615, 14616, 14617, 14618, 14619, 14628, 14632, 14635, 14638, 14639, 14674, 14677, 14682, 14684, 14687, 14688, 14690, 14692, 14695, 14705, 14707, 14716, 14720, 14721, 14723, 14736, 14737, 14739, 14744, 14747, 14748, 14749, 14752, 14766, 14768, 14800, 14802, 14806, 14811, 14815, 14818, 14822, 14823, 14824, 14827, 14831, 14837, 14840, 14842, 14846, 14847, 14849, 14850, 14851, 14857, 14865, 14868, 14870, 14873, 14889, 14908, 14913, 14924, 14925, 14927, 14931, 14933, 14950, 14952, 14954, 14966, 14971, 14974, 14979, 14984, 14996, 15000, 15001, 15002, 15010, 15013, 15016, 15018, 15020, 15023, 15026, 15047, 15048, 15051, 15054, 15055, 15056, 15059, 15062, 15070, 15074, 15075, 15080, 15098, 15100, 15101, 15102, 15103, 15110, 15116, 15117, 15119, 15121, 15122, 15124, 15128, 15129, 15131, 15132, 15133, 15137, 15138, 15140, 15141, 15142, 15144, 15145, 15147, 15158, 15160, 15176, 15181, 15182, 15183, 15186, 15188, 15191, 15192, 15195, 15197, 15201, 15203, 15206, 15209, 15221, 15228, 15243, 15251, 15266, 15269, 15273, 15275, 15276, 15288, 15289, 15291, 15292, 15303, 15308, 15311, 15312, 15314, 15315, 15318, 15320, 15322, 15323, 15329, 15332, 15335, 15337, 15341, 15342, 15354, 15355, 15357, 15360, 15368, 15370, 15378, 15379, 15380, 15394, 15403, 15405, 15408, 15409, 15411, 15412, 15413, 15414, 15415, 15420, 15421, 15422, 15424, 15426, 15427, 15441, 15446, 15449, 15452, 15454, 15460, 15462, 15463, 15464, 15466, 15468, 15473, 15474, 15478, 15480, 15482, 15485, 15486, 15488, 15489, 15490, 15494, 15503, 15505, 15508, 15516, 15517, 15518, 15519, 15530, 15535, 15540, 15541, 15543, 15544, 15545, 15546, 15547, 15556, 15557, 15564, 15568, 15577, 15580, 15588, 15589, 15594, 15595, 15597, 15609, 15610, 15613, 15616, 15620, 15622, 15625, 15627, 15630, 15632, 15636, 15652, 15655, 15658, 15665, 15666, 15669, 15682, 15702, 15707, 15714, 15726, 15728, 15731, 15758, 15769, 15770, 15771, 15775, 15783, 15785, 15792, 15794, 15795, 15796, 15798, 15800, 15801, 15803, 15806, 15818, 15819, 15825, 15826, 15833, 15835, 15837, 15838, 15846, 15847, 15849, 15872, 15883, 15885, 15888, 15889, 15899, 15901, 15911, 15912, 15913, 15915, 15917, 15918, 15919, 15926, 15927, 15929, 15947, 15950, 15951, 15966, 15967, 15974, 15975, 15978, 15981, 15982, 15986, 15995, 15996, 15997, 15998, 16001, 16003, 16009, 16011, 16042, 16045, 16046, 16048, 16052, 16071, 16072, 16074, 16078, 16091, 16092, 16093, 16095, 16096, 16106, 16109, 16126, 16128, 16129, 16136, 16137, 16138, 16147, 16148, 16149, 16158, 16165, 16168, 16170, 16173, 16210, 16213, 16219, 16220, 16226, 16230, 16246, 16249, 16250, 16253, 16255, 16257, 16263, 16265, 16268, 16269, 16285, 16287, 16289, 16309, 16310, 16316, 16317, 16319, 16320, 16326, 16327, 16328, 16333, 16341, 16345, 16349, 16350, 16361, 16389, 16391, 16392, 16395, 16396, 16405, 16408, 16410, 16426, 16430, 16431, 16437, 16441, 16459, 16461, 16462, 16464, 16465, 16471, 16476, 16492, 16494, 16496, 16499, 16501, 16504, 16509, 16529, 16530, 16539, 16540, 16542, 16543, 16544, 16545, 16558, 16561, 16562, 16565, 16591, 16592, 16594, 16595, 16603, 16606, 16621, 16623, 16625, 16628, 16631, 16637, 16639, 16645, 16648, 16655, 16669, 16673, 16674, 16675, 16686, 16687, 16688, 16692, 16698, 16699, 16700, 16703, 16710, 16715, 16720, 16722, 16727, 16728, 16729, 16730, 16733, 16736, 16737, 16739, 16742, 16745, 16747, 16756, 16757, 16758, 16759, 16764, 16765, 16766, 16772, 16775, 16779, 16781, 16801, 16807, 16809, 16810, 16824, 16829, 16830, 16832, 16836, 16852, 16854, 16856, 16863, 16866, 16872, 16874, 16877, 16878, 16884, 16887, 16897, 16898, 16905, 16907, 16915, 16917, 16918, 16923, 16924, 16925, 16927, 16930, 16948, 16949, 16951, 16953, 16955, 16959, 16973, 17001, 17004, 17005, 17007, 17008, 17009, 17012, 17018, 17020, 17021, 17024, 17026, 17029, 17033, 17034, 17042, 17050, 17054, 17055, 17059, 17061, 17062, 17071, 17081, 17082, 17083, 17084, 17085, 17098, 17101, 17102, 17107, 17108, 17109, 17110, 17114, 17117, 17125, 17126, 17128, 17130, 17131, 17132, 17147, 17150, 17154, 17156, 17158, 17159, 17160, 17163, 17164, 17169, 17172, 17173, 17177, 17180, 17183, 17188, 17191, 17193, 17195, 17200, 17201, 17202, 17210, 17224, 17227, 17228, 17236, 17241, 17242, 17249, 17252, 17256, 17257, 17258, 17260, 17262, 17263, 17267, 17268, 17275, 17277, 17280, 17281, 17284, 17289, 17290, 17293, 17304, 17305, 17307, 17309, 17317, 17333, 17340, 17345, 17350, 17351, 17353, 17357, 17368, 17371, 17383, 17384, 17386, 17398, 17401, 17402, 17424, 17425, 17427, 17428, 17462, 17470, 17471, 17477, 17478, 17479, 17480, 17483, 17484, 17492, 17499, 17503, 17505, 17509, 17513, 17516, 17518, 17524, 17526, 17528, 17556, 17557, 17560, 17566, 17568, 17571, 17572, 17576, 17577, 17579, 17580, 17583, 17585, 17593, 17614, 17619, 17628, 17631, 17632, 17633, 17641, 17643, 17647, 17652, 17656, 17658, 17659, 17660, 17662, 17664, 17665, 17668, 17670, 17671, 17673, 17675, 17676, 17677, 17699, 17704, 17707, 17708, 17709, 17721, 17727, 17728, 17729, 17740, 17748, 17752, 17755, 17757, 17761, 17763, 17764, 17766, 17768, 17779, 17796, 17798, 17805, 17813, 17827, 17839, 17840, 17842, 17843, 17847, 17848, 17850, 17866, 17871, 17872, 17875, 17876, 17880, 17885, 17886, 17887, 17888, 17892, 17897, 17900, 17902, 17903, 17910, 17911, 17913, 17914, 17917, 17922, 17926, 17937, 17940, 17978, 17990, 17992, 17994, 17996, 18001, 18004, 18007, 18008, 18009, 18013, 18016, 18017, 18018, 18022, 18027, 18028, 18033, 18034, 18035, 18036, 18044, 18051, 18053, 18070, 18076, 18077, 18079, 18085, 18092, 18093, 18097, 18098, 18101, 18102, 18103, 18104, 18105, 18106, 18109, 18110, 18118, 18134, 18143, 18147, 18149, 18164, 18166, 18167, 18170, 18178, 18179, 18180, 18183, 18190, 18193, 18197, 18198, 18201, 18203, 18205, 18212, 18213, 18214, 18215, 18218, 18224, 18225, 18233, 18237, 18238, 18260, 18261, 18262, 18271, 18273, 18280, 18283, 18290, 18305, 18308, 18313, 18315, 18317, 18319, 18322, 18323, 18343, 18344, 18357, 18362, 18366, 18367, 18371, 18373, 18389, 18392, 18393, 18400, 18401, 18404, 18408, 18419, 18424, 18433, 18435, 18437, 18438, 18446, 18448, 18452, 18453, 18461, 18464, 18470, 18487, 18489, 18495, 18501, 18503, 18504, 18506, 18507, 18511, 18514, 18530, 18533, 18534, 18535, 18536, 18540, 18552, 18553, 18558, 18560, 18563, 18564, 18597, 18598, 18607, 18611, 18613, 18615, 18616, 18618, 18620, 18650, 18652, 18664, 18667, 18668, 18729, 18731, 18732, 18736, 18742, 18746, 18750, 18757, 18760, 18761, 18767, 18769, 18783, 18788, 18790, 18814, 18817, 18818, 18823, 18824, 18829, 18837, 18838, 18844, 18846, 18850, 18861, 18863, 18883, 18887, 18890, 18892, 18893, 18894, 18916, 18917, 18923, 18924, 18927, 18928, 18935, 18937, 18938, 18944, 18946, 18954, 18955, 18970, 18972, 18973, 18974, 18984, 18985, 18987, 18990, 18993, 18994, 18996, 18997, 19012, 19014, 19015, 19018, 19022, 19034, 19036, 19037, 19038, 19043, 19046, 19052, 19056, 19059, 19061, 19066, 19067, 19069, 19078, 19079, 19080, 19081, 19083, 19086, 19091, 19094, 19098, 19109, 19129, 19130, 19134, 19135, 19142, 19144, 19145, 19152, 19155, 19156, 19159, 19162, 19164, 19165, 19176, 19177, 19178, 19185, 19186, 19188, 19193, 19202, 19206, 19208, 19209, 19210, 19212, 19214, 19217, 19218, 19221, 19222, 19224, 19227, 19229, 19231, 19235, 19237, 19240, 19241, 19254, 19256, 19259, 19262, 19264, 19269, 19276, 19278, 19280, 19285, 19288, 19303, 19326, 19327, 19335, 19337, 19338, 19342, 19345, 19348, 19351, 19354, 19355, 19362, 19364, 19376, 19377, 19379, 19382, 19389, 19392, 19399, 19402, 19412, 19436, 19442, 19444, 19446, 19450, 19452, 19455, 19456, 19457, 19475, 19483, 19496, 19501, 19504, 19529, 19532, 19538, 19539, 19542, 19545, 19547, 19549, 19551, 19561, 19562, 19570, 19574, 19575, 19578, 19591, 19592, 19596, 19597, 19598, 19599, 19603, 19604, 19605, 19617, 19620, 19624, 19626, 19630, 19662, 19672, 19673, 19674, 19675, 19676, 19677, 19681, 19686, 19687, 19688, 19692, 19695, 19698, 19699, 19700, 19701, 19704, 19712, 19713, 19715, 19721, 19722, 19733, 19735, 19736, 19742, 19745, 19747, 19751, 19752, 19754, 19757, 19759, 19778, 19780, 19781, 19782, 19785, 19786, 19787, 19793, 19795, 19809, 19814, 19817, 19818, 19825, 19827, 19830, 19853, 19857, 19858, 19860, 19867, 19870, 19873, 19880, 19882, 19884, 19886, 19889, 19895, 19912, 19914, 19917, 19919, 19923, 19924, 19926, 19927, 19928, 19929, 19930, 19940, 19941, 19946, 19953, 19969, 20005, 20006, 20009, 20011, 20014, 20015, 20022, 20025, 20036, 20058, 20059, 20065, 20067, 20076, 20084, 20085, 20086, 20087, 20091, 20095, 20099, 20109, 20117, 20118, 20122, 20124, 20133, 20134, 20145, 20146, 20148, 20149, 20162, 20165, 20167, 20172, 20178, 20185, 20191, 20207, 20216, 20217, 20222, 20223, 20229, 20231, 20234, 20239, 20242, 20243, 20248, 20250, 20257, 20262, 20271, 20272, 20274, 20276, 20280, 20283, 20285, 20286, 20287, 20288, 20290, 20308, 20311, 20313, 20328, 20333, 20334, 20341, 20342, 20343, 20345, 20359, 20363, 20369, 20383, 20386, 20387, 20394, 20404, 20405, 20412, 20414, 20418, 20424, 20436, 20438, 20442, 20443, 20445, 20447, 20452, 20455, 20460, 20463, 20469, 20470, 20472, 20473, 20474, 20475, 20478, 20482, 20483, 20492, 20502, 20504, 20506, 20507, 20508, 20510, 20511, 20515, 20517, 20524, 20525, 20531, 20532, 20544, 20546, 20548, 20549, 20557, 20558, 20559, 20562, 20569, 20570, 20576, 20581, 20582, 20587, 20588, 20589, 20594, 20613, 20628, 20629, 20633, 20637, 20639, 20647, 20651, 20652, 20655, 20656, 20657, 20658, 20659, 20661, 20666, 20669, 20670, 20672, 20673, 20675, 20687, 20688, 20721, 20722, 20723, 20727, 20729, 20738, 20739, 20743, 20744, 20746, 20754, 20755, 20756, 20758, 20761, 20769, 20772, 20778, 20781, 20782, 20794, 20795, 20797, 20821, 20824, 20826, 20828, 20832, 20833, 20835, 20837, 20843, 20844, 20865, 20870, 20871, 20883, 20888, 20897, 20899, 20905, 20906, 20922, 20923, 20924, 20926, 20934, 20939, 20944, 20953, 20977, 20981, 20984, 20985, 20987, 20994, 20999, 21000, 21016, 21034, 21035, 21036, 21037, 21040, 21046, 21051, 21055, 21066, 21069, 21074, 21075, 21076, 21077, 21086, 21091, 21094, 21096, 21098, 21105, 21109, 21110, 21112, 21132, 21136, 21137, 21139, 21140, 21141, 21150, 21152, 21162, 21163, 21169, 21170, 21172, 21178, 21180, 21184, 21188, 21190, 21192, 21199, 21206, 21210, 21212, 21221, 21226, 21228, 21233, 21235, 21237, 21242, 21253, 21277, 21282, 21283, 21297, 21298, 21299, 21303, 21304, 21307, 21309, 21310, 21311, 21329, 21337, 21338, 21341, 21351, 21353, 21357, 21360, 21361, 21379, 21383, 21384, 21390, 21392, 21399, 21406, 21410, 21411, 21412, 21413, 21427, 21428, 21431, 21433, 21438, 21460, 21461, 21462, 21463, 21464, 21467, 21468, 21475, 21476, 21478, 21488, 21491, 21495, 21501, 21502, 21512, 21514, 21518, 21524, 21527, 21540, 21541, 21542, 21544, 21548, 21550, 21568, 21572, 21577, 21585, 21590, 21591, 21593, 21595, 21600, 21610, 21613, 21617, 21623, 21624, 21628, 21629, 21636, 21640, 21656, 21661, 21663, 21672, 21686, 21694, 21700, 21702, 21703, 21705, 21708, 21709, 21712, 21715, 21716, 21717, 21729, 21731, 21753, 21757, 21758, 21759, 21764, 21768, 21769, 21773, 21781, 21808, 21809, 21812, 21813, 21818, 21823, 21824, 21827, 21843, 21846, 21856, 21863, 21864, 21868, 21876, 21877, 21878, 21895, 21902, 21907, 21910, 21912, 21914, 21925, 21930, 21942, 21945, 21949, 21952, 21956, 21959, 21960, 21970, 21974, 21978, 21980, 21983, 21997, 22001, 22008, 22010, 22011, 22012, 22013, 22014, 22015, 22019, 22021, 22025, 22027, 22044, 22054, 22055, 22058, 22066, 22069, 22075, 22084, 22086, 22087, 22096, 22097, 22101, 22105, 22109, 22125, 22127, 22140, 22141, 22143, 22145, 22146, 22147, 22150, 22151, 22170, 22171, 22174, 22179, 22186, 22188, 22189, 22190, 22191, 22199, 22201, 22202, 22218, 22222, 22229, 22232, 22235, 22239, 22242, 22243, 22253, 22254, 22259, 22268, 22278, 22279, 22286, 22289, 22290, 22293, 22305, 22308, 22311, 22316, 22317, 22320, 22321, 22337, 22339, 22340, 22342, 22344, 22345, 22346, 22347, 22348, 22351, 22377, 22391, 22393, 22396, 22397, 22409, 22410, 22411, 22417, 22418, 22447, 22448, 22460, 22462, 22480, 22484, 22488, 22495, 22496, 22499, 22500, 22513, 22516, 22523, 22526, 22553, 22554, 22560, 22561, 22562, 22570, 22573, 22575, 22578, 22583, 22585, 22592, 22593, 22594, 22596, 22597, 22598, 22614, 22617, 22619, 22625, 22627, 22628, 22637, 22639, 22640, 22642, 22658, 22661, 22666, 22667, 22671, 22672, 22673, 22674, 22677, 22681, 22685, 22702, 22709, 22710, 22719, 22723, 22724, 22725, 22731, 22743, 22748, 22749, 22753, 22757, 22770, 22771, 22772, 22776, 22777, 22795, 22801, 22860, 22862, 22863, 22867, 22870, 22871, 22886, 22887, 22900, 22903, 22906, 22908, 22910, 22913, 22922, 22923, 22924, 22926, 22927, 22931, 22946, 22948, 22950, 22952, 22953, 22958, 22960, 22961, 22965, 22967, 22974, 22975, 22976, 22979, 22981, 22994, 22996, 23004, 23010, 23013, 23014, 23016, 23018, 23019, 23020, 23022, 23024, 23031, 23032, 23037, 23038, 23041, 23046, 23047, 23061, 23065, 23066, 23068, 23096, 23101, 23104, 23111, 23117, 23121, 23125, 23139, 23141, 23144, 23145, 23159, 23162, 23166, 23169, 23171, 23198, 23200, 23202, 23215, 23217, 23219, 23230, 23245, 23246, 23250, 23251, 23252, 23254, 23268, 23272, 23282, 23283, 23287, 23289, 23311, 23312, 23318, 23320, 23321, 23324, 23327, 23344, 23346, 23347, 23355, 23359, 23360, 23362, 23369, 23373, 23374, 23378, 23379, 23392, 23393, 23394, 23395, 23397, 23400, 23401, 23402, 23404, 23411, 23421, 23423, 23429, 23430, 23444, 23450, 23451, 23453, 23456, 23463, 23468, 23470, 23472, 23473, 23496, 23497, 23498, 23499, 23501, 23502, 23508, 23512, 23513, 23514, 23522, 23537, 23538, 23539, 23542, 23559, 23565, 23566, 23570, 23573, 23599, 23603, 23606, 23609, 23611, 23613, 23617, 23619, 23620, 23623, 23627, 23628, 23631, 23634, 23635, 23636, 23638, 23654, 23660, 23661, 23665, 23670, 23675, 23677, 23678, 23680, 23681, 23682, 23684, 23697, 23702, 23703, 23704, 23706, 23708, 23709, 23711, 23715, 23724, 23726, 23727, 23738, 23739, 23742, 23763, 23764, 23765, 23768, 23769, 23774, 23798, 23801, 23805, 23808, 23811, 23814, 23817, 23818, 23819, 23821, 23822, 23823, 23842, 23844, 23848, 23851, 23853, 23858, 23862, 23863, 23864, 23869, 23874, 23875, 23876, 23878, 23880, 23889, 23890, 23894, 23901, 23909, 23914, 23916, 23925, 23936, 23937, 23940, 23946, 23950, 23951, 23953, 23954, 23969, 23971, 23973, 23974, 23975, 23978, 23982, 23987, 23989, 23990, 23994, 23995, 24008, 24012, 24014, 24016, 24021, 24023, 24025, 24026, 24036, 24041, 24042, 24053, 24054, 24058, 24060, 24066, 24067, 24070, 24075, 24081, 24082, 24083, 24084, 24085, 24086, 24087, 24105, 24108, 24110, 24112, 24128, 24129, 24139, 24141, 24143, 24144, 24145, 24169, 24170, 24178, 24179, 24181, 24182, 24186, 24191, 24202, 24203, 24204, 24209, 24213, 24215, 24218, 24222, 24224, 24225, 24235, 24253, 24256, 24257, 24260, 24263, 24267, 24270, 24271, 24274, 24275, 24278, 24279, 24280, 24285, 24286, 24300, 24315, 24316, 24318, 24319, 24320, 24324, 24325, 24327, 24355, 24356, 24359, 24365, 24366, 24369, 24373, 24374, 24377, 24383, 24385, 24387, 24391, 24393, 24395, 24398, 24425, 24427, 24434, 24443, 24445, 24455, 24458, 24460, 24461, 24463, 24472, 24473, 24475, 24479, 24482, 24487, 24505, 24508, 24509, 24523, 24526, 24530, 24533, 24541, 24546, 24549, 24552, 24559, 24582, 24584, 24585, 24586, 24606, 24612, 24630, 24639, 24645, 24648, 24650, 24666, 24667, 24687, 24694, 24697, 24699, 24700, 24702, 24707, 24709, 24716, 24721, 24741, 24742, 24744, 24747, 24749, 24752, 24754, 24755, 24767, 24768, 24773, 24775, 24787, 24798, 24799, 24801, 24803, 24805, 24818, 24826, 24829, 24830, 24834, 24849, 24850, 24853, 24857, 24858, 24859, 24860, 24878, 24882, 24883, 24886, 24887, 24890, 24891, 24894, 24896, 24900, 24901, 24903, 24920, 24927, 24928, 24931, 24937, 24938, 24941, 24944, 24948, 24949, 24951, 24961, 24975, 24980]
| 2,562.928571
| 35,578
| 0.695689
| 5,480
| 35,881
| 4.554745
| 0.996168
| 0.000481
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.813152
| 0.152783
| 35,881
| 13
| 35,579
| 2,760.076923
| 0.007928
| 0.008082
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
08902a614e8c26917cd2549b5afe2f308699d55c
| 190
|
py
|
Python
|
pg_table_as_queue_tools/__init__.py
|
vinger4/pg_table_as_queue_tools
|
3192893ec39519d59062d267a5ebdf3b454264e4
|
[
"MIT"
] | null | null | null |
pg_table_as_queue_tools/__init__.py
|
vinger4/pg_table_as_queue_tools
|
3192893ec39519d59062d267a5ebdf3b454264e4
|
[
"MIT"
] | null | null | null |
pg_table_as_queue_tools/__init__.py
|
vinger4/pg_table_as_queue_tools
|
3192893ec39519d59062d267a5ebdf3b454264e4
|
[
"MIT"
] | null | null | null |
from pg_table_as_queue_tools.read_batch import (get_sql_to_get_batch_from_queue, get_sql_to_release_queue_item,
get_sql_to_delete_queue_item)
| 63.333333
| 111
| 0.689474
| 28
| 190
| 3.928571
| 0.535714
| 0.163636
| 0.218182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.284211
| 190
| 2
| 112
| 95
| 0.808824
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
089c753cbc5f13d047b68301be62221eca99d2b2
| 35
|
py
|
Python
|
telegooby/__init__.py
|
tetra5/gooby-telegram
|
956879f34dc1ae93ce6328160b971c344166378a
|
[
"MIT"
] | null | null | null |
telegooby/__init__.py
|
tetra5/gooby-telegram
|
956879f34dc1ae93ce6328160b971c344166378a
|
[
"MIT"
] | null | null | null |
telegooby/__init__.py
|
tetra5/gooby-telegram
|
956879f34dc1ae93ce6328160b971c344166378a
|
[
"MIT"
] | null | null | null |
__version__ = ('2016', '07', '14')
| 17.5
| 34
| 0.542857
| 4
| 35
| 3.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.266667
| 0.142857
| 35
| 1
| 35
| 35
| 0.233333
| 0
| 0
| 0
| 0
| 0
| 0.228571
| 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
|
08a97cbb70bde4f9a4ba68383a69e56b31b95d5d
| 112
|
py
|
Python
|
setup.py
|
DenBaum/lolm8guesser
|
ed71f2b1a70b37231ce30cd108285db23fb212cf
|
[
"MIT"
] | null | null | null |
setup.py
|
DenBaum/lolm8guesser
|
ed71f2b1a70b37231ce30cd108285db23fb212cf
|
[
"MIT"
] | null | null | null |
setup.py
|
DenBaum/lolm8guesser
|
ed71f2b1a70b37231ce30cd108285db23fb212cf
|
[
"MIT"
] | null | null | null |
from distutils.core import setup
import py2exe
setup(console=['main.py'], py_modules=['main', 'friendship'])
| 28
| 61
| 0.732143
| 15
| 112
| 5.4
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.01
| 0.107143
| 112
| 4
| 61
| 28
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.190909
| 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
|
08ac5e969f53c24a9067c0241fb770d0d291d6ae
| 444
|
py
|
Python
|
job/_maya.py
|
plinecom/JobManager
|
ce2c85fa740d5dce2d582e694bb3adc9176101d7
|
[
"MIT"
] | null | null | null |
job/_maya.py
|
plinecom/JobManager
|
ce2c85fa740d5dce2d582e694bb3adc9176101d7
|
[
"MIT"
] | null | null | null |
job/_maya.py
|
plinecom/JobManager
|
ce2c85fa740d5dce2d582e694bb3adc9176101d7
|
[
"MIT"
] | null | null | null |
import jobinfo
__author__ = 'Masataka'
class JobMaya(jobinfo.JobInfo):
def __init__(self, param):
jobinfo.JobInfo.__init__(self, param)
class JobMayaSw(JobMaya):
def __init__(self, param):
JobMaya.__init__(self, param)
class JobMayaMr(JobMaya):
def __init__(self, param):
JobMaya.__init__(self, param)
class JobMayaFile(JobMaya):
def __init__(self, param):
JobMaya.__init__(self, param)
| 18.5
| 45
| 0.686937
| 50
| 444
| 5.38
| 0.26
| 0.237918
| 0.386617
| 0.237918
| 0.516729
| 0.516729
| 0.516729
| 0.516729
| 0.516729
| 0.356877
| 0
| 0
| 0.202703
| 444
| 23
| 46
| 19.304348
| 0.759887
| 0
| 0
| 0.5
| 0
| 0
| 0.018018
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.071429
| 0
| 0.642857
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
08c48a3f7b1d5adafb0d573f249880dd191748fa
| 7,312
|
py
|
Python
|
tests/anybase32_samples.py
|
alanblevins/anybase32
|
5ec7b6c88c778789ff4d12f5b6afd0594d4e1d6a
|
[
"MIT"
] | 4
|
2017-07-26T02:25:41.000Z
|
2021-10-06T17:55:25.000Z
|
tests/anybase32_samples.py
|
alanblevins/anybase32
|
5ec7b6c88c778789ff4d12f5b6afd0594d4e1d6a
|
[
"MIT"
] | 3
|
2018-07-13T21:17:40.000Z
|
2019-02-11T07:30:57.000Z
|
tests/anybase32_samples.py
|
alanblevins/anybase32
|
5ec7b6c88c778789ff4d12f5b6afd0594d4e1d6a
|
[
"MIT"
] | null | null | null |
CROCKFORD_MODIFIED = (
b"ahm6a81a59rqaub3dcn2m832e9qqevh0ctqqg83aenpq0wt0dxv6awh0ehm6a818dhgqmy994"
b"1j6ytt1"
)
CROCKFORD = (
b"AHM6A81A59RQATB3DCN2M832E9QQEVH0CSQQG83AENPQ0WS0DXV6AWH0EHM6A818DHGQMY994"
b"1J6YSS1"
)
ZBASE32 = (
b"ktwgkebkfjazk4mdpcinwednqjzzq5tyc3zzoedkqiszyh3yp75gkhtyqtwgkebeptozw6jjr"
b"b1g633b"
)
RFC_3548 = (
b"KRUGKIBKFJYXK2LDNMVCUIDCOJXXO3RAMZXXQIDKOVWXA4ZAN53GK4RAORUGKIBINRQXU6JJE"
b"BSG6ZZB"
)
RFC_2938 = (
b"AHK6A81A59ONAQB3DCL2K832E9NNERH0CPNNG83AELMN0SP0DTR6ASH0EHK6A818DHGNKV994"
b"1I6VPP1"
)
RFC_4648 = (
b"KRUGKIBKFJYXK2LDNMVCUIDCOJXXO3RAMZXXQIDKOVWXA4ZAN53GK4RAORUGKIBINRQXU6JJE"
b"BSG6ZZB"
)
NIGHTMARE = (
b"6vNI6LD61lZm62b08BnONL0OUlmmUSvdBzmmVL06UnMmd5zd8sSI65vdUvNI6LDL8vVmN7llo"
b"DWI7zzD"
)
ARBITRARY = (
b"`^(6`81`59=_`[~3@!)2(832#9__#]^0!+__%83`#)-_0{+0@}]6`{^0#^(6`818@^%_(\994"
b"1&6\++1"
)
ICON_ZBASE32 = (
b"tferhtapbepywyyyyygw11nrkeyyyyyoyyyyyryeyayyyyy96x9snyyyyyrzy1n3qcyyynauy"
b"yyysrabynpjagyyyyfr64kdepefy4dxqtzzg4dxqyor1o4drba8r55gpfsgkyyyxdpj4w58kt"
b"j61ft769xxeo1mtnyje15xkekooen1ekfayfrtrainnneojkrndeq3niehnrkfewnbz1fytyb"
b"a7dwytokinmyctefpob9rrgte7y7dtnfci69bxqtsziih69uc59ii4h9qxm8uus3h6b6ybygj"
b"c1bukr4aydfjeexbdarda9ncpaxrf3yenntrqyybynfucooz89jdyryxo9th8oi1foy8zayyn"
b"6gubcrybonpuxydy8r89h86wow3moyabbybab4jnqnmbnybeynyxk8rfjoyebdydyr7uyufgy"
b"fyyoygb15dcmtoywbpybonq99g4cyeb8xauf7onyn51ootkypy1rynyr5ftbnyy4b5ynsc6iw"
b"kewyfocyynturztb3ydcn4ybojfmsc1yysn5obogqnyf5ryyeboydywceowwoybd5ybocoe3d"
b"xyyejgeyntdxri3h6ri4hr88feyyy6r3se6m1jb3esyisnbpqrdiqi3qdawch1ezfckdcaenc"
b"gprymsnxgct1cwbgo86bh6cyyykbrein8oe8h97xd8y7msq3a5e7poqmhs6ixag9htgrazd95"
b"1h9k5oeyyybamwx5e9hmbxscpeyqagobs97etf7angozomwb49xn5gse8wbpeywdw7wi9uqdh"
b"8hxbheso3bqq35816j3gajmnrrs5b3jmz59u8ajxhyi97puhzhx8h6946bxznr1yurzcbehnx"
b"tagn3u4r3jeh36jyubdn5uue6t9hshf999y74ctce1mnzfcnwf8dkrj8dd1rukgxgcifrkrwf"
b"rtjaw17f95rhmx136ad85xukyfope9yn6htfswf4aad63f1qrnaquyqf7ayyd3ms56b4owyoy"
b"hypnb6du5z99zu99k8wy1obydgjgj8nyyym3nnem1w3k3u9taeyyyrjerbfkarng9warcn3oy"
b"gduyomzgbbx6gypwree1cjo1nnbbyw3rydt3gykpcojbntbspsyq1wabx4tyb4pgykfwepr5o"
b"bazcripaba6zyd94crrj7ojez1yo1bnb3yrbgajb5krynawkmytahnyzugn9oeqbjynbfn3rr"
b"draofntrjf3npkegfjewibykirb5ht7qebdub4he47jnq6eyy3ef9rgztdudfrbsjeu5iycsi"
b"b5ukbzdknrpeom4b18ecc4thmkbg6oqk4bwxccg4o6xwfmpy87id36exdubo8edydu8tdcgyz"
b"cpo4nsrhnancucxf5neicb1ihcgiok4sy8qhj6ith9cmzyojentqybr5ye74nrbothokembgf"
b"ousajnwny8brgoe7wnjzbrbaewqnrhtj8knmsoumwrx3aocgrctto7crombd4aje6r3xnb7ao"
b"o6rgh1bfnkdgeu5urynjga4eig1nmjrpwuqket61mfjuc4rogtd1xr7w3dmseduufbcryihtb"
b"xruz1c83buhop6eex1mcfj4a1yqg1xow9nfbjcw41kd81tb3jwhwdgmgb1efk48g115swkniy"
b"tgs8iwoipwg5ffm4to6wbgpdiuehh5yasjff4mmpn1zjtw4yzpd5sum9eq17bdzcid38jxwnz"
b"4mf61t9e19wy87dzbogacfcda6rgqky3uccyqgd8df5ttmhaj1ubuwhmd8diecbzg8i3t3h3b"
b"6cs6ikafk5nw9yi18fyifkk1wujkg3kf7kkukigimxkwn4i6pkhsirxifxfg9pqe3kugw9dir"
b"r7jfimksij4w8mkcpig37j8qwexku8ibziex7rx3c95negm8bw3o4xeq1fdeftm9t53ttybpt"
b"tuc5afoossdpmo34anpqrr4ah5smhqaimzg87ds7asxpkigou1o3uje3ixc416qkgcxa8hqc8"
b"d6rhqt8yu33ew6m9g9wk5akq6kxnfrp4cpnczraskzdmikmjxf1aiprkswpme9i54piq7su35"
b"ji7es7iu6hbb3yhq1t8mouwq3hx3an3534u5fj75jakwhmr4xj46szn7kumwwp4dq4rq69s7j"
b"9qunxmhzwyu3gg9j66xg66x6ohxwz94i87pz7kx7k8btcypcacrodpsdgqdy6ckpmtph6b4m6"
b"85xaino47apyr8jmb1io3xacr1gh7nxfd4ide4toxttwhcz8druts5tupa4t1cbtgrrursuxk"
b"jzzjww1pzgunujt5jo7w3t6p3ug4fuqsur43sxjt4h3qxg98uxm3zz7zcbp8ostcs4wmpqdfj"
b"g3qesigm8zmpxdqoipd1spfmbkiwzpue4s35mjf44745q78ngu51uwuj4i37iu8aqaxdpsjs4"
b"w5qgpohzcyps7qs3s5c9mbc7tbq37zaszc85wuzsjz5qu7tz6u4bapo9co7ka7meqzhh7wqek"
b"dwit454pc788q876hm7rs7rzsqsgxnd87oc9dsajhskqrpgqi8g6ue7utq373qqb98nrmtffa"
b"f13q1h9n7ga5a5qhtxxrjj4xkhk7hf7pf7c7uq33zozpidp495ts73w67b6hu9gdj83ju3cug"
b"h6oaxrr8anthzeu6nh91wagzz7cx38wguhbc646qe3xccz3ni7p46amxjmzim5sd5az855dhh"
b"w9hc9qgxbz5a3phsk93o5hbp6es9fw9o5xu3xamz4dxht96389xm97nyf8oy1on3adtgywdyk"
b"5ym79o6uhrg9ahx345p19pcs37iya3ef3erkwddhnisbqmopprfwct5roiwo9x3ha34ehh4eq"
b"oie874gs4ydsd3ubtxbzhdb8osdakihg8688bnnadmeudf3iq9e7ao5u57nxwtrseuxjs33tj"
b"hh46mkkgwid7ktqpe6pwp74g17d9ttqc3ch3ikauicr15nmdoh1hkiqg3zg3xs99us98b9nuz"
b"tyza55n6cn91n7qbh4dusn61n4qfijfajnaqwsebgeouta1uarnrbkiymeajx1np51mdokx8b"
b"b5ou8rez7npsttdcrgzbkd38xr1bkji7jf5rtzo4z1jgfgq1133p3oou4urfhjogw3zc58kxb"
b"pgusrbsurxj4zwaa8rwt1bawfktbjsj5c39kc9ugc7smit1amcz6aizezp3xd4kox1mmsqeka"
b"bk3fwfmcoig7bkfwkgzfed5r35fk7um9ucj3eh3pkh6fxg65ufu3mp3yphh76x995e1aejqdr"
b"iswsdrsi3pdicqpxpcpeh5rxdtx8poiaaiywiaciogio6mtnisfjs7ku7m7im3xmu6zwu8wum"
b"mofxcd1wnag4on49mbpkoi3cfxzi73i9pmi8iom43564sd6wguwpuhfcjtkzbjsaz1hkz9sbe"
b"5thqkgh8p9fm9gqh114kuk6rzf1c63s1c5w6pztpu3po7fik19ujqduqbzc7ipyp57mmj5xi6"
b"3n7smhz3wwpzqhds3b5ue7981hma3p8388c4q39k11fj7nw9jkdp5s15s4sdi9ap5e6hg55zu"
b"5dj5gi5pp5379785r57s4iyfkw5img4i19s1x5sx5u9mwjimw9tfz5piq44uupq8shqy61yx6"
b"oqeaqs5m5uigidzjd4in1t9mnz448b5dt9xz6uzzzqmepgagimdcha5tnghnrx81qu7aj595t"
b"hdj45j5ea67chrd7g85sdiut4m5kekpxfg1gupj3i645cjp5wu6c85e7p4s6xm6rxsa9b6qde"
b"xn3xffxgigjp8pquysu1pu9fuhcusk349m6f5h7aag5wk58z35d35xswd5x767by78b4jn99n"
b"988q6dzu1h6kh8jhi15x1tgi7ak6pk6q19pzi8j4th94j7gu68zqqmzgiqzfqgzqxqxk65k65"
b"g69wtz8tz35q9jxm36rmx9isiuahu5zp76p7g976f69476fs7x33nx9qq3q77173874s5au7h"
b"m94rb5kb5fb75b6i87p97zga79q864syq6ox8wqhe95opbcd399jd7cxb7bomdh3t9facdcg7"
b"qxdoxt388td6hz7786kqo6xcu81p8oz94tx717qnhmn69za4zi7xustude4df9116j565mhwz"
b"66io8mdgz7ztsnaaxm71magcai77ns9xshn76hqhq69e69b786e9byxhwx6483s84i8wf89qj"
b"turhu9hny8g8u9ttugmq5yyyyyeddjbjr4yyyxe1oyyryocyyb6x9yyyeb4eyyb4uyyyy7joy"
b"yyb4uyyyyf5x1jxhktoyyybe41krefk8tsir4xpwswabynyxd59cq45muuuwsxg7jb1apbnfc"
b"b1bw3ysysnaf7q4e6ajkfe1s16r3bgmdpf1foacocuh3bnrdn54irdt9mnyrcfq11ozfnfqoa"
b"w7hw14xq5xh94bfxkweuhx4yp9s78iyicitr1qo8dymwrsoorcyhe3yq4yfpbcen6syiojoyq"
b"db9y9qrirnzudrtkwjzt5qyui8muz6yn99pymbcz4ktqz443onak1suoh54yw343xrnuebgyy"
b"c5s69y8kye4sjsnimpmpzqdj9ezegbtpjz8tzkmkidxnz4bgophokjfabu1zin7nb8fpdr6dm"
b"sodkouayunpurfsmkinwmpc81pjzqyhm9ee9etkst6s3aznhz5xzyuyeqjiu81a7pxqkxownx"
b"6f34t3q93cmrqyegbotaeazjsmx9qcu3s9s161gzcoeetbeka1bi36m9ogiu67inzozp9y5dr"
b"9djq56cijpsqzcxke19nod9j7uiq66ks8m7na7a9qxcepezntsr4npgnkraph1rozwt347n69"
b"47zckc35zfjb5kn31pxw8efio3ntkxrjjc1ess1qgp5axdtzu3r31qjqqcnghxawcbo3ta8xy"
b"pxwtjd75czh6e4cmwmxqttoxocwe5y5ay4hq5uyo1p6unfrmidngxc5dgh1nfkaueb1o3m95y"
b"o4kph8w5xcmi9z4an7q1r87ujrkdtryyyodzgc9k31qiubc1zjrxfnydi7bqmznf1siwqin55"
b"ngusqn6s5uwuz5jhg47dd3xyssoojo9ande61orjojwosghcf4145ykdui418gckiu9yue1as"
b"qmad4ja435x87wbqp7mcqgee3darxorhyo7eu3rhfz5mpai7ezh58jena4bdf3ci4im9igi97"
b"s4kpht7heb99379ynmfecgra8wnxazujps14s4mbmmujiqhzbaq99deirwbncifedcxsd4ysu"
b"bxotae9qr58umr38edg5okyeaun8wcjf9onjuhhpnen8adybz8af9wxefca1yyyyyyy1kfj3n"
b"khouyoe"
)
SAMPLE_TEXT = b"The **quick** brown fox jumps over the (lazy) dog!"
TOO_SHORT_ALPHABET = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ23456"
TOO_LONG_ALPHABET = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ2345678"
REPEAT_CHARACTER_ALPHABET = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ234566"
ARBITRARY_ALPHABET = b"0123456789`~!@#$%^&*()-_=+[]{}\/"
| 62.495726
| 80
| 0.887992
| 246
| 7,312
| 26.308943
| 0.53252
| 0.005562
| 0.023177
| 0.02534
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.221437
| 0.071116
| 7,312
| 116
| 81
| 63.034483
| 0.731449
| 0
| 0
| 0.034783
| 0
| 0.008696
| 0.861715
| 0.846259
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
08da84d98171f4623f3b3d907cf83a1c2ce74e92
| 49
|
py
|
Python
|
dscreate/__main__.py
|
joelsewhere/dscreate
|
c0f6e522abf8223149737d640d99e80de71e530e
|
[
"MIT"
] | null | null | null |
dscreate/__main__.py
|
joelsewhere/dscreate
|
c0f6e522abf8223149737d640d99e80de71e530e
|
[
"MIT"
] | 5
|
2021-05-29T19:07:32.000Z
|
2021-11-10T20:55:36.000Z
|
dscreate/__main__.py
|
learn-co-curriculum/dscreate
|
c0f6e522abf8223149737d640d99e80de71e530e
|
[
"MIT"
] | 2
|
2021-04-29T14:43:38.000Z
|
2021-08-18T09:07:01.000Z
|
from dscreate.apps.DsCreateApp import main
main()
| 24.5
| 42
| 0.836735
| 7
| 49
| 5.857143
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081633
| 49
| 2
| 43
| 24.5
| 0.911111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
3eb2d7fec24303bd61eabccc6f3c7821e1caa6ce
| 98
|
py
|
Python
|
src/api/settings.py
|
adelizer/tf-serving-kibana-demo
|
8fa388b647e25570e088cfd3f97f4950eaa9c3be
|
[
"MIT"
] | null | null | null |
src/api/settings.py
|
adelizer/tf-serving-kibana-demo
|
8fa388b647e25570e088cfd3f97f4950eaa9c3be
|
[
"MIT"
] | 3
|
2021-06-08T21:47:58.000Z
|
2022-03-12T00:35:46.000Z
|
src/api/settings.py
|
adelizer/tf-serving-kibana-demo
|
8fa388b647e25570e088cfd3f97f4950eaa9c3be
|
[
"MIT"
] | null | null | null |
import os
# Flask settings
FLASK_DEBUG = os.environ.get if os.environ.get is not None else False
| 19.6
| 69
| 0.77551
| 18
| 98
| 4.166667
| 0.722222
| 0.24
| 0.32
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163265
| 98
| 4
| 70
| 24.5
| 0.914634
| 0.142857
| 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
|
3ec3ec8c695bf59dbf5b5f45343d5c581697c489
| 118
|
py
|
Python
|
morepath_rest_dump_load/run.py
|
solancer/morepath_rest_dump_load
|
7347c6fa3f84b7e817a43c07a2e8b7cea35115b7
|
[
"BSD-3-Clause"
] | 1
|
2016-09-17T03:36:14.000Z
|
2016-09-17T03:36:14.000Z
|
morepath_rest_dump_load/run.py
|
solancer/morepath_rest_dump_load
|
7347c6fa3f84b7e817a43c07a2e8b7cea35115b7
|
[
"BSD-3-Clause"
] | 10
|
2016-12-26T20:47:55.000Z
|
2021-04-18T14:28:11.000Z
|
morepath_rest_dump_load/run.py
|
solancer/morepath_rest_dump_load
|
7347c6fa3f84b7e817a43c07a2e8b7cea35115b7
|
[
"BSD-3-Clause"
] | 3
|
2016-07-19T08:57:30.000Z
|
2021-01-25T14:00:30.000Z
|
import morepath
from .app import App
def run(): # pragma: no cover
morepath.autoscan()
morepath.run(App())
| 14.75
| 30
| 0.669492
| 16
| 118
| 4.9375
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.211864
| 118
| 7
| 31
| 16.857143
| 0.849462
| 0.135593
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.4
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
3ecf8b4ee07d6270e0b4109dbd60beb8664c375e
| 1,018
|
py
|
Python
|
sdk/python/pulumi_azure_nextgen/authorization/latest/__init__.py
|
test-wiz-sec/pulumi-azure-nextgen
|
20a695af0d020b34b0f1c336e1b69702755174cc
|
[
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_azure_nextgen/authorization/latest/__init__.py
|
test-wiz-sec/pulumi-azure-nextgen
|
20a695af0d020b34b0f1c336e1b69702755174cc
|
[
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_azure_nextgen/authorization/latest/__init__.py
|
test-wiz-sec/pulumi-azure-nextgen
|
20a695af0d020b34b0f1c336e1b69702755174cc
|
[
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Export this package's modules as members:
from .get_management_lock_at_resource_group_level import *
from .get_management_lock_at_resource_level import *
from .get_management_lock_at_subscription_level import *
from .get_management_lock_by_scope import *
from .get_policy_assignment import *
from .get_policy_definition import *
from .get_policy_set_definition import *
from .get_role_assignment import *
from .get_role_definition import *
from .management_lock_at_resource_group_level import *
from .management_lock_at_resource_level import *
from .management_lock_at_subscription_level import *
from .management_lock_by_scope import *
from .policy_assignment import *
from .policy_definition import *
from .policy_set_definition import *
from .role_assignment import *
from .role_definition import *
from ._inputs import *
from . import outputs
| 39.153846
| 80
| 0.820236
| 148
| 1,018
| 5.277027
| 0.331081
| 0.243278
| 0.133163
| 0.107554
| 0.509603
| 0.435339
| 0.330346
| 0.112676
| 0
| 0
| 0
| 0.001114
| 0.117878
| 1,018
| 25
| 81
| 40.72
| 0.868597
| 0.199411
| 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
|
f5f42434ae56af39068af9d0d0819cc17c83c676
| 134
|
py
|
Python
|
components_cookbook/cliapp/cliapp/classmodule.py
|
clozach/xparrot
|
f86ac2620a2f09bea4cc838aa9666deed9cccb81
|
[
"MIT"
] | null | null | null |
components_cookbook/cliapp/cliapp/classmodule.py
|
clozach/xparrot
|
f86ac2620a2f09bea4cc838aa9666deed9cccb81
|
[
"MIT"
] | null | null | null |
components_cookbook/cliapp/cliapp/classmodule.py
|
clozach/xparrot
|
f86ac2620a2f09bea4cc838aa9666deed9cccb81
|
[
"MIT"
] | null | null | null |
class Yo():
def __init__(self, name):
self.name = name
def say_name(self):
print('Yo {}!'.format(self.name))
| 19.142857
| 41
| 0.552239
| 18
| 134
| 3.833333
| 0.5
| 0.347826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.276119
| 134
| 6
| 42
| 22.333333
| 0.71134
| 0
| 0
| 0
| 0
| 0
| 0.044776
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0
| 0.6
| 0.2
| 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
|
eb09293324394b7298c5543906d92c08d02ec168
| 65
|
py
|
Python
|
src/ansys/mapdl/core/_commands/aux12_/__init__.py
|
Miiicah/pymapdl
|
ce85393ca82db7556a5d05883ca3fd9296444cba
|
[
"MIT"
] | 1
|
2022-02-09T01:12:02.000Z
|
2022-02-09T01:12:02.000Z
|
src/ansys/mapdl/core/_commands/aux12_/__init__.py
|
Miiicah/pymapdl
|
ce85393ca82db7556a5d05883ca3fd9296444cba
|
[
"MIT"
] | 9
|
2022-02-24T20:34:18.000Z
|
2022-03-31T20:44:17.000Z
|
src/ansys/mapdl/core/_commands/aux12_/__init__.py
|
lynch1972/pymapdl
|
46b31438af2a0d5b2d9a69abe82e0fe69935a855
|
[
"MIT"
] | null | null | null |
from . import general_radiation, radiation_mat, radiosity_solver
| 32.5
| 64
| 0.861538
| 8
| 65
| 6.625
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092308
| 65
| 1
| 65
| 65
| 0.898305
| 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
|
eb13bcb2bc67dbc29a3e8bbee269014bc7fbbd5d
| 21
|
py
|
Python
|
photologue/__init__.py
|
praekelt/django-photologue
|
ba756349313a5a3b4807bc11048f210dfd076522
|
[
"BSD-3-Clause"
] | 5
|
2015-11-05T10:41:07.000Z
|
2021-01-05T17:07:17.000Z
|
photologue/__init__.py
|
praekelt/django-photologue
|
ba756349313a5a3b4807bc11048f210dfd076522
|
[
"BSD-3-Clause"
] | 1
|
2015-03-28T12:10:54.000Z
|
2015-03-28T12:10:54.000Z
|
photologue/__init__.py
|
praekelt/django-photologue
|
ba756349313a5a3b4807bc11048f210dfd076522
|
[
"BSD-3-Clause"
] | 1
|
2019-11-08T07:19:39.000Z
|
2019-11-08T07:19:39.000Z
|
VERSION = (2, 10, 3)
| 10.5
| 20
| 0.52381
| 4
| 21
| 2.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0.238095
| 21
| 1
| 21
| 21
| 0.4375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
eb3423000486d1d1ffdbeaac43ff4f50c252ec16
| 147
|
py
|
Python
|
battleship/errors.py
|
jcobian/battleship-ai
|
5bec63a2c2562b615f926dfb2ceb16bfc294da3f
|
[
"MIT"
] | null | null | null |
battleship/errors.py
|
jcobian/battleship-ai
|
5bec63a2c2562b615f926dfb2ceb16bfc294da3f
|
[
"MIT"
] | null | null | null |
battleship/errors.py
|
jcobian/battleship-ai
|
5bec63a2c2562b615f926dfb2ceb16bfc294da3f
|
[
"MIT"
] | null | null | null |
class AlreadyFiredError(RuntimeError):
pass
class InvalidBoardError(RuntimeError):
pass
class InvalidMoveError(RuntimeError):
pass
| 13.363636
| 38
| 0.768707
| 12
| 147
| 9.416667
| 0.5
| 0.424779
| 0.371681
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170068
| 147
| 10
| 39
| 14.7
| 0.92623
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
de278c98d57d7dfa1c2d4e0ccf06031b96f8ce1a
| 168
|
py
|
Python
|
building/building.py
|
WagJK/alexa-uiuc-main
|
c83f8ceb06194f851ca8310f011ad985aa785726
|
[
"MIT"
] | 2
|
2018-08-20T16:34:11.000Z
|
2018-11-25T20:36:27.000Z
|
building/building.py
|
WagJK/alexa-uiuc-main
|
c83f8ceb06194f851ca8310f011ad985aa785726
|
[
"MIT"
] | null | null | null |
building/building.py
|
WagJK/alexa-uiuc-main
|
c83f8ceb06194f851ca8310f011ad985aa785726
|
[
"MIT"
] | 2
|
2019-03-23T00:06:55.000Z
|
2020-12-02T04:02:29.000Z
|
import json
import time
from datetime import date, datetime
from flask import render_template
from flask_ask import statement, question, session, request
import data
| 18.666667
| 59
| 0.833333
| 24
| 168
| 5.75
| 0.625
| 0.130435
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 168
| 8
| 60
| 21
| 0.958333
| 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
|
de3cd1a537f0cc1ec042e39f98a9aec37aa76ee1
| 76
|
py
|
Python
|
quantity/digger/technicals/__init__.py
|
wyjcpu/quantity
|
a53126a430f12b5bac81a52b2fe749cc497faf36
|
[
"MIT"
] | null | null | null |
quantity/digger/technicals/__init__.py
|
wyjcpu/quantity
|
a53126a430f12b5bac81a52b2fe749cc497faf36
|
[
"MIT"
] | null | null | null |
quantity/digger/technicals/__init__.py
|
wyjcpu/quantity
|
a53126a430f12b5bac81a52b2fe749cc497faf36
|
[
"MIT"
] | 1
|
2021-05-11T09:33:59.000Z
|
2021-05-11T09:33:59.000Z
|
# -*- coding: utf-8 -*-
from common import *
from base import TechnicalBase
| 19
| 30
| 0.697368
| 10
| 76
| 5.3
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015873
| 0.171053
| 76
| 3
| 31
| 25.333333
| 0.825397
| 0.276316
| 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
|
de587ac8449bab0b0a6202304ea5ef7b9b474f5e
| 18,239
|
py
|
Python
|
fhir/resources/tests/test_examplescenario.py
|
mmabey/fhir.resources
|
cc73718e9762c04726cd7de240c8f2dd5313cbe1
|
[
"BSD-3-Clause"
] | null | null | null |
fhir/resources/tests/test_examplescenario.py
|
mmabey/fhir.resources
|
cc73718e9762c04726cd7de240c8f2dd5313cbe1
|
[
"BSD-3-Clause"
] | null | null | null |
fhir/resources/tests/test_examplescenario.py
|
mmabey/fhir.resources
|
cc73718e9762c04726cd7de240c8f2dd5313cbe1
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Profile: http://hl7.org/fhir/StructureDefinition/ExampleScenario
Release: R4
Version: 4.0.1
Build ID: 9346c8cc45
Last updated: 2019-11-01T09:29:23.356+11:00
"""
import io
import json
import os
import unittest
import pytest
from .. import examplescenario
from ..fhirdate import FHIRDate
from .fixtures import force_bytes
@pytest.mark.usefixtures("base_settings")
class ExampleScenarioTests(unittest.TestCase):
def instantiate_from(self, filename):
datadir = os.environ.get("FHIR_UNITTEST_DATADIR") or ""
with io.open(os.path.join(datadir, filename), "r", encoding="utf-8") as handle:
js = json.load(handle)
self.assertEqual("ExampleScenario", js["resourceType"])
return examplescenario.ExampleScenario(js)
def testExampleScenario1(self):
inst = self.instantiate_from("examplescenario-example.json")
self.assertIsNotNone(inst, "Must have instantiated a ExampleScenario instance")
self.implExampleScenario1(inst)
js = inst.as_json()
self.assertEqual("ExampleScenario", js["resourceType"])
inst2 = examplescenario.ExampleScenario(js)
self.implExampleScenario1(inst2)
def implExampleScenario1(self, inst):
self.assertEqual(force_bytes(inst.actor[0].actorId), force_bytes("Nurse"))
self.assertEqual(
force_bytes(inst.actor[0].description), force_bytes("The Nurse")
)
self.assertEqual(force_bytes(inst.actor[0].name), force_bytes("Nurse"))
self.assertEqual(force_bytes(inst.actor[0].type), force_bytes("person"))
self.assertEqual(force_bytes(inst.actor[1].actorId), force_bytes("MAP"))
self.assertEqual(
force_bytes(inst.actor[1].description),
force_bytes(
"The entity that receives the Administration Requests to show the nurse to perform them"
),
)
self.assertEqual(force_bytes(inst.actor[1].name), force_bytes("Nurse's Tablet"))
self.assertEqual(force_bytes(inst.actor[1].type), force_bytes("entity"))
self.assertEqual(force_bytes(inst.actor[2].actorId), force_bytes("OP"))
self.assertEqual(
force_bytes(inst.actor[2].description),
force_bytes("The Medication Administration Order Placer"),
)
self.assertEqual(
force_bytes(inst.actor[2].name), force_bytes("MAR / Scheduler")
)
self.assertEqual(force_bytes(inst.actor[2].type), force_bytes("entity"))
self.assertEqual(force_bytes(inst.actor[3].actorId), force_bytes("MAC"))
self.assertEqual(
force_bytes(inst.actor[3].description),
force_bytes(
"The entity that receives the Medication Administration reports"
),
)
self.assertEqual(force_bytes(inst.actor[3].name), force_bytes("MAR / EHR"))
self.assertEqual(force_bytes(inst.actor[3].type), force_bytes("entity"))
self.assertEqual(force_bytes(inst.id), force_bytes("example"))
self.assertEqual(
force_bytes(inst.instance[0].description),
force_bytes(
'The initial prescription which describes "medication X, 3 times per day" - the exact scheduling is not in the initial prescription (it is left for the care teams to decide on the schedule).'
),
)
self.assertEqual(
force_bytes(inst.instance[0].name), force_bytes("Initial Prescription")
)
self.assertEqual(
force_bytes(inst.instance[0].resourceId), force_bytes("iherx001")
)
self.assertEqual(
force_bytes(inst.instance[1].description),
force_bytes("The administration request for day 1, morning"),
)
self.assertEqual(
force_bytes(inst.instance[1].name),
force_bytes("Request for day 1, morning"),
)
self.assertEqual(
force_bytes(inst.instance[1].resourceId), force_bytes("iherx001.001")
)
self.assertEqual(
force_bytes(inst.instance[2].description),
force_bytes("The administration request for day 1, lunch"),
)
self.assertEqual(
force_bytes(inst.instance[2].name), force_bytes("Request for day 1, lunch")
)
self.assertEqual(
force_bytes(inst.instance[2].resourceId), force_bytes("iherx001.002")
)
self.assertEqual(
force_bytes(inst.instance[3].description),
force_bytes("The administration request for day 1, evening"),
)
self.assertEqual(
force_bytes(inst.instance[3].name),
force_bytes("Request for day 1, evening"),
)
self.assertEqual(
force_bytes(inst.instance[3].resourceId), force_bytes("iherx001.003")
)
self.assertEqual(
force_bytes(inst.instance[4].description),
force_bytes("The administration request for day 2, morning"),
)
self.assertEqual(
force_bytes(inst.instance[4].name),
force_bytes("Request for day 2, morning"),
)
self.assertEqual(
force_bytes(inst.instance[4].resourceId), force_bytes("iherx001.004")
)
self.assertEqual(
force_bytes(inst.instance[5].description),
force_bytes("The administration request for day 2, lunch"),
)
self.assertEqual(
force_bytes(inst.instance[5].name), force_bytes("Request for day 2, lunch")
)
self.assertEqual(
force_bytes(inst.instance[5].resourceId), force_bytes("iherx001.005")
)
self.assertEqual(
force_bytes(inst.instance[6].description),
force_bytes("The administration request for day 2, evening"),
)
self.assertEqual(
force_bytes(inst.instance[6].name),
force_bytes("Request for day 2, evening"),
)
self.assertEqual(
force_bytes(inst.instance[6].resourceId), force_bytes("iherx001.006")
)
self.assertEqual(
force_bytes(inst.instance[7].description),
force_bytes("Administration report for day 1, morning: Taken"),
)
self.assertEqual(
force_bytes(inst.instance[7].name), force_bytes("Morning meds - taken")
)
self.assertEqual(
force_bytes(inst.instance[7].resourceId), force_bytes("iheadm001a")
)
self.assertEqual(
force_bytes(inst.instance[8].description),
force_bytes("Administration report for day 1, morning: NOT Taken"),
)
self.assertEqual(
force_bytes(inst.instance[8].name), force_bytes("Morning meds - not taken")
)
self.assertEqual(
force_bytes(inst.instance[8].resourceId), force_bytes("iheadm001b")
)
self.assertEqual(
force_bytes(inst.instance[9].containedInstance[0].resourceId),
force_bytes("iherx001.001"),
)
self.assertEqual(
force_bytes(inst.instance[9].containedInstance[1].resourceId),
force_bytes("iherx001.002"),
)
self.assertEqual(
force_bytes(inst.instance[9].containedInstance[2].resourceId),
force_bytes("iherx001.003"),
)
self.assertEqual(
force_bytes(inst.instance[9].containedInstance[3].resourceId),
force_bytes("iherx001.004"),
)
self.assertEqual(
force_bytes(inst.instance[9].containedInstance[4].resourceId),
force_bytes("iherx001.005"),
)
self.assertEqual(
force_bytes(inst.instance[9].containedInstance[5].resourceId),
force_bytes("iherx001.006"),
)
self.assertEqual(
force_bytes(inst.instance[9].description),
force_bytes("All the medication Requests for Day 1"),
)
self.assertEqual(
force_bytes(inst.instance[9].name),
force_bytes("Bundle of Medication Requests"),
)
self.assertEqual(
force_bytes(inst.instance[9].resourceId), force_bytes("iherx001bundle")
)
self.assertEqual(force_bytes(inst.meta.tag[0].code), force_bytes("HTEST"))
self.assertEqual(
force_bytes(inst.meta.tag[0].display), force_bytes("test health data")
)
self.assertEqual(
force_bytes(inst.meta.tag[0].system),
force_bytes("http://terminology.hl7.org/CodeSystem/v3-ActReason"),
)
self.assertEqual(
force_bytes(inst.process[0].postConditions),
force_bytes(
"Medication administration Reports are submitted, EHR is updated."
),
)
self.assertEqual(
force_bytes(inst.process[0].preConditions),
force_bytes(
"Medication administration requests are in the EHR / MAR, scheduled for each individual intake."
),
)
self.assertEqual(
force_bytes(inst.process[0].step[0].operation.initiator),
force_bytes("Nurse"),
)
self.assertEqual(
force_bytes(inst.process[0].step[0].operation.name),
force_bytes("1. Get today's schedule"),
)
self.assertEqual(
force_bytes(inst.process[0].step[0].operation.number), force_bytes("1")
)
self.assertEqual(
force_bytes(inst.process[0].step[0].operation.receiver), force_bytes("MAP")
)
self.assertEqual(
force_bytes(inst.process[0].step[1].process[0].description),
force_bytes(
"Query for medication administration orders,\\n- For today's shifts\\n- For today's patients"
),
)
self.assertEqual(
force_bytes(inst.process[0].step[1].process[0].step[0].operation.initiator),
force_bytes("MAP"),
)
self.assertEqual(
force_bytes(inst.process[0].step[1].process[0].step[0].operation.name),
force_bytes(
"2.Query for medication administration orders,\\n- For today's shifts\\n- For today's patients"
),
)
self.assertEqual(
force_bytes(inst.process[0].step[1].process[0].step[0].operation.number),
force_bytes("2"),
)
self.assertEqual(
force_bytes(inst.process[0].step[1].process[0].step[0].operation.receiver),
force_bytes("OP"),
)
self.assertEqual(
force_bytes(
inst.process[0].step[1].process[0].step[0].operation.request.resourceId
),
force_bytes("iherxqry"),
)
self.assertEqual(
force_bytes(
inst.process[0].step[1].process[0].step[0].operation.response.resourceId
),
force_bytes("iherx001bundle"),
)
self.assertEqual(
force_bytes(inst.process[0].step[1].process[0].title),
force_bytes("P1. Query Administration Requests"),
)
self.assertTrue(inst.process[0].step[2].pause)
self.assertEqual(
force_bytes(inst.process[0].step[3].operation.initiator), force_bytes("MAP")
)
self.assertEqual(
force_bytes(inst.process[0].step[3].operation.name),
force_bytes("Notify (alert)"),
)
self.assertEqual(
force_bytes(inst.process[0].step[3].operation.number), force_bytes("4")
)
self.assertEqual(
force_bytes(inst.process[0].step[3].operation.receiver),
force_bytes("Nurse"),
)
self.assertEqual(
force_bytes(inst.process[0].step[4].operation.initiator),
force_bytes("Nurse"),
)
self.assertEqual(
force_bytes(inst.process[0].step[4].operation.name),
force_bytes("Read orders"),
)
self.assertEqual(
force_bytes(inst.process[0].step[4].operation.number), force_bytes("5")
)
self.assertEqual(
force_bytes(inst.process[0].step[4].operation.receiver), force_bytes("MAP")
)
self.assertTrue(inst.process[0].step[5].pause)
self.assertEqual(
force_bytes(inst.process[0].step[6].operation.initiator),
force_bytes("Nurse"),
)
self.assertEqual(
force_bytes(inst.process[0].step[6].operation.name),
force_bytes("Ask if patient took meds"),
)
self.assertEqual(
force_bytes(inst.process[0].step[6].operation.number), force_bytes("5")
)
self.assertEqual(
force_bytes(inst.process[0].step[6].operation.receiver),
force_bytes("Nurse"),
)
self.assertEqual(
force_bytes(inst.process[0].step[7].alternative[0].description),
force_bytes("Invoke if patient took medications"),
)
self.assertEqual(
force_bytes(
inst.process[0]
.step[7]
.alternative[0]
.step[0]
.process[0]
.step[0]
.operation.initiator
),
force_bytes("Nurse"),
)
self.assertTrue(
inst.process[0]
.step[7]
.alternative[0]
.step[0]
.process[0]
.step[0]
.operation.initiatorActive
)
self.assertEqual(
force_bytes(
inst.process[0]
.step[7]
.alternative[0]
.step[0]
.process[0]
.step[0]
.operation.name
),
force_bytes("Register Meds taken"),
)
self.assertEqual(
force_bytes(
inst.process[0]
.step[7]
.alternative[0]
.step[0]
.process[0]
.step[0]
.operation.number
),
force_bytes("1a"),
)
self.assertEqual(
force_bytes(
inst.process[0]
.step[7]
.alternative[0]
.step[0]
.process[0]
.step[0]
.operation.receiver
),
force_bytes("MAP"),
)
self.assertEqual(
force_bytes(
inst.process[0].step[7].alternative[0].step[0].process[0].title
),
force_bytes("Register Meds taken"),
)
self.assertEqual(
force_bytes(inst.process[0].step[7].alternative[0].title),
force_bytes("Patient took drugs"),
)
self.assertEqual(
force_bytes(inst.process[0].step[7].alternative[1].description),
force_bytes("No, patient did not take drugs"),
)
self.assertEqual(
force_bytes(
inst.process[0]
.step[7]
.alternative[1]
.step[0]
.process[0]
.step[0]
.operation.initiator
),
force_bytes("Nurse"),
)
self.assertTrue(
inst.process[0]
.step[7]
.alternative[1]
.step[0]
.process[0]
.step[0]
.operation.initiatorActive
)
self.assertEqual(
force_bytes(
inst.process[0]
.step[7]
.alternative[1]
.step[0]
.process[0]
.step[0]
.operation.name
),
force_bytes("Register Meds NOT taken"),
)
self.assertEqual(
force_bytes(
inst.process[0]
.step[7]
.alternative[1]
.step[0]
.process[0]
.step[0]
.operation.number
),
force_bytes("1b"),
)
self.assertEqual(
force_bytes(
inst.process[0]
.step[7]
.alternative[1]
.step[0]
.process[0]
.step[0]
.operation.receiver
),
force_bytes("MAP"),
)
self.assertEqual(
force_bytes(
inst.process[0].step[7].alternative[1].step[0].process[0].title
),
force_bytes("Register Meds NOT taken"),
)
self.assertEqual(
force_bytes(inst.process[0].step[7].alternative[1].title),
force_bytes("No drugs"),
)
self.assertEqual(
force_bytes(inst.process[0].step[7].alternative[2].description),
force_bytes("Unknown whether patient took medications or not"),
)
self.assertTrue(inst.process[0].step[7].alternative[2].step[0].pause)
self.assertEqual(
force_bytes(inst.process[0].step[7].alternative[2].title),
force_bytes("Not clear"),
)
self.assertTrue(inst.process[0].step[8].pause)
self.assertEqual(
force_bytes(inst.process[0].step[9].operation.initiator),
force_bytes("Nurse"),
)
self.assertEqual(
force_bytes(inst.process[0].step[9].operation.name),
force_bytes("Administer drug"),
)
self.assertEqual(
force_bytes(inst.process[0].step[9].operation.number), force_bytes("6")
)
self.assertEqual(
force_bytes(inst.process[0].step[9].operation.receiver),
force_bytes("Nurse"),
)
self.assertEqual(
force_bytes(inst.process[0].title),
force_bytes("Mobile Medication Administration"),
)
self.assertEqual(force_bytes(inst.status), force_bytes("draft"))
self.assertEqual(force_bytes(inst.text.status), force_bytes("generated"))
| 36.551102
| 209
| 0.556116
| 1,878
| 18,239
| 5.28541
| 0.118743
| 0.212573
| 0.211566
| 0.264457
| 0.774129
| 0.741487
| 0.728491
| 0.651421
| 0.585734
| 0.524683
| 0
| 0.031508
| 0.323099
| 18,239
| 498
| 210
| 36.624498
| 0.772477
| 0.009814
| 0
| 0.452282
| 0
| 0.006224
| 0.132174
| 0.002714
| 0
| 0
| 0
| 0
| 0.236515
| 1
| 0.006224
| false
| 0
| 0.016598
| 0
| 0.026971
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
de9cc3556cd2b5a44503242287ee6c2afaca4754
| 77
|
py
|
Python
|
examples/google_app_engine/msgsplitter/test.py
|
pyguy411/python-etc
|
b1fb9397f88f78797c2a3c21c4fe1f5e504c9ad9
|
[
"MIT"
] | null | null | null |
examples/google_app_engine/msgsplitter/test.py
|
pyguy411/python-etc
|
b1fb9397f88f78797c2a3c21c4fe1f5e504c9ad9
|
[
"MIT"
] | null | null | null |
examples/google_app_engine/msgsplitter/test.py
|
pyguy411/python-etc
|
b1fb9397f88f78797c2a3c21c4fe1f5e504c9ad9
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
print "Content-Type: text/html\r\n"
print "test page"
| 15.4
| 35
| 0.701299
| 14
| 77
| 3.857143
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116883
| 77
| 4
| 36
| 19.25
| 0.794118
| 0.25974
| 0
| 0
| 0
| 0
| 0.654545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
dea8b53bab57af1ff5b9e3aa1c0f61686ab08e37
| 218
|
py
|
Python
|
flhhkkSpider/flhhkk/flhhkk_request.py
|
zouyuwuse/Spiders
|
28764b6f4eeccffcf875a8656f30d0c8bb34ce22
|
[
"Apache-2.0"
] | 31
|
2017-05-24T02:31:33.000Z
|
2020-04-19T08:15:23.000Z
|
flhhkkSpider/flhhkk/flhhkk_request.py
|
zouyuwuse/Spiders
|
28764b6f4eeccffcf875a8656f30d0c8bb34ce22
|
[
"Apache-2.0"
] | 3
|
2017-05-26T15:12:54.000Z
|
2018-03-13T05:37:04.000Z
|
flhhkkSpider/flhhkk/flhhkk_request.py
|
zouyuwuse/Spiders
|
28764b6f4eeccffcf875a8656f30d0c8bb34ce22
|
[
"Apache-2.0"
] | 28
|
2017-05-24T15:40:45.000Z
|
2020-04-19T08:15:29.000Z
|
#!usr/bin/env python
# -*- coding:utf-8 _*-
"""
只是继承一下scrapy.Request,然后pass,好区分哪些Request需要处理,相当于改个名
"""
import scrapy
class FlhhkkRequest(scrapy.Request):
"""
flhhkkSpider专用Request类
"""
pass
| 18.166667
| 52
| 0.651376
| 20
| 218
| 7.05
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005747
| 0.201835
| 218
| 12
| 53
| 18.166667
| 0.804598
| 0.527523
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
dee03075c43f37d27c01e5081ebc32ec4e5cbead
| 45
|
py
|
Python
|
gs_navigation/__init__.py
|
IlyaDanilenko/gs_navigation
|
84ba7f356b8cb212852959d2a2a79035241576b0
|
[
"MIT"
] | null | null | null |
gs_navigation/__init__.py
|
IlyaDanilenko/gs_navigation
|
84ba7f356b8cb212852959d2a2a79035241576b0
|
[
"MIT"
] | null | null | null |
gs_navigation/__init__.py
|
IlyaDanilenko/gs_navigation
|
84ba7f356b8cb212852959d2a2a79035241576b0
|
[
"MIT"
] | null | null | null |
from .gs_navigation import NavigationManager
| 22.5
| 44
| 0.888889
| 5
| 45
| 7.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088889
| 45
| 1
| 45
| 45
| 0.95122
| 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
|
72023de01649e5ca3a9af9bee3b3b564e377ce76
| 218
|
py
|
Python
|
pymusicaltext/core/midiunit.py
|
aiwaverse/pymusicaltext
|
7969fa2dcc4e0a3961a7a7ff9a0544476a664020
|
[
"MIT"
] | null | null | null |
pymusicaltext/core/midiunit.py
|
aiwaverse/pymusicaltext
|
7969fa2dcc4e0a3961a7a7ff9a0544476a664020
|
[
"MIT"
] | null | null | null |
pymusicaltext/core/midiunit.py
|
aiwaverse/pymusicaltext
|
7969fa2dcc4e0a3961a7a7ff9a0544476a664020
|
[
"MIT"
] | null | null | null |
import abc
from typing import List, Union
import mido
class MidiUnit(abc.ABC):
@abc.abstractmethod
def generate_message(
self,
) -> Union[List[mido.Message], List[mido.MetaMessage]]:
pass
| 18.166667
| 59
| 0.669725
| 27
| 218
| 5.37037
| 0.592593
| 0.082759
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.229358
| 218
| 11
| 60
| 19.818182
| 0.863095
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0.111111
| 0.333333
| 0
| 0.555556
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
a0cec3762f9bc9517c9f417a32675865177632a6
| 91
|
py
|
Python
|
new_project/time_app/admin.py
|
cs-fullstack-fall-2018/django-mini-project1-cgarciapieto
|
b3b8b5dab8fdb7a9dd8a46cc34edfbb6a0b16c69
|
[
"Apache-2.0"
] | null | null | null |
new_project/time_app/admin.py
|
cs-fullstack-fall-2018/django-mini-project1-cgarciapieto
|
b3b8b5dab8fdb7a9dd8a46cc34edfbb6a0b16c69
|
[
"Apache-2.0"
] | null | null | null |
new_project/time_app/admin.py
|
cs-fullstack-fall-2018/django-mini-project1-cgarciapieto
|
b3b8b5dab8fdb7a9dd8a46cc34edfbb6a0b16c69
|
[
"Apache-2.0"
] | null | null | null |
from django.contrib import admin
from .models import Timeapp
admin.site.register(Timeapp)
| 18.2
| 32
| 0.824176
| 13
| 91
| 5.769231
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10989
| 91
| 5
| 33
| 18.2
| 0.925926
| 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
|
9d0011d37584af64c87046b78ea1e24c1e3fe8cf
| 333
|
py
|
Python
|
src/main/engine/combat/damage.py
|
RokoMijic/NinthAgeGame
|
7f32fc770414e361fdfbd34eb73a66e507a3a57e
|
[
"MIT"
] | null | null | null |
src/main/engine/combat/damage.py
|
RokoMijic/NinthAgeGame
|
7f32fc770414e361fdfbd34eb73a66e507a3a57e
|
[
"MIT"
] | null | null | null |
src/main/engine/combat/damage.py
|
RokoMijic/NinthAgeGame
|
7f32fc770414e361fdfbd34eb73a66e507a3a57e
|
[
"MIT"
] | null | null | null |
from engine.data.model import Model
class Damage:
@staticmethod
def roll_to_wound(attacker: Model, defender: Model):
pass
@staticmethod
def roll_to_pen_armour(attacker: Model, defender: Model):
pass
@staticmethod
def roll_to_pen_specialsave(attacker: Model, defender: Model):
pass
| 20.8125
| 66
| 0.690691
| 40
| 333
| 5.55
| 0.45
| 0.202703
| 0.256757
| 0.283784
| 0.621622
| 0.486486
| 0.486486
| 0.486486
| 0.486486
| 0.486486
| 0
| 0
| 0.237237
| 333
| 16
| 67
| 20.8125
| 0.874016
| 0
| 0
| 0.545455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0.272727
| 0.090909
| 0
| 0.454545
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
9d1c3735d686f63d4ad699df409aab57665a2619
| 120
|
py
|
Python
|
check/admin.py
|
debajyotiroyc/CrispyForm_Django
|
847d3a6a2d9c2ac419d3da39ed17d1ced3bd92af
|
[
"MIT"
] | null | null | null |
check/admin.py
|
debajyotiroyc/CrispyForm_Django
|
847d3a6a2d9c2ac419d3da39ed17d1ced3bd92af
|
[
"MIT"
] | null | null | null |
check/admin.py
|
debajyotiroyc/CrispyForm_Django
|
847d3a6a2d9c2ac419d3da39ed17d1ced3bd92af
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from check.models import info
# Register your models here.
admin.site.register(info)
| 30
| 33
| 0.8
| 18
| 120
| 5.333333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 120
| 4
| 34
| 30
| 0.923077
| 0.216667
| 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
|
9d265559bb9f778e2959da7d60e5b5a645b41d2f
| 172
|
py
|
Python
|
RunningList/server/todo.py
|
Artyko/RunningList
|
f8d2cf00c41f5eaeb8b56db9b3fb611f85937177
|
[
"MIT"
] | null | null | null |
RunningList/server/todo.py
|
Artyko/RunningList
|
f8d2cf00c41f5eaeb8b56db9b3fb611f85937177
|
[
"MIT"
] | null | null | null |
RunningList/server/todo.py
|
Artyko/RunningList
|
f8d2cf00c41f5eaeb8b56db9b3fb611f85937177
|
[
"MIT"
] | null | null | null |
from app import create_app, db
from app.models import Task
app = create_app()
@app.shell_context_processor
def make_shell_context():
return {'db': db, 'Task': Task}
| 17.2
| 35
| 0.732558
| 27
| 172
| 4.444444
| 0.481481
| 0.116667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.156977
| 172
| 9
| 36
| 19.111111
| 0.827586
| 0
| 0
| 0
| 0
| 0
| 0.034884
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
9d3992c0670410cbee9cb2c73558000c4da21a55
| 96
|
py
|
Python
|
ebooks/provider/ebook_provider.py
|
Frederick-S/ebooks-api
|
aa9a15203687567b012bcb72a625e2c62776a99d
|
[
"MIT"
] | null | null | null |
ebooks/provider/ebook_provider.py
|
Frederick-S/ebooks-api
|
aa9a15203687567b012bcb72a625e2c62776a99d
|
[
"MIT"
] | 20
|
2020-03-16T04:24:34.000Z
|
2021-12-12T09:37:51.000Z
|
ebooks/provider/ebook_provider.py
|
Frederick-S/ebooks-api
|
aa9a15203687567b012bcb72a625e2c62776a99d
|
[
"MIT"
] | 1
|
2020-03-10T15:05:44.000Z
|
2020-03-10T15:05:44.000Z
|
class EbookProvider:
def get_ebooks(self, title, last_book_index, page_index):
pass
| 24
| 61
| 0.71875
| 13
| 96
| 5
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208333
| 96
| 3
| 62
| 32
| 0.855263
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
9d41c01ed80036f6caa5a3e899fb08eb4150bc91
| 100
|
py
|
Python
|
torchnca/__init__.py
|
brentyi/nca
|
a018b26b2ac318d10065dac667498cc30ef844a4
|
[
"MIT"
] | 337
|
2020-02-08T05:12:23.000Z
|
2020-07-01T01:45:44.000Z
|
torchnca/__init__.py
|
brentyi/nca
|
a018b26b2ac318d10065dac667498cc30ef844a4
|
[
"MIT"
] | 10
|
2020-02-11T04:20:16.000Z
|
2020-06-17T16:21:12.000Z
|
torchnca/__init__.py
|
brentyi/nca
|
a018b26b2ac318d10065dac667498cc30ef844a4
|
[
"MIT"
] | 46
|
2020-02-08T05:32:30.000Z
|
2020-06-17T16:17:45.000Z
|
"""A PyTorch implementation of Neighbourhood Components Analysis.
"""
from torchnca.nca import NCA
| 20
| 65
| 0.79
| 12
| 100
| 6.583333
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13
| 100
| 4
| 66
| 25
| 0.908046
| 0.62
| 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
|
9d45dc997206966d12b61d023a918d6bee9c775a
| 52
|
py
|
Python
|
zorro/mongodb/__init__.py
|
tailhook/zorro
|
8f004515ac934ba88b8df72b85c536e607d82712
|
[
"MIT"
] | 15
|
2015-06-06T08:12:41.000Z
|
2021-08-17T18:29:47.000Z
|
zorro/mongodb/__init__.py
|
tailhook/zorro
|
8f004515ac934ba88b8df72b85c536e607d82712
|
[
"MIT"
] | null | null | null |
zorro/mongodb/__init__.py
|
tailhook/zorro
|
8f004515ac934ba88b8df72b85c536e607d82712
|
[
"MIT"
] | 3
|
2015-05-10T05:28:45.000Z
|
2016-03-03T04:11:43.000Z
|
from .proto import Connection, Database, Collection
| 26
| 51
| 0.826923
| 6
| 52
| 7.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 52
| 1
| 52
| 52
| 0.934783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9d5ea5fa0b36ef81a50c10a0503a7d05545cf015
| 95
|
py
|
Python
|
binaries/ServiceConsolePlugin/ServiceConsole/ServiceConsole.py
|
ctgriffiths/twister
|
b3930549551b0104738d56f402eb9b4b90dd692c
|
[
"Apache-2.0"
] | 19
|
2015-01-29T11:02:42.000Z
|
2021-06-03T11:45:42.000Z
|
binaries/ServiceConsolePlugin/ServiceConsole/ServiceConsole.py
|
ctgriffiths/twister
|
b3930549551b0104738d56f402eb9b4b90dd692c
|
[
"Apache-2.0"
] | 47
|
2015-01-02T11:39:39.000Z
|
2022-02-05T11:29:07.000Z
|
binaries/ServiceConsolePlugin/ServiceConsole/ServiceConsole.py
|
ctgriffiths/twister
|
b3930549551b0104738d56f402eb9b4b90dd692c
|
[
"Apache-2.0"
] | 10
|
2015-01-12T07:24:39.000Z
|
2017-11-05T00:17:30.000Z
|
from BasePlugin import BasePlugin
# version: 2.001
#
class Plugin(BasePlugin):
pass
#
| 7.916667
| 33
| 0.694737
| 11
| 95
| 6
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.054054
| 0.221053
| 95
| 11
| 34
| 8.636364
| 0.837838
| 0.147368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
19cdefae61863b54a4a7824735ad648f019e546c
| 2,121
|
py
|
Python
|
GoogleTravelTime.py
|
RajeshMIT/JobScraping
|
302b95e1f29400a3970c354dd13d9d71a757e2e6
|
[
"MIT"
] | null | null | null |
GoogleTravelTime.py
|
RajeshMIT/JobScraping
|
302b95e1f29400a3970c354dd13d9d71a757e2e6
|
[
"MIT"
] | null | null | null |
GoogleTravelTime.py
|
RajeshMIT/JobScraping
|
302b95e1f29400a3970c354dd13d9d71a757e2e6
|
[
"MIT"
] | null | null | null |
__author__ = "Rajesh"
import pandas as pd
import urllib.request
import json
import time
dList = []
for i in range(1, 121):
dDict = {}
epoch_time = 1479906000 + (i - 1) * 60
current_time = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(epoch_time))
dDict['Start time'] = current_time
url1 = "https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=61+strathmore+road+brighton+MA&destinations=staples+drive+framingham+MA&departure_time=" + str(
epoch_time) + "&traffic_model=best_guess&key=<apikey>"
url2 = "https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=61+strathmore+road+brighton+MA&destinations=staples+drive+framingham+MA&departure_time=" + str(
epoch_time) + "&traffic_model=optimistic&key=<apikey>"
url3 = "https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=61+strathmore+road+brighton+MA&destinations=staples+drive+framingham+MA&departure_time=" + str(
epoch_time) + "&traffic_model=pessimistic&key=<apikey>"
request = urllib.request.Request(url1, headers={'content-type': 'application/json'})
html = urllib.request.urlopen(request)
datafile = json.loads(html.read().decode("utf-8"))
dDict['Commute time - Best guess scenario'] = datafile["rows"][0]['elements'][0]['duration_in_traffic']['text']
request = urllib.request.Request(url2, headers={'content-type': 'application/json'})
html = urllib.request.urlopen(request)
datafile = json.loads(html.read().decode("utf-8"))
dDict['Commute time - Optimistic scenario'] = datafile["rows"][0]['elements'][0]['duration_in_traffic']['text']
request = urllib.request.Request(url3, headers={'content-type': 'application/json'})
html = urllib.request.urlopen(request)
datafile = json.loads(html.read().decode("utf-8"))
dDict['Commute time - Pessimistic scenario'] = datafile["rows"][0]['elements'][0]['duration_in_traffic']['text']
dList.append(dDict)
df = pd.DataFrame(dList)
df.to_csv('GoogleTravelTime.csv', sep=',', index=False)
| 50.5
| 188
| 0.69637
| 270
| 2,121
| 5.377778
| 0.32963
| 0.062672
| 0.039256
| 0.045455
| 0.723141
| 0.723141
| 0.723141
| 0.723141
| 0.723141
| 0.723141
| 0
| 0.020663
| 0.132956
| 2,121
| 41
| 189
| 51.731707
| 0.768896
| 0
| 0
| 0.1875
| 0
| 0.09375
| 0.469712
| 0.055288
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.125
| 0
| 0.125
| 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
|
19de5128e972bd8a2e1ecf93e9a7ce3d79c3af2f
| 176
|
py
|
Python
|
cuisine/optimize/suggestion.py
|
j3kstrum/recipe-tweaker
|
941d2fed87fc2c568b29d3b3baee3f8ebfe4daca
|
[
"MIT"
] | null | null | null |
cuisine/optimize/suggestion.py
|
j3kstrum/recipe-tweaker
|
941d2fed87fc2c568b29d3b3baee3f8ebfe4daca
|
[
"MIT"
] | null | null | null |
cuisine/optimize/suggestion.py
|
j3kstrum/recipe-tweaker
|
941d2fed87fc2c568b29d3b3baee3f8ebfe4daca
|
[
"MIT"
] | null | null | null |
from cuisine.optimize import Feedback
from data.recipe import Recipe
class Suggestion:
def with_feedback(self: 'Suggestion', feedback: Feedback) -> Recipe:
pass
| 19.555556
| 72
| 0.738636
| 21
| 176
| 6.142857
| 0.619048
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 176
| 8
| 73
| 22
| 0.902098
| 0
| 0
| 0
| 0
| 0
| 0.056818
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
19ec2392c5b3d108c6cfdacfd83d83f91e3722f9
| 40,537
|
py
|
Python
|
main.py
|
MCTH2065/YandexWebProject
|
0cba0066957998ed90a8c93fc6ca232516b1acfe
|
[
"MIT"
] | null | null | null |
main.py
|
MCTH2065/YandexWebProject
|
0cba0066957998ed90a8c93fc6ca232516b1acfe
|
[
"MIT"
] | null | null | null |
main.py
|
MCTH2065/YandexWebProject
|
0cba0066957998ed90a8c93fc6ca232516b1acfe
|
[
"MIT"
] | null | null | null |
# http://d4m4gge.pythonanywhere.com/
import datetime
from flask_login import LoginManager
from flask import Flask
from data import db_session
from data.serverdata import ServerData
from data.users import User
from flask_login import login_user, logout_user
from flask import request
from forms.confirm_password import ConfirmPassword
from forms.user_change import ChangeData
from forms.createaccount import CreateAccount
from forms.loginform import LoginForm
from forms.forgotpassword import ForgotPassword
from forms.changepassword import ChangePassword
import random
from data.jobs import Jobs
from flask import render_template
from flask import redirect, make_response
from flask import session
app = Flask(__name__)
app.config['SECRET_KEY'] = 'yandexlyceum_secret_key'
login_manager = LoginManager()
login_manager.init_app(app)
def number_to_base(n, b):
if n == 0:
return [0]
digits = []
while n:
digits.append(int(n % b))
n //= b
return digits[::-1]
def update_job():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
us = session.get("user", 0)
db_s = db_session.create_session()
us_data = us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')
us_id = us_data[9]
u = db_s.query(User).filter(User.id == str(us_id)).one()
if u.work_is_done == False:
if not u.work:
field = u.field
if field == 'IT':
funcs = [['для вывода в консоль', 'print, print()'], ['для перевода данных в строку', 'str, str()'],
['для перевода данных в целое число', 'int, int()'],
['для перевода данных в число с плавающей запятой', 'float, float()'],
['для присваивания значений', '='], ['для перевода данных в список',
'list, list(), []'],
['для перевода данных в множество', 'set, set()'],
['для перевода данных в словарь', 'dict, dict(), {}'],
['для перевода данных в кортеж', 'tuple, tuple(), ()']]
ran_first = random.randint(1, 10000)
first = f'Чему будет равно число {str(ran_first)} в двоичной системе счисления?'
ans_first = str(format(ran_first, 'b'))
ran_second = random.randint(1, 10000)
second = f'Чему будет равно число {str(ran_second)} в четверичной системе счисления?'
ans_second = ''.join(str(number_to_base(ran_second, 4))[1:-1].split(', '))
ran_third = random.randint(1, 10000)
third = f'Чему будет равно число {str(ran_third)} в восьмеричной системе счисления?'
ans_third = ''.join(str(number_to_base(ran_third, 8))[1:-1].split(', '))
ran_fourth = random.choice(funcs)
fourth = f'Что служит в Python {ran_fourth[0]}?'
ans_fourth = ran_fourth[1].split(', ')
print(ans_first, ans_second, ans_third, ans_fourth)
f = 'question-answer'.join([first, ans_first])
s = 'question-answer'.join([second, ans_second])
t = 'question-answer'.join([third, ans_third])
ft = 'question-answer'.join([fourth, str(ans_fourth)])
user_work = 'between-tasks'.join([f, s, t, ft])
u.work = user_work
db_s.commit()
session["answers"] = [ans_first, ans_second, ans_third, ans_fourth]
elif field == 'Economics':
ran_first = random.randint(20, 80)
ran_days_first = random.randint(18, 22)
ran_hours_first = random.randint(7, 9)
first = f'Сколько денег в конце месяца, в котором {ran_days_first} рабочих дней,' \
f' получит работник, который работает {ran_hours_first} часов в день с зарплатой {ran_first}' \
f' д/ч'
ans_first = ran_first * ran_hours_first * ran_days_first
print(ans_first)
ran_second = random.randint(20, 80)
ran_days_second = random.randint(18, 22)
ran_hours_second = random.randint(7, 9)
second = f'Сколько денег в конце месяца, в котором {ran_days_second} рабочих дней,' \
f' получит работник, который работает {ran_hours_second}' \
f' часов в день с зарплатой {ran_second} д/ч'
ans_second = ran_first * ran_hours_second * ran_days_second
print(ans_second)
ran_third_money = random.choice([5000, 8000, 10000, 6000, 9000, 14000])
ran_third_f = random.choice([2, 4, 8])
ran_third_s = random.choice([2, 4, 8])
third = f'Вам из {ran_third_f} офисов пришло по {ran_third_money} долларов.' \
f' По сколько долларов получит каждый из {ran_third_s} других офисов?'
ans_third = (ran_third_money * ran_third_f) // ran_third_s
print(ans_third)
ran_fourth_money = random.choice([50000, 70000, 80000, 90000, 100000, 110000, 120000, 130000])
ran_fourth_losses = random.choice([60, 70, 80])
fourth = f'Предприятие в среднем зарабатывает {ran_fourth_money} долларов.' \
f' Какова будет чистая прибыль в год, если расходы равны {ran_fourth_losses} процентов?'
ans_fourth = int((ran_fourth_money * 12) * ((100 - ran_fourth_losses) / 100))
print(ans_fourth)
f = 'question-answer'.join([first, str(ans_first)])
s = 'question-answer'.join([second, str(ans_second)])
t = 'question-answer'.join([third, str(ans_third)])
ft = 'question-answer'.join([fourth, str(ans_fourth)])
user_work = 'between-tasks'.join([f, s, t, ft])
u.work = user_work
db_s.commit()
session["answers"] = [ans_first, ans_second, ans_third, ans_fourth]
elif field == 'Engineering':
ran_first_value = random.randint(500, 2500)
ran_first_volume = random.randint(1, 25)
first = f'Чему равна масса тела плотности {ran_first_value} кг/куб. метр и ' \
f'объема {ran_first_volume} куб. метров?'
ans_first = ran_first_value * ran_first_volume
second_voltage = 220
random_second_current = random.choice([5, 10, 11, 22, 44])
second = f'Чему равно сопротивление проводника в сети, напряжение в которой равно {second_voltage}' \
f' вольт, а сила тока равна {random_second_current} ампер?'
ans_second = second_voltage // random_second_current
third_random_length = random.randint(5, 30)
third_random_height = random.randint(5, 15)
third_random_radius = random.randint(2, 10)
third = f'Чему равна площадь цилиндра (число пи принять за 3), высота боковой стороны которого равна' \
f' {third_random_height} метров, её длина равна {third_random_length} метров,' \
f' а радиус основания равен {third_random_radius} метров?'
ans_third = (third_random_length * third_random_height) + 2 * (3 * (third_random_radius ** 2))
fourth_random_av_speed = random.randint(50, 150)
fourth_random_hours = random.randint(2, 15)
fourth = f'Какой путь пройдёт автомобиль, двигаясь со средней скоростью {fourth_random_av_speed}' \
f' километров в час {fourth_random_hours} часов?'
ans_fourth = fourth_random_av_speed * fourth_random_hours
f = 'question-answer'.join([first, str(ans_first)])
s = 'question-answer'.join([second, str(ans_second)])
t = 'question-answer'.join([third, str(ans_third)])
ft = 'question-answer'.join([fourth, str(ans_fourth)])
user_work = 'between-tasks'.join([f, s, t, ft])
u.work = user_work
db_s.commit()
session["answers"] = [ans_first, ans_second, ans_third, ans_fourth]
else:
tasks = u.work.split('between-tasks')
f = tasks[0]
s = tasks[1]
t = tasks[2]
ft = tasks[3]
first, ans_first = f.split('question-answer')[0], f.split('question-answer')[1]
second, ans_second = s.split('question-answer')[0], s.split('question-answer')[1]
third, ans_third = t.split('question-answer')[0], t.split('question-answer')[1]
fourth, ans_fourth = ft.split('question-answer')[0], ft.split('question-answer')[1]
session["answers"] = [ans_first, ans_second, ans_third, ans_fourth]
user = session.get("user").split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')
id = int(user[9])
real_user = db_s.query(User).filter(User.id == id).one()
if real_user.mood + 2 >= 100:
real_user.mood = 100
else:
real_user.mood += 2
db_s.commit()
def register_time():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
db_s = db_session.create_session()
user = session.get("user").split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')
id = int(user[9])
real_user = db_s.query(User).filter(User.id == id).one()
if real_user.work_time:
last = real_user.work_time
now = datetime.datetime.today()
print((now - last).seconds)
if now - last >= datetime.timedelta(hours=24):
real_user.work_time = now
real_user.work = None
db_s.commit()
update_job()
elif now.day > last.day:
real_user.work_time = now
real_user.work = None
db_s.commit()
update_job()
elif now.month > last.month:
real_user.work_time = now
real_user.work = None
db_s.commit()
update_job()
elif now.year > last.year:
real_user.work_time = now
real_user.work = None
db_s.commit()
update_job()
else:
real_user.work_time = datetime.datetime.today()
db_s.commit()
def update_vacs():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
db_s = db_session.create_session()
user = session.get("user").split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')
id = int(user[9])
real_user = db_s.query(User).filter(User.id == id).one()
if real_user.update_vacs:
last = real_user.update_vacs
now = datetime.datetime.now()
if now - last >= datetime.timedelta(hours=72):
real_user.update_vacs = now
db_s.commit()
return True
else:
return False
else:
real_user.update_vacs = datetime.datetime.now()
db_s.commit()
@login_manager.user_loader
def load_user(user_id):
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
db_sess = db_session.create_session()
return db_sess.query(User).get(user_id)
@app.route('/login', methods=['GET', 'POST'])
def login():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
form = LoginForm()
logout_user()
if form.validate_on_submit():
db_sess = db_session.create_session()
user = db_sess.query(User).filter(User.email == form.email.data).first()
if user and user.check_password(form.password.data):
login_user(user)
res = make_response(redirect("/"))
if user.comp:
company = db_sess.query(Jobs).filter(Jobs.id == int(user.comp)).one().name
else:
company = ''
data = 'UgandaWillNeverBeChosenAsABioOfSomeoneRight?'.join(
[user.name, user.surname, str(user.age), user.email, str(user.rating),
str(user.experience), str(user.money), str(user.mood), user.bio,
str(user.id), str(user.pfp), company])
session["user"] = data
return res
res = make_response(render_template('login.html',
message="Неправильный логин или пароль",
form=form,
data="Только авторизованные пользователи могут пользоваться сервисом"
" Work At Home"))
session.pop("user", None)
return res
res = make_response(render_template('login.html', form=form, data="Только авторизованные пользователи"
" могут пользоваться сервисом"
" Work At Home"))
session.pop("user", None)
return res
@app.route('/create', methods=['GET', 'POST'])
def create():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
logout_user()
form = CreateAccount()
if form.validate_on_submit():
db_sess = db_session.create_session()
if form.password.data == form.check_password.data:
if db_sess.query(User).filter(User.email == form.email.data).all() == []:
user = User()
user.surname = form.surname.data
user.name = form.name.data
user.age = form.age.data
user.email = form.email.data
user.hashed_password = form.password.data
user.experience = form.experience.data
user.bio = form.bio.data
user.codeword = form.codeword.data
user.pfp = f'static/img/{str(random.randint(1, 6))}.png'
user.work_is_done = 0
db_sess.add(user)
db_sess.commit()
session.pop("user", None)
return redirect('/login')
else:
res = make_response(render_template('createaccount.html',
message="Почта занята",
form=form))
return res
res = make_response(render_template('createaccount.html',
message="Пароли не совпадают",
form=form))
session.pop("user", None)
return res
res = make_response(render_template('createaccount.html', form=form))
session.pop("user", None)
return res
@app.route('/')
def index():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
us = session.get("user", 0)
db_sess = db_session.create_session()
if us == 0:
return redirect("/login")
else:
register_time()
user = db_sess.query(User).filter(
User.email == us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')[3]).first()
return render_template('main.html', data=' '.join([user.name, user.surname]))
@app.route('/jobs', methods=['GET', 'POST'])
def jobs():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
us = session.get("user", 0)
if us == 0:
return redirect("/login")
register_time()
message = session.get("message_for_job", "")
db_s = db_session.create_session()
current = db_s.query(ServerData).one()
if update_vacs():
j = db_s.query(Jobs).all()
data = []
for_db = []
for elem in j:
ch = random.randint(1, 10)
if ch / 10 <= elem.chance_of_a_job:
stats = random.choice(elem.field_rating_mood_salary.split(', ')).split('-')
b = random.choice(elem.lower_rank_bosses.split(', '))
d = [elem.name, elem.about, elem.boss,
b, stats[0], stats[1], stats[2], stats[3], elem.is_experience_required
]
for_db.append(
f'{str(elem.id)}-{stats[0]}-{stats[1]}-{stats[2]}-{stats[3]}-{b}')
data.append(d)
current.current_jobs = (';'.join(for_db))
db_s.commit()
session.pop("message_for_job", None)
return render_template('jobs.html', data=data, message=message)
else:
data = []
if current.current_jobs:
for elem in current.current_jobs.split(';'):
j = db_s.query(Jobs).filter(Jobs.id == int(elem.split('-')[0])).one()
stats = elem.split('-')[1:6]
d = [j.name, j.about, j.boss, (stats[4]),
stats[0], stats[1], stats[2], stats[3], j.is_experience_required
]
data.append(d)
session.pop("message_for_job", None)
return render_template('jobs.html', data=data, message=message)
@app.route('/get_job', methods=['GET', 'POST'])
def test():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
db_s = db_session.create_session()
current = db_s.query(ServerData).one()
d = request.form.get('data')
d = d.split('"')
company_name = d[-2]
c = db_s.query(Jobs).filter(Jobs.name == company_name).one()
user = session.get("user").split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')
if user[11]:
session["message_for_job"] = 'already'
else:
if update_vacs() is False:
r = user[4]
exp = user[5]
mood = user[7]
else:
r = -1000000
exp = False
mood = -1000000
session["message_for_job"] = '0'
stats = c.field_rating_mood_salary.split('-')
if int(r) >= 0:
if int(r) >= int(stats[1]):
if int(mood) >= int(stats[2]):
if (str(c.is_experience_required) == 'True' and str(exp) == 'True') \
or (str(c.is_experience_required) == 'False'):
field_head = current.current_jobs.split(';')
head = None
field = None
salary = 0
for elem in field_head:
if str(elem.split('-')[0]) == str(c.id):
salary = elem.split('-')[4]
head = elem.split('-')[5]
field = elem.split('-')[1]
userid = int(user[9])
u = db_s.query(User).filter(User.id == userid).one()
company = db_s.query(Jobs).filter(Jobs.id == int(c.id)).one().makes_happier
if u.mood + company <= 100:
u.mood += company
else:
u.mood = 100
u.comp = c.id
u.head = head
u.field = field
u.salary = salary
db_s.commit()
u = db_s.query(User).filter(User.id == userid).one()
company = db_s.query(Jobs).filter(Jobs.id == int(u.comp)).one()
company_n = company.name
data = 'UgandaWillNeverBeChosenAsABioOfSomeoneRight?'.join(
[u.name, u.surname, str(u.age), u.email, str(u.rating),
str(u.experience), str(u.money), str(u.mood), u.bio,
str(u.id), str(u.pfp), company_n])
session["user"] = data
session["message_for_job"] = '1'
else:
session["message_for_job"] = 'отсутсвие опыта'
else:
session["message_for_job"] = 'низкий коэфицент трудоспособности'
else:
session["message_for_job"] = 'низкий рейтинг'
return redirect('/jobs')
@app.route('/work')
def work():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
us = session.get("user", 0)
if us == 0:
return redirect("/login")
register_time()
db_s = db_session.create_session()
us_data = us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')
us_id = us_data[9]
u = db_s.query(User).filter(User.id == int(us_id)).one()
if u.comp:
if u.work_is_done == False:
if not u.work:
field = u.field
first, second, third, fourth = '0', '0', '0', '0'
if field == 'IT':
funcs = [['для вывода в консоль', 'print, print()'], ['для перевода данных в строку', 'str, str()'],
['для перевода данных в целое число', 'int, int()'],
['для перевода данных в число с плавающей запятой', 'float, float()'],
['для присваивания значений', '='], ['для перевода данных в список',
'list, list(), []'],
['для перевода данных в множество', 'set, set()'],
['для перевода данных в словарь', 'dict, dict(), {}'],
['для перевода данных в кортеж', 'tuple, tuple(), ()']]
ran_first = random.randint(1, 10000)
first = f'Чему будет равно число {str(ran_first)} в двоичной системе счисления?'
ans_first = str(format(ran_first, 'b'))
ran_second = random.randint(1, 10000)
second = f'Чему будет равно число {str(ran_second)} в четвертичной системе счисления?'
ans_second = ''.join(str(number_to_base(ran_second, 4))[1:-1].split(', '))
ran_third = random.randint(1, 10000)
third = f'Чему будет равно число {str(ran_third)} в восьмеричной системе счисления?'
ans_third = ''.join(str(number_to_base(ran_third, 8))[1:-1].split(', '))
ran_fourth = random.choice(funcs)
fourth = f'Что служит в Python {ran_fourth[0]}?'
ans_fourth = ran_fourth[1].split(', ')
print(ans_first, ans_second, ans_third, ans_fourth)
f = 'question-answer'.join([first, ans_first])
s = 'question-answer'.join([second, ans_second])
t = 'question-answer'.join([third, ans_third])
ft = 'question-answer'.join([fourth, str(ans_fourth)])
user_work = 'between-tasks'.join([f, s, t, ft])
u.work = user_work
db_s.commit()
session["answers"] = [ans_first, ans_second, ans_third, ans_fourth]
elif field == 'Economics':
ran_first = random.randint(20, 80)
ran_days_first = random.randint(18, 22)
ran_hours_first = random.randint(7, 9)
first = f'Сколько денег в конце месяца, в котором {ran_days_first} рабочих дней,' \
f' получит работник, который работает {ran_hours_first}' \
f' часов в день с зарплатой {ran_first}' \
f' д/ч'
ans_first = ran_first * ran_hours_first * ran_days_first
print(ans_first)
ran_second = random.randint(20, 80)
ran_days_second = random.randint(18, 22)
ran_hours_second = random.randint(7, 9)
second = f'Сколько денег в конце месяца, в котором {ran_days_second} рабочих дней,' \
f' получит работник, который работает {ran_hours_second}' \
f' часов в день с зарплатой {ran_second} д/ч'
ans_second = ran_first * ran_hours_second * ran_days_second
print(ans_second)
ran_third_money = random.choice([5000, 8000, 10000, 6000, 9000, 14000])
ran_third_f = random.choice([2, 4, 8])
ran_third_s = random.choice([2, 4, 8])
third = f'Вам из {ran_third_f} офисов пришло по {ran_third_money} долларов.' \
f' По сколько долларов получит каждый из {ran_third_s} других офисов?'
ans_third = (ran_third_money * ran_third_f) // ran_third_s
print(ans_third)
ran_fourth_money = random.choice([50000, 70000, 80000, 90000, 100000, 110000, 120000, 130000])
ran_fourth_losses = random.choice([60, 70, 80])
fourth = f'Предприятие в среднем зарабатывает {ran_fourth_money} долларов.' \
f' Какова будет чистая прибыль в год, если расходы равны {ran_fourth_losses} процентов?'
ans_fourth = int((ran_fourth_money * 12) * ((100 - ran_fourth_losses) / 100))
print(ans_fourth)
f = 'question-answer'.join([first, str(ans_first)])
s = 'question-answer'.join([second, str(ans_second)])
t = 'question-answer'.join([third, str(ans_third)])
ft = 'question-answer'.join([fourth, str(ans_fourth)])
user_work = 'between-tasks'.join([f, s, t, ft])
u.work = user_work
db_s.commit()
session["answers"] = [ans_first, ans_second, ans_third, ans_fourth]
elif field == 'Engineering':
ran_first_value = random.randint(500, 2500)
ran_first_volume = random.randint(1, 25)
first = f'Чему равна масса тела плотности {ran_first_value} кг/куб. метр и ' \
f'объема {ran_first_volume} куб. метров?'
ans_first = ran_first_value * ran_first_volume
second_voltage = 220
random_second_current = random.choice([5, 10, 11, 22, 44])
second = f'Чему равно сопротивление проводника в сети, напряжение' \
f' в которой равно {second_voltage}' \
f' вольт, а сила тока равна {random_second_current} ампер?'
ans_second = second_voltage // random_second_current
third_random_length = random.randint(5, 30)
third_random_height = random.randint(5, 15)
third_random_radius = random.randint(2, 10)
third = f'Чему равна площадь цилиндра (число пи принять за 3), высота боковой' \
f' стороны которого равна' \
f' {third_random_height} метров, её длина равна {third_random_length} метров,' \
f' а радиус основания равен {third_random_radius} метров?'
ans_third = (third_random_length * third_random_height) + 2 * (3 * (third_random_radius ** 2))
fourth_random_av_speed = random.randint(50, 150)
fourth_random_hours = random.randint(2, 15)
fourth = f'Какой путь пройдёт автомобиль, двигаясь со средней скоростью {fourth_random_av_speed}' \
f' километров в час {fourth_random_hours} часов?'
ans_fourth = fourth_random_av_speed * fourth_random_hours
f = 'question-answer'.join([first, str(ans_first)])
s = 'question-answer'.join([second, str(ans_second)])
t = 'question-answer'.join([third, str(ans_third)])
ft = 'question-answer'.join([fourth, str(ans_fourth)])
user_work = 'between-tasks'.join([f, s, t, ft])
u.work = user_work
db_s.commit()
session["answers"] = [ans_first, ans_second, ans_third, ans_fourth]
else:
tasks = u.work.split('between-tasks')
f = tasks[0]
s = tasks[1]
t = tasks[2]
ft = tasks[3]
first, ans_first = f.split('question-answer')[0], f.split('question-answer')[1]
second, ans_second = s.split('question-answer')[0], s.split('question-answer')[1]
third, ans_third = t.split('question-answer')[0], t.split('question-answer')[1]
fourth, ans_fourth = ft.split('question-answer')[0], ft.split('question-answer')[1]
session["answers"] = [ans_first, ans_second, ans_third, ans_fourth]
return render_template('workwork.html', first=first, second=second, third=third, fourth=fourth)
else:
return render_template('workwork.html', done=True)
else:
return render_template('workwork.html', message='Вы ещё не работаете в какой-либо компании!')
@app.route('/check_work', methods=['GET', 'POST'])
def check_work():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
form_data = request.form
answers = session.get("answers", 0)
us = session.get("user", 0)
if us == 0:
return redirect("/login")
if answers == 0:
return redirect('/work')
us_data = us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')
us_id = us_data[9]
db_sess = db_session.create_session()
user = db_sess.query(User).filter(User.id == int(us_id)).one()
money = 0
rate = -2
max_rate = db_sess.query(Jobs).filter(Jobs.id == int(user.comp)).one().max_rating
salary = int(user.salary)
if user.field == 'IT':
u_first = form_data.get('first')
u_second = form_data.get('second')
u_third = form_data.get('third')
u_fourth = form_data.get('fourth')
print(answers)
ans_first, ans_second, ans_third, ans_fourth = answers
if str(u_first) == ans_first:
print('1 - OK')
money += salary
rate += 1
else:
print('1 - NOT OK')
if str(u_second) == ans_second:
print('2 - OK')
money += salary
rate += 1
else:
print('2 - NOT OK')
if str(u_third) == ans_third:
print('3 - OK')
money += salary
rate += 1
else:
print('3 - NOT OK')
if str(u_fourth) in ans_fourth:
print('4 - OK')
money += salary
rate += 1
else:
print('4 - NOT OK')
elif user.field == 'Economics':
u_first = form_data.get('first')
u_second = form_data.get('second')
u_third = form_data.get('third')
u_fourth = form_data.get('fourth')
ans_first, ans_second, ans_third, ans_fourth = answers
if str(u_first) == str(ans_first):
print('1 - OK')
money += salary
rate += 1
else:
print('1 - NOT OK')
if str(u_second) == str(ans_second):
print('2 - OK')
money += salary
rate += 1
else:
print('2 - NOT OK')
if str(u_third) == str(ans_third):
print('3 - OK')
money += salary
rate += 1
else:
print('3 - NOT OK')
if str(u_fourth) == str(ans_fourth):
print('4 - OK')
money += salary
rate += 1
else:
print('4 - NOT OK')
else:
u_first = form_data.get('first')
u_second = form_data.get('second')
u_third = form_data.get('third')
u_fourth = form_data.get('fourth')
ans_first, ans_second, ans_third, ans_fourth = answers
if str(u_first) == str(ans_first):
print('1 - OK')
money += salary
rate += 1
else:
print('1 - NOT OK')
if str(u_second) == str(ans_second):
print('2 - OK')
money += salary
rate += 1
else:
print('2 - NOT OK')
if str(u_third) == str(ans_third):
print('3 - OK')
money += salary
rate += 1
else:
print('3 - NOT OK')
if str(u_fourth) == str(ans_fourth):
print('4 - OK')
money += salary
rate += 1
else:
print('4 - NOT OK')
user.work = None
user.work_is_done = True
user.money += money
if user.rating + rate >= max_rate:
user.rating = max_rate
elif user.rating + rate < 0:
user.rating = 0
else:
user.rating += rate
db_sess.commit()
u = db_sess.query(User).filter(User.id == int(us_id)).one()
company = db_sess.query(Jobs).filter(Jobs.id == int(u.comp)).one().name
data = 'UgandaWillNeverBeChosenAsABioOfSomeoneRight?'.join(
[u.name, u.surname, str(u.age), u.email, str(u.rating),
str(u.experience), str(u.money), str(u.mood), u.bio,
str(u.id), str(u.pfp), company])
session["user"] = data
return redirect('/work')
@app.route('/company')
def company_info():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
us = session.get("user", 0)
if us == 0:
return redirect("/login")
register_time()
update_vacs()
db_s = db_session.create_session()
user = us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')
company_name = user[11]
if company_name:
company = db_s.query(Jobs).filter(Jobs.name == company_name).one()
j = []
for elem in company.field_rating_mood_salary.split(', '):
j.append(elem.split('-')[0])
j = ', '.join(j)
more_user = db_s.query(User).filter(User.id == int(user[9])).one()
company_data = [company.name, company.boss, company.lower_rank_bosses, j, company.more_about,
more_user.head, more_user.field]
return render_template('company.html', data=company_data)
else:
return render_template('company.html')
@app.route('/resign', methods=['GET', 'POST'])
def resign():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
us = session.get("user", 0)
if us == 0:
return redirect("/login")
form = ConfirmPassword()
if form.is_submitted():
if form.password.data == form.check_password.data:
s = db_session.create_session()
userid = us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')[9]
com = s.query(Jobs).filter(
Jobs.name == (us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')[11])).one().makes_sadder
usdata = s.query(User).filter(User.id == userid).one()
if usdata.mood - int(com) >= 0:
usdata.mood -= int(com)
else:
usdata.mood = 0
usdata.comp = None
usdata.head = None
usdata.field = None
usdata.comp = None
usdata.head = None
usdata.field = None
usdata.work_is_done = 0
s.commit()
u = s.query(User).filter(User.id == userid).one()
data = 'UgandaWillNeverBeChosenAsABioOfSomeoneRight?'.join(
[u.name, u.surname, str(u.age), u.email, str(u.rating),
str(u.experience), str(u.money), str(u.mood), u.bio,
str(u.id), str(u.pfp), ''])
session["user"] = data
return redirect("/")
return render_template('confirm_password.html', form=form,
message='Пароли не совпадают!')
return render_template('confirm_password.html', form=form)
@app.route('/user')
def user_data():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
us = session.get("user", 0)
if us == 0:
return redirect("/login")
update_vacs()
register_time()
return render_template('user_data.html', data=us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?'))
@app.route('/user_change', methods=['GET', 'POST'])
def user_data_change():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
form = ChangeData()
us = session.get("user", 0)
if us == 0:
return redirect("/login")
if form.is_submitted():
db_sess = db_session.create_session()
if db_sess.query(User).filter(User.id == us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')[9]).all != []:
if us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')[3] == form.email.data or \
db_sess.query(User).filter(User.email == form.email.data).all() == []:
user = db_sess.query(User).filter(
User.id == us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')[9]).one()
user.name = form.name.data
user.surname = form.surname.data
user.age = form.age.data
user.email = form.email.data
user.bio = form.bio.data
db_sess.commit()
user = db_sess.query(User).filter(
User.id == us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?')[9]).one()
if user.comp:
company = db_sess.query(Jobs).filter(Jobs.id == int(user.comp)).one().name
else:
company = ''
data = 'UgandaWillNeverBeChosenAsABioOfSomeoneRight?'.join(
[user.name, user.surname, str(user.age), user.email, str(user.rating),
str(user.experience), str(user.money), str(user.mood), user.bio,
str(user.id), str(user.pfp), company])
session["user"] = data
return redirect('/user')
return render_template('user_data_change.html', data=us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?'),
form=form,
message='Почта уже занята')
return render_template('user_data_change.html', data=us.split('UgandaWillNeverBeChosenAsABioOfSomeoneRight?'),
form=form)
@app.route('/forgot', methods=['GET', 'POST'])
def forgot():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
form = ForgotPassword()
if form.is_submitted():
s = db_session.create_session()
u = s.query(User).filter(User.email == form.email.data,
User.name == form.name.data,
User.surname == form.surname.data,
User.codeword == form.codeword.data).all()
if len(u) == 1:
session["change_password"] = u[0].id
return redirect('/change_password')
return render_template('forgotpassword.html', form=form,
message='Неверные данные!')
return render_template('forgotpassword.html', form=form)
@app.route('/change_password', methods=['GET', 'POST'])
def change_password():
db_session.global_init("/home/D4M4ggE/YandexWebProject/db/top_secret.db")
u = session.get("change_password", 0)
if u == 0:
return redirect("/login")
form = ChangePassword()
if form.is_submitted():
if form.password.data == form.check_password.data:
s = db_session.create_session()
user = s.query(User).filter(User.id == u).one()
if form.password.data == user.hashed_password:
return render_template('changepassword.html', form=form,
message='Нельзя использовать'
' предыдущий пароль!')
user.hashed_password = str(form.password.data)
s.commit()
return redirect("/")
return render_template('changepassword.html', form=form,
message='Пароли не совпадают!')
return render_template('changepassword.html', form=form)
| 45.752822
| 120
| 0.543331
| 4,693
| 40,537
| 4.519071
| 0.08502
| 0.026405
| 0.02037
| 0.018814
| 0.789608
| 0.762637
| 0.740428
| 0.727603
| 0.700726
| 0.691626
| 0
| 0.021555
| 0.333917
| 40,537
| 886
| 121
| 45.752822
| 0.763898
| 0.000839
| 0
| 0.66005
| 0
| 0.001241
| 0.199175
| 0.05617
| 0
| 0
| 0
| 0
| 0
| 1
| 0.022333
| false
| 0.031017
| 0.023573
| 0
| 0.102978
| 0.047146
| 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
|
19ee6701254ce7100f7b06582bf46048cd4a7dcb
| 60
|
py
|
Python
|
smlcs/predict/__init__.py
|
AnandBhatUpb/smlcs-final-submission
|
54d810d2ed1dc5907973ce55d93d318bec0d4011
|
[
"Apache-2.0"
] | null | null | null |
smlcs/predict/__init__.py
|
AnandBhatUpb/smlcs-final-submission
|
54d810d2ed1dc5907973ce55d93d318bec0d4011
|
[
"Apache-2.0"
] | null | null | null |
smlcs/predict/__init__.py
|
AnandBhatUpb/smlcs-final-submission
|
54d810d2ed1dc5907973ce55d93d318bec0d4011
|
[
"Apache-2.0"
] | null | null | null |
from .launch import Launch
from .predictor import Predictor
| 20
| 32
| 0.833333
| 8
| 60
| 6.25
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 60
| 2
| 33
| 30
| 0.961538
| 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
|
c21d1fa0d79cc68b193ecb1f75f5c0fe57f9f2ab
| 59
|
py
|
Python
|
nn/conv/__init__.py
|
knielbo/kartina
|
bd029aabb014c5402fa4afd1e840b0a6a4907467
|
[
"MIT"
] | null | null | null |
nn/conv/__init__.py
|
knielbo/kartina
|
bd029aabb014c5402fa4afd1e840b0a6a4907467
|
[
"MIT"
] | null | null | null |
nn/conv/__init__.py
|
knielbo/kartina
|
bd029aabb014c5402fa4afd1e840b0a6a4907467
|
[
"MIT"
] | 1
|
2020-09-24T13:39:46.000Z
|
2020-09-24T13:39:46.000Z
|
from .shallownet import ShallowNet
from .lenet import LeNet
| 29.5
| 34
| 0.847458
| 8
| 59
| 6.25
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118644
| 59
| 2
| 35
| 29.5
| 0.961538
| 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
|
c232732dc7c7687210fc53cb6781bd2e7bacc2c9
| 45
|
py
|
Python
|
BotErrors/RepeatedKeywordError.py
|
juanamari94/FlaqueadorV2Bot
|
21f1b473df0687190c3e9bf394152be35a64aa45
|
[
"MIT"
] | null | null | null |
BotErrors/RepeatedKeywordError.py
|
juanamari94/FlaqueadorV2Bot
|
21f1b473df0687190c3e9bf394152be35a64aa45
|
[
"MIT"
] | null | null | null |
BotErrors/RepeatedKeywordError.py
|
juanamari94/FlaqueadorV2Bot
|
21f1b473df0687190c3e9bf394152be35a64aa45
|
[
"MIT"
] | null | null | null |
class RepeatedKeywordError(Exception):
pass
| 15
| 38
| 0.844444
| 4
| 45
| 9.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088889
| 45
| 2
| 39
| 22.5
| 0.926829
| 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
|
c2400f19a26299451643d99fabcf7ecff2439ce9
| 48
|
py
|
Python
|
3.1homework/py03.py
|
beautyShang/learn-python
|
ee133ba4b81281f5b69a96010c540efc711af289
|
[
"Apache-2.0"
] | null | null | null |
3.1homework/py03.py
|
beautyShang/learn-python
|
ee133ba4b81281f5b69a96010c540efc711af289
|
[
"Apache-2.0"
] | null | null | null |
3.1homework/py03.py
|
beautyShang/learn-python
|
ee133ba4b81281f5b69a96010c540efc711af289
|
[
"Apache-2.0"
] | null | null | null |
r = 5
pi = 3.14159
print(round(r ** 2 * pi, 2))
| 12
| 28
| 0.520833
| 11
| 48
| 2.272727
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0.25
| 48
| 3
| 29
| 16
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 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
|
a02913318e09bfe75d79550e91a26184879bee3a
| 570
|
py
|
Python
|
test/dml_decision_tree/decision_tree_discrete.py
|
Edelweiss35/deep-machine-learning
|
b1e4b133609f303be77de824601925f448a94764
|
[
"WTFPL"
] | 708
|
2015-01-07T20:17:58.000Z
|
2022-03-07T02:30:42.000Z
|
test/dml_decision_tree/decision_tree_discrete.py
|
Edelweiss35/deep-machine-learning
|
b1e4b133609f303be77de824601925f448a94764
|
[
"WTFPL"
] | 2
|
2016-12-15T03:15:57.000Z
|
2021-06-16T01:25:13.000Z
|
test/dml_decision_tree/decision_tree_discrete.py
|
Edelweiss35/deep-machine-learning
|
b1e4b133609f303be77de824601925f448a94764
|
[
"WTFPL"
] | 333
|
2015-01-09T06:51:46.000Z
|
2022-01-16T08:49:58.000Z
|
from __future__ import division
import numpy as np
import scipy as sp
from dml.DT import DTC
X=np.array([
[0,0,0,0,8],
[0,0,0,1,3.5],
[0,1,0,1,3.5],
[0,1,1,0,3.5],
[0,0,0,0,3.5],
[1,0,0,0,3.5],
[1,0,0,1,3.5],
[1,1,1,1,2],
[1,0,1,2,3.5],
[1,0,1,2,3.5],
[2,0,1,2,3.5],
[2,0,1,1,3.5],
[2,1,0,1,3.5],
[2,1,0,2,3.5],
[2,0,0,0,10],
]).transpose()
y=np.array([
[1],
[-1],
[1],
[1],
[-1],
[-1],
[-1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
[1],
]).transpose()
prop=np.zeros((5,1))
prop[4]=1
a=DTC(X,y,prop)
a.train()
print a.pred(np.array([[0,0,0,0,3.0],[2,1,0,1,2]]).transpose())
| 12.666667
| 63
| 0.5
| 159
| 570
| 1.767296
| 0.188679
| 0.135231
| 0.160142
| 0.185053
| 0.402135
| 0.341637
| 0.153025
| 0.153025
| 0.053381
| 0.053381
| 0
| 0.230019
| 0.1
| 570
| 44
| 64
| 12.954545
| 0.317739
| 0
| 0
| 0.44186
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.093023
| null | null | 0.023256
| 0
| 0
| 1
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a03fd586b2e58e597552acf263d62ff20ccb626b
| 123
|
py
|
Python
|
poco/utils/measurement.py
|
HBoPRC/Poco
|
c8b0dc5362db45ff7a8397eebb0c52d9047f4b67
|
[
"Apache-2.0"
] | 1,444
|
2018-01-24T03:27:52.000Z
|
2022-03-31T07:40:57.000Z
|
poco/utils/measurement.py
|
HBoPRC/Poco
|
c8b0dc5362db45ff7a8397eebb0c52d9047f4b67
|
[
"Apache-2.0"
] | 524
|
2018-03-14T01:08:06.000Z
|
2022-03-31T08:21:52.000Z
|
poco/utils/measurement.py
|
HBoPRC/Poco
|
c8b0dc5362db45ff7a8397eebb0c52d9047f4b67
|
[
"Apache-2.0"
] | 268
|
2018-01-25T03:58:33.000Z
|
2022-03-24T08:18:59.000Z
|
# coding=utf-8
def point_inside(p, bounds):
return bounds[3] <= p[0] <= bounds[1] and bounds[0] <= p[1] <= bounds[2]
| 20.5
| 76
| 0.593496
| 22
| 123
| 3.272727
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.07
| 0.186992
| 123
| 5
| 77
| 24.6
| 0.65
| 0.097561
| 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
|
a098269bb6f0c69aafa1fd9eac90a8abffed1bc8
| 138
|
py
|
Python
|
Module 1/Chapter 9/influencer_frnd.py
|
PacktPublishing/Natural-Language-Processing-Python-and-NLTK
|
bb7fd9a3071b4247d13accfbf0a48eefec76e925
|
[
"MIT"
] | 50
|
2016-12-11T13:49:01.000Z
|
2022-03-20T19:47:55.000Z
|
Module 1/Chapter 9/influencer_frnd.py
|
PacktPublishing/Natural-Language-Processing-Python-and-NLTK
|
bb7fd9a3071b4247d13accfbf0a48eefec76e925
|
[
"MIT"
] | null | null | null |
Module 1/Chapter 9/influencer_frnd.py
|
PacktPublishing/Natural-Language-Processing-Python-and-NLTK
|
bb7fd9a3071b4247d13accfbf0a48eefec76e925
|
[
"MIT"
] | 40
|
2017-06-14T14:02:48.000Z
|
2021-10-14T06:25:00.000Z
|
friends = fb.get_connections("me", "friends")["data"]
print friends
for frd in friends:
print fb.get_connections(frd["id"],"friends")
| 27.6
| 53
| 0.710145
| 20
| 138
| 4.8
| 0.55
| 0.104167
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115942
| 138
| 4
| 54
| 34.5
| 0.786885
| 0
| 0
| 0
| 0
| 0
| 0.15942
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.5
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
cd3a3c65cacba84374723daa20a1ffebbf166bbe
| 1,148
|
py
|
Python
|
sdk/python/pulumi_sonarqube/config/vars.py
|
jshield/pulumi-sonarqube
|
53664a97903af3ecdf4f613117d83d0acae8e53e
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_sonarqube/config/vars.py
|
jshield/pulumi-sonarqube
|
53664a97903af3ecdf4f613117d83d0acae8e53e
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_sonarqube/config/vars.py
|
jshield/pulumi-sonarqube
|
53664a97903af3ecdf4f613117d83d0acae8e53e
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
import types
__config__ = pulumi.Config('sonarqube')
class _ExportableConfig(types.ModuleType):
@property
def host(self) -> Optional[str]:
return __config__.get('host')
@property
def installed_version(self) -> Optional[str]:
return __config__.get('installedVersion')
@property
def pass_(self) -> Optional[str]:
return __config__.get('pass')
@property
def tls_insecure_skip_verify(self) -> Optional[bool]:
"""
Allows ignoring insecure certificates when set to true. Defaults to false. Disabling TLS verification is dangerous and
should only be done for local testing.
"""
return __config__.get_bool('tlsInsecureSkipVerify')
@property
def user(self) -> Optional[str]:
return __config__.get('user')
| 28
| 126
| 0.689024
| 138
| 1,148
| 5.5
| 0.608696
| 0.072464
| 0.098814
| 0.110672
| 0.158103
| 0.158103
| 0
| 0
| 0
| 0
| 0
| 0.001105
| 0.211672
| 1,148
| 40
| 127
| 28.7
| 0.837569
| 0.292683
| 0
| 0.217391
| 1
| 0
| 0.074646
| 0.027027
| 0
| 0
| 0
| 0
| 0
| 1
| 0.217391
| false
| 0.086957
| 0.26087
| 0.173913
| 0.73913
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.