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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cb680ad6e0b262b8717c1706e9263031d22ee2a9 | 131 | py | Python | shop/admin.py | kni5ht/tech-shop | b42f0aff26ee2c99511bc80fb3e995c4b7a28bae | [
"MIT"
] | null | null | null | shop/admin.py | kni5ht/tech-shop | b42f0aff26ee2c99511bc80fb3e995c4b7a28bae | [
"MIT"
] | null | null | null | shop/admin.py | kni5ht/tech-shop | b42f0aff26ee2c99511bc80fb3e995c4b7a28bae | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Sub_Category
# Register your models here.
admin.site.register(Sub_Category)
| 18.714286 | 33 | 0.816794 | 19 | 131 | 5.526316 | 0.631579 | 0.209524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.122137 | 131 | 6 | 34 | 21.833333 | 0.913043 | 0.198473 | 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 | 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 |
cb7ea55b9199c2b891658fe4053aae99565d406a | 186 | py | Python | GPyOpt/objective_examples/__init__.py | zhenwendai/GPyOpt | fd96875e7ec0cb0f78014d96813ece400648827d | [
"BSD-3-Clause"
] | 850 | 2015-05-31T21:12:41.000Z | 2022-03-24T17:25:37.000Z | GPyOpt/objective_examples/__init__.py | lakshaykc/GPyOpt | 097ba66e81c7e22b5bf9fdbe64fd135753bc4a67 | [
"BSD-3-Clause"
] | 340 | 2015-09-10T14:08:06.000Z | 2022-03-28T20:35:26.000Z | GPyOpt/objective_examples/__init__.py | lakshaykc/GPyOpt | 097ba66e81c7e22b5bf9fdbe64fd135753bc4a67 | [
"BSD-3-Clause"
] | 299 | 2015-07-30T13:18:37.000Z | 2022-03-22T21:27:31.000Z | # Copyright (c) 2016, the GPyOpt Authors
# Licensed under the BSD 3-clause license (see LICENSE.txt)
from . import experiments1d
from . import experiments2d
from . import experimentsNd
| 26.571429 | 59 | 0.77957 | 25 | 186 | 5.8 | 0.76 | 0.206897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.044586 | 0.155914 | 186 | 6 | 60 | 31 | 0.878981 | 0.516129 | 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 |
cbd68bb5d2bd36f3dde1f3ef94306bc3c4f055eb | 50 | py | Python | optimizer/__init__.py | sdamadi/image-classification | 2f38dc3c64c733f1ce820d09fe9d5f6dbf988f97 | [
"MIT"
] | 3 | 2021-12-13T13:05:58.000Z | 2022-03-23T09:14:13.000Z | optimizer/__init__.py | sdamadi/image-classification | 2f38dc3c64c733f1ce820d09fe9d5f6dbf988f97 | [
"MIT"
] | null | null | null | optimizer/__init__.py | sdamadi/image-classification | 2f38dc3c64c733f1ce820d09fe9d5f6dbf988f97 | [
"MIT"
] | 1 | 2021-12-31T04:00:45.000Z | 2021-12-31T04:00:45.000Z | from .CustomSGD import *
from .CustomAdam import * | 25 | 25 | 0.78 | 6 | 50 | 6.5 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.14 | 50 | 2 | 25 | 25 | 0.906977 | 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 |
3848f32e9c13d3fbe513fcffe56753cdae64191f | 186 | py | Python | efficientnet_lite/preprocessing_layer.py | waterviewsrl/efficientnet-lite-keras | 9e6c18ff843f79c6d3da3123e7864458be0ae8ab | [
"Apache-2.0"
] | null | null | null | efficientnet_lite/preprocessing_layer.py | waterviewsrl/efficientnet-lite-keras | 9e6c18ff843f79c6d3da3123e7864458be0ae8ab | [
"Apache-2.0"
] | null | null | null | efficientnet_lite/preprocessing_layer.py | waterviewsrl/efficientnet-lite-keras | 9e6c18ff843f79c6d3da3123e7864458be0ae8ab | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
def get_preprocessing_layer():
"""Return preprocessing layer for EfficientNet Lite variants."""
def f(x):
return (x/127.5) - 1.0
return f
| 16.909091 | 68 | 0.655914 | 26 | 186 | 4.615385 | 0.730769 | 0.3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.042553 | 0.241935 | 186 | 10 | 69 | 18.6 | 0.808511 | 0.311828 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0.2 | 0.2 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
384c0f0408968c7d5d1a04003090ab533488c67d | 225 | py | Python | liquidb/settings.py | Gusakovskiy/django-liquidb | 034d427c1bf6dca0ab73c964bfced4e2a4d9c6ca | [
"BSD-3-Clause"
] | 11 | 2021-03-26T12:40:38.000Z | 2022-02-06T00:59:16.000Z | liquidb/settings.py | Gusakovskiy/django-liquidb | 034d427c1bf6dca0ab73c964bfced4e2a4d9c6ca | [
"BSD-3-Clause"
] | null | null | null | liquidb/settings.py | Gusakovskiy/django-liquidb | 034d427c1bf6dca0ab73c964bfced4e2a4d9c6ca | [
"BSD-3-Clause"
] | 1 | 2022-01-30T23:09:15.000Z | 2022-01-30T23:09:15.000Z | import os
from django.conf import settings
ADMIN_SNAPSHOT_ACTIONS = os.environ.get("ADMIN_SNAPSHOT_ACTIONS")
if ADMIN_SNAPSHOT_ACTIONS is None:
ADMIN_SNAPSHOT_ACTIONS = getattr(settings, "ADMIN_SNAPSHOT_ACTIONS", True)
| 28.125 | 78 | 0.822222 | 31 | 225 | 5.645161 | 0.516129 | 0.371429 | 0.571429 | 0.32 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.106667 | 225 | 7 | 79 | 32.142857 | 0.870647 | 0 | 0 | 0 | 0 | 0 | 0.195556 | 0.195556 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 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 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
698aa6d567b3d7e995ab5511e227a97ba2c98875 | 242 | py | Python | essays/admin.py | janzaheer/tarot_juicer | bec9d81ea1a9ebc3cac57ed681779c7890979fe6 | [
"MIT"
] | null | null | null | essays/admin.py | janzaheer/tarot_juicer | bec9d81ea1a9ebc3cac57ed681779c7890979fe6 | [
"MIT"
] | null | null | null | essays/admin.py | janzaheer/tarot_juicer | bec9d81ea1a9ebc3cac57ed681779c7890979fe6 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import EssayArticle, CuratedSlashdot, CuratedWatchtower
# Register your models here.
admin.site.register(EssayArticle)
admin.site.register(CuratedSlashdot)
admin.site.register(CuratedWatchtower)
| 30.25 | 68 | 0.847107 | 27 | 242 | 7.592593 | 0.481481 | 0.131707 | 0.24878 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.078512 | 242 | 7 | 69 | 34.571429 | 0.919283 | 0.107438 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
69d08ad63a892012a0c7541816260846edd721a1 | 65 | py | Python | server/__init__.py | daliasen/LED-Cube | 3959ee5caf86c1497ac22231d87a8009bed5b3e8 | [
"BSD-3-Clause"
] | 4 | 2018-08-19T09:16:40.000Z | 2020-01-27T13:18:19.000Z | server/__init__.py | daliasen/LED-Cube | 3959ee5caf86c1497ac22231d87a8009bed5b3e8 | [
"BSD-3-Clause"
] | null | null | null | server/__init__.py | daliasen/LED-Cube | 3959ee5caf86c1497ac22231d87a8009bed5b3e8 | [
"BSD-3-Clause"
] | 3 | 2018-08-09T13:30:29.000Z | 2020-01-26T16:19:23.000Z | from .server import *
from .controller import Output, FileOutput
| 21.666667 | 42 | 0.8 | 8 | 65 | 6.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.138462 | 65 | 2 | 43 | 32.5 | 0.928571 | 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 |
0e0d42a26cbaf6b03f0647590969d7697315fb89 | 87 | py | Python | utility/str2mugi.py | hvze/Mugi | a12662a627c5de777132c386e9d60688bf3dd199 | [
"MIT"
] | 1 | 2018-03-16T18:01:38.000Z | 2018-03-16T18:01:38.000Z | utility/str2mugi.py | hvze/Mugi | a12662a627c5de777132c386e9d60688bf3dd199 | [
"MIT"
] | null | null | null | utility/str2mugi.py | hvze/Mugi | a12662a627c5de777132c386e9d60688bf3dd199 | [
"MIT"
] | null | null | null | import sys
print(''.join(map(lambda x: ('p' * ord(x)) + 'or', ' '.join(sys.argv[1:])))) | 43.5 | 76 | 0.54023 | 15 | 87 | 3.133333 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012987 | 0.114943 | 87 | 2 | 76 | 43.5 | 0.597403 | 0 | 0 | 0 | 0 | 0 | 0.045455 | 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 |
3867e4c807f648e32e373b83320dea4c455d8509 | 50 | py | Python | holobot/extensions/reminders/database/__init__.py | rexor12/holobot | 89b7b416403d13ccfeee117ef942426b08d3651d | [
"MIT"
] | 1 | 2021-05-24T00:17:46.000Z | 2021-05-24T00:17:46.000Z | holobot/extensions/reminders/database/__init__.py | rexor12/holobot | 89b7b416403d13ccfeee117ef942426b08d3651d | [
"MIT"
] | 41 | 2021-03-24T22:50:09.000Z | 2021-12-17T12:15:13.000Z | holobot/extensions/reminders/database/__init__.py | rexor12/holobot | 89b7b416403d13ccfeee117ef942426b08d3651d | [
"MIT"
] | null | null | null | from .reminder_migration import ReminderMigration
| 25 | 49 | 0.9 | 5 | 50 | 8.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08 | 50 | 1 | 50 | 50 | 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 |
3880d34eece5c1aa75e4ffd74f09e0026f8007cb | 16,895 | py | Python | dilation_net.py | DavideA/dilation-keras | 879b523cbb9fae73b6e65277e497ce1f71de10f8 | [
"MIT"
] | 85 | 2017-02-27T10:57:17.000Z | 2021-11-21T03:58:08.000Z | dilation_net.py | DavideA/dilation-keras | 879b523cbb9fae73b6e65277e497ce1f71de10f8 | [
"MIT"
] | 4 | 2017-03-06T13:01:19.000Z | 2019-09-11T17:36:19.000Z | dilation_net.py | DavideA/dilation-keras | 879b523cbb9fae73b6e65277e497ce1f71de10f8 | [
"MIT"
] | 21 | 2017-02-27T10:56:18.000Z | 2020-12-02T07:47:26.000Z | import warnings
from keras import backend as K
from keras.models import Model
from keras.layers import Convolution2D, MaxPooling2D, Input, AtrousConvolution2D
from keras.layers import Dropout, UpSampling2D, ZeroPadding2D
from keras.utils.layer_utils import convert_all_kernels_in_model
from keras.utils.data_utils import get_file
from datasets import CONFIG
from utils import softmax
# CITYSCAPES MODEL
def get_dilation_model_cityscapes(input_shape, apply_softmax, input_tensor, classes):
if input_tensor is None:
model_in = Input(shape=input_shape)
else:
if not K.is_keras_tensor(input_tensor):
model_in = Input(tensor=input_tensor, shape=input_shape)
else:
model_in = input_tensor
h = Convolution2D(64, 3, 3, activation='relu', name='conv1_1')(model_in)
h = Convolution2D(64, 3, 3, activation='relu', name='conv1_2')(h)
h = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), name='pool1')(h)
h = Convolution2D(128, 3, 3, activation='relu', name='conv2_1')(h)
h = Convolution2D(128, 3, 3, activation='relu', name='conv2_2')(h)
h = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), name='pool2')(h)
h = Convolution2D(256, 3, 3, activation='relu', name='conv3_1')(h)
h = Convolution2D(256, 3, 3, activation='relu', name='conv3_2')(h)
h = Convolution2D(256, 3, 3, activation='relu', name='conv3_3')(h)
h = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), name='pool3')(h)
h = Convolution2D(512, 3, 3, activation='relu', name='conv4_1')(h)
h = Convolution2D(512, 3, 3, activation='relu', name='conv4_2')(h)
h = Convolution2D(512, 3, 3, activation='relu', name='conv4_3')(h)
h = AtrousConvolution2D(512, 3, 3, atrous_rate=(2, 2), activation='relu', name='conv5_1')(h)
h = AtrousConvolution2D(512, 3, 3, atrous_rate=(2, 2), activation='relu', name='conv5_2')(h)
h = AtrousConvolution2D(512, 3, 3, atrous_rate=(2, 2), activation='relu', name='conv5_3')(h)
h = AtrousConvolution2D(4096, 7, 7, atrous_rate=(4, 4), activation='relu', name='fc6')(h)
h = Dropout(0.5, name='drop6')(h)
h = Convolution2D(4096, 1, 1, activation='relu', name='fc7')(h)
h = Dropout(0.5, name='drop7')(h)
h = Convolution2D(classes, 1, 1, name='final')(h)
h = ZeroPadding2D(padding=(1, 1))(h)
h = Convolution2D(classes, 3, 3, activation='relu', name='ctx_conv1_1')(h)
h = ZeroPadding2D(padding=(1, 1))(h)
h = Convolution2D(classes, 3, 3, activation='relu', name='ctx_conv1_2')(h)
h = ZeroPadding2D(padding=(2, 2))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(2, 2), activation='relu', name='ctx_conv2_1')(h)
h = ZeroPadding2D(padding=(4, 4))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(4, 4), activation='relu', name='ctx_conv3_1')(h)
h = ZeroPadding2D(padding=(8, 8))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(8, 8), activation='relu', name='ctx_conv4_1')(h)
h = ZeroPadding2D(padding=(16, 16))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(16, 16), activation='relu', name='ctx_conv5_1')(h)
h = ZeroPadding2D(padding=(32, 32))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(32, 32), activation='relu', name='ctx_conv6_1')(h)
h = ZeroPadding2D(padding=(64, 64))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(64, 64), activation='relu', name='ctx_conv7_1')(h)
h = ZeroPadding2D(padding=(1, 1))(h)
h = Convolution2D(classes, 3, 3, activation='relu', name='ctx_fc1')(h)
h = Convolution2D(classes, 1, 1, name='ctx_final')(h)
# the following two layers pretend to be a Deconvolution with grouping layer.
# never managed to implement it in Keras
# since it's just a gaussian upsampling trainable=False is recommended
h = UpSampling2D(size=(8, 8))(h)
logits = Convolution2D(classes, 16, 16, border_mode='same', bias=False, trainable=False, name='ctx_upsample')(h)
if apply_softmax:
model_out = softmax(logits)
else:
model_out = logits
model = Model(input=model_in, output=model_out, name='dilation_cityscapes')
return model
# PASCAL VOC MODEL
def get_dilation_model_voc(input_shape, apply_softmax, input_tensor, classes):
if input_tensor is None:
model_in = Input(shape=input_shape)
else:
if not K.is_keras_tensor(input_tensor):
model_in = Input(tensor=input_tensor, shape=input_shape)
else:
model_in = input_tensor
h = Convolution2D(64, 3, 3, activation='relu', name='conv1_1')(model_in)
h = Convolution2D(64, 3, 3, activation='relu', name='conv1_2')(h)
h = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), name='pool1')(h)
h = Convolution2D(128, 3, 3, activation='relu', name='conv2_1')(h)
h = Convolution2D(128, 3, 3, activation='relu', name='conv2_2')(h)
h = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), name='pool2')(h)
h = Convolution2D(256, 3, 3, activation='relu', name='conv3_1')(h)
h = Convolution2D(256, 3, 3, activation='relu', name='conv3_2')(h)
h = Convolution2D(256, 3, 3, activation='relu', name='conv3_3')(h)
h = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), name='pool3')(h)
h = Convolution2D(512, 3, 3, activation='relu', name='conv4_1')(h)
h = Convolution2D(512, 3, 3, activation='relu', name='conv4_2')(h)
h = Convolution2D(512, 3, 3, activation='relu', name='conv4_3')(h)
h = AtrousConvolution2D(512, 3, 3, atrous_rate=(2, 2), activation='relu', name='conv5_1')(h)
h = AtrousConvolution2D(512, 3, 3, atrous_rate=(2, 2), activation='relu', name='conv5_2')(h)
h = AtrousConvolution2D(512, 3, 3, atrous_rate=(2, 2), activation='relu', name='conv5_3')(h)
h = AtrousConvolution2D(4096, 7, 7, atrous_rate=(4, 4), activation='relu', name='fc6')(h)
h = Dropout(0.5, name='drop6')(h)
h = Convolution2D(4096, 1, 1, activation='relu', name='fc7')(h)
h = Dropout(0.5, name='drop7')(h)
h = Convolution2D(classes, 1, 1, activation='relu', name='fc-final')(h)
h = ZeroPadding2D(padding=(33, 33))(h)
h = Convolution2D(2 * classes, 3, 3, activation='relu', name='ct_conv1_1')(h)
h = Convolution2D(2 * classes, 3, 3, activation='relu', name='ct_conv1_2')(h)
h = AtrousConvolution2D(4 * classes, 3, 3, atrous_rate=(2, 2), activation='relu', name='ct_conv2_1')(h)
h = AtrousConvolution2D(8 * classes, 3, 3, atrous_rate=(4, 4), activation='relu', name='ct_conv3_1')(h)
h = AtrousConvolution2D(16 * classes, 3, 3, atrous_rate=(8, 8), activation='relu', name='ct_conv4_1')(h)
h = AtrousConvolution2D(32 * classes, 3, 3, atrous_rate=(16, 16), activation='relu', name='ct_conv5_1')(h)
h = Convolution2D(32 * classes, 3, 3, activation='relu', name='ct_fc1')(h)
logits = Convolution2D(classes, 1, 1, name='ct_final')(h)
if apply_softmax:
model_out = softmax(logits)
else:
model_out = logits
model = Model(input=model_in, output=model_out, name='dilation_voc12')
return model
# KITTI MODEL
def get_dilation_model_kitti(input_shape, apply_softmax, input_tensor, classes):
if input_tensor is None:
model_in = Input(shape=input_shape)
else:
if not K.is_keras_tensor(input_tensor):
model_in = Input(tensor=input_tensor, shape=input_shape)
else:
model_in = input_tensor
h = Convolution2D(64, 3, 3, activation='relu', name='conv1_1')(model_in)
h = Convolution2D(64, 3, 3, activation='relu', name='conv1_2')(h)
h = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), name='pool1')(h)
h = Convolution2D(128, 3, 3, activation='relu', name='conv2_1')(h)
h = Convolution2D(128, 3, 3, activation='relu', name='conv2_2')(h)
h = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), name='pool2')(h)
h = Convolution2D(256, 3, 3, activation='relu', name='conv3_1')(h)
h = Convolution2D(256, 3, 3, activation='relu', name='conv3_2')(h)
h = Convolution2D(256, 3, 3, activation='relu', name='conv3_3')(h)
h = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), name='pool3')(h)
h = Convolution2D(512, 3, 3, activation='relu', name='conv4_1')(h)
h = Convolution2D(512, 3, 3, activation='relu', name='conv4_2')(h)
h = Convolution2D(512, 3, 3, activation='relu', name='conv4_3')(h)
h = AtrousConvolution2D(512, 3, 3, atrous_rate=(2, 2), activation='relu', name='conv5_1')(h)
h = AtrousConvolution2D(512, 3, 3, atrous_rate=(2, 2), activation='relu', name='conv5_2')(h)
h = AtrousConvolution2D(512, 3, 3, atrous_rate=(2, 2), activation='relu', name='conv5_3')(h)
h = AtrousConvolution2D(4096, 7, 7, atrous_rate=(4, 4), activation='relu', name='fc6')(h)
h = Dropout(0.5, name='drop6')(h)
h = Convolution2D(4096, 1, 1, activation='relu', name='fc7')(h)
h = Dropout(0.5, name='drop7')(h)
h = Convolution2D(classes, 1, 1, name='final')(h)
h = ZeroPadding2D(padding=(1, 1))(h)
h = Convolution2D(classes, 3, 3, activation='relu', name='ctx_conv1_1')(h)
h = ZeroPadding2D(padding=(1, 1))(h)
h = Convolution2D(classes, 3, 3, activation='relu', name='ctx_conv1_2')(h)
h = ZeroPadding2D(padding=(2, 2))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(2, 2), activation='relu', name='ctx_conv2_1')(h)
h = ZeroPadding2D(padding=(4, 4))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(4, 4), activation='relu', name='ctx_conv3_1')(h)
h = ZeroPadding2D(padding=(8, 8))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(8, 8), activation='relu', name='ctx_conv4_1')(h)
h = ZeroPadding2D(padding=(1, 1))(h)
h = Convolution2D(classes, 3, 3, activation='relu', name='ctx_fc1')(h)
logits = Convolution2D(classes, 1, 1, name='ctx_final')(h)
if apply_softmax:
model_out = softmax(logits)
else:
model_out = logits
model = Model(input=model_in, output=model_out, name='dilation_kitti')
return model
# CAMVID MODEL
def get_dilation_model_camvid(input_shape, apply_softmax, input_tensor, classes):
if input_tensor is None:
model_in = Input(shape=input_shape)
else:
if not K.is_keras_tensor(input_tensor):
model_in = Input(tensor=input_tensor, shape=input_shape)
else:
model_in = input_tensor
h = Convolution2D(64, 3, 3, activation='relu', name='conv1_1')(model_in)
h = Convolution2D(64, 3, 3, activation='relu', name='conv1_2')(h)
h = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), name='pool1')(h)
h = Convolution2D(128, 3, 3, activation='relu', name='conv2_1')(h)
h = Convolution2D(128, 3, 3, activation='relu', name='conv2_2')(h)
h = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), name='pool2')(h)
h = Convolution2D(256, 3, 3, activation='relu', name='conv3_1')(h)
h = Convolution2D(256, 3, 3, activation='relu', name='conv3_2')(h)
h = Convolution2D(256, 3, 3, activation='relu', name='conv3_3')(h)
h = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), name='pool3')(h)
h = Convolution2D(512, 3, 3, activation='relu', name='conv4_1')(h)
h = Convolution2D(512, 3, 3, activation='relu', name='conv4_2')(h)
h = Convolution2D(512, 3, 3, activation='relu', name='conv4_3')(h)
h = AtrousConvolution2D(512, 3, 3, atrous_rate=(2, 2), activation='relu', name='conv5_1')(h)
h = AtrousConvolution2D(512, 3, 3, atrous_rate=(2, 2), activation='relu', name='conv5_2')(h)
h = AtrousConvolution2D(512, 3, 3, atrous_rate=(2, 2), activation='relu', name='conv5_3')(h)
h = AtrousConvolution2D(4096, 7, 7, atrous_rate=(4, 4), activation='relu', name='fc6')(h)
h = Dropout(0.5, name='drop6')(h)
h = Convolution2D(4096, 1, 1, activation='relu', name='fc7')(h)
h = Dropout(0.5, name='drop7')(h)
h = Convolution2D(classes, 1, 1, name='final')(h)
h = ZeroPadding2D(padding=(1, 1))(h)
h = Convolution2D(classes, 3, 3, activation='relu', name='ctx_conv1_1')(h)
h = ZeroPadding2D(padding=(1, 1))(h)
h = Convolution2D(classes, 3, 3, activation='relu', name='ctx_conv1_2')(h)
h = ZeroPadding2D(padding=(2, 2))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(2, 2), activation='relu', name='ctx_conv2_1')(h)
h = ZeroPadding2D(padding=(4, 4))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(4, 4), activation='relu', name='ctx_conv3_1')(h)
h = ZeroPadding2D(padding=(8, 8))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(8, 8), activation='relu', name='ctx_conv4_1')(h)
h = ZeroPadding2D(padding=(16, 16))(h)
h = AtrousConvolution2D(classes, 3, 3, atrous_rate=(16, 16), activation='relu', name='ctx_conv5_1')(h)
h = ZeroPadding2D(padding=(1, 1))(h)
h = Convolution2D(classes, 3, 3, activation='relu', name='ctx_fc1')(h)
logits = Convolution2D(classes, 1, 1, name='ctx_final')(h)
if apply_softmax:
model_out = softmax(logits)
else:
model_out = logits
model = Model(input=model_in, output=model_out, name='dilation_camvid')
return model
# model function
def DilationNet(dataset, input_shape=None, apply_softmax=True, pretrained=True,
input_tensor=None, classes=None):
""" Instantiate the Dilation network architecture, optionally loading weights
pre-trained on a dataset in the set (cityscapes, voc12, kitti, camvid).
Note that pre-trained model is only available for Theano dim ordering.
The model and the weights should be compatible with both
TensorFlow and Theano backends.
# Arguments
dataset: choose among (cityscapes, voc12, kitti, camvid).
input_shape: shape tuple. It should have exactly 3 inputs channels,
and the axis ordering should be coherent with what specified in
your keras.json (e.g. use (3, 512, 512) for 'th' and (512, 512, 3)
for 'tf'). None will default to dataset specific sizes.
apply_softmax: whether to apply softmax or return logits.
pretrained: boolean. If `True`, loads weights coherently with
input_tensor: optional Keras tensor (i.e. output of `layers.Input()`)
to use as image input for the model.
classes: optional number of segmentation classes. If pretrained is True,
it should be coherent with the dataset chosen.
# Returns
A Keras model instance.
"""
if dataset not in {'cityscapes', 'voc12', 'kitti', 'camvid'}:
raise ValueError('The `dataset` argument should be one among '
'(cityscapes, voc12, kitti, camvid)')
if classes is not None:
if classes != CONFIG[dataset]['classes'] and pretrained:
raise ValueError('Cannot load pretrained model for dataset `{}` '
'with {} classes'.format(dataset, classes))
else:
classes = CONFIG[dataset]['classes']
if input_shape is None:
input_shape = CONFIG[dataset]['input_shape']
# get the model
if dataset == 'cityscapes':
model = get_dilation_model_cityscapes(input_shape=input_shape, apply_softmax=apply_softmax,
input_tensor=input_tensor, classes=classes)
elif dataset == 'voc12':
model = get_dilation_model_voc(input_shape=input_shape, apply_softmax=apply_softmax,
input_tensor=input_tensor, classes=classes)
elif dataset == 'kitti':
model = get_dilation_model_kitti(input_shape=input_shape, apply_softmax=apply_softmax,
input_tensor=input_tensor, classes=classes)
elif dataset == 'camvid':
model = get_dilation_model_camvid(input_shape=input_shape, apply_softmax=apply_softmax,
input_tensor=input_tensor, classes=classes)
# load weights
if pretrained:
if K.image_dim_ordering() == 'th':
weights_path = get_file(CONFIG[dataset]['weights_file'],
CONFIG[dataset]['weights_url'],
cache_subdir='models')
model.load_weights(weights_path)
if K.backend() == 'tensorflow':
warnings.warn('You are using the TensorFlow backend, yet you '
'are using the Theano '
'image dimension ordering convention '
'(`image_dim_ordering="th"`). '
'For best performance, set '
'`image_dim_ordering="tf"` in '
'your Keras config '
'at ~/.keras/keras.json.')
convert_all_kernels_in_model(model)
else:
raise NotImplementedError('Pretrained DilationNet model is not available with '
'tensorflow dim ordering')
return model
| 51.666667 | 116 | 0.636342 | 2,367 | 16,895 | 4.405999 | 0.089142 | 0.024739 | 0.155336 | 0.079778 | 0.752613 | 0.732477 | 0.715601 | 0.712724 | 0.698245 | 0.698245 | 0 | 0.070162 | 0.208701 | 16,895 | 326 | 117 | 51.825153 | 0.709926 | 0.080971 | 0 | 0.714286 | 0 | 0 | 0.119646 | 0.00345 | 0 | 0 | 0 | 0 | 0 | 1 | 0.019841 | false | 0 | 0.035714 | 0 | 0.075397 | 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 |
3899e83872324bf1d8f9c8d79973c3acaa849505 | 3,633 | py | Python | tests/models/test_stats.py | kzkn/fc | 1233f11e3e096b8f60a7b5e60fa71e994fbaea4a | [
"Apache-2.0"
] | null | null | null | tests/models/test_stats.py | kzkn/fc | 1233f11e3e096b8f60a7b5e60fa71e994fbaea4a | [
"Apache-2.0"
] | null | null | null | tests/models/test_stats.py | kzkn/fc | 1233f11e3e096b8f60a7b5e60fa71e994fbaea4a | [
"Apache-2.0"
] | 1 | 2016-07-18T03:51:23.000Z | 2016-07-18T03:51:23.000Z | # -*- coding: utf-8 -*-
from datetime import datetime, timedelta
from nose.tools import ok_, with_setup
from fcsite.models import set_user, user, schedules, users, entries, stats
from tests.models import getdb
def setup_module(module):
getdb().execute("DELETE FROM Entry")
getdb().execute("DELETE FROM User")
getdb().execute("DELETE FROM Schedule")
def setup_testdata():
users.insert("foo", "passwd1", 1, 0x0)
u = users.find_by_id(1)
u.joined = datetime(2011, 1, 1)
set_user(u)
d = datetime(2012, 1, 1)
schedules.insert(schedules.TYPE_PRACTICE, d + timedelta(days=1), "p1")
schedules.insert(schedules.TYPE_PRACTICE, d + timedelta(days=2), "p2")
schedules.insert(schedules.TYPE_PRACTICE, d + timedelta(days=3), "p3")
schedules.insert(schedules.TYPE_PRACTICE, d + timedelta(days=4), "p4")
schedules.insert(schedules.TYPE_PRACTICE, d + timedelta(days=5), "p5")
schedules.insert(schedules.TYPE_GAME, d + timedelta(days=1), "g1")
schedules.insert(schedules.TYPE_GAME, d + timedelta(days=2), "g2")
schedules.insert(schedules.TYPE_GAME, d + timedelta(days=3), "g3")
schedules.insert(schedules.TYPE_GAME, d + timedelta(days=4), "g4")
schedules.insert(schedules.TYPE_GAME, d + timedelta(days=5), "g5")
schedules.insert(schedules.TYPE_EVENT, d + timedelta(days=1), "e1")
schedules.insert(schedules.TYPE_EVENT, d + timedelta(days=2), "e2")
schedules.insert(schedules.TYPE_EVENT, d + timedelta(days=3), "e3")
schedules.insert(schedules.TYPE_EVENT, d + timedelta(days=4), "e4")
schedules.insert(schedules.TYPE_EVENT, d + timedelta(days=5), "e5")
def teardown_testdata():
getdb().execute("DELETE FROM Entry")
getdb().execute("DELETE FROM User")
getdb().execute("DELETE FROM Schedule")
@with_setup(setup_testdata, teardown_testdata)
def test_entry_rate_reflects_only_practice():
entries.do_entry(1, "comment", True)
entries.do_entry(2, "comment", True)
entries.do_entry(3, "comment", True)
entries.do_entry(4, "comment", True)
entries.do_entry(5, "comment", True)
# kokomade practice
entries.do_entry(6, "comment", False)
entries.do_entry(7, "comment", False)
entries.do_entry(8, "comment", False)
entries.do_entry(9, "comment", False)
entries.do_entry(10, "comment", False)
entries.do_entry(11, "comment", False)
entries.do_entry(12, "comment", False)
entries.do_entry(13, "comment", False)
entries.do_entry(14, "comment", False)
entries.do_entry(15, "comment", False)
u = user()
rate = stats.get_practice_entry_rate_of_year(u, 2012)
assert rate.count == 5
assert rate.allcount == 5
@with_setup(setup_testdata, teardown_testdata)
def test_entry_rate_reflects_after_joined():
entries.do_entry(1, "comment", False)
entries.do_entry(2, "comment", False)
entries.do_entry(3, "comment", False) # 2012/1/4
entries.do_entry(4, "comment", True)
entries.do_entry(5, "comment", True)
# kokomade practice
entries.do_entry(6, "comment", False)
entries.do_entry(7, "comment", False)
entries.do_entry(8, "comment", False)
entries.do_entry(9, "comment", False)
entries.do_entry(10, "comment", False)
entries.do_entry(11, "comment", False)
entries.do_entry(12, "comment", False)
entries.do_entry(13, "comment", False)
entries.do_entry(14, "comment", False)
entries.do_entry(15, "comment", False)
u = user()
u.joined = datetime(2012, 1, 4)
rate = stats.get_practice_entry_rate_of_year(u, 2012)
assert rate.count == 2
assert rate.allcount == 3
| 37.84375 | 74 | 0.684283 | 506 | 3,633 | 4.754941 | 0.181818 | 0.112219 | 0.174564 | 0.174564 | 0.817539 | 0.753533 | 0.753533 | 0.753533 | 0.456359 | 0.456359 | 0 | 0.037674 | 0.16708 | 3,633 | 95 | 75 | 38.242105 | 0.757436 | 0.018167 | 0 | 0.473684 | 0 | 0 | 0.099944 | 0 | 0 | 0 | 0.000842 | 0 | 0.052632 | 1 | 0.065789 | false | 0.013158 | 0.052632 | 0 | 0.118421 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
38e803692297de4dafc8ef8dbc65999ff96ce7db | 91 | py | Python | automd_testapp/endpoints/__init__.py | cliftbar/auto-api | bcba991da69551fe964fb5b52ab034fc0c1785c3 | [
"MIT"
] | null | null | null | automd_testapp/endpoints/__init__.py | cliftbar/auto-api | bcba991da69551fe964fb5b52ab034fc0c1785c3 | [
"MIT"
] | 25 | 2020-05-03T01:45:55.000Z | 2020-12-17T07:14:56.000Z | automd_testapp/endpoints/__init__.py | cliftbar/auto-api | bcba991da69551fe964fb5b52ab034fc0c1785c3 | [
"MIT"
] | null | null | null | from .status import Status, MinimalStatus, IntrospectionStatus
from .add_two import AddTwo
| 30.333333 | 62 | 0.846154 | 11 | 91 | 6.909091 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.10989 | 91 | 2 | 63 | 45.5 | 0.938272 | 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 |
2a21fac01a52089b9368c9a604fd2c985ff16318 | 123 | py | Python | topics/admin.py | odehabuzaid/DjangoX | ee4ec660eb101d374938bc2f82b7ca61d1c7917e | [
"MIT"
] | null | null | null | topics/admin.py | odehabuzaid/DjangoX | ee4ec660eb101d374938bc2f82b7ca61d1c7917e | [
"MIT"
] | null | null | null | topics/admin.py | odehabuzaid/DjangoX | ee4ec660eb101d374938bc2f82b7ca61d1c7917e | [
"MIT"
] | null | null | null | from django.contrib import admin
from topics.models import Topic
# Register your models here.
admin.site.register(Topic)
| 17.571429 | 32 | 0.804878 | 18 | 123 | 5.5 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130081 | 123 | 6 | 33 | 20.5 | 0.925234 | 0.211382 | 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 |
2a471794d1647ba84954145b39edef75a71e3903 | 138 | py | Python | test.py | IshaSarangi/Diabetes-Prediction-master | 9660955a2772b120e8f78a6a65f138e981ebeee1 | [
"MIT"
] | null | null | null | test.py | IshaSarangi/Diabetes-Prediction-master | 9660955a2772b120e8f78a6a65f138e981ebeee1 | [
"MIT"
] | null | null | null | test.py | IshaSarangi/Diabetes-Prediction-master | 9660955a2772b120e8f78a6a65f138e981ebeee1 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import sklearn
import flask
pd.__version__
| 13.8 | 31 | 0.818841 | 23 | 138 | 4.73913 | 0.608696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 138 | 9 | 32 | 15.333333 | 0.947826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.857143 | 0 | 0.857143 | 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 |
2a51af5ff38e4892c78e1383e9a4d1ce571f3b7b | 13 | py | Python | pyoptimizer/__init__.py | grnydawn/pyoptimizer | 4cae9df56a3ac1c28e9b8e2a9d504bd1d0a76887 | [
"MIT"
] | null | null | null | pyoptimizer/__init__.py | grnydawn/pyoptimizer | 4cae9df56a3ac1c28e9b8e2a9d504bd1d0a76887 | [
"MIT"
] | null | null | null | pyoptimizer/__init__.py | grnydawn/pyoptimizer | 4cae9df56a3ac1c28e9b8e2a9d504bd1d0a76887 | [
"MIT"
] | null | null | null | # Thu Feb 15
| 6.5 | 12 | 0.615385 | 3 | 13 | 2.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.222222 | 0.307692 | 13 | 1 | 13 | 13 | 0.666667 | 0.769231 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
2a5be7e31bf9052a188b24478d32f85eb91ee651 | 103 | py | Python | dataset/__init__.py | tsaikenyoo/BERT_SQuAD_pytorch | 411d9aa286081b398a0f60878ae751654a9cb53f | [
"Apache-2.0"
] | null | null | null | dataset/__init__.py | tsaikenyoo/BERT_SQuAD_pytorch | 411d9aa286081b398a0f60878ae751654a9cb53f | [
"Apache-2.0"
] | null | null | null | dataset/__init__.py | tsaikenyoo/BERT_SQuAD_pytorch | 411d9aa286081b398a0f60878ae751654a9cb53f | [
"Apache-2.0"
] | null | null | null |
from .tokenizer import Tokenizer
from .dataset import SquadDataLoader, SquadSample, SquadInputFeature | 25.75 | 68 | 0.854369 | 10 | 103 | 8.8 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.106796 | 103 | 4 | 68 | 25.75 | 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 |
2a92178346631a4a0468c13e02f639fbfea36184 | 181 | py | Python | basil/prices/migrate.py | eve-basil/prices | c00c7f999bcca19066ed333c6eae4d0ea271113e | [
"Apache-2.0"
] | null | null | null | basil/prices/migrate.py | eve-basil/prices | c00c7f999bcca19066ed333c6eae4d0ea271113e | [
"Apache-2.0"
] | null | null | null | basil/prices/migrate.py | eve-basil/prices | c00c7f999bcca19066ed333c6eae4d0ea271113e | [
"Apache-2.0"
] | null | null | null | from basil_common import configurables
import storage
from . import REQUIRED_OPTIONS
configurables.verify(REQUIRED_OPTIONS)
storage.migrate_db(configurables.database_connector())
| 22.625 | 54 | 0.867403 | 21 | 181 | 7.238095 | 0.619048 | 0.197368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.077348 | 181 | 7 | 55 | 25.857143 | 0.91018 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
aaa39e0c7b644c4b14e2104bb0fab7c13984775b | 228 | py | Python | src/senertec/energyUnit.py | Kleinrotti/py-senertec | b5cbe4e50c72c14e507bb92477088205fb2c786f | [
"MIT"
] | null | null | null | src/senertec/energyUnit.py | Kleinrotti/py-senertec | b5cbe4e50c72c14e507bb92477088205fb2c786f | [
"MIT"
] | null | null | null | src/senertec/energyUnit.py | Kleinrotti/py-senertec | b5cbe4e50c72c14e507bb92477088205fb2c786f | [
"MIT"
] | null | null | null | class energyUnit(object):
"""Represents an energy unit."""
def __init__(self):
self.serial = str()
"""Serial number of energy unit."""
self.model = str()
"""Model name of energy unit."""
| 25.333333 | 43 | 0.561404 | 26 | 228 | 4.769231 | 0.615385 | 0.241935 | 0.193548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.285088 | 228 | 8 | 44 | 28.5 | 0.760736 | 0.114035 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
aaaafdd3c6e61fada867cf05cc8ac6b1c579cb8c | 45 | py | Python | python_demo/first.py | mhy-web/Algorithm_demo | cfa47d3ded24c74149924499b1714b0823b80e27 | [
"MIT"
] | 2 | 2019-01-09T04:19:21.000Z | 2019-01-09T04:19:22.000Z | python_demo/first.py | mahyuan/Front_end_basics | cfa47d3ded24c74149924499b1714b0823b80e27 | [
"MIT"
] | 14 | 2021-05-12T02:07:31.000Z | 2021-05-14T13:16:33.000Z | python_demo/first.py | mhy-web/Front_end_basics | cfa47d3ded24c74149924499b1714b0823b80e27 | [
"MIT"
] | null | null | null | #!/user/bin/env python3
print('hello world') | 15 | 23 | 0.711111 | 7 | 45 | 4.571429 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02439 | 0.088889 | 45 | 3 | 24 | 15 | 0.756098 | 0.488889 | 0 | 0 | 0 | 0 | 0.478261 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
2a9c22118e3c94448020041525e9f541f636c9e2 | 374 | py | Python | prod_tracking_backend/api/models.py | Akinwale7/Texada_test | 45df81efcb091c0b7cc1d07d3f634df44c590fe2 | [
"MIT"
] | null | null | null | prod_tracking_backend/api/models.py | Akinwale7/Texada_test | 45df81efcb091c0b7cc1d07d3f634df44c590fe2 | [
"MIT"
] | null | null | null | prod_tracking_backend/api/models.py | Akinwale7/Texada_test | 45df81efcb091c0b7cc1d07d3f634df44c590fe2 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Product(models.Model):
description = models.CharField(max_length=50)
datetime = models.DateTimeField()
longitude = models.CharField(max_length=20)
latitude = models.CharField(max_length=20)
elevation = models.CharField(max_length=10)
def __str__(self):
return self.description
| 26.714286 | 49 | 0.73262 | 46 | 374 | 5.782609 | 0.586957 | 0.225564 | 0.270677 | 0.360902 | 0.195489 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02589 | 0.173797 | 374 | 13 | 50 | 28.769231 | 0.834951 | 0.064171 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0.111111 | 0.111111 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
2aa4c124369152c9c657b100cab62453b7e83798 | 159 | py | Python | easyml/__init__.py | peiyong86/easyml | 364a76d6c6cbfd07b909ac48768599aad8238356 | [
"Apache-2.0"
] | null | null | null | easyml/__init__.py | peiyong86/easyml | 364a76d6c6cbfd07b909ac48768599aad8238356 | [
"Apache-2.0"
] | null | null | null | easyml/__init__.py | peiyong86/easyml | 364a76d6c6cbfd07b909ac48768599aad8238356 | [
"Apache-2.0"
] | null | null | null | from .FMModel import FM, FMParam
from .LRModel import LR, LRParam
from .DecisionTreeModel import DecisionTree
from .DataIO import DataSet, min_max_normalize
| 22.714286 | 46 | 0.823899 | 21 | 159 | 6.142857 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.132075 | 159 | 6 | 47 | 26.5 | 0.934783 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
2acb299a92532697813fc57c23d2eb5f69b22b48 | 47 | py | Python | venv/lib/python3.6/encodings/iso2022_jp_2004.py | JamesMusyoka/Blog | fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5 | [
"Unlicense"
] | 2 | 2019-04-17T13:35:50.000Z | 2021-12-21T00:11:36.000Z | venv/lib/python3.6/encodings/iso2022_jp_2004.py | JamesMusyoka/Blog | fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5 | [
"Unlicense"
] | 2 | 2021-03-31T19:51:24.000Z | 2021-06-10T23:05:09.000Z | venv/lib/python3.6/encodings/iso2022_jp_2004.py | JamesMusyoka/Blog | fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5 | [
"Unlicense"
] | 2 | 2019-10-01T08:47:35.000Z | 2020-07-11T06:32:16.000Z | /usr/lib/python3.6/encodings/iso2022_jp_2004.py | 47 | 47 | 0.851064 | 9 | 47 | 4.222222 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.212766 | 0 | 47 | 1 | 47 | 47 | 0.595745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
2d47611fd685d210a8e2387a486f89d0dbaed5f6 | 197 | py | Python | src/django_ixctl/apps.py | fullctl/ixctl | e46dc18269c08f031f22aac5934968ce357dba8f | [
"Apache-2.0"
] | null | null | null | src/django_ixctl/apps.py | fullctl/ixctl | e46dc18269c08f031f22aac5934968ce357dba8f | [
"Apache-2.0"
] | 39 | 2021-01-11T15:26:30.000Z | 2021-10-19T16:07:21.000Z | src/django_ixctl/apps.py | fullctl/ixctl | e46dc18269c08f031f22aac5934968ce357dba8f | [
"Apache-2.0"
] | 1 | 2021-11-06T20:18:50.000Z | 2021-11-06T20:18:50.000Z | from django.apps import AppConfig
class DjangoIxctlConfig(AppConfig):
name = "django_ixctl"
label = "django_ixctl"
def ready(self):
import django_ixctl.signals # noqa: F401
| 19.7 | 49 | 0.700508 | 23 | 197 | 5.869565 | 0.695652 | 0.244444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019481 | 0.218274 | 197 | 9 | 50 | 21.888889 | 0.857143 | 0.050761 | 0 | 0 | 0 | 0 | 0.12973 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
2d769061e2625e6099c4ea467080de48149f8154 | 81 | py | Python | genie_core/script/output_action.py | JereMIbq1995/genie-core | f87b6de56749630a46200298f7021047e854c8a3 | [
"MIT"
] | null | null | null | genie_core/script/output_action.py | JereMIbq1995/genie-core | f87b6de56749630a46200298f7021047e854c8a3 | [
"MIT"
] | null | null | null | genie_core/script/output_action.py | JereMIbq1995/genie-core | f87b6de56749630a46200298f7021047e854c8a3 | [
"MIT"
] | null | null | null | from genie_core.script.action import Action
class OutputAction(Action):
pass | 20.25 | 43 | 0.802469 | 11 | 81 | 5.818182 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.135802 | 81 | 4 | 44 | 20.25 | 0.914286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
2d8abda7adb44f36cbd29ed96635ddd62b6312b6 | 49 | py | Python | HalideRL/gym-halide/gym_halide/envs/__init__.py | mpecenin/wscad-2019 | 7509188a5d0c8404359be19c3801bdb85975113d | [
"MIT"
] | 7 | 2019-11-14T15:44:22.000Z | 2021-10-31T21:53:38.000Z | HalideRL/gym-halide/gym_halide/envs/__init__.py | mpecenin/wscad-2019 | 7509188a5d0c8404359be19c3801bdb85975113d | [
"MIT"
] | 1 | 2021-01-06T08:42:52.000Z | 2021-01-23T01:51:54.000Z | HalideRL/gym-halide/gym_halide/envs/__init__.py | mpecenin/wscad-2019 | 7509188a5d0c8404359be19c3801bdb85975113d | [
"MIT"
] | null | null | null | from gym_halide.envs.halide_env import HalideEnv
| 24.5 | 48 | 0.877551 | 8 | 49 | 5.125 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.081633 | 49 | 1 | 49 | 49 | 0.911111 | 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 |
2d8c4759858030b7af57719015d8ae522a6ee71b | 5,342 | py | Python | models/mobilenet_v1.py | acanus/ssd_keras | 9e1b7adbe343e9be894e87bf899a18412b047669 | [
"Apache-2.0"
] | null | null | null | models/mobilenet_v1.py | acanus/ssd_keras | 9e1b7adbe343e9be894e87bf899a18412b047669 | [
"Apache-2.0"
] | null | null | null | models/mobilenet_v1.py | acanus/ssd_keras | 9e1b7adbe343e9be894e87bf899a18412b047669 | [
"Apache-2.0"
] | null | null | null | from tensorflow.keras.layers import DepthwiseConv2D
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Input, Lambda, Activation,Conv2D, Convolution2D, MaxPooling2D, ZeroPadding2D, Reshape, Concatenate,BatchNormalization, Add, Conv2DTranspose
from tensorflow.keras.regularizers import l2
def mobilenet(input_tensor):
if input_tensor is None:
input_tensor = Input(shape=(300,300,3))
x = ZeroPadding2D(padding=((1, 1), (1, 1)), name='conv1_padding')(input_tensor)
x = Convolution2D(32, (3, 3), strides=(2, 2), padding='valid', use_bias=False,name="conv0")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name = "conv0/bn")(x)
x = Activation('relu')(x)
x = DepthwiseConv2D(32, (3, 3), strides=(1, 1), padding='same', use_bias=False, name="conv1/dw")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv1/dw/bn")(x)
x = Activation('relu')(x)
x = Convolution2D(64, (1, 1), strides=(1, 1), padding='same', use_bias=False, name="conv1")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv1/bn")(x)
x = Activation('relu')(x)
print ("conv1 shape: ", x.shape)
x = ZeroPadding2D(padding=((1, 1), (1, 1)), name='conv2_padding')(x)
x = DepthwiseConv2D(64, (3, 3), strides=(2, 2), padding='valid', use_bias=False,name="conv2/dw")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv2/dw/bn")(x)
x = Activation('relu')(x)
x = Convolution2D(128, (1, 1), strides=(1, 1), padding='same', use_bias=False,name="conv2")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv2/bn")(x)
x = Activation('relu')(x)
x = DepthwiseConv2D(128, (3, 3), strides=(1, 1), padding='same', use_bias=False,name="conv3/dw")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv3/dw/bn")(x)
x = Activation('relu')(x)
x = Convolution2D(128, (1, 1), strides=(1, 1), padding='same', use_bias=False,name="conv3")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv3/bn")(x)
x = Activation('relu')(x)
print ("conv3 shape: ", x.shape)
x = ZeroPadding2D(padding=((1, 1), (1, 1)), name='conv3_padding')(x)
x = DepthwiseConv2D(128, (3, 3), strides=(2, 2), padding='valid', use_bias=False,name="conv4/dw")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv4/dw/bn")(x)
x = Activation('relu')(x)
x = Convolution2D(256, (1, 1), strides=(1, 1), padding='same', use_bias=False,name="conv4")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv4/bn")(x)
x = Activation('relu')(x)
x = DepthwiseConv2D(256, (3, 3), strides=(1, 1), padding='same', use_bias=False,name="conv5/dw")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv5/dw/bn")(x)
x = Activation('relu')(x)
x = Convolution2D(256, (1, 1), strides=(1, 1), padding='same', use_bias=False,name="conv5")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv5/bn")(x)
x = Activation('relu')(x)
print ("conv5 shape: ", x.shape)
x = ZeroPadding2D(padding=((1, 1), (1, 1)), name='conv4_padding')(x)
x = DepthwiseConv2D(256, (3, 3), strides=(2, 2), padding='valid', use_bias=False,name="conv6/dw")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv6/dw/bn")(x)
x = Activation('relu')(x)
x = Convolution2D(512, (1, 1), strides=(1, 1), padding='same', use_bias=False,name="conv6")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv6/bn")(x)
x = Activation('relu')(x)
test = x
for i in range(5):
x = DepthwiseConv2D(512, (3, 3), strides=(1, 1), padding='same', use_bias=False,name=("conv" + str(7+i)+"/dw" ))(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name=("conv" + str(7+i)+"/dw/bn" ))(x)
x = Activation('relu')(x)
x = Convolution2D(512, (1, 1), strides=(1, 1), padding='same', use_bias=False,name=("conv" + str(7+i)))(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name=("conv" + str(7+i) +"/bn"))(x)
x = Activation('relu')(x)
# print ("conv11 shape: ", x.shape)
conv11 = x
x = ZeroPadding2D(padding=((1, 1), (1, 1)), name='conv5_padding')(x)
x = DepthwiseConv2D(512, (3, 3), strides=(2, 2), padding='valid', use_bias=False,name="conv12/dw")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv12/dw/bn")(x)
x = Activation('relu')(x)
x = Convolution2D(1024, (1, 1), strides=(1, 1), padding='same', use_bias=False,name="conv12")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv12/bn")(x)
x = Activation('relu')(x)
x = DepthwiseConv2D(1024, (3, 3), strides=(1, 1), padding='same', use_bias=False,name="conv13/dw")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv13/dw/bn")(x)
x = Activation('relu')(x)
x = Convolution2D(1024, (1, 1), strides=(1, 1), padding='same', use_bias=False,name="conv13")(x)
x = BatchNormalization( momentum=0.99, epsilon=0.00001 , name="conv13/bn")(x)
x = Activation('relu')(x)
conv13 = x
# print ("conv13 shape: ", x.shape)
# model = Model(inputs=input_tensor, outputs=x)
return [conv11,conv13,test] | 48.126126 | 175 | 0.631786 | 792 | 5,342 | 4.224747 | 0.099747 | 0.033473 | 0.068141 | 0.090855 | 0.83682 | 0.805738 | 0.783025 | 0.740586 | 0.681411 | 0.67095 | 0 | 0.095536 | 0.161363 | 5,342 | 111 | 176 | 48.126126 | 0.651339 | 0.021153 | 0 | 0.246753 | 0 | 0 | 0.108305 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.012987 | false | 0 | 0.051948 | 0 | 0.077922 | 0.038961 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
2d99e085a133a21d335e4b78135b7a31a3b4f4f3 | 217 | py | Python | util/test.py | cnzeki/PSENet | c7e0785404e12866171e9da678736abae9cdb8cb | [
"Apache-2.0"
] | null | null | null | util/test.py | cnzeki/PSENet | c7e0785404e12866171e9da678736abae9cdb8cb | [
"Apache-2.0"
] | null | null | null | util/test.py | cnzeki/PSENet | c7e0785404e12866171e9da678736abae9cdb8cb | [
"Apache-2.0"
] | null | null | null | #encoding = utf-8
import numpy as np
assert_true = np.testing.assertTrue
assert_equal = np.testing.assert_equal
assert_array_equal = np.testing.assert_array_equal
assert_almost_equal = np.testing.assert_almost_equal
| 27.125 | 52 | 0.83871 | 34 | 217 | 5.029412 | 0.411765 | 0.210526 | 0.245614 | 0.350877 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005076 | 0.092166 | 217 | 7 | 53 | 31 | 0.862944 | 0.073733 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.8 | 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 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
2dad7433ca10b90b5791f7653f7dbd20bc5b5eba | 80 | py | Python | haoda/ir/arithmetic/__init__.py | Ruola/haoda | 7134628a918fb8a273ecdbf13e6f6cc3db227285 | [
"MIT"
] | 2 | 2020-01-15T03:05:05.000Z | 2022-02-22T04:11:59.000Z | haoda/ir/arithmetic/__init__.py | Ruola/haoda | 7134628a918fb8a273ecdbf13e6f6cc3db227285 | [
"MIT"
] | null | null | null | haoda/ir/arithmetic/__init__.py | Ruola/haoda | 7134628a918fb8a273ecdbf13e6f6cc3db227285 | [
"MIT"
] | 2 | 2020-01-04T01:50:23.000Z | 2020-01-15T06:37:42.000Z | # pylint: disable=unused-wildcard-import
from haoda.ir.arithmetic.base import *
| 26.666667 | 40 | 0.8 | 11 | 80 | 5.818182 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0875 | 80 | 2 | 41 | 40 | 0.876712 | 0.475 | 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 |
2dcb83f1ff7d6077e0827aa696cd179b3b0e2a96 | 9,962 | py | Python | tests/test_decode.py | a-n-rose/ctcdecode | c9b522b9ff0434a80ad3c5344a60aa93be7d34b1 | [
"MIT"
] | 588 | 2017-11-10T07:22:31.000Z | 2022-03-30T03:02:49.000Z | tests/test_decode.py | a-n-rose/ctcdecode | c9b522b9ff0434a80ad3c5344a60aa93be7d34b1 | [
"MIT"
] | 149 | 2017-11-07T01:12:22.000Z | 2022-03-28T13:52:11.000Z | tests/test_decode.py | a-n-rose/ctcdecode | c9b522b9ff0434a80ad3c5344a60aa93be7d34b1 | [
"MIT"
] | 202 | 2017-11-10T05:46:17.000Z | 2022-03-31T07:58:24.000Z | """Test decoders."""
from __future__ import absolute_import, division, print_function
import os
import unittest
import ctcdecode
import torch
class TestDecoders(unittest.TestCase):
def setUp(self):
self.vocab_list = ["'", " ", "a", "b", "c", "d", "_"]
self.beam_size = 20
self.probs_seq1 = [
[0.06390443, 0.21124858, 0.27323887, 0.06870235, 0.0361254, 0.18184413, 0.16493624],
[0.03309247, 0.22866108, 0.24390638, 0.09699597, 0.31895462, 0.0094893, 0.06890021],
[0.218104, 0.19992557, 0.18245131, 0.08503348, 0.14903535, 0.08424043, 0.08120984],
[0.12094152, 0.19162472, 0.01473646, 0.28045061, 0.24246305, 0.05206269, 0.09772094],
[0.1333387, 0.00550838, 0.00301669, 0.21745861, 0.20803985, 0.41317442, 0.01946335],
[0.16468227, 0.1980699, 0.1906545, 0.18963251, 0.19860937, 0.04377724, 0.01457421],
]
self.probs_seq2 = [
[0.08034842, 0.22671944, 0.05799633, 0.36814645, 0.11307441, 0.04468023, 0.10903471],
[0.09742457, 0.12959763, 0.09435383, 0.21889204, 0.15113123, 0.10219457, 0.20640612],
[0.45033529, 0.09091417, 0.15333208, 0.07939558, 0.08649316, 0.12298585, 0.01654384],
[0.02512238, 0.22079203, 0.19664364, 0.11906379, 0.07816055, 0.22538587, 0.13483174],
[0.17928453, 0.06065261, 0.41153005, 0.1172041, 0.11880313, 0.07113197, 0.04139363],
[0.15882358, 0.1235788, 0.23376776, 0.20510435, 0.00279306, 0.05294827, 0.22298418],
]
self.greedy_result = ["ac'bdc", "b'da"]
self.beam_search_result = ["acdc", "b'a", "a a"]
def convert_to_string(self, tokens, vocab, seq_len):
return "".join([vocab[x] for x in tokens[0:seq_len]])
def test_beam_search_decoder_1(self):
probs_seq = torch.FloatTensor([self.probs_seq1])
decoder = ctcdecode.CTCBeamDecoder(
self.vocab_list, beam_width=self.beam_size, blank_id=self.vocab_list.index("_")
)
beam_result, beam_scores, timesteps, out_seq_len = decoder.decode(probs_seq)
output_str = self.convert_to_string(beam_result[0][0], self.vocab_list, out_seq_len[0][0])
self.assertEqual(output_str, self.beam_search_result[0])
def test_beam_search_decoder_2(self):
probs_seq = torch.FloatTensor([self.probs_seq2])
decoder = ctcdecode.CTCBeamDecoder(
self.vocab_list, beam_width=self.beam_size, blank_id=self.vocab_list.index("_")
)
beam_result, beam_scores, timesteps, out_seq_len = decoder.decode(probs_seq)
output_str = self.convert_to_string(beam_result[0][0], self.vocab_list, out_seq_len[0][0])
self.assertEqual(output_str, self.beam_search_result[1])
def test_beam_search_decoder_3(self):
lm_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "test.arpa")
probs_seq = torch.FloatTensor([self.probs_seq2])
decoder = ctcdecode.CTCBeamDecoder(
self.vocab_list, beam_width=self.beam_size, blank_id=self.vocab_list.index("_"), model_path=lm_path
)
beam_result, beam_scores, timesteps, out_seq_len = decoder.decode(probs_seq)
output_str = self.convert_to_string(beam_result[0][0], self.vocab_list, out_seq_len[0][0])
self.assertEqual(output_str, self.beam_search_result[2])
def test_beam_search_decoder_batch(self):
probs_seq = torch.FloatTensor([self.probs_seq1, self.probs_seq2])
decoder = ctcdecode.CTCBeamDecoder(
self.vocab_list, beam_width=self.beam_size, blank_id=self.vocab_list.index("_"), num_processes=24
)
beam_results, beam_scores, timesteps, out_seq_len = decoder.decode(probs_seq)
output_str1 = self.convert_to_string(beam_results[0][0], self.vocab_list, out_seq_len[0][0])
output_str2 = self.convert_to_string(beam_results[1][0], self.vocab_list, out_seq_len[1][0])
self.assertEqual(output_str1, self.beam_search_result[0])
self.assertEqual(output_str2, self.beam_search_result[1])
del decoder
def test_beam_search_decoder_batch_log(self):
probs_seq = torch.FloatTensor([self.probs_seq1, self.probs_seq2]).log()
decoder = ctcdecode.CTCBeamDecoder(
self.vocab_list,
beam_width=self.beam_size,
blank_id=self.vocab_list.index("_"),
log_probs_input=True,
num_processes=24,
)
beam_results, beam_scores, timesteps, out_seq_len = decoder.decode(probs_seq)
output_str1 = self.convert_to_string(beam_results[0][0], self.vocab_list, out_seq_len[0][0])
output_str2 = self.convert_to_string(beam_results[1][0], self.vocab_list, out_seq_len[1][0])
self.assertEqual(output_str1, self.beam_search_result[0])
self.assertEqual(output_str2, self.beam_search_result[1])
def test_online_decoder_decoding(self):
lm_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "test.arpa")
decoder = ctcdecode.OnlineCTCBeamDecoder(
self.vocab_list,
beam_width=self.beam_size,
blank_id=self.vocab_list.index("_"),
log_probs_input=True,
num_processes=24,
model_path=lm_path,
)
state1 = ctcdecode.DecoderState(decoder)
state2 = ctcdecode.DecoderState(decoder)
probs_seq = torch.FloatTensor([self.probs_seq2, self.probs_seq2]).log()
is_eos_s = [True for _ in range(len(probs_seq))]
beam_results, beam_scores, timesteps, out_seq_len = decoder.decode(probs_seq, [state1, state2], is_eos_s)
output_str1 = self.convert_to_string(beam_results[0][0], self.vocab_list, out_seq_len[0][0])
output_str2 = self.convert_to_string(beam_results[1][0], self.vocab_list, out_seq_len[1][0])
self.assertEqual(output_str1, self.beam_search_result[2])
self.assertEqual(output_str2, self.beam_search_result[2])
def test_online_decoder_decoding_no_lm(self):
decoder = ctcdecode.OnlineCTCBeamDecoder(
self.vocab_list,
beam_width=self.beam_size,
blank_id=self.vocab_list.index("_"),
log_probs_input=True,
num_processes=24,
)
state1 = ctcdecode.DecoderState(decoder)
state2 = ctcdecode.DecoderState(decoder)
probs_seq = torch.FloatTensor([self.probs_seq1, self.probs_seq2]).log()
is_eos_s = [True for _ in range(len(probs_seq))]
beam_results, beam_scores, timesteps, out_seq_len = decoder.decode(
probs_seq, [state1, state2], is_eos_s
)
output_str1 = self.convert_to_string(beam_results[0][0], self.vocab_list, out_seq_len[0][0])
output_str2 = self.convert_to_string(beam_results[1][0], self.vocab_list, out_seq_len[1][0])
self.assertEqual(output_str1, self.beam_search_result[0])
self.assertEqual(output_str2, self.beam_search_result[1])
def test_online_decoder_decoding_with_two_calls(self):
lm_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "test.arpa")
decoder = ctcdecode.OnlineCTCBeamDecoder(
self.vocab_list,
beam_width=self.beam_size,
blank_id=self.vocab_list.index("_"),
log_probs_input=True,
num_processes=24,
model_path=lm_path,
)
state1 = ctcdecode.DecoderState(decoder)
probs_seq = torch.FloatTensor([self.probs_seq2]).log()
beam_results, beam_scores, timesteps, out_seq_len = decoder.decode(probs_seq[:, :2], [state1], [False])
beam_results, beam_scores, timesteps, out_seq_len = decoder.decode(probs_seq[:, 2:], [state1], [True])
output_str1 = self.convert_to_string(beam_results[0][0], self.vocab_list, out_seq_len[0][0])
self.assertEqual(output_str1, self.beam_search_result[2])
def test_online_decoder_decoding_with_two_calls_no_lm(self):
decoder = ctcdecode.OnlineCTCBeamDecoder(
self.vocab_list,
beam_width=self.beam_size,
blank_id=self.vocab_list.index("_"),
log_probs_input=True,
num_processes=24,
)
state1 = ctcdecode.DecoderState(decoder)
state2 = ctcdecode.DecoderState(decoder)
probs_seq = torch.FloatTensor([self.probs_seq1, self.probs_seq2]).log()
beam_results, beam_scores, timesteps, out_seq_len = decoder.decode(
probs_seq[:, :2], [state1, state2], [False, False]
)
beam_results, beam_scores, timesteps, out_seq_len = decoder.decode(
probs_seq[:, 2:], [state1, state2], [True, True]
)
del state1, state2
size = beam_results.shape
output_str1 = self.convert_to_string(beam_results[0][0], self.vocab_list, out_seq_len[0][0])
output_str2 = self.convert_to_string(beam_results[1][0], self.vocab_list, out_seq_len[1][0])
self.assertEqual(output_str1, self.beam_search_result[0])
self.assertEqual(output_str2, self.beam_search_result[1])
def test_online_decoder_decoding_with_a_lot_calls_no_lm_check_size(self):
decoder = ctcdecode.OnlineCTCBeamDecoder(
self.vocab_list,
beam_width=self.beam_size,
blank_id=self.vocab_list.index("_"),
log_probs_input=True,
num_processes=24,
)
state1 = ctcdecode.DecoderState(decoder)
probs_seq = torch.FloatTensor([self.probs_seq1]).log()
for i in range(1000):
beam_results, beam_scores, timesteps, out_seq_len = decoder.decode(
probs_seq, [state1], [False, False]
)
beam_results, beam_scores, timesteps, out_seq_len = decoder.decode(
probs_seq, [state1], [True, True]
)
del state1
self.assertGreaterEqual(beam_results.shape[2], out_seq_len.max())
if __name__ == "__main__":
unittest.main()
| 46.12037 | 113 | 0.663923 | 1,339 | 9,962 | 4.621359 | 0.144884 | 0.050905 | 0.073529 | 0.048481 | 0.790886 | 0.78022 | 0.771978 | 0.768746 | 0.754848 | 0.754848 | 0 | 0.116157 | 0.215318 | 9,962 | 215 | 114 | 46.334884 | 0.675451 | 0.001405 | 0 | 0.542373 | 0 | 0 | 0.007242 | 0 | 0 | 0 | 0 | 0 | 0.084746 | 1 | 0.067797 | false | 0 | 0.028249 | 0.00565 | 0.107345 | 0.00565 | 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 |
2de580f6a3e708734e7f2ed0c20af3ec7d2a3a1a | 1,985 | py | Python | etl/parsers/etw/Microsoft_Windows_Security_EnterpriseData_FileRevocationManager.py | IMULMUL/etl-parser | 76b7c046866ce0469cd129ee3f7bb3799b34e271 | [
"Apache-2.0"
] | 104 | 2020-03-04T14:31:31.000Z | 2022-03-28T02:59:36.000Z | etl/parsers/etw/Microsoft_Windows_Security_EnterpriseData_FileRevocationManager.py | IMULMUL/etl-parser | 76b7c046866ce0469cd129ee3f7bb3799b34e271 | [
"Apache-2.0"
] | 7 | 2020-04-20T09:18:39.000Z | 2022-03-19T17:06:19.000Z | etl/parsers/etw/Microsoft_Windows_Security_EnterpriseData_FileRevocationManager.py | IMULMUL/etl-parser | 76b7c046866ce0469cd129ee3f7bb3799b34e271 | [
"Apache-2.0"
] | 16 | 2020-03-05T18:55:59.000Z | 2022-03-01T10:19:28.000Z | # -*- coding: utf-8 -*-
"""
Microsoft-Windows-Security-EnterpriseData-FileRevocationManager
GUID : 2cd58181-0bb6-463e-828a-056ff837f966
"""
from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct
from etl.utils import WString, CString, SystemTime, Guid
from etl.dtyp import Sid
from etl.parsers.etw.core import Etw, declare, guid
@declare(guid=guid("2cd58181-0bb6-463e-828a-056ff837f966"), event_id=0, version=0)
class Microsoft_Windows_Security_EnterpriseData_FileRevocationManager_0_0(Etw):
pattern = Struct(
"EntIDString" / WString,
"AppIDString" / WString
)
@declare(guid=guid("2cd58181-0bb6-463e-828a-056ff837f966"), event_id=1, version=0)
class Microsoft_Windows_Security_EnterpriseData_FileRevocationManager_1_0(Etw):
pattern = Struct(
"EntIDString" / WString,
"AppIDString" / WString,
"ErrorCode" / Int32ul
)
@declare(guid=guid("2cd58181-0bb6-463e-828a-056ff837f966"), event_id=17, version=0)
class Microsoft_Windows_Security_EnterpriseData_FileRevocationManager_17_0(Etw):
pattern = Struct(
"EntIDString" / WString,
"AppIDString" / WString
)
@declare(guid=guid("2cd58181-0bb6-463e-828a-056ff837f966"), event_id=18, version=0)
class Microsoft_Windows_Security_EnterpriseData_FileRevocationManager_18_0(Etw):
pattern = Struct(
"EntIDString" / WString,
"AppIDString" / WString
)
@declare(guid=guid("2cd58181-0bb6-463e-828a-056ff837f966"), event_id=19, version=0)
class Microsoft_Windows_Security_EnterpriseData_FileRevocationManager_19_0(Etw):
pattern = Struct(
"EntIDString" / WString,
"AppIDString" / WString,
"ErrorCode" / Int32ul
)
@declare(guid=guid("2cd58181-0bb6-463e-828a-056ff837f966"), event_id=20, version=0)
class Microsoft_Windows_Security_EnterpriseData_FileRevocationManager_20_0(Etw):
pattern = Struct(
"PolicyString" / WString
)
| 33.083333 | 123 | 0.73602 | 221 | 1,985 | 6.420814 | 0.248869 | 0.078929 | 0.118393 | 0.187456 | 0.80902 | 0.767442 | 0.742072 | 0.742072 | 0.437632 | 0.437632 | 0 | 0.127078 | 0.151637 | 1,985 | 59 | 124 | 33.644068 | 0.715558 | 0.065491 | 0 | 0.439024 | 0 | 0 | 0.192849 | 0.11701 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.097561 | 0 | 0.390244 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
2df8c986e266b1ac3443e9fd1914cb1274804eef | 69 | py | Python | lang/py/cookbook/v2/source/cb2_19_7_exm_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_19_7_exm_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_19_7_exm_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | def average(sequence):
return sum(sequence)/float(len(sequence))
| 23 | 45 | 0.73913 | 9 | 69 | 5.666667 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.115942 | 69 | 2 | 46 | 34.5 | 0.836066 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 0.5 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
fa8b554eab534a72faf4a6c1b8e3f1f8d7a378f2 | 177 | py | Python | graph.py | katahiromz/SoundWaveStudy | c2cdff28a604520419bdadcf65c0de36790648dd | [
"MIT"
] | null | null | null | graph.py | katahiromz/SoundWaveStudy | c2cdff28a604520419bdadcf65c0de36790648dd | [
"MIT"
] | null | null | null | graph.py | katahiromz/SoundWaveStudy | c2cdff28a604520419bdadcf65c0de36790648dd | [
"MIT"
] | null | null | null | # graph.py
import matplotlib
import pandas as pd
import matplotlib.pyplot as plt
import sys
data = pd.read_csv(sys.argv[1], header=None, sep=' ')
data.plot()
plt.show()
| 19.666667 | 54 | 0.706215 | 29 | 177 | 4.275862 | 0.689655 | 0.258065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006803 | 0.169492 | 177 | 8 | 55 | 22.125 | 0.836735 | 0.045198 | 0 | 0 | 0 | 0 | 0.006289 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.571429 | 0 | 0.571429 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
fa9b27e44456d0815abcad32d31ee523fd170177 | 1,646 | py | Python | generate_graphs.py | mouchetm/CommunityDetection | a8a9ec01d8d02795ccacb5066777e8f0c60c6e3b | [
"MIT"
] | null | null | null | generate_graphs.py | mouchetm/CommunityDetection | a8a9ec01d8d02795ccacb5066777e8f0c60c6e3b | [
"MIT"
] | null | null | null | generate_graphs.py | mouchetm/CommunityDetection | a8a9ec01d8d02795ccacb5066777e8f0c60c6e3b | [
"MIT"
] | 1 | 2021-11-12T18:38:48.000Z | 2021-11-12T18:38:48.000Z | from utils import *
from tqdm import tqdm
outdir = '../data/simple_sbm1/'
#outdir = '../data/simple_sbm2/'
#outdir = '../data/complex_sbm1/'
#outdir = '../data/complex_sbm2/'
number_of_graphs = 50
p_in, p_out = 0.9, 0.1 #change for complexity of recovery of the clusters
#p_in, p_out = 0.7, 0.3
#p_in_min, p_out_max = 0.9, 0.1
#p_in_min, p_out_max = 0.7, 0.3
nodes_by_clusters = 500
nb_clusters = 4
block_sizes = nb_clusters * [nodes_by_clusters]
n_nodes = sum(block_sizes)
for i in tqdm(range(0, number_of_graphs)):
gr = simple_SBM(n_nodes, block_sizes, p_in, p_out)
#gr = random_SBM(n_nodes, block_sizes, p_in_min, p_out_max)
A = get_np_adjency_matrix(gr)
np.save(outdir + 'matrix_'+str(i)+'.npy', A)
outdir = '../data/simple_sbm2/'
p_in, p_out = 0.7, 0.3
for i in tqdm(range(0, number_of_graphs)):
gr = simple_SBM(n_nodes, block_sizes, p_in, p_out)
#gr = random_SBM(n_nodes, block_sizes, p_in_min, p_out_max)
A = get_np_adjency_matrix(gr)
np.save(outdir + 'matrix_'+str(i)+'.npy', A)
outdir = '../data/complex_sbm1/'
p_in_min, p_out_max = 0.9, 0.1
for i in tqdm(range(0, number_of_graphs)):
gr = simple_SBM(n_nodes, block_sizes, p_in, p_out)
#gr = random_SBM(n_nodes, block_sizes, p_in_min, p_out_max)
A = get_np_adjency_matrix(gr)
np.save(outdir + 'matrix_'+str(i)+'.npy', A)
outdir = '../data/complex_sbm2/'
p_in_min, p_out_max = 0.7, 0.3
for i in tqdm(range(0, number_of_graphs)):
gr = simple_SBM(n_nodes, block_sizes, p_in, p_out)
#gr = random_SBM(n_nodes, block_sizes, p_in_min, p_out_max)
A = get_np_adjency_matrix(gr)
np.save(outdir + 'matrix_'+str(i)+'.npy', A)
| 32.27451 | 73 | 0.68955 | 318 | 1,646 | 3.216981 | 0.163522 | 0.043988 | 0.046921 | 0.054741 | 0.729228 | 0.721408 | 0.721408 | 0.721408 | 0.703812 | 0.703812 | 0 | 0.032421 | 0.156744 | 1,646 | 50 | 74 | 32.92 | 0.704611 | 0.27825 | 0 | 0.516129 | 0 | 0 | 0.107052 | 0.035684 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.064516 | 0 | 0.064516 | 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 |
fab6c4c62f421e3719ca261f8cd23b7e21a25fb9 | 127 | py | Python | spanet/dataset/__init__.py | Alexanders101/SPANet | 20731bb271b23f0746243e79203ff6b77556c852 | [
"BSD-3-Clause"
] | 13 | 2021-05-20T15:13:01.000Z | 2021-11-24T22:12:45.000Z | spanet/dataset/__init__.py | Alexanders101/SPANet | 20731bb271b23f0746243e79203ff6b77556c852 | [
"BSD-3-Clause"
] | null | null | null | spanet/dataset/__init__.py | Alexanders101/SPANet | 20731bb271b23f0746243e79203ff6b77556c852 | [
"BSD-3-Clause"
] | 7 | 2021-06-28T12:18:17.000Z | 2022-01-27T20:05:06.000Z | from spanet.dataset.jet_reconstruction_dataset import JetReconstructionDataset
from spanet.dataset.event_info import EventInfo
| 42.333333 | 78 | 0.905512 | 15 | 127 | 7.466667 | 0.666667 | 0.178571 | 0.303571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.062992 | 127 | 2 | 79 | 63.5 | 0.941176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 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 |
fab826f43752570d1e09b903a4f83c09d7368a25 | 13,183 | py | Python | src/alias/azext_alias/tests/test_alias_commands.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/alias/azext_alias/tests/test_alias_commands.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/alias/azext_alias/tests/test_alias_commands.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long,too-many-public-methods
import os
import shutil
import tempfile
import unittest
from unittest import mock
from azure.cli.testsdk import ScenarioTest
from azext_alias import alias
from azext_alias._const import (
ALIAS_FILE_NAME,
ALIAS_HASH_FILE_NAME,
COLLIDED_ALIAS_FILE_NAME,
ALIAS_TAB_COMP_TABLE_FILE_NAME
)
class AliasTests(ScenarioTest):
def setUp(self):
self.mock_config_dir = tempfile.mkdtemp()
self.patchers = []
self.patchers.append(mock.patch('azext_alias.alias.GLOBAL_CONFIG_DIR', self.mock_config_dir))
self.patchers.append(mock.patch('azext_alias.alias.GLOBAL_ALIAS_PATH', os.path.join(self.mock_config_dir, ALIAS_FILE_NAME)))
self.patchers.append(mock.patch('azext_alias.alias.GLOBAL_ALIAS_HASH_PATH', os.path.join(self.mock_config_dir, ALIAS_HASH_FILE_NAME)))
self.patchers.append(mock.patch('azext_alias.alias.GLOBAL_COLLIDED_ALIAS_PATH', os.path.join(self.mock_config_dir, COLLIDED_ALIAS_FILE_NAME)))
self.patchers.append(mock.patch('azext_alias.util.GLOBAL_ALIAS_TAB_COMP_TABLE_PATH', os.path.join(self.mock_config_dir, ALIAS_TAB_COMP_TABLE_FILE_NAME)))
self.patchers.append(mock.patch('azext_alias.custom.GLOBAL_ALIAS_PATH', os.path.join(self.mock_config_dir, ALIAS_FILE_NAME)))
os.makedirs(os.path.join(self.mock_config_dir, 'export'))
for patcher in self.patchers:
patcher.start()
def tearDown(self):
for patcher in self.patchers:
patcher.stop()
shutil.rmtree(self.mock_config_dir)
def test_create_and_list_alias(self):
self.kwargs.update({
'alias_name': 'c',
'alias_command': 'create'
})
self.cmd('az alias create -n "{alias_name}" -c "{alias_command}"')
self.cmd('az alias list', checks=[
self.check('[0].alias', '{alias_name}'),
self.check('[0].command', '{alias_command}'),
self.check('length(@)', 1)
])
def test_create_alias_error(self):
self.kwargs.update({
'alias_name': 'c',
'alias_command': 'will_fail'
})
self.cmd('az alias create -n "{alias_name}" -c "{alias_command}"', expect_failure=True)
self.cmd('az alias list', checks=[
self.check('length(@)', 0)
])
def test_remove_alias(self):
self.kwargs.update({
'alias_name': 'c',
'alias_command': 'create'
})
self.cmd('az alias create -n "{alias_name}" -c "{alias_command}"')
self.cmd('az alias list', checks=[
self.check('[0].alias', '{alias_name}'),
self.check('[0].command', '{alias_command}'),
self.check('length(@)', 1)
])
self.cmd('az alias remove -n "{alias_name}"')
self.cmd('az alias list', checks=[
self.check('length(@)', 0)
])
def test_remove_multiple_aliases(self):
self.kwargs.update({
'alias_name': 'c',
'alias_command': 'create'
})
self.cmd('az alias create -n \'{alias_name}\' -c \'{alias_command}\'')
self.kwargs.update({
'alias_name': 'storage-ls {{ url }}',
'alias_command': 'storage blob list --account-name {{ url.replace("https://", "").split(".")[0] }} --container-name {{ url.replace("https://", "").split("/")[1] }}'
})
self.cmd('az alias create -n \'{alias_name}\' -c \'{alias_command}\'')
self.cmd('az alias list', checks=[
self.check('length(@)', 2)
])
self.cmd('az alias remove -n \'storage-ls {{{{ url }}}}\' c')
self.cmd('az alias list', checks=[
self.check('length(@)', 0)
])
def test_remove_alias_non_existing(self):
self.kwargs.update({
'alias_name': 'c',
})
self.cmd('az alias list', checks=[
self.check('length(@)', 0)
])
self.cmd('az alias remove -n "{alias_name}"', expect_failure=True)
def test_alias_file_and_hash_create(self):
self.kwargs.update({
'alias_name': 'c',
'alias_command': 'create'
})
self.cmd('az alias create -n "{alias_name}" -c "{alias_command}"')
expected_alias_string = '''[c]
command = create
'''
with open(alias.GLOBAL_ALIAS_PATH) as alias_config_file:
assert alias_config_file.read() == expected_alias_string
def test_alias_file_remove(self):
self.kwargs.update({
'alias_name': 'c',
'alias_command': 'create'
})
self.cmd('az alias create -n "{alias_name}" -c "{alias_command}"')
self.cmd('az alias list', checks=[
self.check('[0].alias', '{alias_name}'),
self.check('[0].command', '{alias_command}'),
self.check('length(@)', 1)
])
self.cmd('az alias remove -n "{alias_name}"')
with open(alias.GLOBAL_ALIAS_PATH) as alias_config_file:
assert not alias_config_file.read()
def test_create_and_import_file(self):
_, mock_alias_config_file = tempfile.mkstemp()
with open(mock_alias_config_file, 'w') as f:
f.write('[c]\ncommand = create\n[grp]\ncommand = group')
self.kwargs.update({
'alias_source': mock_alias_config_file
})
self.cmd('az alias import -s {alias_source}')
self.cmd('az alias list', checks=[
self.check('[0].alias', 'c'),
self.check('[0].command', 'create'),
self.check('[1].alias', 'grp'),
self.check('[1].command', 'group'),
self.check('length(@)', 2)
])
os.remove(mock_alias_config_file)
def test_create_and_import_url(self):
self.kwargs.update({
'alias_source': 'https://raw.githubusercontent.com/chewong/azure-cli-alias-extension/test/azext_alias/tests/alias'
})
self.cmd('az alias import -s {alias_source}')
self.cmd('az alias list', checks=[
self.check('[0].alias', 'c'),
self.check('[0].command', 'create'),
self.check('[1].alias', 'grp'),
self.check('[1].command', 'group'),
self.check('length(@)', 2)
])
def test_create_and_import_collide(self):
self.kwargs.update({
'alias_name': 'c',
'alias_command': 'vm'
})
self.cmd('az alias create -n \'{alias_name}\' -c \'{alias_command}\'')
self.cmd('az alias list', checks=[
self.check('[0].alias', '{alias_name}'),
self.check('[0].command', '{alias_command}'),
self.check('length(@)', 1)
])
self.kwargs.update({
'alias_source': 'https://raw.githubusercontent.com/chewong/azure-cli-alias-extension/test/azext_alias/tests/alias'
})
self.cmd('az alias import -s {alias_source}')
self.cmd('az alias list', checks=[
self.check('[0].alias', 'c'),
self.check('[0].command', 'create'),
self.check('[1].alias', 'grp'),
self.check('[1].command', 'group'),
self.check('length(@)', 2)
])
def test_import_invalid_content_from_url(self):
self.kwargs.update({
'alias_source': 'https://raw.githubusercontent.com/chewong/azure-cli-alias-extension/test/azext_alias/tests/invalid_alias'
})
self.cmd('az alias import -s {alias_source}', expect_failure=True)
self.cmd('az alias list', checks=[
self.check('length(@)', 0)
])
def test_remove_all_aliases(self):
self.kwargs.update({
'alias_name': 'list-vm {{ resource_group }}',
'alias_command': 'vm list --resource-group {{ resource_group }}'
})
self.cmd('az alias create -n \'{alias_name}\' -c \'{alias_command}\'')
self.kwargs.update({
'alias_name': 'storage-ls {{ url }}',
'alias_command': 'storage blob list --account-name {{ url.replace("https://", "").split(".")[0] }} --container-name {{ url.replace("https://", "").split("/")[1] }}'
})
self.cmd('az alias create -n \'{alias_name}\' -c \'{alias_command}\'')
self.cmd('az alias list', checks=[
self.check('length(@)', 2)
])
self.cmd('az alias remove-all --yes')
self.cmd('az alias list', checks=[
self.check('length(@)', 0)
])
def test_excessive_whitespaces_in_alias_command(self):
self.kwargs.update({
'alias_name': ' list-vm \n{{ resource_group }} ',
'alias_command': ' vm \n list --resource-group {{ resource_group }} '
})
self.cmd('az alias create -n \'{alias_name}\' -c \'{alias_command}\'')
self.cmd('az alias list', checks=[
self.check('[0].alias', 'list-vm {{{{ resource_group }}}}'),
self.check('[0].command', 'vm list --resource-group {{{{ resource_group }}}}'),
self.check('length(@)', 1)
])
@mock.patch('os.getcwd')
def test_export_file_name_only(self, mock_os_getcwd):
mock_os_getcwd.return_value = os.path.join(self.mock_config_dir, 'export')
self._pre_test_export()
self.cmd('az alias export -p alias')
self._post_test_export(os.path.join(self.mock_config_dir, 'export', 'alias'))
@mock.patch('os.getcwd')
def test_export_existing_file(self, mock_os_getcwd):
mock_os_getcwd.return_value = os.path.join(self.mock_config_dir, 'export')
self._pre_test_export()
self.cmd('az alias export -p alias')
self.cmd('az alias export -p alias', expect_failure=True)
@mock.patch('os.getcwd')
def test_export_path_relative_path(self, mock_os_getcwd):
mock_os_getcwd.return_value = os.path.join(self.mock_config_dir, 'export')
self._pre_test_export()
self.cmd('az alias export -p test1/test2/alias')
self._post_test_export(os.path.join(self.mock_config_dir, 'export', 'test1', 'test2', 'alias'))
@mock.patch('os.getcwd')
def test_export_path_dir_only(self, mock_os_getcwd):
mock_os_getcwd.return_value = os.path.join(self.mock_config_dir, 'export')
self._pre_test_export()
self.cmd('az alias export -p {}'.format(os.path.join(self.mock_config_dir, 'export')))
self._post_test_export(os.path.join(self.mock_config_dir, 'export', 'alias'))
@mock.patch('os.getcwd')
def test_export_path_absolute_path(self, mock_os_getcwd):
mock_os_getcwd.return_value = os.path.join(self.mock_config_dir, 'export')
self._pre_test_export()
self.cmd('az alias export -p {}'.format(os.path.join(self.mock_config_dir, 'export', 'alias12345')))
self._post_test_export(os.path.join(self.mock_config_dir, 'export', 'alias12345'))
@mock.patch('os.getcwd')
def test_export_path_exclusion(self, mock_os_getcwd):
mock_os_getcwd.return_value = os.path.join(self.mock_config_dir, 'export')
self._pre_test_export()
self.cmd('az alias export -p {} -e \'{}\''.format('alias', 'storage-ls {{{{ url }}}}'))
self._post_test_export(os.path.join(self.mock_config_dir, 'export', 'alias'), test_exclusion=True)
@mock.patch('os.getcwd')
def test_export_path_exclusion_error(self, mock_os_getcwd):
mock_os_getcwd.return_value = os.path.join(self.mock_config_dir, 'export')
self._pre_test_export()
self.cmd('az alias export -p {} -e {}'.format('alias', 'invalid_alias'), expect_failure=True)
def _pre_test_export(self):
self.kwargs.update({
'alias_name': 'c',
'alias_command': 'create'
})
self.cmd('az alias create -n \'{alias_name}\' -c \'{alias_command}\'')
self.kwargs.update({
'alias_name': 'storage-ls {{ url }}',
'alias_command': 'storage blob list --account-name {{ url.replace("https://", "").split(".")[0] }} --container-name {{ url.replace("https://", "").split("/")[1] }}'
})
self.cmd('az alias create -n \'{alias_name}\' -c \'{alias_command}\'')
self.cmd('az alias list', checks=[
self.check('length(@)', 2)
])
def _post_test_export(self, export_path, test_exclusion=False): # pylint: disable=no-self-use
with open(export_path, 'r') as f:
expected = '''[c]
command = create
[storage-ls {{ url }}]
command = storage blob list --account-name {{ url.replace("https://", "").split(".")[0] }} --container-name {{ url.replace("https://", "").split("/")[1] }}
''' if not test_exclusion else '''[c]
command = create
'''
assert f.read() == expected
if __name__ == '__main__':
unittest.main()
| 42.118211 | 176 | 0.584389 | 1,639 | 13,183 | 4.466748 | 0.097621 | 0.044939 | 0.057779 | 0.089878 | 0.798115 | 0.779812 | 0.766152 | 0.753176 | 0.727906 | 0.657834 | 0 | 0.006053 | 0.235606 | 13,183 | 312 | 177 | 42.253205 | 0.720453 | 0.031708 | 0 | 0.67037 | 0 | 0.025926 | 0.312745 | 0.020458 | 0 | 0 | 0 | 0 | 0.011111 | 1 | 0.088889 | false | 0 | 0.059259 | 0 | 0.151852 | 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 |
fad504747ef1506dfb52b347d7ca8178b08d3f0b | 221 | py | Python | excelApi/urls.py | damiso15/excel_microservice | 4c1b57ad6b5d1afb455d55ea97981b8ecc7c28f6 | [
"MIT"
] | null | null | null | excelApi/urls.py | damiso15/excel_microservice | 4c1b57ad6b5d1afb455d55ea97981b8ecc7c28f6 | [
"MIT"
] | 5 | 2021-03-30T14:07:01.000Z | 2021-09-22T19:30:11.000Z | excelApi/urls.py | damiso15/excel_microservice | 4c1b57ad6b5d1afb455d55ea97981b8ecc7c28f6 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import ExcelAPIView
app_name = 'excelApi'
urlpatterns = [
# path('', ExcelAPIView.as_view(), name='post-parse'),
path('', ExcelAPIView.as_view(), name='pre-parse'),
]
| 17 | 58 | 0.674208 | 27 | 221 | 5.407407 | 0.592593 | 0.219178 | 0.246575 | 0.30137 | 0.356164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.158371 | 221 | 12 | 59 | 18.416667 | 0.784946 | 0.235294 | 0 | 0 | 0 | 0 | 0.101796 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
87877ae442743b57e55690a022a760022eb7784e | 291 | py | Python | src/tigerarcades/primes/tests/test_lib.py | tigerarcades/primes | cc52e8238acc18fc89c13da460e69c2665c17c69 | [
"MIT"
] | null | null | null | src/tigerarcades/primes/tests/test_lib.py | tigerarcades/primes | cc52e8238acc18fc89c13da460e69c2665c17c69 | [
"MIT"
] | null | null | null | src/tigerarcades/primes/tests/test_lib.py | tigerarcades/primes | cc52e8238acc18fc89c13da460e69c2665c17c69 | [
"MIT"
] | null | null | null | from tigerarcades.primes import lib
def test_is_prime():
assert lib.is_prime(2)
assert lib.is_prime(3)
assert not lib.is_prime(4)
assert lib.is_prime(5)
assert not lib.is_prime(6)
assert lib.is_prime(7)
assert not lib.is_prime(8)
assert not lib.is_prime(9)
| 22.384615 | 35 | 0.697595 | 53 | 291 | 3.641509 | 0.358491 | 0.326425 | 0.414508 | 0.331606 | 0.393782 | 0 | 0 | 0 | 0 | 0 | 0 | 0.034632 | 0.206186 | 291 | 12 | 36 | 24.25 | 0.800866 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.8 | 1 | 0.1 | true | 0 | 0.1 | 0 | 0.2 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
87a13b982390e494c1205e929ddbe62131913bfb | 123 | py | Python | proudcatowner/utils/__init__.py | cyanideph/proudcatowner | b54f060f8545c4580961a2072e0486f17d164076 | [
"MIT"
] | null | null | null | proudcatowner/utils/__init__.py | cyanideph/proudcatowner | b54f060f8545c4580961a2072e0486f17d164076 | [
"MIT"
] | null | null | null | proudcatowner/utils/__init__.py | cyanideph/proudcatowner | b54f060f8545c4580961a2072e0486f17d164076 | [
"MIT"
] | null | null | null | from .entities import *
from .exceptions import *
from .helpers import *
from .device import *
from .headers import *
| 20.5 | 26 | 0.715447 | 15 | 123 | 5.866667 | 0.466667 | 0.454545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.203252 | 123 | 5 | 27 | 24.6 | 0.897959 | 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 |
87b03952835f5933fdc139e5eb8811c98032b4ca | 374 | py | Python | src/lib/permissions.py | softcodesInt/softcode-admin-api | 697c1c6c3c9a3dc524a3e7c2271071e7c9c1f03f | [
"MIT"
] | null | null | null | src/lib/permissions.py | softcodesInt/softcode-admin-api | 697c1c6c3c9a3dc524a3e7c2271071e7c9c1f03f | [
"MIT"
] | null | null | null | src/lib/permissions.py | softcodesInt/softcode-admin-api | 697c1c6c3c9a3dc524a3e7c2271071e7c9c1f03f | [
"MIT"
] | null | null | null | from rest_framework import permissions
class AdminDashboardPermission(permissions.BasePermission):
def has_permission(self, request, view):
return request.user.is_staff and request.user.is_active
class AppPermission(permissions.BasePermission):
def has_permission(self, request, view):
return request.user.is_active and not request.user.is_staff
| 31.166667 | 67 | 0.78877 | 46 | 374 | 6.26087 | 0.478261 | 0.152778 | 0.180556 | 0.215278 | 0.520833 | 0.520833 | 0.520833 | 0.520833 | 0.520833 | 0.520833 | 0 | 0 | 0.141711 | 374 | 11 | 68 | 34 | 0.897196 | 0 | 0 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0.142857 | 0.285714 | 1 | 0 | 0 | 0 | 0 | null | 0 | 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 |
87bde709490cda1474c17f9122c1b852ab9d5a0b | 15 | py | Python | login.py | longguang99/test001 | 9d065c8c7356c0738ad5910bb8e0b8053bbecc98 | [
"MIT"
] | null | null | null | login.py | longguang99/test001 | 9d065c8c7356c0738ad5910bb8e0b8053bbecc98 | [
"MIT"
] | null | null | null | login.py | longguang99/test001 | 9d065c8c7356c0738ad5910bb8e0b8053bbecc98 | [
"MIT"
] | null | null | null | num=10
num2=20
| 5 | 7 | 0.733333 | 4 | 15 | 2.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.384615 | 0.133333 | 15 | 2 | 8 | 7.5 | 0.461538 | 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 |
87c239addaaf6db46fb8014dfd57c3242a967908 | 70 | py | Python | enthought/pyface/workbench/action/tool_bar_manager.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/pyface/workbench/action/tool_bar_manager.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/pyface/workbench/action/tool_bar_manager.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from pyface.workbench.action.tool_bar_manager import *
| 23.333333 | 54 | 0.828571 | 10 | 70 | 5.6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 70 | 2 | 55 | 35 | 0.888889 | 0.171429 | 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 |
35730f0f3ae50d98720a2e01ab08b5871289b7a4 | 21 | py | Python | tools/__init__.py | alxsimon/Teaser | 1e4cdef270aa028b57508847375fa6f6f691db6c | [
"MIT"
] | 44 | 2015-09-01T17:45:15.000Z | 2021-02-09T02:19:29.000Z | tools/__init__.py | alxsimon/Teaser | 1e4cdef270aa028b57508847375fa6f6f691db6c | [
"MIT"
] | 16 | 2016-01-07T23:43:56.000Z | 2021-10-21T10:04:28.000Z | tools/__init__.py | alxsimon/Teaser | 1e4cdef270aa028b57508847375fa6f6f691db6c | [
"MIT"
] | 8 | 2016-05-13T20:54:14.000Z | 2020-07-23T16:31:10.000Z | # Tools module init
| 10.5 | 20 | 0.714286 | 3 | 21 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.238095 | 21 | 1 | 21 | 21 | 0.9375 | 0.809524 | 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 |
35a023ef1bb80d539a28eb2c617593756407f50c | 81 | py | Python | enumfields/__init__.py | Lamda511/django-enumfields | d8c2018afae9de8156479b6bc0ff8e45cef9a1d3 | [
"MIT"
] | 5 | 2018-05-05T21:49:41.000Z | 2019-01-22T14:08:27.000Z | enumfields/__init__.py | Lamda511/django-enumfields | d8c2018afae9de8156479b6bc0ff8e45cef9a1d3 | [
"MIT"
] | 1 | 2018-05-09T12:25:08.000Z | 2018-05-10T12:39:51.000Z | enumfields/__init__.py | Lamda511/django-enumfields | d8c2018afae9de8156479b6bc0ff8e45cef9a1d3 | [
"MIT"
] | 1 | 2016-08-29T21:10:54.000Z | 2016-08-29T21:10:54.000Z | from .enums import Enum, IntEnum
from .fields import EnumField, EnumIntegerField
| 27 | 47 | 0.82716 | 10 | 81 | 6.7 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.123457 | 81 | 2 | 48 | 40.5 | 0.943662 | 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 |
35c34491b0b41756a71644413e3f2eddebd5d4c3 | 42,977 | py | Python | userbot/plugins/animation2.py | yu9ohde/Marshmellow | 145c90470701c972ab458483ac1b9320d1a44e8e | [
"MIT"
] | 2 | 2020-12-06T03:46:08.000Z | 2022-02-19T20:34:52.000Z | userbot/plugins/animation2.py | pro-boy/Marshmello | 4cf6d96b69a7e0617ba5ced96eb5ee557b318b4c | [
"MIT"
] | 4 | 2020-11-07T07:39:51.000Z | 2020-11-10T03:46:41.000Z | userbot/plugins/animation2.py | pro-boy/Marshmello | 4cf6d96b69a7e0617ba5ced96eb5ee557b318b4c | [
"MIT"
] | 9 | 2020-11-28T11:30:44.000Z | 2021-06-01T07:11:57.000Z | from telethon import events
from userbot.utils import admin_cmd
import random, re, asyncio
from userbot import ALIVE_NAME, CMD_HELP
from userbot import CMD_HELP
from collections import deque
import importlib.util
from platform import uname
from telethon.tl.types import ChannelParticipantsAdmins
DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Cat"
@borg.on(admin_cmd(pattern=r"lul$"))
async def _(event):
if event.fwd_from:
return
deq = deque(list("😂🤣😂🤣😂🤣"))
for _ in range(48):
await asyncio.sleep(0.1)
await event.edit("".join(deq))
deq.rotate(1)
@borg.on(admin_cmd(pattern=r"crazy$"))
async def _(event):
if event.fwd_from:
return
deq = deque(list("😁☹️😁☹️😁☹️😁"))
for _ in range(48):
await asyncio.sleep(0.1)
await event.edit("".join(deq))
deq.rotate(1)
@borg.on(admin_cmd(outgoing=True, pattern="clock$"))
async def _(event):
if event.fwd_from:
return
deq = deque(list("🕙🕘🕗🕖🕕🕔🕓🕒🕑🕐🕛"))
for _ in range(48):
await asyncio.sleep(0.1)
await event.edit("".join(deq))
deq.rotate(1)
@borg.on(admin_cmd(pattern=r"muah$"))
async def _(event):
if event.fwd_from:
return
deq = deque(list("😗😙😚😚😘"))
for _ in range(48):
await asyncio.sleep(0.1)
await event.edit("".join(deq))
deq.rotate(1)
@borg.on(admin_cmd(pattern="heart$"))
async def _(event):
if event.fwd_from:
return
deq = deque(list("❤️🧡💛💚💙💜🖤"))
for _ in range(48):
await asyncio.sleep(0.1)
await event.edit("".join(deq))
deq.rotate(1)
@borg.on(admin_cmd(pattern="gym$", outgoing=True))
async def _(event):
if event.fwd_from:
return
deq = deque(list("🏃🏋🤸🏃🏋🤸🏃🏋🤸"))
for _ in range(48):
await asyncio.sleep(0.1)
await event.edit("".join(deq))
deq.rotate(1)
@borg.on(admin_cmd(pattern=f"earth$", outgoing=True))
async def _(event):
if event.fwd_from:
return
deq = deque(list("🌏🌍🌎🌎🌍🌏🌍🌎"))
for _ in range(48):
await asyncio.sleep(0.1)
await event.edit("".join(deq))
deq.rotate(1)
@borg.on(admin_cmd(outgoing=True, pattern="moon$"))
async def _(event):
if event.fwd_from:
return
deq = deque(list("🌗🌘🌑🌒🌓🌔🌕🌖"))
for _ in range(48):
await asyncio.sleep(0.1)
await event.edit("".join(deq))
deq.rotate(1)
@borg.on(admin_cmd(pattern=r"candy$"))
async def _(event):
if event.fwd_from:
return
deq = deque(list("🍦🍧🍩🍪🎂🍰🧁🍫🍬🍭"))
for _ in range(48):
await asyncio.sleep(0.1)
await event.edit("".join(deq))
deq.rotate(1)
@borg.on(admin_cmd(pattern="stupidity$"))
async def _(event):
if event.fwd_from:
return
animation_interval = 1
animation_ttl = range(0, 14)
await event.edit("brain")
animation_chars = [
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n🧠 <(^_^ <)🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n🧠 <(^_^ <) 🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n🧠 <(^_^ <) 🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n🧠 <(^_^ <) 🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n🧠 <(^_^ <) 🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n🧠<(^_^ <) 🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n(> ^_^)>🧠 🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n (> ^_^)>🧠 🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n (> ^_^)>🧠 🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n (> ^_^)>🧠 🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n (> ^_^)>🧠 🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n (> ^_^)>🧠🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n (> ^_^)>🗑",
"YOᑌᖇ ᗷᖇᗩIᑎ ➡️ 🧠\n\n <(^_^ <)🗑",
]
for i in animation_ttl:
await asyncio.sleep(animation_interval)
await event.edit(animation_chars[i %14 ])
@borg.on(admin_cmd(pattern=f"bomb$", outgoing=True))
async def _(event):
if event.fwd_from:
return
await event.edit("▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n")
await asyncio.sleep(0.5)
await event.edit("💣💣💣💣 \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n")
await asyncio.sleep(0.5)
await event.edit("▪️▪️▪️▪️ \n💣💣💣💣 \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n")
await asyncio.sleep(0.5)
await event.edit("▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n💣💣💣💣 \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n")
await asyncio.sleep(0.5)
await event.edit("▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n💣💣💣💣 \n▪️▪️▪️▪️ \n")
await asyncio.sleep(0.5)
await event.edit("▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n💣💣💣💣 \n")
await asyncio.sleep(1)
await event.edit("▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n💥💥💥💥 \n")
await asyncio.sleep(0.5)
await event.edit("▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n💥💥💥💥 \n💥💥💥💥 \n")
await asyncio.sleep(0.5)
await event.edit("▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n▪️▪️▪️▪️ \n😵😵😵😵 \n")
await asyncio.sleep(0.5)
await event.edit("`RIP USER......`")
await asyncio.sleep(2)
@borg.on(admin_cmd(pattern=f"kill$", outgoing=True))
async def _(event):
if event.fwd_from:
return
animation_interval = 0.7
animation_ttl = range(0, 12)
await event.edit("ready to die dude.....")
animation_chars = [
"Fiiiiire",
"( ・ิω・ิ)︻デ═一-->",
"---->____________",
"------>__________",
"-------->_________",
"---------->_______",
"------------>_____",
"-------------->____",
"------------------>",
"------>;(^。^)ノ",
"( ̄ー ̄) DED",
"`Headshot 😈.😈.😈.😈.😈.😈.😈......`\n '#Sad_Reacts_Online'\n",
]
for i in animation_ttl:
await asyncio.sleep(animation_interval)
await event.edit(animation_chars[i % 12])
@borg.on(admin_cmd(pattern="wtf$"))
async def _(event):
if event.fwd_from:
return
animation_interval = 0.5
animation_ttl = range(0, 5)
await event.edit("wtf")
animation_chars = [
"What",
"What The",
"What The F",
"What The F Brah"
]
for i in animation_ttl:
await asyncio.sleep(animation_interval)
await event.edit(animation_chars[i % 5 ])
@borg.on(admin_cmd(pattern="ding$"))
async def _(event):
animation_interval = 0.3
animation_ttl = range(0, 30)
animation_chars = [
"🔴⬛⬛⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜",
"⬜⬜⬛⬜⬜\n⬜⬛⬜⬜⬜\n🔴⬜⬜⬜⬜",
"⬜⬜⬛⬜⬜\n⬜⬜⬛⬜⬜\n⬜⬜🔴⬜⬜",
"⬜⬜⬛⬜⬜\n⬜⬜⬜⬛⬜\n⬜⬜⬜⬜🔴",
"⬜⬜⬛⬛🔴\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜",
"⬜⬜⬛⬜⬜\n⬜⬜⬜⬛⬜\n⬜⬜⬜⬜🔴",
"⬜⬜⬛⬜⬜\n⬜⬜⬛⬜⬜\n⬜⬜🔴⬜⬜",
"⬜⬜⬛⬜⬜\n⬜⬛⬜⬜⬜\n🔴⬜⬜⬜⬜",
"🔴⬛⬛⬜⬜\n⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜"
]
if event.fwd_from:
return
await event.edit("ding..dong..ding..dong ...")
await asyncio.sleep(4)
for i in animation_ttl:
await asyncio.sleep(animation_interval)
await event.edit(animation_chars[i % 10])
@borg.on(admin_cmd(pattern=f"hypnotize$", outgoing=True))
async def _(event):
if event.fwd_from:
return
animation_interval = 0.3
animation_ttl = range(0, 15)
await event.edit("hypnotizing....")
animation_chars = [
"⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜",
"⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬛⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜",
"⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬛⬛⬛⬜⬜\n⬜⬜⬛⬜⬛⬜⬜\n⬜⬜⬛⬛⬛⬜⬜\n⬜⬜⬜⬜⬜⬜⬜\n⬜⬜⬜⬜⬜⬜⬜",
"⬜⬜⬜⬜⬜⬜⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬜⬜⬜⬜⬜⬜",
"⬛⬛⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬛⬛⬛⬛⬛⬛",
"⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛",
"⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛⬜",
"⬜⬜⬜⬜⬜⬜⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬜⬜⬜⬜⬜⬜",
"⬛⬛⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬜⬛⬛⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬛⬛⬜⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬛⬛⬛⬛⬛⬛",
"⬜⬜⬜⬜⬜⬜⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬜⬜⬜⬜⬜⬜",
"⬛⬛⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬜⬛⬛⬛⬜⬛\n⬛⬜⬛⬜⬛⬜⬛\n⬛⬜⬛⬛⬛⬜⬛\n⬛⬜⬜⬜⬜⬜⬛\n⬛⬛⬛⬛⬛⬛⬛",
"⬜⬜⬜⬜⬜⬜⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬜⬛⬜⬛⬜\n⬜⬛⬜⬜⬜⬛⬜\n⬜⬛⬛⬛⬛⬛⬜\n⬜⬜⬜⬜⬜⬜⬜",
"⬛⬛⬛⬛⬛\n⬛⬜⬜⬜⬛\n⬛⬜⬛⬜⬛\n⬛⬜⬜⬜⬛\n⬛⬛⬛⬛⬛",
"⬜⬜⬜\n⬜⬛⬜\n⬜⬜⬜",
"[👉🔴👈])"
]
for i in animation_ttl:
await asyncio.sleep(animation_interval)
await event.edit(animation_chars[i % 15])
@borg.on(admin_cmd(pattern="gangster$"))
async def _(event):
await event.edit("EVERyBOdy")
await asyncio.sleep(0.3)
await event.edit("iZ")
await asyncio.sleep(0.2)
await event.edit("GangSTur")
await asyncio.sleep(0.5)
await event.edit("UNtIL ")
await asyncio.sleep(0.2)
await event.edit("I")
await asyncio.sleep(0.3)
await event.edit("ArRivE")
await asyncio.sleep(0.3)
await event.edit("🔥🔥🔥")
await asyncio.sleep(0.3)
await event.edit("EVERyBOdy iZ GangSTur UNtIL I ArRivE 🔥🔥🔥")
A = ("⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⣠⣤⣶⣶\n"
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⢰⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣀⣀⣾⣿⣿⣿⣿\n"
"⣿⡏⠉⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⠀⠀⠀⠈⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⠉⠁⠀⣿\n"
"⣿⣿⣧⡀⠀⠀⠀⠀⠙⠿⠿⠻⠿⠟⠿⠛⠉⠀⠀⠀⠀⠀⣸⣿\n"
"⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿\n"
"⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⡟⠀⠀⢰⣹⡆⠀⠀⠀⠀⠀⠀⣭⣷⠀⠀⠸⣿⣿⣿\n"
"⣿⣿⣿⣿⠃⠀⠀⠈⠉⠀⠀⠀⠤⠄⠀⠀⠉⠁⠀⠀⠀⢿⣿⣿\n"
"⣿⣿⣿⣿⠀⢾⣿⣷⠀⠀⠀⠀⡠⠤⢄⠀⠀⠠⣿⣿⣷⠀⣿⣿\n"
"⣿⣿⣿⣿⡀⠀⠉⠀⠀⠀⠀⠀⢄⠀⢀⠀⠀⠀⠉⠉⠁⠀⣿⣿\n"
"⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿\n"
"⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿\n"
"⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿\n"
"⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿🅼🅰️ 🅺🅸 🅲🅷🆄⢸⣿⣿⣿⣿⣿⣿\n"
"🅿️🅸🅺🅰️ 🅿️🅸🅺🅰️ 🅿️🅸🅺🅰️🅲🅷🆄\n")
B = ("⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n"
"⠀⠀⠀⠀⠀⠀⠀⢀⣤⣤⡀⠀⠀⠀⠀⠀⠀\n"
"⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀\n"
"⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⠟⠀⠀⠀⠀⠀⠀\n"
"⠀⠀⠀⠀⠀⠀⠀⠘⠻⣿⣷⣄⠀⠀⠀⠀⠀\n"
"⠀⠀⠀⠀⣴⣶⣿⡆⠀⠀⠉⠉⠀⠈⣶⡆⠀\n"
"⠀⠀⠀⢠⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⢻⣷⠀\n"
"⠀⠀⠀⣼⣿⡿⠟⠀⠀⠀⠀⠀⠀⠀⣸⣿⡄\n"
"⠀⠀⠀⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣷\n"
"⠀⠀⠘⠛⠃⠀⠀⠀⠀⠀⠀⠀⠀⢰⣾⣿⠏\n"
"⠀⢠⣧⡔⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠟⠁⠀\n"
"⠀⢸⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ Ah\n here we go again.\n")
C = ("⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n"
"⢀⡴⠑⡄⠀⠀⠀⠀⠀⠀⠀⣀⣀⣤⣤⣤⣀⡀⠀⠀⠀⠀\n"
"⠸⡇⠀⠿⡀⠀⠀⠀⣀⡴⢿⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀⠀⠀⠀\n"
"⠀⠀⠀⠀⠑⢄⣠⠾⠁⣀⣄⡈⠙⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀\n"
"⠀⠀⠀⠀⢀⡀⠁⠀⠀⠈⠙⠛⠂⠈⣿⣿⣿⣿⣿⠿⡿⢿⣆⠀\n"
"⠀⠀⠀⢀⡾⣁⣀⠀⠴⠂⠙⣗⡀⠀⢻⣿⣿⠭⢤⣴⣦⣤⣹⠀\n"
"⠀⠀⢀⣾⣿⣿⣿⣷⣮⣽⣾⣿⣥⣴⣿⣿⡿⢂⠔⢚⡿⢿⣿⣦\n"
"⠀⢀⡞⠁⠙⠻⠿⠟⠉⠀⠛⢹⣿⣿⣿⣿⣿⣌⢤⣼⣿⣾⣿⡟\n"
"⠀⣾⣷⣶⠇⠀⠀⣤⣄⣀⡀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇\n"
"⠀⠉⠈⠉⠀⠀⢦⡈⢻⣿⣿⣿⣶⣶⣶⣶⣤⣽⡹⣿⣿⣿⣿⡇\n"
"⠀⠀⠀⠀⠀⠀⠀⠉⠲⣽⡻⢿⣿⣿⣿⣿⣿⣿⣷⣜⣿⣿⣿⡇\n"
"⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣷⣶⣮⣭⣽⣿⣿⣿⣿⣿⣿⣿⠀\n"
"⠀⠀⠀⠀⠀⠀⣀⣀⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀\n"
"⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀\n"
"⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀\n"
"⠄⠄⠄⠄⠄⠄⣠⢼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⡄⠄⠄⠄\n"
"⠄⠄⣀⣤⣴⣾⣿⣷⣭⣭⣭⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⠄⠄\n"
"⠄⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣸⣿⣿⣧⠄⠄\n"
"⠄⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⢻⣿⣿⡄⠄\n"
"⠄⢸⣿⣮⣿⣿⣿⣿⣿⣿⣿⡟⢹⣿⣿⣿⡟⢛⢻⣷⢻⣿⣧⠄\n"
"⠄⠄⣿⡏⣿⡟⡛⢻⣿⣿⣿⣿⠸⣿⣿⣿⣷⣬⣼⣿⢸⣿⣿⠄\n"
"⠄⠄⣿⣧⢿⣧⣥⣾⣿⣿⣿⡟⣴⣝⠿⣿⣿⣿⠿⣫⣾⣿⣿⡆\n"
"⠄⠄⢸⣿⣮⡻⠿⣿⠿⣟⣫⣾⣿⣿⣿⣷⣶⣾⣿⡏⣿⣿⣿⡇\n"
"⠄⠄⢸⣿⣿⣿⡇⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⣿⣿⣿⡇\n"
"⠄⠄⢸⣿⣿⣿⡇⠄⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢸⣿⣿⣿⠄\n"
"⠄⠄⣼⣿⣿⣿⢃⣾⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⣿⣿⣿⡇⠄\n"
"⠄⠄⠸⣿⣿⢣⢶⣟⣿⣖⣿⣷⣻⣮⡿⣽⣿⣻⣖⣶⣤⣭⡉⠄\n"
"⠄⠄⠄⢹⠣⣛⣣⣭⣁⡛⠻⢽⣿⣿⣿⣿⢻⣿⣿⣿⣽⡧⡄⠄\n"
"⠄⠄⠄⠄⣼⣿⣿⣿⣿⣿⣿⣶⣌⡛⢿⣽⢘⣿⣷⣿⡻⠏⣛⣀\n"
"⠄⠄⠄⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⠙⡅⣿⠚⣡⣴⣿⣿⡆\n"
"⠄⠄⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠄⣱⣾⣿⣿⣿⣿⣿\n"
"⠄⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢸⣿⣿⣿⣿⣿⣿⣿\n"
"⠄⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠣⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⠄⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⠑⣿⣮⣝⣛⠿⠿⣿⣿⣿\n"
"⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⠄⠄⠄⠄⣿⣿⣿⣿⣿⣿⣿⣿⡟\n"
"⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠄⠄⠄⠄⢹⣿⣿⣿⣿⣿⣿⣿⡟\n"
"⣸⣿⣿⣿⣿⣿⣿⣿⣿⠏⠄⠄⠄⠄⠄⠸⣿⣿⣿⣿⡿⢟⣣\n"
"⣿⣿⣿⣿Ohh Yaa,Come on Baby⣿⣿⣿⣿\n")
D = ("⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⡿⠿⠿⠿⠿⠿⠿⢿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⣧⣤⣤⠀⢠⣤⡄⢸⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠸⠿⠇⢸⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⣿⣿⠿⠷⣤⣀⣤⣾⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⡏⢀⣤⣤⡀⠹⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⡇⠘⠿⠿⠃⢠⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⡿⠦⠤⠤⠴⢿⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⣧⣤⣤⣄⡀ ⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣤⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⣇⣀⣀⣀⡀ ⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⡿⠿⠿⠿⠟⠀⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⣧⣤⣤⣤⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⠉⠉⢉⣉⣉⣉⣉⣉⣉⡉⠉⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⠀⠀⠻⠿⠿⠿⣿⡿⠿⠇⠀⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⠀⠀⣤⣤⣤⣤⣾⡇⠀⠀⠀⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⠀⠀⢉⣩⣭⣭⣭⡄⠀⠀⠀⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⠀⠀⣿⡟⠋⠉⠋⠁⠀⠀⠀⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⠀⠀⣾⣿⣶⣶⣶⡆⠀⠀⠀⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⠀⠀⣶⣶⣶⣶⣶⣶⣶⡆⠀⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⠀⠀⣾⣏⠀⠀⣹⡇⠀⠀⠀⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⠀⠀⠘⠿⠿⠿⠟⠃⠀⠀⠀⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n")
@borg.on(admin_cmd(pattern="athink (.*)"))
async def survivor(think):
name = think.pattern_match.group(1)
E = (f"** ➥ {name} .\n\n**"
"⠀⠀⠀⠀⢀⣀⣀⣀\n"
"⠀⠀⠀⠰⡿⠿⠛⠛⠻⠿⣷\n"
"⠀⠀⠀⠀⠀⠀⣀⣄⡀⠀⠀⠀⠀⢀⣀⣀⣤⣄⣀⡀\n"
"⠀⠀⠀⠀⠀⢸⣿⣿⣷⠀⠀⠀⠀⠛⠛⣿⣿⣿⡛⠿⠷\n"
"⠀⠀⠀⠀⠀⠘⠿⠿⠋⠀⠀⠀⠀⠀⠀⣿⣿⣿⠇\n"
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠁\n"
"⠀\n"
"⠀⠀⠀⠀⣿⣷⣄⠀⢶⣶⣷⣶⣶⣤⣀\n"
"⠀⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀⠀⠈⠙⠻⠗\n"
"⠀⠀⠀⣰⣿⣿⣿⠀⠀⠀⠀⢀⣀⣠⣤⣴⣶⡄\n"
"⠀⣠⣾⣿⣿⣿⣥⣶⣶⣿⣿⣿⣿⣿⠿⠿⠛⠃\n"
"⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄\n"
"⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁\n"
"⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁\n"
"⠀⠀⠛⢿⣿⣿⣿⣿⣿⣿⡿⠟\n")
await think.edit(n + E)
@borg.on(admin_cmd(pattern="xdick (.*)"))
async def survivor(dicksay):
name = dicksay.pattern_match.group(1)
F = (f"** ➥ {name} .\n**"
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n"
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡤⠖⠲⢄\n"
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠞⠁⠀⠀⠀⠀⢱\n"
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠎⠀⠀⠀⠀⠀⠀⠀⣸\n"
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣄⠀⠀⠀⠀⢀⡠⠖⠁\n"
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⠁⠀⠀\n"
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣯⣿⣿⣿⣿⣿⠇⠀⠀⠀\n"
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⡴⣻⣿⣿⣿⣿⣯⠏⠀⠀⠀⠀\n"
"⠀⠀⠀⠀⠀⠀⠀⣠⠾⣽⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀\n"
"⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀\n"
"⠀⠀⠀⠀⣴⣻⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀\n"
"⠀⠀⣠⢾⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀\n"
"⠀⣼⣷⣿⣿⣿⣿⣿⣿⣟⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n"
"⢸⢿⣿⣿⣿⣿⣿⣿⣿⣯⣻⡟⡆⠀⠀⠀⠀⠀⠀⠀⠀\n"
"⠸⣿⣿⣿⣿⣿⣿⣿⣿⣹⣿⡿⡇⠀⠀⠀⠀⠀⠀⠀⠀\n"
"⠀⠹⣟⣿⣿⣿⣿⡿⣷⡿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀\n"
"⠀⠀⠈⠛⠯⣿⡯⠟⠛⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n")
await dicksay.edit(n + F)
@borg.on(admin_cmd(pattern="frogsay (.*)"))
async def survivor(frogsay):
name = frogsay.pattern_match.group(1)
G = (f"** ➥ {name} .\n\n**"
"⠄⠄⠄⠄⠄⣀⣀⣤⣶⣿⣿⣶⣶⣶⣤⣄⣠⣴⣶⣿⣶⣦⣄⠄\n"
"⠄⣠⣴⣾⣿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦\n"
"⢠⠾⣋⣭⣄⡀⠄⠙⠻⣿⣿⡿⠛⠋⠉⠉⠉⠙⠛⠿⣿⣿⣿⣿\n"
"⡎⡟⢻⣿⣷⠄⠄⠄⠄⡼⣡⣾⣿⣿⣦⠄⠄⠄⠄⠄⠈⠛⢿⣿\n"
"⡇⣷⣾⣿⠟⠄⠄⠄⢰⠁⣿⣇⣸⣿⣿⠄⠄⠄⠄⠄⠄⠄⣠⣼\n"
"⣦⣭⣭⣄⣤⣤⣴⣶⣿⣧⡘⠻⠛⠛⠁⠄⠄⠄⠄⣀⣴⣿⣿⣿\n"
"⢉⣹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣦⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿\n"
"⡿⠛⠛⠛⠛⠻⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⡇⠄⠄⢀⣀⣀⠄⠄⠄⠄⠉⠉⠛⠛⠻⠿⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⠈⣆⠄⠄⢿⣿⣿⣷⣶⣶⣤⣤⣀⣀⡀⠄⠄⠉⢻⣿⣿⣿⣿⣿\n"
"⠄⣿⡀⠄⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠂⠄⢠⣿⣿⣿⣿⣿\n"
"⠄⣿⡇⠄⠄⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠄⢀⣼⣿⣿⣿⣿⣿\n"
"⠄⣿⡇⠄⠠⣿⣿⣿⣿⣿⣿⣿⡿⠋⠄⠄⣠⣾⣿⣿⣿⣿⣿⣿\n"
"⠄⣿⠁⠄⠐⠛⠛⠛⠉⠉⠉⠉⠄⠄⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⠄⠻⣦⣀⣀⣀⣀⣀⣤⣤⣤⣤⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋\n")
await frogsay.edit(n + G)
@borg.on(admin_cmd(pattern="putinsay (.*)"))
async def survivor(putinsay):
name = putinsay.pattern_match.group(1)
H = (f"**Vladimir Putin ➥ {name} .\n\n**"
"⣿⣿⣿⣿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣵⣿⣿⣿⠿⡟⣛⣧⣿⣯⣿⣝⡻⢿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⠋⠁⣴⣶⣿⣿⣿⣿⣿⣿⣿⣦⣍⢿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⢷⠄⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⢼⣿⣿⣿⣿\n"
"⢹⣿⣿⢻⠎⠔⣛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⣿⣿⣿⣿\n"
"⢸⣿⣿⠇⡶⠄⣿⣿⠿⠟⡛⠛⠻⣿⡿⠿⠿⣿⣗⢣⣿⣿⣿⣿\n"
"⠐⣿⣿⡿⣷⣾⣿⣿⣿⣾⣶⣶⣶⣿⣁⣔⣤⣀⣼⢲⣿⣿⣿⣿\n"
"⠄⣿⣿⣿⣿⣾⣟⣿⣿⣿⣿⣿⣿⣿⡿⣿⣿⣿⢟⣾⣿⣿⣿⣿\n"
"⠄⣟⣿⣿⣿⡷⣿⣿⣿⣿⣿⣮⣽⠛⢻⣽⣿⡇⣾⣿⣿⣿⣿⣿\n"
"⠄⢻⣿⣿⣿⡷⠻⢻⡻⣯⣝⢿⣟⣛⣛⣛⠝⢻⣿⣿⣿⣿⣿⣿\n"
"⠄⠸⣿⣿⡟⣹⣦⠄⠋⠻⢿⣶⣶⣶⡾⠃⡂⢾⣿⣿⣿⣿⣿⣿\n"
"⠄⠄⠟⠋⠄⢻⣿⣧⣲⡀⡀⠄⠉⠱⣠⣾⡇⠄⠉⠛⢿⣿⣿⣿\n"
"⠄⠄⠄⠄⠄⠈⣿⣿⣿⣷⣿⣿⢾⣾⣿⣿⣇⠄⠄⠄⠄⠄⠉⠉\n"
"⠄⠄⠄⠄⠄⠄⠸⣿⣿⠟⠃⠄⠄⢈⣻⣿⣿⠄⠄⠄⠄⠄⠄⠄\n"
"⠄⠄⠄⠄⠄⠄⠄⢿⣿⣾⣷⡄⠄⢾⣿⣿⣿⡄⠄⠄⠄⠄⠄⠄\n"
"⠄⠄⠄⠄⠄⠄⠄⠸⣿⣿⣿⠃⠄⠈⢿⣿⣿⠄⠄⠄⠄⠄⠄⠄\n")
await putinsay.edit(H)
@borg.on(admin_cmd(pattern="deadfrog (.*)"))
async def survivor(deadfrog):
name = deadfrog.pattern_match.group(1)
I = (f"**Froggy ➥ {name} .\n\n**"
"⣿⣿⣿⡇⠄⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⡇⠄⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⡇⠄⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⡇⠄⣿⣿⣿⡿⠋⣉⣉⣉⡙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⠃⠄⠹⠟⣡⣶⢟⣛⣛⡻⢿⣦⣩⣤⣬⡉⢻⣿⣿⣿⣿\n"
"⣿⣿⣿⠄⢀⢤⣾⣿⣿⣿⡿⠿⠿⠿⢮⡃⣛⡻⢿⠈⣿⣿⣿⣿\n"
"⣿⡟⢡⣴⣯⣿⣿⣿⠤⣤⣭⣶⣶⣶⣮⣔⡈⠛⢓⠦⠈⢻⣿⣿\n"
"⠏⣠⣿⣿⣿⣿⣿⣿⣯⡪⢛⠿⢿⣿⣿⣿⡿⣼⣿⣿⣮⣄⠙⣿\n"
"⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣾⡭⠴⣶⣶⣽⣽⣛⡿⠿⠿⠇⣿\n"
"⣿⣿⣿⣿⣿⣿⣿⠿⣿⣿⣿⣿⣿⣿⣿⣷⣝⣛⢛⢋⣥⣴⣿⣿\n"
"⣿⣿⣿⣿⣿⢿⠱⣿⣛⠾⣭⣛⡿⢿⣿⣿⣿⣿⣿⡀⣿⣿⣿⣿\n"
"⠑⠽⡻⢿⣮⣽⣷⣶⣯⣽⣳⠮⣽⣟⣲⠯⢭⣿⣛⡇⣿⣿⣿⣿\n"
"⠄⠄⠈⠑⠊⠉⠟⣻⠿⣿⣿⣿⣷⣾⣭⣿⠷⠶⠂⣴⣿⣿⣿⣿\n"
"⠄⠄⠄⠄⠄⠄⠄⠁⠙⠒⠙⠯⠍⠙⢉⣡⣶⣿⣿⣿⣿⣿⣿⣿\n"
"⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿\n")
await deadfrog.edit(I)
@borg.on(admin_cmd(pattern="trumpsay (.*)"))
async def survivor(trumpsay):
name = trumpsay.pattern_match.group(1)
J = (f"**Donald Trump ➥ {name} .\n\n**"
"⣿⣿⣿⣿⣿⣿⡿⠿⠛⠋⠉⡉⣉⡛⣛⠿⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⡿⠋⠁⠄⠄⠄⠄⠄⢀⣸⣿⣿⡿⠿⡯⢙⠿⣿⣿⣿⣿\n"
"⣿⣿⡿⠄⠄⠄⠄⠄⡀⡀⠄⢀⣀⣉⣉⣉⠁⠐⣶⣶⣿⣿⣿⣿\n"
"⣿⣿⡇⠄⠄⠄⠄⠁⣿⣿⣀⠈⠿⢟⡛⠛⣿⠛⠛⣿⣿⣿⣿⣿\n"
"⣿⣿⡆⠄⠄⠄⠄⠄⠈⠁⠰⣄⣴⡬⢵⣴⣿⣤⣽⣿⣿⣿⣿⣿\n"
"⣿⣿⡇⠄⢀⢄⡀⠄⠄⠄⠄⡉⠻⣿⡿⠁⠘⠛⡿⣿⣿⣿⣿⣿\n"
"⣿⡿⠃⠄⠄⠈⠻⠄⠄⠄⠄⢘⣧⣀⠾⠿⠶⠦⢳⣿⣿⣿⣿⣿\n"
"⣿⣶⣤⡀⢀⡀⠄⠄⠄⠄⠄⠄⠻⢣⣶⡒⠶⢤⢾⣿⣿⣿⣿⣿\n"
"⣿⡿⠋⠄⢘⣿⣦⡀⠄⠄⠄⠄⠄⠉⠛⠻⠻⠺⣼⣿⠟⠛⠿⣿\n"
"⠋⠁⠄⠄⠄⢻⣿⣿⣶⣄⡀⠄⠄⠄⠄⢀⣤⣾⣿⡀⠄⠄⠄⢹\n"
"⠄⠄⠄⠄⠄⠄⢻⣿⣿⣿⣷⡤⠄⠰⡆⠄⠄⠈⠛⢦⣀⡀⡀⠄\n"
"⠄⠄⠄⠄⠄⠄⠈⢿⣿⠟⡋⠄⠄⠄⢣⠄⠄⠄⠄⠄⠈⠹⣿⣀\n"
"⠄⠄⠄⠄⠄⠄⠄⠘⣷⣿⣿⣷⠄⠄⢺⣇⠄⠄⠄⠄⠄⠄⠸⣿\n"
"⠄⠄⠄⠄⠄⠄⠄⠄⠹⣿⣿⡇⠄⠄⠸⣿⡄⠄⠈⠁⠄⠄⠄⣿\n"
"⠄⠄⠄⠄⠄⠄⠄⠄⠄⢻⣿⡇⠄⠄⠄⢹⣧⠄⠄⠄⠄⠄⠄⠘\n")
await trumpsay.edit(J)
@borg.on(admin_cmd(pattern="chinasay (.*)"))
async def survivor(ckmkb):
name = ckmkb.pattern_match.group(1)
K = (f"**🅲🅺🅼🅺🅱 ➥ {name} .\n\n**"
"⣿⣿⣿⣿⠟⠋⢁⢁⢁⢁⢁⢁⢁⢁⠈⢻⢿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⠃⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠈⡀⠭⢿⣿⣿⣿⣿\n"
"⣿⣿⣿⡟⠄⢀⣾⣿⣿⣿⣷⣶⣿⣷⣶⣶⡆⠄⠄⠄⣿⣿⣿⣿\n"
"⣿⣿⣿⡇⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠄⠄⢸⣿⣿⣿⣿\n"
"⣿⣿⣿⣇⣼⣿⣿⠿⠶⠙⣿⡟⠡⣴⣿⣽⣿⣧⠄⢸⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣾⣿⣿⣟⣭⣾⣿⣷⣶⣶⣴⣶⣿⣿⢄⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⣿⡟⣩⣿⣿⣿⡏⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣹⡋⠘⠷⣦⣀⣠⡶⠁⠈⠁⠄⣿⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣍⠃⣴⣶⡔⠒⠄⣠⢀⠄⠄⠄⡨⣿⣿⣿⣿⣿⣿\n"
"⣿⣿⣿⣿⣿⣿⣦⡘⠿⣷⣿⠿⠟⠃⠄⠄⣠⡇⠈⠻⣿⣿⣿⣿\n"
"⣿⣿⣿⡿⠟⠋⢁⣷⣠⠄⠄⠄⠄⣀⣠⣾⡟⠄⠄⠄⠄⠉⠙⠻\n"
"⡿⠟⠁⠄⠄⠄⢸⣿⣿⡯⢓⣴⣾⣿⣿⡟⠄⠄⠄⠄⠄⠄⠄⠄\n"
"⠄⠄⠄⠄⠄⠄⣿⡟⣷⠄⠹⣿⣿⣿⡿⠁⠄⠄⠄⠄⠄⠄⠄⠄\n"
"⠄⠄⠄⠄⠄⣸⣿⡷⡇⠄⣴⣾⣿⣿⠃⠄⠄⠄⠄⠄⠄⠄⠄⠄\n"
"⠄⠄⠄⠄⠄⣿⣿⠃⣦⣄⣿⣿⣿⠇⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄\n"
"⠄⠄⠄⠄⢸⣿⠗⢈⡶⣷⣿⣿⡏⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄\n")
await ckmkb.edit(K)
@borg.on(admin_cmd(pattern=r"pikachu"))
async def survivor(pikachu):
await pikachu.edit(A)
@borg.on(admin_cmd(pattern=r"shit"))
async def survivor(shit):
await shit.edit(B)
@borg.on(admin_cmd(pattern=r"saxy"))
async def survivor(saxy):
await saxy.edit(C)
@borg.on(admin_cmd(pattern=r"pornhub"))
async def survivor(pornhub):
await pornhub.edit(D)
@borg.on(admin_cmd(pattern=r"dead"))
async def bluedevilded(ded):
await ded.edit(n + " == |\n |" "\n | \n"
" | \n"
" | \n"
" | \n"
" | \n"
" | \n"
" | \n"
" / ̄ ̄\| \n"
"< ´・ |\ \n"
" | 3 | 丶\ \n"
"< 、・ | \ \n"
" \__/∪ _ ∪) \n"
" U U\n")
M = ("▄███████▄\n"
"█▄█████▄█\n"
"█▼▼▼▼▼█\n"
"██________█▌\n"
"█▲▲▲▲▲█\n"
"█████████\n"
"_████\n")
P = ("┈┈┏━╮╭━┓┈╭━━━━╮\n"
"┈┈┃┏┗┛┓┃╭┫ⓞⓘⓝⓚ┃\n"
"┈┈╰┓▋▋┏╯╯╰━━━━╯\n"
"┈╭━┻╮╲┗━━━━╮╭╮┈\n"
"┈┃▎▎┃╲╲╲╲╲╲┣━╯┈\n"
"┈╰━┳┻▅╯╲╲╲╲┃┈┈┈\n"
"┈┈┈╰━┳┓┏┳┓┏╯┈┈┈\n"
"┈┈┈┈┈┗┻┛┗┻┛┈┈┈┈\n")
K = ("_/﹋\_\n"
"(҂`_´)\n"
"<,︻╦╤─ ҉ - -\n"
"_/﹋\_\n")
G = ("........___________________\n"
"....../ `-___________--_____|] - - - - - -\n"" - - ░ ▒▓▓█D \n"
"...../==o;;;;;;;;______.:/\n"
".....), -.(_(__) /\n"
"....// (..) ), —\n"
"...//___//\n")
D = ("╥━━━━━━━━╭━━╮━━┳\n"
"╢╭╮╭━━━━━┫┃▋▋━▅┣\n"
"╢┃╰┫┈┈┈┈┈┃┃┈┈╰┫┣\n"
"╢╰━┫┈┈┈┈┈╰╯╰┳━╯┣\n"
"╢┊┊┃┏┳┳━━┓┏┳┫┊┊┣\n"
"╨━━┗┛┗┛━━┗┛┗┛━━┻\n")
H = ("╔┓┏╦━╦┓╔┓╔━━╗\n"
"║┗┛║┗╣┃║┃║X X ║\n"
"║┏┓║┏╣┗╣┗╣╰╯║\n"
"╚┛┗╩━╩━╩━╩━━╝\n")
E = ("▬▬▬.◙.▬▬▬ \n"
"═▂▄▄▓▄▄▂ \n"
"◢◤ █▀▀████▄▄▄▄◢◤ \n"
"█▄ █ █▄ ███▀▀▀▀▀▀▀╬ \n"
"◥█████◤ \n"
"══╩══╩══ \n"
"╬═╬ \n"
"╬═╬ \n"
"╬═╬ \n"
"╬═╬ \n"
"╬═╬ \n"
"╬═╬ \n"
"╬═╬ Hello, My Friend :D \n"
"╬═╬☻/ \n"
"╬═╬/▌ \n"
"╬═╬/ \ \n")
@borg.on(admin_cmd(pattern=r"monster"))
async def bluedevilmonster(monster):
await monster.edit(M)
@borg.on(admin_cmd(pattern=r"pig"))
async def bluedevilpig(pig):
await pig.edit(P)
@borg.on(admin_cmd(pattern=r"kiler"))
async def bluedevilkiller(kiler):
await kiler.edit(K)
@borg.on(admin_cmd(pattern=r"gun"))
async def bluedevilgun(gun):
await gun.edit(G)
@borg.on(admin_cmd(pattern=r"dog"))
async def bluedevildog(dog):
await dog.edit(D)
@borg.on(admin_cmd(pattern=r"hello"))
async def bluedevilhello(hello):
await hello.edit(H)
@borg.on(admin_cmd(pattern=r"hmf"))
async def bluedevilhmf(hmf):
await hmf.edit(E)
CMD_HELP.update(
{
"animation2": ".help animation2"
"\nUsage: Explore yourself.\n\n"
}
)
| 65.814701 | 4,035 | 0.139144 | 2,224 | 42,977 | 16.136691 | 0.222122 | 0.01031 | 0.014434 | 0.013654 | 0.797955 | 0.119901 | 0.109284 | 0.105718 | 0.093067 | 0.09095 | 0 | 0.003085 | 0.095028 | 42,977 | 652 | 4,036 | 65.915644 | 0.144396 | 0 | 0 | 0.258503 | 0 | 0 | 0.762175 | 0.68297 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.015306 | 0 | 0.040816 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
35df1ed7319e3588f9ff5b04c0158beaac9fa176 | 197 | bzl | Python | jekyll/toolchains.bzl | dwtj/dwtj_rules_jekyll | 7f000ffbc29c3c2d3a63270e849314530ee226fe | [
"MIT"
] | null | null | null | jekyll/toolchains.bzl | dwtj/dwtj_rules_jekyll | 7f000ffbc29c3c2d3a63270e849314530ee226fe | [
"MIT"
] | null | null | null | jekyll/toolchains.bzl | dwtj/dwtj_rules_jekyll | 7f000ffbc29c3c2d3a63270e849314530ee226fe | [
"MIT"
] | null | null | null | '''This exports all public toolchain rules in this project.
'''
load("//jekyll/toolchains/jekyll_toolchain:defs.bzl", _jekyll_toolchain = "jekyll_toolchain")
jekyll_toolchain = _jekyll_toolchain
| 28.142857 | 93 | 0.791878 | 24 | 197 | 6.208333 | 0.541667 | 0.503356 | 0.422819 | 0.604027 | 0.402685 | 0.402685 | 0 | 0 | 0 | 0 | 0 | 0 | 0.096447 | 197 | 6 | 94 | 32.833333 | 0.837079 | 0.284264 | 0 | 0 | 0 | 0 | 0.455224 | 0.335821 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
ea463e9da4d3efe85f29ca712291e42aa65ff0b9 | 131 | py | Python | week2/4.py | kamorozov/coursera_python | 706bc1bc46839f8b3debdf293240ad5ce20c9775 | [
"Unlicense"
] | 2 | 2019-05-17T13:42:02.000Z | 2019-05-18T04:00:35.000Z | week2/4.py | kamorozov/coursera_python | 706bc1bc46839f8b3debdf293240ad5ce20c9775 | [
"Unlicense"
] | null | null | null | week2/4.py | kamorozov/coursera_python | 706bc1bc46839f8b3debdf293240ad5ce20c9775 | [
"Unlicense"
] | 2 | 2019-10-03T09:07:44.000Z | 2019-12-28T19:17:20.000Z | a = int(input())
if a % 4 == 0 and a % 100 != 0:
print('YES')
elif a % 400 == 0:
print('YES')
else:
print('NO')
| 16.375 | 32 | 0.442748 | 22 | 131 | 2.636364 | 0.636364 | 0.206897 | 0.310345 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.114943 | 0.335878 | 131 | 7 | 33 | 18.714286 | 0.551724 | 0 | 0 | 0.285714 | 0 | 0 | 0.064516 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.428571 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
17d66a34adcdcb396400b51ecc9496d59dbd2331 | 117 | py | Python | app/admin.py | RegilioSpee/k_sec-filecify | 001c01d4db32fb3c134230e31465845ef6521994 | [
"MIT"
] | null | null | null | app/admin.py | RegilioSpee/k_sec-filecify | 001c01d4db32fb3c134230e31465845ef6521994 | [
"MIT"
] | null | null | null | app/admin.py | RegilioSpee/k_sec-filecify | 001c01d4db32fb3c134230e31465845ef6521994 | [
"MIT"
] | 1 | 2021-02-09T08:50:45.000Z | 2021-02-09T08:50:45.000Z | from django.contrib import admin
# Register your models here.
from .models import Video
admin.site.register(Video) | 16.714286 | 32 | 0.794872 | 17 | 117 | 5.470588 | 0.647059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136752 | 117 | 7 | 33 | 16.714286 | 0.920792 | 0.222222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
aa472a83afab85999f5ba658a8bd03c3353b03b7 | 28 | py | Python | test.py | ferdinandwp/dataprep | c5fe22e6011610908c275e8f6591ba92529e8127 | [
"MIT"
] | null | null | null | test.py | ferdinandwp/dataprep | c5fe22e6011610908c275e8f6591ba92529e8127 | [
"MIT"
] | null | null | null | test.py | ferdinandwp/dataprep | c5fe22e6011610908c275e8f6591ba92529e8127 | [
"MIT"
] | null | null | null | # This is test file
| 2.8 | 19 | 0.5 | 4 | 28 | 3.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.464286 | 28 | 9 | 20 | 3.111111 | 0.933333 | 0.607143 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
a4afbdbfc89b440b2cf5fce9b9d5fb7d8bb2d310 | 549 | py | Python | pymoo/problems/single/__init__.py | gabicavalcante/pymoo | 1711ce3a96e5ef622d0116d6c7ea4d26cbe2c846 | [
"Apache-2.0"
] | 762 | 2018-06-05T20:56:09.000Z | 2021-09-14T09:09:42.000Z | pymoo/problems/single/__init__.py | gabicavalcante/pymoo | 1711ce3a96e5ef622d0116d6c7ea4d26cbe2c846 | [
"Apache-2.0"
] | 176 | 2018-09-05T18:37:05.000Z | 2021-09-14T01:18:43.000Z | pymoo/problems/single/__init__.py | gabicavalcante/pymoo | 1711ce3a96e5ef622d0116d6c7ea4d26cbe2c846 | [
"Apache-2.0"
] | 160 | 2018-08-05T05:31:20.000Z | 2021-09-14T09:09:45.000Z | from pymoo.problems.single.ackley import *
from pymoo.problems.single.cantilevered_beam import *
from pymoo.problems.single.griewank import *
from pymoo.problems.single.knapsack import *
from pymoo.problems.single.pressure_vessel import *
from pymoo.problems.single.rastrigin import *
from pymoo.problems.single.rosenbrock import *
from pymoo.problems.single.schwefel import *
from pymoo.problems.single.sphere import *
from pymoo.problems.single.zakharov import *
from pymoo.problems.single.g import *
from pymoo.problems.single.himmelblau import * | 45.75 | 53 | 0.826958 | 74 | 549 | 6.108108 | 0.256757 | 0.238938 | 0.451327 | 0.610619 | 0.705752 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08561 | 549 | 12 | 54 | 45.75 | 0.900398 | 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 | 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 | 0 | 0 | 0 | 5 |
a4b16dcf442f2a5bc892479c3b3a52aec3f02d38 | 56 | py | Python | _release.py | Arun-Karunakaran/nohuyuar | a533c9c69fb8617da99117578d6c6279d0f4e1cb | [
"BSD-3-Clause"
] | null | null | null | _release.py | Arun-Karunakaran/nohuyuar | a533c9c69fb8617da99117578d6c6279d0f4e1cb | [
"BSD-3-Clause"
] | null | null | null | _release.py | Arun-Karunakaran/nohuyuar | a533c9c69fb8617da99117578d6c6279d0f4e1cb | [
"BSD-3-Clause"
] | null | null | null | from nohuyuarintel.main import *
print(__releaseinfo__)
| 18.666667 | 32 | 0.839286 | 6 | 56 | 7.166667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.089286 | 56 | 2 | 33 | 28 | 0.843137 | 0 | 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 |
a4b3dc98a8d4a35c32d2a4b242bd5abc62d1e82c | 164 | py | Python | modules/schemas/migrator.py | atthealchemist/graduation-project-system-backend | 1215425208e1708f1ed3d008ea7cffebb36f8e30 | [
"MIT"
] | null | null | null | modules/schemas/migrator.py | atthealchemist/graduation-project-system-backend | 1215425208e1708f1ed3d008ea7cffebb36f8e30 | [
"MIT"
] | null | null | null | modules/schemas/migrator.py | atthealchemist/graduation-project-system-backend | 1215425208e1708f1ed3d008ea7cffebb36f8e30 | [
"MIT"
] | null | null | null | from typing import List
from fastapi_utils.api_model import APIModel as APISchema
class MigratorSchema(APISchema):
migrator_name: str
params: List[dict]
| 18.222222 | 57 | 0.786585 | 22 | 164 | 5.727273 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.164634 | 164 | 8 | 58 | 20.5 | 0.919708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.4 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
a4df508c8e522e8dd0590b2dbd4caaa4a521ddce | 34 | bzl | Python | mobile_back_qti/variables.bzl | fatihcakirs/mobile_app_open | 7de0c9d38fc953c81908276887e9542cfd27c467 | [
"Apache-2.0"
] | null | null | null | mobile_back_qti/variables.bzl | fatihcakirs/mobile_app_open | 7de0c9d38fc953c81908276887e9542cfd27c467 | [
"Apache-2.0"
] | null | null | null | mobile_back_qti/variables.bzl | fatihcakirs/mobile_app_open | 7de0c9d38fc953c81908276887e9542cfd27c467 | [
"Apache-2.0"
] | null | null | null | SNPE_VERSION = "snpe-1.54.2.2899"
| 17 | 33 | 0.705882 | 7 | 34 | 3.285714 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.258065 | 0.088235 | 34 | 1 | 34 | 34 | 0.483871 | 0 | 0 | 0 | 0 | 0 | 0.470588 | 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 |
a4e3fd182772dd39338c55803ef4fbae4cc2eba0 | 174 | py | Python | ApiExample/languages/admin.py | CodeForTravel/Django_REST_API_PrettyPrinted | 05776b2832258f25b30eda0ddc23fc8189f086db | [
"bzip2-1.0.6"
] | null | null | null | ApiExample/languages/admin.py | CodeForTravel/Django_REST_API_PrettyPrinted | 05776b2832258f25b30eda0ddc23fc8189f086db | [
"bzip2-1.0.6"
] | null | null | null | ApiExample/languages/admin.py | CodeForTravel/Django_REST_API_PrettyPrinted | 05776b2832258f25b30eda0ddc23fc8189f086db | [
"bzip2-1.0.6"
] | null | null | null | from django.contrib import admin
from .models import Language,Paradigm,Programmer
admin.site.register(Language)
admin.site.register(Paradigm)
admin.site.register(Programmer) | 29 | 48 | 0.844828 | 23 | 174 | 6.391304 | 0.478261 | 0.183673 | 0.346939 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.063218 | 174 | 6 | 49 | 29 | 0.90184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
35088884d613d5d00bcb0731f795a16eb56f8747 | 137 | py | Python | twiliosms/models/__init__.py | lauro-cesar/twiliosms4django | ed175f223a3da901ec564f931c947027bf67a6d0 | [
"BSD-3-Clause"
] | 1 | 2021-07-31T21:10:08.000Z | 2021-07-31T21:10:08.000Z | twiliosms/models/__init__.py | lauro-cesar/twiliosms4django | ed175f223a3da901ec564f931c947027bf67a6d0 | [
"BSD-3-Clause"
] | null | null | null | twiliosms/models/__init__.py | lauro-cesar/twiliosms4django | ed175f223a3da901ec564f931c947027bf67a6d0 | [
"BSD-3-Clause"
] | null | null | null | from .twiliosettings import TwilioSettings
from .sms import TwilioSMS
from .base import BaseModel
from .twilionumber import TwilioNumber
| 27.4 | 42 | 0.854015 | 16 | 137 | 7.3125 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.116788 | 137 | 4 | 43 | 34.25 | 0.966942 | 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 |
352b52e5ee1750c76d6b8487761e54bdfb683ffb | 398 | py | Python | Validation/RecoEgamma/python/electronPostValidationSequence_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Validation/RecoEgamma/python/electronPostValidationSequence_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Validation/RecoEgamma/python/electronPostValidationSequence_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from Validation.RecoEgamma.ElectronMcSignalPostValidator_cfi import *
from Validation.RecoEgamma.ElectronMcFakePostValidator_cfi import *
from Validation.RecoEgamma.ElectronMcSignalPostValidatorPt1000_cfi import *
electronPostValidationSequence = cms.Sequence(electronMcSignalPostValidator+electronMcFakePostValidator+electronMcSignalPostValidatorPt1000)
| 49.75 | 140 | 0.904523 | 30 | 398 | 11.9 | 0.5 | 0.117647 | 0.201681 | 0.128852 | 0.184874 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02122 | 0.052764 | 398 | 7 | 141 | 56.857143 | 0.925729 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.8 | 0 | 0.8 | 0 | 0 | 0 | 1 | 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 |
35317638b18a7923aa18e2cd0974a1da3f7b63e0 | 77 | py | Python | config/GlobalParams.py | whtngus/chatbot_copy | f32fa54d7c7a6636c556082b584558eff86bfc58 | [
"Apache-2.0"
] | null | null | null | config/GlobalParams.py | whtngus/chatbot_copy | f32fa54d7c7a6636c556082b584558eff86bfc58 | [
"Apache-2.0"
] | null | null | null | config/GlobalParams.py | whtngus/chatbot_copy | f32fa54d7c7a6636c556082b584558eff86bfc58 | [
"Apache-2.0"
] | null | null | null | # 단어 시퀀스 벡터 크기
MAX_SEQ_LEN = 15
def GlobalParams():
global MAX_SEQ_LEN
| 11 | 22 | 0.701299 | 14 | 77 | 3.571429 | 0.785714 | 0.24 | 0.36 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.033898 | 0.233766 | 77 | 6 | 23 | 12.833333 | 0.813559 | 0.155844 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
3537ee8a326b5e811550248b6703aa83327347c8 | 469 | py | Python | rest_framework/common/abstracts.py | chahayeong/restframework | 849afc524fb02758d62e9050dd5354767bfbea27 | [
"BSD-3-Clause"
] | null | null | null | rest_framework/common/abstracts.py | chahayeong/restframework | 849afc524fb02758d62e9050dd5354767bfbea27 | [
"BSD-3-Clause"
] | null | null | null | rest_framework/common/abstracts.py | chahayeong/restframework | 849afc524fb02758d62e9050dd5354767bfbea27 | [
"BSD-3-Clause"
] | null | null | null | from abc import *
class PrinterBase(metaclass=ABCMeta):
@abstractmethod
def dframe(self):
pass
class ReaderBase(metaclass=ABCMeta):
@abstractmethod
def new_file(self):
pass
@abstractmethod
def csv(self):
pass
@abstractmethod
def xls(self):
pass
@abstractmethod
def json(self):
pass
#추상화
class ScraperBase(metaclass=ABCMeta):
@abstractmethod
def driver(self):
pass
| 14.212121 | 37 | 0.620469 | 47 | 469 | 6.170213 | 0.446809 | 0.351724 | 0.310345 | 0.341379 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.298507 | 469 | 32 | 38 | 14.65625 | 0.881459 | 0.006397 | 0 | 0.545455 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.272727 | false | 0.272727 | 0.045455 | 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 |
10a603d80e15bbe856b3db09f16a371223b7faf3 | 334 | py | Python | 03 Basic Data Types/floats_2.py | gitter-badger/survival-python | c9c7f336ecd0b8196934386d334f53cd79cb7284 | [
"MIT"
] | 1 | 2020-12-19T04:41:50.000Z | 2020-12-19T04:41:50.000Z | 03 Basic Data Types/floats_2.py | gitter-badger/survival-python | c9c7f336ecd0b8196934386d334f53cd79cb7284 | [
"MIT"
] | null | null | null | 03 Basic Data Types/floats_2.py | gitter-badger/survival-python | c9c7f336ecd0b8196934386d334f53cd79cb7284 | [
"MIT"
] | 3 | 2020-01-08T00:34:24.000Z | 2021-07-08T23:06:52.000Z | # assign scientific notation float to x
x = 3e3
print(x)
print(type(x))
# assign scientific notation float to y with a capital E
y = 4E4
print(y)
print(type(y))
# assign scientific notation float to z with a float before the e.
z = 4.01e5
print(z)
print(type(z))
123.0
1.23e2
12.3E1
1.23e2.0
print(test_1, test_2, test_3, test_4) | 15.181818 | 66 | 0.718563 | 68 | 334 | 3.470588 | 0.426471 | 0.20339 | 0.305085 | 0.368644 | 0.394068 | 0 | 0 | 0 | 0 | 0 | 0 | 0.105072 | 0.173653 | 334 | 22 | 67 | 15.181818 | 0.75 | 0.47006 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.5 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
52bc279fd9157d034734c0558fbff9c381ab9433 | 152 | py | Python | tests/test_cli.py | klorenz/python-confluence-tool | 5ece0483bad279f978f2b539cab7a9c6f0757dc3 | [
"MIT"
] | 1 | 2021-07-19T13:05:51.000Z | 2021-07-19T13:05:51.000Z | tests/test_cli.py | cwaninger/python-confluence-tool | 4fd7f164738b3d26ad102f1f72e153e0e151e2ef | [
"MIT"
] | 4 | 2020-04-20T10:29:49.000Z | 2021-06-07T11:27:07.000Z | tests/test_cli.py | cwaninger/python-confluence-tool | 4fd7f164738b3d26ad102f1f72e153e0e151e2ef | [
"MIT"
] | 2 | 2017-09-22T10:22:06.000Z | 2019-03-29T00:38:43.000Z | from confluence_tool.cli import main
def test_cli():
"""this is just a dummy test to make sure everything compiles with python3"""
assert True
| 25.333333 | 81 | 0.736842 | 24 | 152 | 4.583333 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008197 | 0.197368 | 152 | 5 | 82 | 30.4 | 0.893443 | 0.467105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0.333333 | true | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
52ff1907a680256b1b0fa723f7268280e904cefc | 220 | py | Python | hybrik/models/__init__.py | uyoung-jeong/HybrIK | aff6aeda06e627fc48f7d7c2bffb2245393d7584 | [
"MIT"
] | 287 | 2020-11-30T12:45:20.000Z | 2022-03-31T16:03:45.000Z | hybrik/models/__init__.py | pengyun1314123/HybrIK | ae1bc3cea0cc5aa98fb512eeb295c3478b0c598f | [
"MIT"
] | 62 | 2021-01-08T02:06:47.000Z | 2022-03-15T11:55:58.000Z | hybrik/models/__init__.py | pengyun1314123/HybrIK | ae1bc3cea0cc5aa98fb512eeb295c3478b0c598f | [
"MIT"
] | 30 | 2021-03-04T07:18:03.000Z | 2022-03-09T06:06:28.000Z | from .simple3dposeBaseSMPL import Simple3DPoseBaseSMPL
from .simple3dposeBaseSMPL24 import Simple3DPoseBaseSMPL24
from .criterion import * # noqa: F401,F403
__all__ = ['Simple3DPoseBaseSMPL', 'Simple3DPoseBaseSMPL24']
| 36.666667 | 60 | 0.836364 | 17 | 220 | 10.588235 | 0.529412 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.090452 | 0.095455 | 220 | 5 | 61 | 44 | 0.81407 | 0.068182 | 0 | 0 | 0 | 0 | 0.206897 | 0.108374 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.75 | 0 | 0.75 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
5e240a025a0d64824f0ef9ad5a9b7774467405fd | 41 | py | Python | plugins/cb_buttons.py | Baygoktas/video-subtitle-merger | e6a6f16a8c37b143e3363ba3b23ddeb3add74b6e | [
"MIT"
] | null | null | null | plugins/cb_buttons.py | Baygoktas/video-subtitle-merger | e6a6f16a8c37b143e3363ba3b23ddeb3add74b6e | [
"MIT"
] | null | null | null | plugins/cb_buttons.py | Baygoktas/video-subtitle-merger | e6a6f16a8c37b143e3363ba3b23ddeb3add74b6e | [
"MIT"
] | 4 | 2022-01-25T12:04:03.000Z | 2022-02-03T19:54:42.000Z | #None Here Delete this or Remain it Same
| 20.5 | 40 | 0.780488 | 8 | 41 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.195122 | 41 | 1 | 41 | 41 | 0.969697 | 0.95122 | 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 |
5e28dad1774158eeb54965b086ec7a0c113ba02b | 31 | py | Python | recommender/__init__.py | evazion/recommender | b888d3c60392f92fd9d17fc2db61ed09fe51d300 | [
"MIT"
] | 4 | 2021-09-05T19:12:16.000Z | 2022-03-20T21:03:21.000Z | recommender/__init__.py | evazion/recommender | b888d3c60392f92fd9d17fc2db61ed09fe51d300 | [
"MIT"
] | null | null | null | recommender/__init__.py | evazion/recommender | b888d3c60392f92fd9d17fc2db61ed09fe51d300 | [
"MIT"
] | 1 | 2022-03-20T21:03:15.000Z | 2022-03-20T21:03:15.000Z | from .model import Recommender
| 15.5 | 30 | 0.83871 | 4 | 31 | 6.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.129032 | 31 | 1 | 31 | 31 | 0.962963 | 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 |
eaba87a8ad60578b2154b1d0360fc4e4bf44b83e | 240 | py | Python | apiapp/views.py | userimack/api_in_django | 15aaa6c2cacaa119e63d2657b505ea40167a763a | [
"MIT"
] | null | null | null | apiapp/views.py | userimack/api_in_django | 15aaa6c2cacaa119e63d2657b505ea40167a763a | [
"MIT"
] | null | null | null | apiapp/views.py | userimack/api_in_django | 15aaa6c2cacaa119e63d2657b505ea40167a763a | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def home(request):
return HttpResponse("Welcome to the home page")
def api(request):
return HttpResponse("This is my First API")
| 20 | 51 | 0.754167 | 34 | 240 | 5.323529 | 0.705882 | 0.110497 | 0.276243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.170833 | 240 | 11 | 52 | 21.818182 | 0.909548 | 0.095833 | 0 | 0 | 0 | 0 | 0.205607 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0.333333 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 5 |
d812c102dcb6549151e9c77308bae47600f22127 | 141 | py | Python | S4/S4 Library/simulation/households/household_tracker.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | 1 | 2021-05-20T19:33:37.000Z | 2021-05-20T19:33:37.000Z | S4/S4 Library/simulation/households/household_tracker.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | S4/S4 Library/simulation/households/household_tracker.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | from sims.sim_info_tracker import BaseLODTracker
class HouseholdTracker(BaseLODTracker):
def household_lod_cleanup(self):
pass
| 20.142857 | 48 | 0.787234 | 16 | 141 | 6.6875 | 0.9375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.163121 | 141 | 6 | 49 | 23.5 | 0.90678 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0.25 | 0.25 | 0 | 0.75 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 5 |
dc307a5304054a62f64dcbe4688d56b408021b29 | 38 | py | Python | tests/__init__.py | gucky92/puffbird | 2feb04aead2f961972d901db5188fd04f6d7c035 | [
"MIT"
] | 1 | 2021-02-02T15:43:57.000Z | 2021-02-02T15:43:57.000Z | tests/__init__.py | gucky92/puffbird | 2feb04aead2f961972d901db5188fd04f6d7c035 | [
"MIT"
] | 74 | 2020-06-08T19:53:43.000Z | 2022-03-27T22:46:21.000Z | tests/__init__.py | gucky92/puffbird | 2feb04aead2f961972d901db5188fd04f6d7c035 | [
"MIT"
] | null | null | null | """Unit test package for puffbird."""
| 19 | 37 | 0.684211 | 5 | 38 | 5.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.131579 | 38 | 1 | 38 | 38 | 0.787879 | 0.815789 | 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 |
dc497c052217b572b06401ed12c2f69ce4e52f45 | 604 | py | Python | tests/test_debug.py | chrispyles/pybryt | 23f8bfce3179638ec5b4efe3555d3bb4e7321dc0 | [
"MIT"
] | 41 | 2021-02-17T20:45:17.000Z | 2022-03-16T19:39:00.000Z | tests/test_debug.py | chrispyles/pybryt | 23f8bfce3179638ec5b4efe3555d3bb4e7321dc0 | [
"MIT"
] | 120 | 2021-03-05T01:11:45.000Z | 2022-03-23T04:08:58.000Z | tests/test_debug.py | chrispyles/pybryt | 23f8bfce3179638ec5b4efe3555d3bb4e7321dc0 | [
"MIT"
] | 18 | 2021-02-14T04:27:34.000Z | 2022-03-03T07:29:49.000Z | """Tests for debug mode"""
from pybryt import debug_mode, disable_debug_mode, enable_debug_mode
from pybryt.debug import _debug_mode_enabled
def test_debug_mode():
"""
Test that the debug mode controllers correctly enable and disable debug mode.
"""
enable_debug_mode()
assert _debug_mode_enabled()
disable_debug_mode()
assert not _debug_mode_enabled()
with debug_mode():
assert _debug_mode_enabled()
assert not _debug_mode_enabled()
enable_debug_mode()
with debug_mode():
assert _debug_mode_enabled()
assert not _debug_mode_enabled()
| 25.166667 | 81 | 0.728477 | 80 | 604 | 5.05 | 0.25 | 0.423267 | 0.277228 | 0.148515 | 0.566832 | 0.504951 | 0.29703 | 0.29703 | 0.29703 | 0.29703 | 0 | 0 | 0.200331 | 604 | 23 | 82 | 26.26087 | 0.836439 | 0.162252 | 0 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.428571 | 1 | 0.071429 | true | 0 | 0.142857 | 0 | 0.214286 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
f4c92e03047ef510a676829c6cae277db37d4afc | 106 | py | Python | fuzzware.py | mo-bl/fuzzware-pipeline | 814b6b5855acdd19e1fbaeeadd4a00d0536ee34d | [
"Apache-2.0"
] | null | null | null | fuzzware.py | mo-bl/fuzzware-pipeline | 814b6b5855acdd19e1fbaeeadd4a00d0536ee34d | [
"Apache-2.0"
] | null | null | null | fuzzware.py | mo-bl/fuzzware-pipeline | 814b6b5855acdd19e1fbaeeadd4a00d0536ee34d | [
"Apache-2.0"
] | 2 | 2022-02-09T10:43:55.000Z | 2022-03-27T12:23:55.000Z | #!/usr/bin/env python3
import fuzzware_pipeline
if __name__ == '__main__':
fuzzware_pipeline.main()
| 15.142857 | 28 | 0.735849 | 13 | 106 | 5.230769 | 0.769231 | 0.470588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010989 | 0.141509 | 106 | 6 | 29 | 17.666667 | 0.736264 | 0.198113 | 0 | 0 | 0 | 0 | 0.095238 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 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 |
f4fe0d8a6d52bf1a243f8945af63521b70d8c1a8 | 80 | py | Python | guardian/__init__.py | reo-ar/reo-cogs | 1424270a41891822e3a6e68bd43a92abe75fa6fc | [
"Unlicense"
] | 1 | 2020-10-22T21:28:55.000Z | 2020-10-22T21:28:55.000Z | guardian/__init__.py | reo-ar/reo-cogs | 1424270a41891822e3a6e68bd43a92abe75fa6fc | [
"Unlicense"
] | null | null | null | guardian/__init__.py | reo-ar/reo-cogs | 1424270a41891822e3a6e68bd43a92abe75fa6fc | [
"Unlicense"
] | null | null | null | from .guardian import Guardian
def setup(bot):
bot.add_cog(Guardian(bot))
| 13.333333 | 30 | 0.725 | 12 | 80 | 4.75 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1625 | 80 | 5 | 31 | 16 | 0.850746 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
762fb9a4a6639bacb3839324bd5813dc7f8eea9e | 96 | py | Python | venv/lib/python3.8/site-packages/poetry/core/masonry/builders/builder.py | Retraces/UkraineBot | 3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/poetry/core/masonry/builders/builder.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/poetry/core/masonry/builders/builder.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/0f/1d/f4/a27e9c21fea7a36a42ff7553cf02ec1aa371c1922b8fb8c553c1cae7b0 | 96 | 96 | 0.895833 | 9 | 96 | 9.555556 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.364583 | 0 | 96 | 1 | 96 | 96 | 0.53125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
5208da8fe0c558d293b179a8109037a6cc389504 | 676 | py | Python | test/test_login_node.py | Factern/factern-client-python | 2453dbf0d683417142fe98514ef6de2742f14f92 | [
"MIT"
] | null | null | null | test/test_login_node.py | Factern/factern-client-python | 2453dbf0d683417142fe98514ef6de2742f14f92 | [
"MIT"
] | null | null | null | test/test_login_node.py | Factern/factern-client-python | 2453dbf0d683417142fe98514ef6de2742f14f92 | [
"MIT"
] | 2 | 2018-07-20T15:02:06.000Z | 2018-08-01T20:38:38.000Z | # coding: utf-8
"""
Factern API
"""
from __future__ import absolute_import
import unittest
import factern_client
from factern_client.com.factern.model.login_node import LoginNode # noqa: E501
from factern_client.rest import ApiException
class TestLoginNode(unittest.TestCase):
"""LoginNode unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testLoginNode(self):
"""Test LoginNode"""
# FIXME: construct object with mandatory attributes with example values
# model = factern_client.models.login_node.LoginNode() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()
| 19.314286 | 79 | 0.68787 | 78 | 676 | 5.717949 | 0.551282 | 0.116592 | 0.076233 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013333 | 0.223373 | 676 | 34 | 80 | 19.882353 | 0.83619 | 0.316568 | 0 | 0.214286 | 0 | 0 | 0.018349 | 0 | 0 | 0 | 0 | 0.029412 | 0 | 1 | 0.214286 | false | 0.214286 | 0.357143 | 0 | 0.642857 | 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 | 1 | 0 | 1 | 0 | 0 | 5 |
bff9a52e0b5349e59404a7ce92d2c72bda9a1327 | 160 | py | Python | skewtpy/__init__.py | aktaylor08/skewtpy | 7f4ecbab288d35a5fd0d4544af1dd276dce71cb8 | [
"Apache-2.0"
] | null | null | null | skewtpy/__init__.py | aktaylor08/skewtpy | 7f4ecbab288d35a5fd0d4544af1dd276dce71cb8 | [
"Apache-2.0"
] | null | null | null | skewtpy/__init__.py | aktaylor08/skewtpy | 7f4ecbab288d35a5fd0d4544af1dd276dce71cb8 | [
"Apache-2.0"
] | null | null | null | __author__ = 'ataylor'
import profile
from profile import create_sounding_df
from plotting import get_skewt_fig_axes
from plotting import plot_simple_sounding
| 22.857143 | 41 | 0.86875 | 23 | 160 | 5.565217 | 0.652174 | 0.1875 | 0.28125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1125 | 160 | 6 | 42 | 26.666667 | 0.901408 | 0 | 0 | 0 | 0 | 0 | 0.04375 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.8 | 0 | 0.8 | 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 |
870722bb24134ef21f687683fe2c6fb86725b50f | 108 | py | Python | src/modules/__init__.py | mcindoe/poker | 34a4b7212ea250452b1ade1372098d676e17da06 | [
"MIT"
] | null | null | null | src/modules/__init__.py | mcindoe/poker | 34a4b7212ea250452b1ade1372098d676e17da06 | [
"MIT"
] | 1 | 2019-10-24T08:39:10.000Z | 2019-10-24T08:39:10.000Z | src/modules/__init__.py | mcindoe/poker | 34a4b7212ea250452b1ade1372098d676e17da06 | [
"MIT"
] | null | null | null | from .ofc_board import OfcBoard
from .card import Card
from .deck import Deck
from .ofc_hand import OfcHand
| 21.6 | 31 | 0.814815 | 18 | 108 | 4.777778 | 0.5 | 0.162791 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148148 | 108 | 4 | 32 | 27 | 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 |
871a8e87f38058657b38d0ec9aac9502a2c8e042 | 173 | py | Python | nn_ood/posteriors/__init__.py | StanfordASL/SCOD | 6a569734d3e246e25c53c0dff97e4e83690087d4 | [
"MIT"
] | 10 | 2021-05-13T03:52:18.000Z | 2022-03-23T19:34:35.000Z | nn_ood/posteriors/__init__.py | StanfordASL/SCOD | 6a569734d3e246e25c53c0dff97e4e83690087d4 | [
"MIT"
] | null | null | null | nn_ood/posteriors/__init__.py | StanfordASL/SCOD | 6a569734d3e246e25c53c0dff97e4e83690087d4 | [
"MIT"
] | 4 | 2021-05-30T09:12:50.000Z | 2021-11-09T23:56:11.000Z | from .local_ensemble import LocalEnsemble
from .scod import SCOD
from .ensemble import Ensemble
from .kfac import KFAC
from .naive import Naive
from .maha import Mahalanobis | 28.833333 | 41 | 0.83237 | 25 | 173 | 5.72 | 0.4 | 0.195804 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.132948 | 173 | 6 | 42 | 28.833333 | 0.953333 | 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 |
8728d462181df886465828571ab6d4f250af250a | 126 | py | Python | TeacherTree/venv/Lib/site-packages/flask_boost/templates/action.py | intuile/teacher-tree-website | 71b4a30bd2d1f541f0921a8afd1ab476c7af7928 | [
"MIT"
] | 543 | 2015-01-12T06:22:48.000Z | 2022-02-18T11:42:32.000Z | TeacherTree/venv/Lib/site-packages/flask_boost/templates/action.py | intuile/teacher-tree-website | 71b4a30bd2d1f541f0921a8afd1ab476c7af7928 | [
"MIT"
] | 31 | 2015-01-01T06:55:59.000Z | 2018-02-17T00:20:42.000Z | TeacherTree/venv/Lib/site-packages/flask_boost/templates/action.py | intuile/teacher-tree-website | 71b4a30bd2d1f541f0921a8afd1ab476c7af7928 | [
"MIT"
] | 96 | 2015-01-04T08:44:39.000Z | 2020-01-07T18:18:04.000Z |
@bp.route('/#{controller}/#{action}')
def #{action}():
return render_template('#{controller}/#{action}/#{action}.html')
| 21 | 68 | 0.626984 | 13 | 126 | 6 | 0.692308 | 0.410256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.087302 | 126 | 5 | 69 | 25.2 | 0.678261 | 0.087302 | 0 | 0 | 0 | 0 | 0.553571 | 0.553571 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 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 | 1 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
8769bbddeaefde7824ea018d19f7a80b78926811 | 17 | py | Python | core/__init__.py | reinspect/amok | adc014b42ec7375c5965aa709873b3911b28e470 | [
"MIT"
] | null | null | null | core/__init__.py | reinspect/amok | adc014b42ec7375c5965aa709873b3911b28e470 | [
"MIT"
] | null | null | null | core/__init__.py | reinspect/amok | adc014b42ec7375c5965aa709873b3911b28e470 | [
"MIT"
] | null | null | null | # don't delete me | 17 | 17 | 0.705882 | 4 | 17 | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.176471 | 17 | 1 | 17 | 17 | 0.857143 | 0.882353 | 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 |
876a00e4d8b69f3ae0974a36388e97b5e7c6cba7 | 187 | py | Python | chatchannels/admin.py | megatron0000/ces22-xadrez-web | 10032f81952e1f816925f5af9c27f235dfbf360c | [
"MIT"
] | null | null | null | chatchannels/admin.py | megatron0000/ces22-xadrez-web | 10032f81952e1f816925f5af9c27f235dfbf360c | [
"MIT"
] | 8 | 2020-02-11T22:28:16.000Z | 2021-06-10T20:16:42.000Z | chatchannels/admin.py | megatron0000/ces22-xadrez-web | 10032f81952e1f816925f5af9c27f235dfbf360c | [
"MIT"
] | null | null | null | from django.contrib import admin
# Register your models here.
from chatchannels.models import ChatChannel, ChatMessage
admin.site.register(ChatChannel)
admin.site.register(ChatMessage)
| 23.375 | 56 | 0.834225 | 23 | 187 | 6.782609 | 0.565217 | 0.115385 | 0.217949 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.096257 | 187 | 7 | 57 | 26.714286 | 0.923077 | 0.139037 | 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 |
5e55652f5d0791d2b9ea80fe084799fd50258a09 | 110 | py | Python | pyconizr/__init__.py | tkhyn/pyconizr | 7ae3bc38d4aa28abd781c128c7dbc918ea0aac6b | [
"MIT"
] | 1 | 2020-11-17T13:04:16.000Z | 2020-11-17T13:04:16.000Z | pyconizr/__init__.py | tkhyn/pyconizr | 7ae3bc38d4aa28abd781c128c7dbc918ea0aac6b | [
"MIT"
] | null | null | null | pyconizr/__init__.py | tkhyn/pyconizr | 7ae3bc38d4aa28abd781c128c7dbc918ea0aac6b | [
"MIT"
] | 1 | 2021-05-09T13:11:48.000Z | 2021-05-09T13:11:48.000Z | from .version import __version__, __version_info__
from .run import iconize
from .iconizr import Iconizr
| 22 | 51 | 0.8 | 14 | 110 | 5.642857 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.163636 | 110 | 4 | 52 | 27.5 | 0.858696 | 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 |
5e9289bbef7990b4dcafc9b8cf1639aeb93e0402 | 92 | py | Python | src/lockin/exceptions.py | hyptocrypto/LockIn | 89f0d2ba21399119e52e91f39b8d86ac6f554323 | [
"MIT"
] | 1 | 2022-01-21T03:58:31.000Z | 2022-01-21T03:58:31.000Z | src/lockin/exceptions.py | hyptocrypto/LockIn | 89f0d2ba21399119e52e91f39b8d86ac6f554323 | [
"MIT"
] | null | null | null | src/lockin/exceptions.py | hyptocrypto/LockIn | 89f0d2ba21399119e52e91f39b8d86ac6f554323 | [
"MIT"
] | null | null | null | class ServiceAlreadyExists(Exception):
pass
class ServiceNotFound(Exception):
pass
| 15.333333 | 38 | 0.771739 | 8 | 92 | 8.875 | 0.625 | 0.366197 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.163043 | 92 | 5 | 39 | 18.4 | 0.922078 | 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 | 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 |
0d5a7775f6bedbf8c0c03e083a5d2c2f62582c98 | 19 | py | Python | python/testData/psi/MissingDefaultValue.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/psi/MissingDefaultValue.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/psi/MissingDefaultValue.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | def fa(a=):
pass | 9.5 | 11 | 0.526316 | 4 | 19 | 2.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.263158 | 19 | 2 | 12 | 9.5 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.5 | 0 | null | null | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 5 |
0d779a49645c7c53c22235f31631f6a566fa60bb | 78 | py | Python | mimo/io/__init__.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | mimo/io/__init__.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | mimo/io/__init__.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | from .io_set import IOSet
from .input import Input
from .output import Output
| 19.5 | 26 | 0.807692 | 13 | 78 | 4.769231 | 0.538462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 78 | 3 | 27 | 26 | 0.939394 | 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 |
0d8a79e30be81d410f515eb844ef5f4de08d49c6 | 5,327 | py | Python | contenidos/migrations/0001_initial.py | nunataksoftware/anayluistango | 0ac82b237b7f726ebb8d1bad12b575075efa5497 | [
"MIT"
] | null | null | null | contenidos/migrations/0001_initial.py | nunataksoftware/anayluistango | 0ac82b237b7f726ebb8d1bad12b575075efa5497 | [
"MIT"
] | null | null | null | contenidos/migrations/0001_initial.py | nunataksoftware/anayluistango | 0ac82b237b7f726ebb8d1bad12b575075efa5497 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import ckeditor.fields
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Album',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('titulo', models.CharField(max_length=200)),
('slug', models.SlugField(max_length=60, null=True, editable=False, blank=True)),
('descripcion', models.TextField(null=True, blank=True)),
('pub_date', models.DateTimeField(verbose_name=b'fecha publicada', editable=False)),
],
options={
'ordering': ['-pub_date'],
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Diapositiva',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('titulo', models.CharField(max_length=200)),
('slug', models.SlugField(max_length=60, null=True, editable=False, blank=True)),
('contenidos', ckeditor.fields.RichTextField(null=True, blank=True)),
('importancia', models.IntegerField(default=0)),
('imagen', models.ImageField(upload_to=b'diapositivas', verbose_name=b'Imagen')),
],
options={
'ordering': ['-importancia', 'id'],
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Foto',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('titulo', models.CharField(max_length=200)),
('pub_date', models.DateTimeField(verbose_name=b'fecha publicada', editable=False)),
('importancia', models.IntegerField(default=0)),
('imagen', models.ImageField(upload_to=b'fotos', verbose_name=b'Imagen')),
('album', models.ForeignKey(to='contenidos.Album')),
],
options={
'ordering': ['-pub_date'],
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Idioma',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('titulo', models.CharField(max_length=200)),
('codigo', models.CharField(max_length=5)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Novedad',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('titulo', models.CharField(max_length=200)),
('slug', models.SlugField(max_length=60, null=True, editable=False, blank=True)),
('contenidos', ckeditor.fields.RichTextField(null=True, blank=True)),
('pub_date', models.DateTimeField(verbose_name=b'fecha publicada', editable=False)),
('imagen', models.ImageField(upload_to=b'noticias', verbose_name=b'Imagen')),
('idioma', models.ForeignKey(to='contenidos.Idioma')),
],
options={
'ordering': ['-pub_date'],
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Pagina',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('titulo', models.CharField(max_length=200)),
('slug', models.SlugField(max_length=60, null=True, editable=False, blank=True)),
('contenidos', ckeditor.fields.RichTextField(null=True, blank=True)),
('idioma', models.ForeignKey(to='contenidos.Idioma')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='TipoDiapositiva',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('titulo', models.CharField(max_length=200)),
('slug', models.SlugField(max_length=60, null=True, editable=False, blank=True)),
],
options={
},
bases=(models.Model,),
),
migrations.AddField(
model_name='diapositiva',
name='idioma',
field=models.ForeignKey(to='contenidos.Idioma'),
preserve_default=True,
),
migrations.AddField(
model_name='diapositiva',
name='tipo_diapositiva',
field=models.ForeignKey(to='contenidos.TipoDiapositiva'),
preserve_default=True,
),
migrations.AddField(
model_name='album',
name='idioma',
field=models.ForeignKey(to='contenidos.Idioma'),
preserve_default=True,
),
]
| 41.617188 | 114 | 0.539891 | 478 | 5,327 | 5.889121 | 0.167364 | 0.050799 | 0.051155 | 0.068206 | 0.834458 | 0.814565 | 0.77016 | 0.681705 | 0.681705 | 0.681705 | 0 | 0.0096 | 0.315562 | 5,327 | 127 | 115 | 41.944882 | 0.762479 | 0.003942 | 0 | 0.735537 | 0 | 0 | 0.112745 | 0.004902 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.049587 | 0 | 0.07438 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
0dc142af9ef1e0e4ee6de3ecbc3a46b4f107221f | 87 | py | Python | aegea/util/aws/clients.py | jshoe/aegea | dfcb46672a703e831961dc5dd1c6f36488374555 | [
"Apache-2.0"
] | null | null | null | aegea/util/aws/clients.py | jshoe/aegea | dfcb46672a703e831961dc5dd1c6f36488374555 | [
"Apache-2.0"
] | null | null | null | aegea/util/aws/clients.py | jshoe/aegea | dfcb46672a703e831961dc5dd1c6f36488374555 | [
"Apache-2.0"
] | null | null | null | import sys
from ._boto3_loader import Loader
sys.modules[__name__] = Loader("client")
| 17.4 | 40 | 0.781609 | 12 | 87 | 5.166667 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012987 | 0.114943 | 87 | 4 | 41 | 21.75 | 0.792208 | 0 | 0 | 0 | 0 | 0 | 0.068966 | 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 |
0df2ca4e2d97d32022c60d1f7180c059f3d6adc7 | 89 | py | Python | setup.py | jcampbell05/ansible-bender | 4f0cd3576b5bcc6edd2f3d021a7cb477d7172f3e | [
"MIT"
] | 513 | 2019-03-20T11:49:27.000Z | 2022-03-21T18:14:17.000Z | setup.py | jcampbell05/ansible-bender | 4f0cd3576b5bcc6edd2f3d021a7cb477d7172f3e | [
"MIT"
] | 167 | 2019-03-27T12:23:01.000Z | 2022-03-29T08:42:16.000Z | setup.py | jcampbell05/ansible-bender | 4f0cd3576b5bcc6edd2f3d021a7cb477d7172f3e | [
"MIT"
] | 68 | 2019-03-20T20:05:16.000Z | 2022-03-27T15:34:48.000Z | #!/usr/bin/python3
import os
import setuptools
setuptools.setup(use_scm_version=True)
| 11.125 | 38 | 0.797753 | 13 | 89 | 5.307692 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0125 | 0.101124 | 89 | 7 | 39 | 12.714286 | 0.85 | 0.191011 | 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 |
216d047501fc9b06caeca8495f1d3be1fb1d6119 | 121 | py | Python | Introducao python/exercicios/ex005.py | Luis12368/python | 23352d75ad13bcfd09ea85ab422fdc6ae1fcc5e7 | [
"MIT"
] | null | null | null | Introducao python/exercicios/ex005.py | Luis12368/python | 23352d75ad13bcfd09ea85ab422fdc6ae1fcc5e7 | [
"MIT"
] | null | null | null | Introducao python/exercicios/ex005.py | Luis12368/python | 23352d75ad13bcfd09ea85ab422fdc6ae1fcc5e7 | [
"MIT"
] | null | null | null | n = float(input('Insira um número: '))
print(f'Se o número for {n}, seu antecessor será {n-1}\ne o seu sucessor {n+1}')
| 30.25 | 80 | 0.652893 | 24 | 121 | 3.291667 | 0.708333 | 0.050633 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019802 | 0.165289 | 121 | 3 | 81 | 40.333333 | 0.762376 | 0 | 0 | 0 | 0 | 0.5 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
2180f405925a61856e27d3cf46cf60f559d51014 | 162 | py | Python | tools/bin/pythonSrc/pychecker-0.8.18/test_input/import24.py | YangHao666666/hawq | 10cff8350f1ba806c6fec64eb67e0e6f6f24786c | [
"Artistic-1.0-Perl",
"ISC",
"bzip2-1.0.5",
"TCL",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"PostgreSQL",
"BSD-3-Clause"
] | 450 | 2015-09-05T09:12:51.000Z | 2018-08-30T01:45:36.000Z | tools/bin/pythonSrc/pychecker-0.8.18/test_input/import24.py | YangHao666666/hawq | 10cff8350f1ba806c6fec64eb67e0e6f6f24786c | [
"Artistic-1.0-Perl",
"ISC",
"bzip2-1.0.5",
"TCL",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"PostgreSQL",
"BSD-3-Clause"
] | 1,274 | 2015-09-22T20:06:16.000Z | 2018-08-31T22:14:00.000Z | tools/bin/pythonSrc/pychecker-0.8.18/test_input/import24.py | YangHao666666/hawq | 10cff8350f1ba806c6fec64eb67e0e6f6f24786c | [
"Artistic-1.0-Perl",
"ISC",
"bzip2-1.0.5",
"TCL",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"PostgreSQL",
"BSD-3-Clause"
] | 278 | 2015-09-21T19:15:06.000Z | 2018-08-31T00:36:51.000Z | 'doc'
class Aaa:
def __init__(self):
self.a = 1
class Bbb(Aaa):
def __init__(self):
self.b = 1
def func24():
return 53
shadow = 5
| 10.8 | 23 | 0.54321 | 24 | 162 | 3.333333 | 0.625 | 0.15 | 0.25 | 0.35 | 0.45 | 0 | 0 | 0 | 0 | 0 | 0 | 0.064815 | 0.333333 | 162 | 14 | 24 | 11.571429 | 0.675926 | 0.018519 | 0 | 0.2 | 0 | 0 | 0.018519 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3 | false | 0 | 0 | 0.1 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
1d002ab018e017d6557440f9e48789f3d4a9608a | 100 | py | Python | multiquests/__init__.py | Haloherooo/MultiAsynic | 7166c3ec8a2dab456c30c24d96f84cb6a9d3aa72 | [
"MIT"
] | null | null | null | multiquests/__init__.py | Haloherooo/MultiAsynic | 7166c3ec8a2dab456c30c24d96f84cb6a9d3aa72 | [
"MIT"
] | null | null | null | multiquests/__init__.py | Haloherooo/MultiAsynic | 7166c3ec8a2dab456c30c24d96f84cb6a9d3aa72 | [
"MIT"
] | 1 | 2022-03-16T12:25:23.000Z | 2022-03-16T12:25:23.000Z | # -*- coding: utf-8 -*-
"""
@author: lbh
"""
from multiquests.multicoro import getspyder
| 11.111111 | 44 | 0.58 | 10 | 100 | 5.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013158 | 0.24 | 100 | 8 | 45 | 12.5 | 0.75 | 0.35 | 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 |
1d09a4c6b24bf2b3bdbaa1b73bad8e64d4697f8c | 15,030 | py | Python | scarletio/utils/tests/test_hybrid_value_dictionary.py | HuyaneMatsu/scarletio | 49e434a118bbf31586e2bf8631ac8d7c7a2f6ffb | [
"0BSD"
] | 3 | 2021-12-01T07:56:36.000Z | 2021-12-05T17:37:41.000Z | scarletio/utils/tests/test_hybrid_value_dictionary.py | HuyaneMatsu/scarletio | 49e434a118bbf31586e2bf8631ac8d7c7a2f6ffb | [
"0BSD"
] | 7 | 2021-12-04T14:29:27.000Z | 2022-03-07T18:32:28.000Z | scarletio/utils/tests/test_hybrid_value_dictionary.py | HuyaneMatsu/scarletio | 49e434a118bbf31586e2bf8631ac8d7c7a2f6ffb | [
"0BSD"
] | null | null | null | from ..hybrid_value_dictionary import HybridValueDictionary
from .weak_helpers import WeakReferencable, sort_by_type_first_key
import vampytest
# Test HybridValueDictionary
# Test constructor
def test_HybridValueDictionary_constructor():
hybrid_value_dictionary = HybridValueDictionary()
vampytest.assert_eq(len(hybrid_value_dictionary), 0)
vampytest.assert_eq(sorted(hybrid_value_dictionary), [])
def test_HybridValueDictionary_constructor_empty():
hybrid_value_dictionary = HybridValueDictionary([])
vampytest.assert_eq(len(hybrid_value_dictionary), 0)
vampytest.assert_eq(sorted(hybrid_value_dictionary), [])
def test_HybridValueDictionary_constructor_filled():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
hybrid_value_dictionary = HybridValueDictionary(relations)
vampytest.assert_eq(len(hybrid_value_dictionary), len(relations))
vampytest.assert_eq(dict(hybrid_value_dictionary.items()), relations)
# test magic methods
def test_HybridValueDictionary_contains():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
key_1 = 0
key_2 = 10
hybrid_value_dictionary = HybridValueDictionary(relations)
vampytest.assert_contains(key_1, hybrid_value_dictionary)
vampytest.assert_not_in(key_2, hybrid_value_dictionary)
def test_HybridValueDictionary_eq():
relations_1 = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
relations_2 = {0: WeakReferencable(0), 1: 1}
relations_3 = {}
hybrid_value_dictionary_1 = HybridValueDictionary(relations_1)
hybrid_value_dictionary_2 = HybridValueDictionary(relations_2)
hybrid_value_dictionary_3 = HybridValueDictionary(relations_3)
vampytest.assert_eq(hybrid_value_dictionary_1, hybrid_value_dictionary_1)
vampytest.assert_eq(hybrid_value_dictionary_1, hybrid_value_dictionary_2, reverse=True)
vampytest.assert_eq(hybrid_value_dictionary_1, hybrid_value_dictionary_3, reverse=True)
vampytest.assert_eq(hybrid_value_dictionary_1, relations_1)
vampytest.assert_eq(hybrid_value_dictionary_1, relations_2, reverse=True)
vampytest.assert_eq(hybrid_value_dictionary_1, relations_3, reverse=True)
vampytest.assert_is(hybrid_value_dictionary_1.__eq__([1, ]), NotImplemented)
vampytest.assert_is(hybrid_value_dictionary_1.__eq__(1), NotImplemented)
def test_HybridValueDictionary_getitem():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
hybrid_value_dictionary = HybridValueDictionary(relations)
hybrid_value_dictionary_empty = HybridValueDictionary()
vampytest.assert_eq(relations[2], WeakReferencable(2))
with vampytest.assert_raises(KeyError):
hybrid_value_dictionary[6]
with vampytest.assert_raises(KeyError):
hybrid_value_dictionary_empty[6]
def test_HybridValueDictionary_iter():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
hybrid_value_dictionary = HybridValueDictionary(relations)
hybrid_value_dictionary_empty = HybridValueDictionary()
vampytest.assert_eq(sorted(iter(hybrid_value_dictionary)), sorted(hybrid_value_dictionary.keys()))
vampytest.assert_eq(sorted(iter(hybrid_value_dictionary_empty)), sorted(hybrid_value_dictionary_empty.keys()))
def test_HybridValueDictionary_len():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
hybrid_value_dictionary = HybridValueDictionary(relations)
hybrid_value_dictionary_empty = HybridValueDictionary()
vampytest.assert_eq(len(hybrid_value_dictionary), len(relations))
vampytest.assert_eq(len(hybrid_value_dictionary_empty), 0)
def test_HybridValueDictionary_ne():
relations_1 = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
relations_2 = {x: WeakReferencable(x) for x in range(2)}
relations_3 = {}
hybrid_value_dictionary_1 = HybridValueDictionary(relations_1)
hybrid_value_dictionary_2 = HybridValueDictionary(relations_2)
hybrid_value_dictionary_3 = HybridValueDictionary(relations_3)
vampytest.assert_ne(hybrid_value_dictionary_1, hybrid_value_dictionary_1, reverse=True)
vampytest.assert_ne(hybrid_value_dictionary_1, hybrid_value_dictionary_2)
vampytest.assert_ne(hybrid_value_dictionary_1, hybrid_value_dictionary_3)
vampytest.assert_ne(hybrid_value_dictionary_1, relations_1, reverse=True)
vampytest.assert_ne(hybrid_value_dictionary_1, relations_2)
vampytest.assert_ne(hybrid_value_dictionary_1, relations_3)
vampytest.assert_is(hybrid_value_dictionary_1.__ne__([1, ]), NotImplemented)
vampytest.assert_is(hybrid_value_dictionary_1.__ne__(1), NotImplemented)
def test_HybridValueDictionary_setitem():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
hybrid_value_dictionary = HybridValueDictionary(relations)
key_1 = 4
value_1 = WeakReferencable(4)
key_2 = 2
value_2 = WeakReferencable(6)
key_3 = 6
value_3 = 9
hybrid_value_dictionary[key_1] = value_1
vampytest.assert_eq(hybrid_value_dictionary[key_1], value_1)
vampytest.assert_eq(len(hybrid_value_dictionary), 4)
hybrid_value_dictionary[key_2] = value_2
vampytest.assert_eq(hybrid_value_dictionary[key_2], value_2)
vampytest.assert_eq(len(hybrid_value_dictionary), 4)
hybrid_value_dictionary[key_3] = value_3
vampytest.assert_eq(hybrid_value_dictionary[key_3], value_3)
vampytest.assert_eq(len(hybrid_value_dictionary), 5)
# methods
def test_HybridValueDictionary_clear():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
hybrid_value_dictionary_empty = HybridValueDictionary()
test_case = HybridValueDictionary(relations)
test_case.clear()
vampytest.assert_eq(test_case, hybrid_value_dictionary_empty)
vampytest.assert_eq(len(test_case), 0)
test_case = HybridValueDictionary()
test_case.clear()
vampytest.assert_eq(test_case, hybrid_value_dictionary_empty)
vampytest.assert_eq(len(test_case), 0)
def test_HybridValueDictionary_copy():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
hybrid_value_dictionary = HybridValueDictionary(relations)
hybrid_value_dictionary_empty = HybridValueDictionary()
test_case = hybrid_value_dictionary.copy()
vampytest.assert_is_not(test_case, hybrid_value_dictionary)
vampytest.assert_eq(test_case, hybrid_value_dictionary)
test_case = hybrid_value_dictionary_empty.copy()
vampytest.assert_is_not(test_case, hybrid_value_dictionary_empty)
vampytest.assert_eq(test_case, hybrid_value_dictionary_empty)
def test_HybridValueDictionary_get():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
hybrid_value_dictionary = HybridValueDictionary(relations)
key_1 = 1
value_1 = 1
key_2 = 6
vampytest.assert_eq(hybrid_value_dictionary.get(key_1), value_1)
vampytest.assert_is(hybrid_value_dictionary.get(key_2), None)
def test_HybridValueDictionary_items():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
item_1 = (2, WeakReferencable(2))
item_2 = (6, 6)
item_3 = (2, WeakReferencable(6))
hybrid_value_dictionary = HybridValueDictionary(relations)
items = hybrid_value_dictionary.items()
vampytest.assert_eq(len(items), len(hybrid_value_dictionary))
vampytest.assert_eq(
sorted(items),
sorted((key, hybrid_value_dictionary[key]) for key in hybrid_value_dictionary.keys()),
)
vampytest.assert_in(item_1, items)
vampytest.assert_not_in(item_2, items)
vampytest.assert_not_in(item_3, items)
hybrid_value_dictionary_empty = HybridValueDictionary()
items = hybrid_value_dictionary_empty.items()
vampytest.assert_eq(len(items), len(hybrid_value_dictionary_empty))
vampytest.assert_eq(sorted(items), sorted(
(key, hybrid_value_dictionary_empty[key]) for key in hybrid_value_dictionary_empty.keys())
)
vampytest.assert_not_in(item_1, items)
vampytest.assert_not_in(item_2, items)
vampytest.assert_not_in(item_3, items)
def test_HybridValueDictionary_keys():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
key_1 = 2
key_2 = 6
hybrid_value_dictionary = HybridValueDictionary(relations)
keys = hybrid_value_dictionary.keys()
vampytest.assert_eq(len(keys), len(hybrid_value_dictionary))
vampytest.assert_eq(set(keys), set(key for key, value in hybrid_value_dictionary.items()))
vampytest.assert_in(key_1, keys)
vampytest.assert_not_in(key_2, keys)
hybrid_value_dictionary_empty = HybridValueDictionary()
keys = hybrid_value_dictionary_empty.keys()
vampytest.assert_eq(len(keys), len(hybrid_value_dictionary_empty))
vampytest.assert_eq(set(keys), set(key for key, value in hybrid_value_dictionary_empty.items()))
vampytest.assert_not_in(key_1, keys)
vampytest.assert_not_in(key_2, keys)
def test_HybridValueDictionary_pop():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
key_1 = 2
value_1 = WeakReferencable(2)
key_2 = 6
hybrid_value_dictionary = HybridValueDictionary(relations)
vampytest.assert_eq(hybrid_value_dictionary.pop(key_1), value_1)
vampytest.assert_eq(len(hybrid_value_dictionary), 2)
with vampytest.assert_raises(KeyError):
hybrid_value_dictionary.pop(key_2)
vampytest.assert_eq(len(hybrid_value_dictionary), 2)
def test_HybridValueDictionary_popitem():
item_1 = (1, 1)
item_2 = (2, WeakReferencable(2))
relations = dict([item_1, item_2])
hybrid_value_dictionary = HybridValueDictionary(relations)
popped_item_1 = hybrid_value_dictionary.popitem()
vampytest.assert_true((popped_item_1 == item_1) or (popped_item_1 == item_2))
vampytest.assert_eq(len(hybrid_value_dictionary), 1)
popped_item_2 = hybrid_value_dictionary.popitem()
vampytest.assert_true((popped_item_2 == item_1) or (popped_item_2 == item_2))
vampytest.assert_ne(popped_item_1, popped_item_2)
vampytest.assert_eq(len(hybrid_value_dictionary), 0)
with vampytest.assert_raises(KeyError):
hybrid_value_dictionary.popitem()
vampytest.assert_eq(len(hybrid_value_dictionary), 0)
def test_HybridValueDictionary_setdefault():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
key_1 = 6
value_1 = WeakReferencable(6)
expected_value_1 = value_1
key_2 = 1
value_2 = 6
expected_value_2 = 1
key_3 = 7
value_3 = 9
expected_value_3 = value_3
hybrid_value_dictionary = HybridValueDictionary(relations)
value = hybrid_value_dictionary.setdefault(key_1, value_1)
vampytest.assert_eq(value, expected_value_1)
vampytest.assert_eq(len(hybrid_value_dictionary), 4)
value = hybrid_value_dictionary.setdefault(key_2, value_2)
vampytest.assert_eq(value, expected_value_2)
vampytest.assert_eq(len(hybrid_value_dictionary), 4)
vampytest.assert_eq(hybrid_value_dictionary[key_2], expected_value_2)
value = hybrid_value_dictionary.setdefault(key_3, value_3)
vampytest.assert_eq(value, expected_value_3)
vampytest.assert_eq(len(hybrid_value_dictionary), 5)
vampytest.assert_eq(hybrid_value_dictionary[key_3], expected_value_3)
def test_HybridValueDictionary_update():
relations_1 = {0: WeakReferencable(0), 1: 1}
relations_2 = {0: 2, 1: WeakReferencable(4)}
relations_3 = {1: WeakReferencable(-1)}
relations_update_1_2 = relations_1.copy()
relations_update_1_2.update(relations_2)
relations_update_1_3 = relations_1.copy()
relations_update_1_3.update(relations_3)
hybrid_value_dictionary_1 = HybridValueDictionary(relations_1)
hybrid_value_dictionary_2 = HybridValueDictionary(relations_2)
hybrid_value_dictionary_3 = HybridValueDictionary(relations_3)
test_case = hybrid_value_dictionary_1.copy()
test_case.update(hybrid_value_dictionary_1)
vampytest.assert_eq(test_case, relations_1)
test_case = hybrid_value_dictionary_1.copy()
test_case.update(hybrid_value_dictionary_2)
vampytest.assert_eq(test_case, relations_update_1_2)
test_case = hybrid_value_dictionary_1.copy()
test_case.update(hybrid_value_dictionary_3)
vampytest.assert_eq(test_case, relations_update_1_3)
test_case = hybrid_value_dictionary_1.copy()
test_case.update(relations_1)
vampytest.assert_eq(test_case, relations_1)
test_case = hybrid_value_dictionary_1.copy()
test_case.update(relations_2)
vampytest.assert_eq(test_case, relations_update_1_2)
test_case = hybrid_value_dictionary_1.copy()
test_case.update(relations_3)
vampytest.assert_eq(test_case, relations_update_1_3)
test_case = hybrid_value_dictionary_1.copy()
test_case.update(list(relations_1.items()))
vampytest.assert_eq(test_case, relations_1)
test_case = hybrid_value_dictionary_1.copy()
test_case.update(list(relations_2.items()))
vampytest.assert_eq(test_case, relations_update_1_2)
test_case = hybrid_value_dictionary_1.copy()
test_case.update(list(relations_3.items()))
vampytest.assert_eq(test_case, relations_update_1_3)
test_case = HybridValueDictionary()
with vampytest.assert_raises(TypeError):
test_case.update([1, ])
with vampytest.assert_raises(TypeError):
test_case.update(1)
with vampytest.assert_raises(ValueError):
test_case.update([(1,), ])
def test_HybridValueDictionary_values():
relations = {0: WeakReferencable(0), 1: 1, 2: WeakReferencable(2)}
value_1 = WeakReferencable(2)
value_2 = WeakReferencable(6)
hybrid_value_dictionary = HybridValueDictionary(relations)
values = hybrid_value_dictionary.values()
vampytest.assert_eq(len(values), len(hybrid_value_dictionary))
vampytest.assert_eq(
sorted(values, key=sort_by_type_first_key),
sorted(
(value for key, value in hybrid_value_dictionary.items()),
key = sort_by_type_first_key,
),
)
vampytest.assert_in(value_1, values)
vampytest.assert_not_in((value_2, values))
hybrid_value_dictionary_empty = HybridValueDictionary()
values = hybrid_value_dictionary_empty.values()
vampytest.assert_eq(len(values), len(hybrid_value_dictionary_empty))
vampytest.assert_eq(
sorted(values, key=sort_by_type_first_key),
sorted(
(value for key, value in hybrid_value_dictionary_empty.items()),
key = sort_by_type_first_key,
)
)
vampytest.assert_not_in(value_1, values)
vampytest.assert_not_in(value_2, values)
| 34.472477 | 114 | 0.745975 | 1,873 | 15,030 | 5.573946 | 0.040043 | 0.148563 | 0.283621 | 0.067433 | 0.866284 | 0.812069 | 0.757854 | 0.717146 | 0.645211 | 0.578544 | 0 | 0.029426 | 0.165669 | 15,030 | 435 | 115 | 34.551724 | 0.80311 | 0.004657 | 0 | 0.438163 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.367491 | 1 | 0.070671 | false | 0 | 0.010601 | 0 | 0.081272 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
10df413cb3c726b68ef82f9481f3b173d26fe7f5 | 199 | py | Python | Validation/MtdValidation/python/MtdPostProcessor_cff.py | scodella/cmssw | 974479b50b19bd795cb5f91eac872857fd6290f6 | [
"Apache-2.0"
] | 2 | 2020-01-27T15:21:37.000Z | 2020-05-11T11:13:18.000Z | Validation/MtdValidation/python/MtdPostProcessor_cff.py | scodella/cmssw | 974479b50b19bd795cb5f91eac872857fd6290f6 | [
"Apache-2.0"
] | 2 | 2020-11-03T19:02:02.000Z | 2020-11-10T16:44:22.000Z | Validation/MtdValidation/python/MtdPostProcessor_cff.py | scodella/cmssw | 974479b50b19bd795cb5f91eac872857fd6290f6 | [
"Apache-2.0"
] | 1 | 2020-10-06T16:30:09.000Z | 2020-10-06T16:30:09.000Z | import FWCore.ParameterSet.Config as cms
from Validation.MtdValidation.btlSimHitsPostProcessor_cfi import btlSimHitsPostProcessor
mtdValidationPostProcessor = cms.Sequence(btlSimHitsPostProcessor)
| 33.166667 | 88 | 0.894472 | 17 | 199 | 10.411765 | 0.764706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.065327 | 199 | 5 | 89 | 39.8 | 0.951613 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
803371da343df4c0b593bd51b9781f19372005a9 | 62,926 | py | Python | anaf/sales/views.py | tovmeod/anaf | 80e4a00532ce6f4ce76c5ffc858ff90c759a9879 | [
"BSD-3-Clause"
] | 2 | 2016-03-15T13:17:26.000Z | 2017-03-22T15:39:01.000Z | anaf/sales/views.py | tovmeod/anaf | 80e4a00532ce6f4ce76c5ffc858ff90c759a9879 | [
"BSD-3-Clause"
] | 4 | 2021-03-19T21:42:58.000Z | 2022-03-11T23:13:07.000Z | anaf/sales/views.py | tovmeod/anaf | 80e4a00532ce6f4ce76c5ffc858ff90c759a9879 | [
"BSD-3-Clause"
] | 4 | 2016-08-31T16:55:41.000Z | 2020-04-22T18:48:54.000Z | """
Sales module views
"""
from django.shortcuts import get_object_or_404
from django.template import RequestContext
from django.db.models import Q
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from anaf.sales.models import Product, SaleOrder, SaleSource, Lead, Opportunity, SaleStatus, Subscription, \
OrderedProduct
from anaf.sales.forms import SettingsForm, OrderForm, ProductForm, SaleStatusForm, UpdateRecordForm, \
LeadForm, OpportunityForm, OrderedProductForm, SubscriptionForm, \
OrderFilterForm, LeadFilterForm, OpportunityFilterForm, ProductFilterForm, \
MassActionForm, ProductMassActionForm, LeadMassActionForm, \
OpportunityMassActionForm, SaleSourceForm
from anaf.core.rendering import render_to_response
from anaf.core.models import Object, ModuleSetting, UpdateRecord
from anaf.core.views import user_denied
from anaf.core.decorators import mylogin_required, handle_response_format, module_admin_required, \
require_response_format
from anaf.identities.models import Contact
from anaf.finance.models import Currency
from anaf.finance.helpers import convert
def _get_filter_query(args, model=SaleOrder):
"""Compose a filter query based on filter form submission"""
query = Q()
for arg in args:
if args[arg] and hasattr(model, arg) or arg == 'products_interested':
kwargs = {str(arg + '__id'): int(args[arg])}
query = query & Q(**kwargs)
return query
def _process_mass_form(f):
"""Pre-process request to handle mass action form for Orders"""
def wrap(request, *args, **kwargs):
"""Wrap"""
if 'massform' in request.POST:
for key in request.POST:
if 'mass-order' in key:
try:
order = SaleOrder.objects.get(pk=request.POST[key])
form = MassActionForm(
request.user.profile, request.POST, instance=order)
if form.is_valid() and request.user.profile.has_permission(order, mode='w'):
form.save()
except:
pass
return f(request, *args, **kwargs)
wrap.__doc__ = f.__doc__
wrap.__name__ = f.__name__
return wrap
def _process_mass_lead_form(f):
"""Pre-process request to handle mass action form for Orders"""
def wrap(request, *args, **kwargs):
"""Wrap"""
if 'massform' in request.POST:
for key in request.POST:
if 'mass-lead' in key:
try:
lead = Lead.objects.get(pk=request.POST[key])
form = LeadMassActionForm(
request.user.profile, request.POST, instance=lead)
if form.is_valid() and request.user.profile.has_permission(lead, mode='w'):
form.save()
except:
pass
return f(request, *args, **kwargs)
wrap.__doc__ = f.__doc__
wrap.__name__ = f.__name__
return wrap
def _process_mass_opportunity_form(f):
"Pre-process request to handle mass action form for Orders"
def wrap(request, *args, **kwargs):
"Wrap"
if 'massform' in request.POST:
for key in request.POST:
if 'mass-opportunity' in key:
try:
opportunity = Opportunity.objects.get(
pk=request.POST[key])
form = OpportunityMassActionForm(request.user.profile,
request.POST, instance=opportunity)
if form.is_valid() and request.user.profile.has_permission(opportunity,
mode='w'):
form.save()
except:
pass
return f(request, *args, **kwargs)
wrap.__doc__ = f.__doc__
wrap.__name__ = f.__name__
return wrap
def _do_update_record(profile, request, obj):
"""Get the Update Record Form"""
if profile.has_permission(obj, mode='w'):
if request.POST:
record = UpdateRecord()
record.object = obj
record.record_type = 'manual'
form = UpdateRecordForm(request.POST, instance=record)
if form.is_valid():
record = form.save()
record.set_user_from_request(request)
record.save()
record.about.add(obj)
obj.set_last_updated()
else:
form = UpdateRecordForm()
else:
form = None
return form
@mylogin_required
@handle_response_format
@_process_mass_form
def index(request, response_format='html'):
"""Sales index page"""
query = Q(status__hidden=False)
if request.GET:
if 'status' in request.GET and request.GET['status']:
query = _get_filter_query(request.GET)
else:
query = query & _get_filter_query(request.GET)
orders = Object.filter_by_request(
request, SaleOrder.objects.filter(query), mode="r")
filters = OrderFilterForm(request.user.profile, '', request.GET)
statuses = Object.filter_by_request(request, SaleStatus.objects, mode="r")
massform = MassActionForm(request.user.profile)
return render_to_response('sales/index',
{'orders': orders,
'filters': filters,
'statuses': statuses,
'massform': massform
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
@_process_mass_form
def index_assigned(request, response_format='html'):
"Orders assigned to current user"
query = Q(status__hidden=False, assigned=request.user.profile)
if request.GET:
if 'status' in request.GET and request.GET['status']:
query = _get_filter_query(request.GET)
else:
query = query & _get_filter_query(request.GET)
orders = Object.filter_by_request(
request, SaleOrder.objects.filter(query), mode="r")
filters = OrderFilterForm(
request.user.profile, 'assigned', request.GET)
statuses = Object.filter_by_request(request, SaleStatus.objects, mode="r")
massform = MassActionForm(request.user.profile)
return render_to_response('sales/index_assigned',
{'orders': orders,
'statuses': statuses,
'massform': massform,
'filters': filters},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def index_status(request, response_format='html'):
"Index Status"
query = Q(status__hidden=False)
if request.GET:
if 'status' in request.GET and request.GET['status']:
query = _get_filter_query(request.GET)
else:
query = query & _get_filter_query(request.GET)
orders = Object.filter_by_request(
request, SaleOrder.objects.filter(query), mode="r")
statuses = Object.filter_by_request(request, SaleStatus.objects, mode="r")
filters = OrderFilterForm(request.user.profile, '', request.GET)
total = 0
for status in statuses:
status.count = 0
for order in orders:
if order.status == status and order.status.hidden is False:
total += 1
status.count += order.quantity
return render_to_response('sales/index_status',
{'orders': orders,
'statuses': statuses,
'total': total,
'filters': filters
},
context_instance=RequestContext(request), response_format=response_format)
@handle_response_format
@mylogin_required
@_process_mass_form
def index_open(request, response_format='html'):
"SaleOrders owned by current user"
try:
conf = ModuleSetting.get_for_module(
'anaf.sales', 'order_fulfil_status')[0]
fulfil_status = int(conf.value)
query = Q(status__hidden=False) & ~Q(status=fulfil_status)
except Exception:
query = Q(status__hidden=False)
if request.GET:
if 'status' in request.GET and request.GET['status']:
query = _get_filter_query(request.GET) & Q(user=request.user)
else:
query = query & _get_filter_query(request.GET)
orders = Object.filter_by_request(
request, SaleOrder.objects.filter(query), mode="r")
statuses = Object.filter_by_request(request, SaleStatus.objects)
filters = OrderFilterForm(request.user.profile, '', request.GET)
massform = MassActionForm(request.user.profile)
return render_to_response('sales/index_open',
{'orders': orders,
'statuses': statuses,
'massform': massform,
'filters': filters},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def ordered_product_add(request, order_id=None, response_format='html'):
"Add new Ordered Product"
order = get_object_or_404(SaleOrder, pk=order_id)
if not request.user.profile.has_permission(order, mode='w'):
return user_denied("Sorry, you don't have access to this Sale Order")
if request.POST:
if 'cancel' not in request.POST:
ordered_product = OrderedProduct()
ordered_product.order = order
form = OrderedProductForm(
request.user.profile, order, request.POST, instance=ordered_product)
if form.is_valid():
ordered_product = form.save(commit=False)
convert(
ordered_product, 'rate', currency=ordered_product.order.currency)
ordered_product.set_user_from_request(request)
ordered_product.order.update_total()
if 'add_another' in request.POST:
return HttpResponseRedirect(reverse('sales_ordered_product_add', args=[order.id]))
return HttpResponseRedirect(reverse('sales_order_view', args=[order.id]))
else:
return HttpResponseRedirect(reverse('sales_order_view', args=[order.id]))
else:
form = OrderedProductForm(request.user.profile, order)
return render_to_response('sales/ordered_product_add',
{'form': form,
'order': order},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def ordered_product_view(request, ordered_product_id, response_format='html'):
"Ordered product view"
ordered_product = get_object_or_404(OrderedProduct, pk=ordered_product_id)
if not request.user.profile.has_permission(ordered_product) \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, message="You don't have access to this Ordered Product")
return render_to_response('sales/ordered_product_view',
{'ordered_product': ordered_product},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def ordered_product_edit(request, ordered_product_id, response_format='html'):
"OrderedProduct edit"
ordered_product = get_object_or_404(OrderedProduct, pk=ordered_product_id)
if not request.user.profile.has_permission(ordered_product, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this OrderedProduct", response_format)
order = ordered_product.order
if request.POST:
if 'cancel' not in request.POST:
form = OrderedProductForm(
request.user.profile, order, request.POST, instance=ordered_product)
if form.is_valid():
ordered_product = form.save(commit=False)
convert(
ordered_product, 'rate', currency=ordered_product.order.currency)
ordered_product.order.update_total()
return HttpResponseRedirect(reverse('sales_ordered_product_view', args=[ordered_product.id]))
else:
return HttpResponseRedirect(reverse('sales_ordered_product_view', args=[ordered_product.id]))
else:
form = OrderedProductForm(
request.user.profile, order, instance=ordered_product)
return render_to_response('sales/ordered_product_edit',
{'form': form,
'ordered_product': ordered_product,
'order': order
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def ordered_product_delete(request, ordered_product_id, response_format='html'):
"OrderedProduct delete"
ordered_product = get_object_or_404(OrderedProduct, pk=ordered_product_id)
if not request.user.profile.has_permission(ordered_product, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Sale Status", response_format)
if request.POST:
if 'delete' in request.POST:
order_id = ordered_product.order_id
if 'trash' in request.POST:
ordered_product.trash = True
ordered_product.save()
else:
ordered_product.delete()
ordered_product.order.update_total()
return HttpResponseRedirect(reverse('sales_order_view', args=[order_id]))
elif 'cancel' in request.POST:
return HttpResponseRedirect(reverse('sales_ordered_product_view', args=[ordered_product.id]))
order = ordered_product.order
return render_to_response('sales/ordered_product_delete',
{'ordered_product': ordered_product,
'order': order},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def subscription_index(request, response_format='html'):
"Subscription index page"
query = Q(status__hidden=False)
if request.GET:
if 'status' in request.GET and request.GET['status']:
query = _get_filter_query(request.GET)
else:
query = query & _get_filter_query(request.GET)
subscriptions = Object.filter_by_request(
request, Subscription.objects.filter(query), mode="r")
filters = OrderFilterForm(request.user.profile, '', request.GET)
ordered_products = subscriptions.orderedproduct_set.all()
orders = ordered_products.order_set.all()
# orders = Object.filter_by_request(request, SaleOrder.objects, mode = "r")
statuses = Object.filter_by_request(request, SaleStatus.objects, mode="r")
return render_to_response('sales/index',
{'orders': orders,
'products': ordered_products,
'filters': filters,
'statuses': statuses
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def subscription_add(request, order_id=None, product_id=None, productset_id=None, response_format='html'):
"Product add"
if order_id:
order = get_object_or_404(SaleOrder, pk=order_id)
if product_id:
product = get_object_or_404(OrderedProduct, pk=product_id)
if productset_id:
productset = get_object_or_404(Product, pk=productset_id)
subscription = Subscription()
if order_id:
subscription.client = order.client
if product_id:
subscription.product = product.product
if productset_id:
subscription.product = productset
if request.POST:
if 'cancel' not in request.POST:
form = SubscriptionForm(
request.user.profile, request.POST, instance=subscription)
if form.is_valid():
subscription = form.save(commit=False)
subscription.renew()
subscription.save()
subscription.set_user_from_request(request)
if product_id:
product.subscription = subscription
product.save()
if order_id:
return HttpResponseRedirect(reverse('sales_order_view', args=[order_id]))
else:
return HttpResponseRedirect(reverse('sales_subscription_view', args=[subscription.id]))
else:
return HttpResponseRedirect(reverse('sales_product_index'))
else:
form = SubscriptionForm(
request.user.profile, instance=subscription)
return render_to_response('sales/subscription_add',
{'form': form},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def subscription_view(request, subscription_id, response_format='html'):
"Subscription view"
subscription = get_object_or_404(Subscription, pk=subscription_id)
if not request.user.profile.has_permission(subscription):
return user_denied(request, message="You don't have access to this Subscription")
query = Q(subscription=subscription)
if request.GET:
if 'status' in request.GET and request.GET['status']:
query = query & _get_filter_query(request.GET)
else:
query = query & Q(
status__hidden=False) & _get_filter_query(request.GET)
else:
query = query & Q(status__hidden=False)
ops = subscription.orderedproduct_set.all()
orders = []
for op in ops:
orders.append(op.order)
return render_to_response('sales/subscription_view',
{'subscription': subscription,
'orders': orders},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def subscription_edit(request, subscription_id, response_format='html'):
"Subscription edit"
subscription = get_object_or_404(Subscription, pk=subscription_id)
if not request.user.profile.has_permission(subscription, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Subscription", response_format)
if request.POST:
form = SubscriptionForm(
request.user.profile, request.POST, instance=subscription)
else:
form = SubscriptionForm(
request.user.profile, instance=subscription)
if form.is_valid():
subscription = form.save()
return HttpResponseRedirect(reverse('sales_subscription_view', args=[subscription.id]))
return render_to_response('sales/subscription_edit',
{'form': form,
'subscription': subscription,
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def subscription_delete(request, subscription_id, response_format='html'):
"Subscription delete"
subscription = get_object_or_404(Subscription, pk=subscription_id)
if not request.user.profile.has_permission(subscription, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Sale Status", response_format)
if request.POST:
if 'delete' in request.POST:
if 'trash' in request.POST:
subscription.trash = True
subscription.save()
else:
subscription.delete()
return HttpResponseRedirect(reverse('sales_index'))
elif 'cancel' in request.POST:
return HttpResponseRedirect(reverse('sales_subscription_view', args=[subscription.id]))
return render_to_response('sales/subscription_delete',
{'subscription': subscription,
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def product_index(request, response_format='html'):
"Product index page"
query = Q(status__hidden=False)
if request.GET:
if 'status' in request.GET and request.GET['status']:
query = _get_filter_query(request.GET)
else:
query = query & _get_filter_query(request.GET)
if 'massform' in request.POST:
for key in request.POST:
if 'mass-product' in key:
try:
product = Product.objects.get(pk=request.POST[key])
form = ProductMassActionForm(
request.user.profile, request.POST, instance=product)
if form.is_valid() and request.user.profile.has_permission(product, mode='w'):
form.save()
except:
pass
massform = ProductMassActionForm(request.user.profile)
query = Q(parent__isnull=True)
if request.GET:
query = query & _get_filter_query(request.GET, model=Product)
statuses = Object.filter_by_request(request, SaleStatus.objects, mode="r")
products = Object.filter_by_request(
request, Product.objects.filter(query), mode="r")
filters = ProductFilterForm(request.user.profile, '', request.GET)
return render_to_response('sales/product_index',
{'products': products,
'filters': filters,
'massform': massform,
'statuses': statuses
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
@module_admin_required('anaf.sales')
def product_add(request, parent_id=None, response_format='html'):
"Product add"
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
if request.POST:
if 'cancel' not in request.POST:
product = Product()
form = ProductForm(
request.user.profile, None, request.POST, instance=product)
if form.is_valid():
product = form.save()
product.set_user_from_request(request)
return HttpResponseRedirect(reverse('sales_product_view', args=[product.id]))
else:
return HttpResponseRedirect(reverse('sales_product_index'))
else:
form = ProductForm(request.user.profile, parent_id)
return render_to_response('sales/product_add',
{'form': form,
'products': all_products},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def product_edit(request, product_id, response_format='html'):
"Product edit"
product = get_object_or_404(Product, pk=product_id)
if not request.user.profile.has_permission(product, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Product", response_format)
if request.POST:
if 'cancel' not in request.POST:
form = ProductForm(
request.user.profile, None, request.POST, instance=product)
if form.is_valid():
product = form.save()
return HttpResponseRedirect(reverse('sales_product_view', args=[product.id]))
else:
return HttpResponseRedirect(reverse('sales_product_view', args=[product.id]))
else:
form = ProductForm(request.user.profile, None, instance=product)
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
return render_to_response('sales/product_edit',
{'form': form,
'product': product,
'products': all_products},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def product_view(request, product_id, response_format='html'):
"Product view"
product = get_object_or_404(Product, pk=product_id)
if not request.user.profile.has_permission(product) \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, message="You don't have access to this Product")
query = Q(product=product)
if request.GET:
if 'status' in request.GET and request.GET['status']:
query = query & _get_filter_query(request.GET)
else:
query = query & Q(
status__hidden=False) & _get_filter_query(request.GET)
else:
query = query & Q(status__hidden=False)
subproducts = Object.filter_by_request(
request, Product.objects.filter(parent=product))
subscriptions = product.subscription_set.all()
return render_to_response('sales/product_view',
{'product': product,
'subproducts': subproducts,
'subscriptions': subscriptions,
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def product_delete(request, product_id, response_format='html'):
"Product delete"
product = get_object_or_404(Product, pk=product_id)
if not request.user.profile.has_permission(product, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Sale Status", response_format)
if request.POST:
if 'delete' in request.POST:
if 'trash' in request.POST:
product.trash = True
product.save()
else:
product.delete()
return HttpResponseRedirect(reverse('sales_product_index'))
elif 'cancel' in request.POST:
return HttpResponseRedirect(reverse('sales_product_view', args=[product.id]))
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
statuses = Object.filter_by_request(request, SaleStatus.objects, mode="r")
subproducts = Object.filter_by_request(
request, Product.objects.filter(parent=product))
return render_to_response('sales/product_delete',
{'product': product,
'subproducts': subproducts,
'products': all_products,
'statuses': statuses},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
@_process_mass_lead_form
def lead_index(request, response_format='html'):
"Lead index page"
query = Q(status__hidden=False)
if request.GET:
if 'status' in request.GET and request.GET['status']:
query = _get_filter_query(request.GET)
else:
query = query & _get_filter_query(request.GET)
filters = LeadFilterForm(request.user.profile, '', request.GET)
statuses = Object.filter_by_request(request, SaleStatus.objects, mode="r")
leads = Object.filter_by_request(
request, Lead.objects.filter(query), mode="r")
massform = LeadMassActionForm(request.user.profile)
return render_to_response('sales/lead_index',
{'leads': leads,
'filters': filters,
'massform': massform,
'statuses': statuses
},
context_instance=RequestContext(request), response_format=response_format)
@handle_response_format
@mylogin_required
@_process_mass_lead_form
def lead_index_assigned(request, response_format='html'):
"Leads owned by current user"
query = Q(status__hidden=False, assigned=request.user.profile)
if request.GET:
if 'status' in request.GET and request.GET['status']:
query = _get_filter_query(request.GET)
else:
query = query & _get_filter_query(request.GET)
statuses = Object.filter_by_request(request, SaleStatus.objects, mode="r")
leads = Object.filter_by_request(
request, Lead.objects.filter(query), mode="r")
filters = LeadFilterForm(request.user.profile, '', request.GET)
massform = LeadMassActionForm(request.user.profile)
return render_to_response('sales/lead_index_assigned',
{'leads': leads,
'filters': filters,
'massform': massform,
'statuses': statuses
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def lead_add(request, lead_id=None, response_format='html'):
"Lead add"
all_leads = Object.filter_by_request(request, Lead.objects)
if request.POST:
if 'cancel' not in request.POST:
lead = Lead()
form = LeadForm(
request.user.profile, request.POST, instance=lead)
if form.is_valid():
lead = form.save()
lead.set_user_from_request(request)
return HttpResponseRedirect(reverse('sales_lead_view', args=[lead.id]))
else:
return HttpResponseRedirect(reverse('sales_lead_index'))
else:
form = LeadForm(request.user.profile)
return render_to_response('sales/lead_add',
{'form': form,
'leads': all_leads},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def lead_edit(request, lead_id, response_format='html'):
"Lead edit"
lead = get_object_or_404(Lead, pk=lead_id)
if not request.user.profile.has_permission(lead, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Lead", response_format)
if request.POST:
form = LeadForm(
request.user.profile, request.POST, instance=lead)
else:
form = LeadForm(request.user.profile, instance=lead)
if form.is_valid():
lead = form.save()
return HttpResponseRedirect(reverse('sales_lead_view', args=[lead.id]))
return render_to_response('sales/lead_edit',
{'form': form,
'lead': lead,
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def lead_view(request, lead_id, response_format='html'):
"Queue view"
profile = request.user.profile
lead = get_object_or_404(Lead, pk=lead_id)
if not profile.has_permission(lead) \
and not profile.is_admin('anaf.sales'):
return user_denied(request, message="You don't have access to this Lead")
form = _do_update_record(profile, request, lead)
if form.is_valid():
record = form.save()
record.set_user_from_request(request)
lead = record.object
return render_to_response('sales/lead_view',
{'lead': lead,
'form': form},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def lead_delete(request, lead_id, response_format='html'):
"Lead delete"
lead = get_object_or_404(Lead, pk=lead_id)
if not request.user.profile.has_permission(lead, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Sale Status", response_format)
if request.POST:
if 'delete' in request.POST:
if 'trash' in request.POST:
lead.trash = True
lead.save()
else:
lead.delete()
return HttpResponseRedirect(reverse('sales_lead_index'))
elif 'cancel' in request.POST:
return HttpResponseRedirect(reverse('sales_lead_view', args=[lead.id]))
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
all_leads = Object.filter_by_request(request, Lead.objects)
return render_to_response('sales/lead_delete',
{'lead': lead,
'leads': all_leads,
'products': all_products},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
@_process_mass_opportunity_form
def opportunity_index(request, response_format='html'):
"Sales index page"
query = Q(status__hidden=False)
if request.GET:
if 'status' in request.GET and request.GET['status']:
query = _get_filter_query(request.GET)
else:
query = query & _get_filter_query(request.GET)
filters = OpportunityFilterForm(
request.user.profile, '', request.GET)
statuses = Object.filter_by_request(request, SaleStatus.objects, mode="r")
opportunities = Object.filter_by_request(
request, Opportunity.objects.filter(query), mode="r")
massform = OpportunityMassActionForm(request.user.profile)
return render_to_response('sales/opportunity_index',
{'opportunities': opportunities,
'filters': filters,
'massform': massform,
'statuses': statuses
},
context_instance=RequestContext(request), response_format=response_format)
@handle_response_format
@mylogin_required
@_process_mass_opportunity_form
def opportunity_index_assigned(request, response_format='html'):
"Opportunities owned by current user"
query = Q(status__hidden=False, assigned=request.user.profile)
if request.GET:
if 'status' in request.GET and request.GET['status']:
query = _get_filter_query(request.GET)
else:
query = query & _get_filter_query(request.GET)
statuses = Object.filter_by_request(request, SaleStatus.objects, mode="r")
opportunities = Object.filter_by_request(
request, Opportunity.objects.filter(query), mode="r")
filters = OpportunityFilterForm(
request.user.profile, '', request.GET)
massform = OpportunityMassActionForm(request.user.profile)
return render_to_response('sales/opportunity_index_assigned',
{'opportunities': opportunities,
'filters': filters,
'massform': massform,
'statuses': statuses
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def opportunity_add(request, lead_id=None, response_format='html'):
"Opportunity add"
lead = None
if lead_id:
lead = get_object_or_404(Lead, pk=lead_id)
if request.POST:
if 'cancel' not in request.POST:
form = OpportunityForm(
request.user.profile, lead, request.POST)
if form.is_valid():
opportunity = form.save(commit=False)
convert(opportunity, 'amount')
opportunity.set_user_from_request(request)
return HttpResponseRedirect(reverse('sales_opportunity_view', args=[opportunity.id]))
else:
return HttpResponseRedirect(reverse('sales_opportunity_index'))
else:
form = OpportunityForm(request.user.profile, lead)
return render_to_response('sales/opportunity_add',
{'form': form},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def opportunity_edit(request, opportunity_id, response_format='html'):
"Opportunity edit"
opportunity = get_object_or_404(Opportunity, pk=opportunity_id)
if not request.user.profile.has_permission(opportunity, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Opportunity", response_format)
if request.POST:
if 'cancel' not in request.POST:
form = OpportunityForm(
request.user.profile, None, request.POST, instance=opportunity)
if form.is_valid():
opportunity = form.save()
convert(opportunity, 'amount')
return HttpResponseRedirect(reverse('sales_opportunity_view', args=[opportunity.id]))
else:
return HttpResponseRedirect(reverse('sales_opportunity_view', args=[opportunity.id]))
else:
form = OpportunityForm(
request.user.profile, None, instance=opportunity)
all_opportunities = Object.filter_by_request(request, Opportunity.objects)
return render_to_response('sales/opportunity_edit',
{'form': form,
'opportunity': opportunity,
'opportunities': all_opportunities,
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def opportunity_view(request, opportunity_id, response_format='html'):
"Opportunity view"
profile = request.user.profile
opportunity = get_object_or_404(Opportunity, pk=opportunity_id)
if not profile.has_permission(opportunity) \
and not profile.is_admin('anaf.sales'):
return user_denied(request, message="You don't have access to this Opportunity")
form = _do_update_record(profile, request, opportunity)
return render_to_response('sales/opportunity_view',
{'opportunity': opportunity,
'record_form': form},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def opportunity_delete(request, opportunity_id, response_format='html'):
"Opportunity delete"
opportunity = get_object_or_404(Opportunity, pk=opportunity_id)
if not request.user.profile.has_permission(opportunity, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Sale Status", response_format)
if request.POST:
if 'delete' in request.POST:
if 'trash' in request.POST:
opportunity.trash = True
opportunity.save()
else:
opportunity.delete()
return HttpResponseRedirect(reverse('sales_opportunity_index'))
elif 'cancel' in request.POST:
return HttpResponseRedirect(reverse('sales_opportunity_view', args=[opportunity.id]))
all_opportunities = Object.filter_by_request(request, Opportunity.objects)
return render_to_response('sales/opportunity_delete',
{'opportunity': opportunity,
'opportunities': all_opportunities,
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def order_add(request, lead_id=None, opportunity_id=None, response_format='html'):
"Order add"
lead = None
opportunity = None
if lead_id:
lead = get_object_or_404(Lead, pk=lead_id)
if opportunity_id:
opportunity = get_object_or_404(Opportunity, pk=opportunity_id)
if request.POST:
if 'cancel' not in request.POST:
order = SaleOrder()
form = OrderForm(
request.user.profile, lead, opportunity, request.POST, instance=order)
if form.is_valid():
order = form.save()
order.set_user_from_request(request)
return HttpResponseRedirect(reverse('sales_order_view', args=[order.id]))
else:
return HttpResponseRedirect(reverse('sales'))
else:
form = OrderForm(request.user.profile, lead, opportunity)
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
return render_to_response('sales/order_add',
{'form': form,
'products': all_products},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def order_edit(request, order_id, response_format='html'):
"SaleOrder edit"
order = get_object_or_404(SaleOrder, pk=order_id)
if not request.user.profile.has_permission(order, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this SaleOrder", response_format)
if request.POST:
if 'cancel' not in request.POST:
form = OrderForm(
request.user.profile, None, None, request.POST, instance=order)
if form.is_valid():
order = form.save()
return HttpResponseRedirect(reverse('sales_order_view', args=[order.id]))
else:
return HttpResponseRedirect(reverse('sales_order_view', args=[order.id]))
else:
form = OrderForm(
request.user.profile, None, None, instance=order)
all_orders = Object.filter_by_request(request, SaleOrder.objects)
return render_to_response('sales/order_edit',
{'form': form,
'order': order,
'orders': all_orders,
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def order_view(request, order_id, response_format='html'):
"SaleOrder view"
profile = request.user.profile
order = get_object_or_404(SaleOrder, pk=order_id)
form = _do_update_record(profile, request, order)
if form.is_valid():
record = form.save()
record.set_user_from_request(request)
order = record.object
if not profile.has_permission(order) \
and not profile.is_admin('anaf.sales'):
return user_denied(request, message="You don't have access to this Sale")
ordered_products = order.orderedproduct_set.filter(trash=False)
return render_to_response('sales/order_view',
{'order': order,
'ordered_products': ordered_products,
'record_form': form},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def order_invoice_view(request, order_id, response_format='html'):
"Order view as Invoice"
order = get_object_or_404(SaleOrder, pk=order_id)
if not request.user.profile.has_permission(order) \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, message="You don't have access to this Sale")
ordered_products = order.orderedproduct_set.filter(trash=False)
# default company
try:
conf = ModuleSetting.get_for_module('anaf.finance', 'my_company')[0]
my_company = Contact.objects.get(pk=int(conf.value))
except:
my_company = None
return render_to_response('sales/order_invoice_view',
{'order': order,
'ordered_products': ordered_products,
'my_company': my_company},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def order_delete(request, order_id, response_format='html'):
"SaleOrder delete"
order = get_object_or_404(SaleOrder, pk=order_id)
if not request.user.profile.has_permission(order, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Sale Status", response_format)
if request.POST:
if 'delete' in request.POST:
if 'trash' in request.POST:
order.trash = True
order.save()
else:
order.delete()
return HttpResponseRedirect(reverse('sales_index'))
elif 'cancel' in request.POST:
return HttpResponseRedirect(reverse('sales_order_view', args=[order.id]))
all_orders = Object.filter_by_request(request, SaleOrder.objects)
return render_to_response('sales/order_delete',
{'order': order,
'orders': all_orders,
},
context_instance=RequestContext(request), response_format=response_format)
#
# Settings
#
@mylogin_required
@handle_response_format
def settings_view(request, response_format='html'):
"Settings"
if not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, message="You don't have administrator access to the Sales module")
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
all_statuses = Object.filter_by_request(request, SaleStatus.objects)
all_sources = Object.filter_by_request(request, SaleSource.objects)
# default currency
try:
default_currency = Currency.objects.get(is_default=True)
except:
default_currency = None
# all currencies
currencies = Object.filter_by_request(
request, Currency.objects.filter(trash=False))
# default lead status
try:
conf = ModuleSetting.get_for_module(
'anaf.sales', 'default_lead_status')[0]
default_lead_status = SaleStatus.objects.get(pk=int(conf.value))
except:
default_lead_status = None
# default opportunity status
try:
conf = ModuleSetting.get_for_module(
'anaf.sales', 'default_opportunity_status')[0]
default_opportunity_status = SaleStatus.objects.get(
pk=int(conf.value))
except:
default_opportunity_status = None
# default order status
try:
conf = ModuleSetting.get_for_module(
'anaf.sales', 'default_order_status')[0]
default_order_status = SaleStatus.objects.get(pk=int(conf.value))
except:
default_order_status = None
# default order source
try:
conf = ModuleSetting.get_for_module(
'anaf.sales', 'default_order_source')[0]
default_order_source = SaleSource.objects.get(pk=int(conf.value))
except:
default_order_source = None
# order fulfilment status
try:
conf = ModuleSetting.get_for_module(
'anaf.sales', 'order_fulfil_status')[0]
order_fulfil_status = SaleStatus.objects.get(pk=int(conf.value))
except:
order_fulfil_status = None
# default product
try:
conf = ModuleSetting.get_for_module(
'anaf.sales', 'default_order_product')[0]
default_order_product = Product.objects.get(pk=int(conf.value))
except:
default_order_product = None
# check not trashed
if default_opportunity_status and default_opportunity_status.trash:
default_opportunity_status = None
if default_lead_status and default_lead_status.trash:
default_lead_status = None
if default_order_status and default_order_status.trash:
default_order_status = None
if default_order_source and default_order_source.trash:
default_order_source = None
if order_fulfil_status and order_fulfil_status.trash:
order_fulfil_status = None
if default_order_product and default_order_product.trash:
default_order_product = None
return render_to_response('sales/settings_view',
{
'products': all_products,
'statuses': all_statuses,
'sources': all_sources,
'currencies': currencies,
'default_opportunity_status': default_opportunity_status,
'default_lead_status': default_lead_status,
'default_order_status': default_order_status,
'default_order_source': default_order_source,
'order_fulfil_status': order_fulfil_status,
'default_order_product': default_order_product,
'default_currency': default_currency,
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def settings_edit(request, response_format='html'):
"Settings"
if not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, message="You don't have administrator access to the Sales module")
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
if request.POST:
if 'cancel' not in request.POST:
form = SettingsForm(request.user.profile, request.POST)
if form.is_valid():
form.save()
return HttpResponseRedirect(reverse('sales_settings_view'))
else:
return HttpResponseRedirect(reverse('sales_settings_view'))
else:
form = SettingsForm(request.user.profile)
return render_to_response('sales/settings_edit',
{
'products': all_products,
'form': form,
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def status_add(request, response_format='html'):
"TicketStatus add"
if not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, message="You don't have administrator access to the Sales module")
status = None
if request.POST:
if 'cancel' not in request.POST:
status = SaleStatus()
form = SaleStatusForm(
request.user.profile, request.POST, instance=status)
if form.is_valid():
status = form.save()
status.set_user_from_request(request)
return HttpResponseRedirect(reverse('sales_status_view', args=[status.id]))
else:
return HttpResponseRedirect(reverse('sales_settings_view'))
else:
form = SaleStatusForm(request.user.profile)
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
return render_to_response('sales/status_add',
{'form': form,
'status': status,
'products': all_products,
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def status_view(request, status_id, response_format='html'):
"Tickets filtered by status"
status = get_object_or_404(SaleStatus, pk=status_id)
if not request.user.profile.has_permission(status) \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, message="You don't have access to this Sale Status")
query = Q(status=status)
if request.GET:
query = query & _get_filter_query(request.GET)
orders = Object.filter_by_request(request, SaleOrder.objects.filter(query))
return render_to_response('sales/status_view',
{'status': status,
'orders': orders},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def status_edit(request, status_id, response_format='html'):
"SaleStatus edit"
status = get_object_or_404(SaleStatus, pk=status_id)
if not request.user.profile.has_permission(status, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Sale Status", response_format)
if request.POST:
if 'cancel' not in request.POST:
form = SaleStatusForm(
request.user.profile, request.POST, instance=status)
if form.is_valid():
status = form.save()
return HttpResponseRedirect(reverse('sales_status_view', args=[status.id]))
else:
return HttpResponseRedirect(reverse('sales_status_view', args=[status.id]))
else:
form = SaleStatusForm(request.user.profile, instance=status)
return render_to_response('sales/status_edit',
{'form': form,
'status': status},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def status_delete(request, status_id, response_format='html'):
"SaleStatus delete"
status = get_object_or_404(SaleStatus, pk=status_id)
if not request.user.profile.has_permission(status, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Sale Status", response_format)
if request.POST:
if 'delete' in request.POST:
if 'trash' in request.POST:
status.trash = True
status.save()
else:
status.delete()
return HttpResponseRedirect(reverse('sales_settings_view'))
elif 'cancel' in request.POST:
return HttpResponseRedirect(reverse('sales_status_view', args=[status.id]))
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
return render_to_response('sales/status_delete',
{'status': status,
'products': all_products},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def source_add(request, response_format='html'):
"TicketStatus add"
if not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, message="You don't have administrator access to the Sales module")
if request.POST:
if 'cancel' not in request.POST:
source = SaleSource()
form = SaleSourceForm(
request.user.profile, request.POST, instance=source)
if form.is_valid():
source = form.save()
source.set_user_from_request(request)
return HttpResponseRedirect(reverse('sales_source_view', args=[source.id]))
else:
return HttpResponseRedirect(reverse('sales_settings_view'))
else:
form = SaleSourceForm(request.user.profile)
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
all_sources = Object.filter_by_request(request, SaleSource.objects)
return render_to_response('sales/source_add',
{'form': form,
'sources': all_sources,
'products': all_products,
},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def source_view(request, source_id, response_format='html'):
"Orders filtered by source"
source = get_object_or_404(SaleSource, pk=source_id)
if not request.user.profile.has_permission(source) \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, message="You don't have access to this Sale Status")
query = Q(source=source)
if request.GET:
query = query & _get_filter_query(request.GET)
orders = Object.filter_by_request(request, SaleOrder.objects.filter(query))
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
all_sources = Object.filter_by_request(request, SaleSource.objects)
return render_to_response('sales/source_view',
{'source': source,
'sources': all_sources,
'products': all_products,
'orders': orders},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def source_edit(request, source_id, response_format='html'):
"SaleSource edit"
source = get_object_or_404(SaleSource, pk=source_id)
if not request.user.profile.has_permission(source, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Sale Status", response_format)
if request.POST:
if 'cancel' not in request.POST:
form = SaleSourceForm(
request.user.profile, request.POST, instance=source)
if form.is_valid():
source = form.save()
return HttpResponseRedirect(reverse('sales_source_view', args=[source.id]))
else:
return HttpResponseRedirect(reverse('sales_source_view', args=[source.id]))
else:
form = SaleSourceForm(request.user.profile, instance=source)
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
all_sources = Object.filter_by_request(request, SaleSource.objects)
return render_to_response('sales/source_edit',
{'form': form,
'source': source,
'sources': all_sources,
'products': all_products},
context_instance=RequestContext(request), response_format=response_format)
@mylogin_required
@handle_response_format
def source_delete(request, source_id, response_format='html'):
"SaleSource delete"
source = get_object_or_404(SaleSource, pk=source_id)
if not request.user.profile.has_permission(source, mode='w') \
and not request.user.profile.is_admin('anaf.sales'):
return user_denied(request, "You don't have access to this Sale Status", response_format)
if request.POST:
if 'delete' in request.POST:
if 'trash' in request.POST:
source.trash = True
source.save()
else:
source.delete()
return HttpResponseRedirect(reverse('sales_settings_view'))
elif 'cancel' in request.POST:
return HttpResponseRedirect(reverse('sales_source_view', args=[source.id]))
all_products = Object.filter_by_request(
request, Product.objects.filter(parent__isnull=True))
all_sources = Object.filter_by_request(request, SaleSource.objects)
return render_to_response('sales/source_delete',
{'source': source,
'sources': all_sources,
'products': all_products},
context_instance=RequestContext(request), response_format=response_format)
#
# AJAX handlers
@require_response_format(['json'])
@mylogin_required
def ajax_subscription_lookup(request, response_format='json'):
"""Returns a list of matching tasks"""
subscriptions = []
if request.GET and 'term' in request.GET:
subscriptions = Subscription.objects.filter(
Q(client__name__icontains=request.GET['term']) | Q(
product__name__icontains=request.GET['term']) | Q(
details__icontains=request.GET['term']))[:10]
return render_to_response('sales/ajax_subscription_lookup',
{'subscriptions': subscriptions},
context_instance=RequestContext(request),
response_format=response_format)
| 39.501569 | 109 | 0.620777 | 6,599 | 62,926 | 5.681467 | 0.034399 | 0.075429 | 0.054732 | 0.029126 | 0.842766 | 0.819481 | 0.771098 | 0.721434 | 0.695295 | 0.651792 | 0 | 0.0025 | 0.28818 | 62,926 | 1,592 | 110 | 39.526382 | 0.834524 | 0.022582 | 0 | 0.667717 | 0 | 0 | 0.100539 | 0.013179 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04252 | false | 0.00315 | 0.011024 | 0 | 0.159055 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
8055d245387c2249c2e5cea5265bab9b9b8fa039 | 183 | py | Python | ipz/__init__.py | sepandhaghighi/ipz | 3d2a0272eacc41c8780139353c88b960bd119c75 | [
"MIT"
] | 8 | 2017-02-01T14:10:54.000Z | 2019-06-13T11:56:08.000Z | ipz/__init__.py | sepandhaghighi/ipz | 3d2a0272eacc41c8780139353c88b960bd119c75 | [
"MIT"
] | null | null | null | ipz/__init__.py | sepandhaghighi/ipz | 3d2a0272eacc41c8780139353c88b960bd119c75 | [
"MIT"
] | null | null | null | '''
IPZ is a simple library for extracting local and global ip in python scripts
By Sepand Haghighi
http://www.shaghighi.ir
http://github.com/sepandhaghighi/ipz
'''
from .ipz import * | 26.142857 | 76 | 0.765027 | 29 | 183 | 4.827586 | 0.896552 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.131148 | 183 | 7 | 77 | 26.142857 | 0.880503 | 0.852459 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 5 |
8056994199991cd116aad1dbc47ec05ffcc9a25f | 100 | py | Python | old/app/models/__init__.py | CoCongV/scheduler-service | c16ea8751b7259abe1b6bfa2e8e706aa2ea7e74a | [
"BSD-2-Clause"
] | 2 | 2019-11-18T14:25:04.000Z | 2020-08-01T13:16:40.000Z | old/app/models/__init__.py | CoCongV/scheduler-service | c16ea8751b7259abe1b6bfa2e8e706aa2ea7e74a | [
"BSD-2-Clause"
] | null | null | null | old/app/models/__init__.py | CoCongV/scheduler-service | c16ea8751b7259abe1b6bfa2e8e706aa2ea7e74a | [
"BSD-2-Clause"
] | null | null | null | from .user import User
from .client import Client
from .grant import Grant
from .token import Token
| 20 | 26 | 0.8 | 16 | 100 | 5 | 0.375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16 | 100 | 4 | 27 | 25 | 0.952381 | 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 |
338039ee1250cc3143328bc3cb2b76f0202f630b | 201 | py | Python | pacemaker-django/classes/templatetags/custom.py | blesk011/pacemaker-django | 4311537f7025b3d7b49bec0052b04fc342af54a0 | [
"MIT"
] | null | null | null | pacemaker-django/classes/templatetags/custom.py | blesk011/pacemaker-django | 4311537f7025b3d7b49bec0052b04fc342af54a0 | [
"MIT"
] | null | null | null | pacemaker-django/classes/templatetags/custom.py | blesk011/pacemaker-django | 4311537f7025b3d7b49bec0052b04fc342af54a0 | [
"MIT"
] | null | null | null | from django import template
register = template.Library()
@register.filter
def index(List, i):
return List[int(i)]
@register.filter
def change(dic, yearNsemester):
return dic[yearNsemester] | 16.75 | 31 | 0.741294 | 26 | 201 | 5.730769 | 0.615385 | 0.187919 | 0.228188 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.149254 | 201 | 12 | 32 | 16.75 | 0.871345 | 0 | 0 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.125 | 0.25 | 0.625 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 5 |
33959da5e9ccfd0d24e70239a1b077cacb38b61f | 225 | py | Python | rsockets2/__init__.py | freelancer1845/rsockets2-try | 25b8b38e00925c3feb6c6e790624a35bc8689619 | [
"Apache-2.0"
] | 3 | 2020-05-08T09:45:44.000Z | 2020-11-13T11:39:06.000Z | rsockets2/__init__.py | freelancer1845/rsockets2-try | 25b8b38e00925c3feb6c6e790624a35bc8689619 | [
"Apache-2.0"
] | 1 | 2022-01-27T08:07:22.000Z | 2022-01-27T08:07:22.000Z | rsockets2/__init__.py | freelancer1845/rsockets2-try | 25b8b38e00925c3feb6c6e790624a35bc8689619 | [
"Apache-2.0"
] | 1 | 2020-05-08T09:47:14.000Z | 2020-05-08T09:47:14.000Z | from .rsocket_client import RSocketClient
from .messages import RMessageClient
from .transport import TcpTransport, WebsocketTransport
from .rsocket_client_factory import RSocketClientFactory
from .common import RSocketConfig | 45 | 56 | 0.884444 | 24 | 225 | 8.166667 | 0.583333 | 0.112245 | 0.173469 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.088889 | 225 | 5 | 57 | 45 | 0.956098 | 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 |
3398542bcdee1942850b5fb839e6a1a32abb9380 | 32 | py | Python | ex40b.py | thinzaroo15/coding-sprint | 3c146fafb09a5e9bf9ef1d257b9a8f3052e8ab96 | [
"MIT"
] | null | null | null | ex40b.py | thinzaroo15/coding-sprint | 3c146fafb09a5e9bf9ef1d257b9a8f3052e8ab96 | [
"MIT"
] | null | null | null | ex40b.py | thinzaroo15/coding-sprint | 3c146fafb09a5e9bf9ef1d257b9a8f3052e8ab96 | [
"MIT"
] | null | null | null | import mystuff
mystuff.apple()
| 8 | 15 | 0.78125 | 4 | 32 | 6.25 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 32 | 3 | 16 | 10.666667 | 0.892857 | 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 |
3399d4f24fc596327a278bfa9e67c0bb3b6e1dba | 135 | py | Python | polyaxon/polyaxon/config_settings/persistence_data.py | wbuchwalter/polyaxon | a01396ea86a74082c457bfbc2c91d283b6ff6fba | [
"MIT"
] | null | null | null | polyaxon/polyaxon/config_settings/persistence_data.py | wbuchwalter/polyaxon | a01396ea86a74082c457bfbc2c91d283b6ff6fba | [
"MIT"
] | null | null | null | polyaxon/polyaxon/config_settings/persistence_data.py | wbuchwalter/polyaxon | a01396ea86a74082c457bfbc2c91d283b6ff6fba | [
"MIT"
] | null | null | null | import json
from polyaxon.config_manager import config
PERSISTENCE_DATA = json.loads(config.get_string('POLYAXON_PERSISTENCE_DATA'))
| 22.5 | 77 | 0.844444 | 18 | 135 | 6.055556 | 0.611111 | 0.275229 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.081481 | 135 | 5 | 78 | 27 | 0.879032 | 0 | 0 | 0 | 0 | 0 | 0.185185 | 0.185185 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
33c758f3a8c369cf24ec61825672c5512f476143 | 577 | py | Python | Python/Stack.py | nhutnamhcmus/code | 22b528084ed234fcabca89cf1ba02a2c347007bc | [
"MIT"
] | 1 | 2020-10-12T18:33:22.000Z | 2020-10-12T18:33:22.000Z | Python/Stack.py | nhutnamhcmus/code | 22b528084ed234fcabca89cf1ba02a2c347007bc | [
"MIT"
] | null | null | null | Python/Stack.py | nhutnamhcmus/code | 22b528084ed234fcabca89cf1ba02a2c347007bc | [
"MIT"
] | null | null | null | class Stack():
def __init__(self):
self.items = []
def push(self, item):
self.items.append(item)
def pop(self):
return self.items.pop()
def is_empty(self):
return self.items == []
def peek(self):
if not self.is_empty():
return self.items[-1]
def get_stack(self):
return self.items
def __str__(self):
return str(self.items)
myStack = Stack()
myStack.push("A")
myStack.push("B")
myStack.push("C")
myStack.push("D")
print(myStack)
print(myStack.peek()) | 18.612903 | 35 | 0.556326 | 74 | 577 | 4.189189 | 0.337838 | 0.203226 | 0.193548 | 0.183871 | 0.141935 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002469 | 0.298094 | 577 | 31 | 36 | 18.612903 | 0.762963 | 0 | 0 | 0 | 0 | 0 | 0.00692 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.304348 | false | 0 | 0 | 0.173913 | 0.565217 | 0.086957 | 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 |
33efcbf43612d037ffd6d37e07c86fe73f92b449 | 110 | py | Python | tradematik2000/training/data.py | pval3sigma/tradematik2000 | f616b6e6781dfd618add43bd798b500494e34400 | [
"MIT"
] | null | null | null | tradematik2000/training/data.py | pval3sigma/tradematik2000 | f616b6e6781dfd618add43bd798b500494e34400 | [
"MIT"
] | 1 | 2021-03-07T18:29:54.000Z | 2021-03-07T18:29:54.000Z | tradematik2000/training/data.py | pval3sigma/tradematik2000 | f616b6e6781dfd618add43bd798b500494e34400 | [
"MIT"
] | null | null | null | import pandas as pd
def read_data(path):
financial_data = pd.read_csv(path)
return financial_data
| 12.222222 | 38 | 0.727273 | 17 | 110 | 4.470588 | 0.647059 | 0.342105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.209091 | 110 | 8 | 39 | 13.75 | 0.873563 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.75 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 |
d505c5e565cc5bd6cf51a7a82a9711c791150139 | 127 | py | Python | play_with_api/ffmpeg.py | scotthuang1989/mytensorflow_example_code | 2fd1099afc3f60ef9a1bf22227c4cde51ede212c | [
"MIT"
] | 32 | 2017-10-30T01:44:56.000Z | 2021-12-23T06:40:47.000Z | play_with_api/ffmpeg.py | scotthuang1989/mytensorflow_example_code | 2fd1099afc3f60ef9a1bf22227c4cde51ede212c | [
"MIT"
] | 1 | 2020-11-18T21:13:24.000Z | 2020-11-18T21:13:24.000Z | play_with_api/ffmpeg.py | scotthuang1989/mytensorflow_example_code | 2fd1099afc3f60ef9a1bf22227c4cde51ede212c | [
"MIT"
] | 19 | 2017-12-15T13:27:36.000Z | 2020-08-18T00:16:38.000Z | import tensorflow as tf
from tensorflow.contrib import ffmpeg
# tensorflow 1. 5 have decode_video ops. wait for reales of 1.5
| 25.4 | 63 | 0.795276 | 22 | 127 | 4.545455 | 0.772727 | 0.04 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.037736 | 0.165354 | 127 | 4 | 64 | 31.75 | 0.90566 | 0.480315 | 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 |
1d30007d36b8e384656388b0f69d74c8b6939dee | 75 | py | Python | Chapter 03/Displaying Text/displayingText.py | sk8erchoi/rldrl | 98503e31123b896a1e2521b18d02a8642fa4b92a | [
"MIT"
] | 4 | 2021-08-01T02:24:55.000Z | 2022-03-20T06:06:01.000Z | Chapter 03/Displaying Text/displayingText.py | sk8erchoi/rldrl | 98503e31123b896a1e2521b18d02a8642fa4b92a | [
"MIT"
] | null | null | null | Chapter 03/Displaying Text/displayingText.py | sk8erchoi/rldrl | 98503e31123b896a1e2521b18d02a8642fa4b92a | [
"MIT"
] | 5 | 2021-06-17T06:30:39.000Z | 2022-03-21T17:37:12.000Z | # Introduction to Displaying Text
# Displaying text
print('Hello world!')
| 15 | 33 | 0.76 | 9 | 75 | 6.333333 | 0.777778 | 0.491228 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.146667 | 75 | 4 | 34 | 18.75 | 0.890625 | 0.626667 | 0 | 0 | 0 | 0 | 0.48 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 5 |
1d77251ddfc516f49214b69d8b697e11d851de55 | 11,308 | py | Python | temboo/core/Library/Amazon/IAM/__init__.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 7 | 2016-03-07T02:07:21.000Z | 2022-01-21T02:22:41.000Z | temboo/core/Library/Amazon/IAM/__init__.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | null | null | null | temboo/core/Library/Amazon/IAM/__init__.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 8 | 2016-06-14T06:01:11.000Z | 2020-04-22T09:21:44.000Z | from temboo.Library.Amazon.IAM.AddRoleToInstanceProfile import AddRoleToInstanceProfile, AddRoleToInstanceProfileInputSet, AddRoleToInstanceProfileResultSet, AddRoleToInstanceProfileChoreographyExecution
from temboo.Library.Amazon.IAM.AddUserToGroup import AddUserToGroup, AddUserToGroupInputSet, AddUserToGroupResultSet, AddUserToGroupChoreographyExecution
from temboo.Library.Amazon.IAM.ChangePassword import ChangePassword, ChangePasswordInputSet, ChangePasswordResultSet, ChangePasswordChoreographyExecution
from temboo.Library.Amazon.IAM.CreateAccessKey import CreateAccessKey, CreateAccessKeyInputSet, CreateAccessKeyResultSet, CreateAccessKeyChoreographyExecution
from temboo.Library.Amazon.IAM.CreateAccountAlias import CreateAccountAlias, CreateAccountAliasInputSet, CreateAccountAliasResultSet, CreateAccountAliasChoreographyExecution
from temboo.Library.Amazon.IAM.CreateGroup import CreateGroup, CreateGroupInputSet, CreateGroupResultSet, CreateGroupChoreographyExecution
from temboo.Library.Amazon.IAM.CreateInstanceProfile import CreateInstanceProfile, CreateInstanceProfileInputSet, CreateInstanceProfileResultSet, CreateInstanceProfileChoreographyExecution
from temboo.Library.Amazon.IAM.CreateLoginProfile import CreateLoginProfile, CreateLoginProfileInputSet, CreateLoginProfileResultSet, CreateLoginProfileChoreographyExecution
from temboo.Library.Amazon.IAM.CreateUser import CreateUser, CreateUserInputSet, CreateUserResultSet, CreateUserChoreographyExecution
from temboo.Library.Amazon.IAM.CreateVirtualMFADevice import CreateVirtualMFADevice, CreateVirtualMFADeviceInputSet, CreateVirtualMFADeviceResultSet, CreateVirtualMFADeviceChoreographyExecution
from temboo.Library.Amazon.IAM.DeactivateMFADevice import DeactivateMFADevice, DeactivateMFADeviceInputSet, DeactivateMFADeviceResultSet, DeactivateMFADeviceChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteAccessKey import DeleteAccessKey, DeleteAccessKeyInputSet, DeleteAccessKeyResultSet, DeleteAccessKeyChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteAccountAlias import DeleteAccountAlias, DeleteAccountAliasInputSet, DeleteAccountAliasResultSet, DeleteAccountAliasChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteAccountPasswordPolicy import DeleteAccountPasswordPolicy, DeleteAccountPasswordPolicyInputSet, DeleteAccountPasswordPolicyResultSet, DeleteAccountPasswordPolicyChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteGroup import DeleteGroup, DeleteGroupInputSet, DeleteGroupResultSet, DeleteGroupChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteGroupPolicy import DeleteGroupPolicy, DeleteGroupPolicyInputSet, DeleteGroupPolicyResultSet, DeleteGroupPolicyChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteInstanceProfile import DeleteInstanceProfile, DeleteInstanceProfileInputSet, DeleteInstanceProfileResultSet, DeleteInstanceProfileChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteLoginProfile import DeleteLoginProfile, DeleteLoginProfileInputSet, DeleteLoginProfileResultSet, DeleteLoginProfileChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteRole import DeleteRole, DeleteRoleInputSet, DeleteRoleResultSet, DeleteRoleChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteRolePolicy import DeleteRolePolicy, DeleteRolePolicyInputSet, DeleteRolePolicyResultSet, DeleteRolePolicyChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteServerCertificate import DeleteServerCertificate, DeleteServerCertificateInputSet, DeleteServerCertificateResultSet, DeleteServerCertificateChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteSigningCertificate import DeleteSigningCertificate, DeleteSigningCertificateInputSet, DeleteSigningCertificateResultSet, DeleteSigningCertificateChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteUser import DeleteUser, DeleteUserInputSet, DeleteUserResultSet, DeleteUserChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteUserPolicy import DeleteUserPolicy, DeleteUserPolicyInputSet, DeleteUserPolicyResultSet, DeleteUserPolicyChoreographyExecution
from temboo.Library.Amazon.IAM.DeleteVirtualMFADevice import DeleteVirtualMFADevice, DeleteVirtualMFADeviceInputSet, DeleteVirtualMFADeviceResultSet, DeleteVirtualMFADeviceChoreographyExecution
from temboo.Library.Amazon.IAM.EnableMFADevice import EnableMFADevice, EnableMFADeviceInputSet, EnableMFADeviceResultSet, EnableMFADeviceChoreographyExecution
from temboo.Library.Amazon.IAM.GetAccountPasswordPolicy import GetAccountPasswordPolicy, GetAccountPasswordPolicyInputSet, GetAccountPasswordPolicyResultSet, GetAccountPasswordPolicyChoreographyExecution
from temboo.Library.Amazon.IAM.GetAccountSummary import GetAccountSummary, GetAccountSummaryInputSet, GetAccountSummaryResultSet, GetAccountSummaryChoreographyExecution
from temboo.Library.Amazon.IAM.GetGroup import GetGroup, GetGroupInputSet, GetGroupResultSet, GetGroupChoreographyExecution
from temboo.Library.Amazon.IAM.GetGroupPolicy import GetGroupPolicy, GetGroupPolicyInputSet, GetGroupPolicyResultSet, GetGroupPolicyChoreographyExecution
from temboo.Library.Amazon.IAM.GetInstanceProfile import GetInstanceProfile, GetInstanceProfileInputSet, GetInstanceProfileResultSet, GetInstanceProfileChoreographyExecution
from temboo.Library.Amazon.IAM.GetLoginProfile import GetLoginProfile, GetLoginProfileInputSet, GetLoginProfileResultSet, GetLoginProfileChoreographyExecution
from temboo.Library.Amazon.IAM.GetRole import GetRole, GetRoleInputSet, GetRoleResultSet, GetRoleChoreographyExecution
from temboo.Library.Amazon.IAM.GetRolePolicy import GetRolePolicy, GetRolePolicyInputSet, GetRolePolicyResultSet, GetRolePolicyChoreographyExecution
from temboo.Library.Amazon.IAM.GetServerCertificate import GetServerCertificate, GetServerCertificateInputSet, GetServerCertificateResultSet, GetServerCertificateChoreographyExecution
from temboo.Library.Amazon.IAM.GetUser import GetUser, GetUserInputSet, GetUserResultSet, GetUserChoreographyExecution
from temboo.Library.Amazon.IAM.GetUserPolicy import GetUserPolicy, GetUserPolicyInputSet, GetUserPolicyResultSet, GetUserPolicyChoreographyExecution
from temboo.Library.Amazon.IAM.ListAccessKeys import ListAccessKeys, ListAccessKeysInputSet, ListAccessKeysResultSet, ListAccessKeysChoreographyExecution
from temboo.Library.Amazon.IAM.ListAccountAliases import ListAccountAliases, ListAccountAliasesInputSet, ListAccountAliasesResultSet, ListAccountAliasesChoreographyExecution
from temboo.Library.Amazon.IAM.ListGroupPolicies import ListGroupPolicies, ListGroupPoliciesInputSet, ListGroupPoliciesResultSet, ListGroupPoliciesChoreographyExecution
from temboo.Library.Amazon.IAM.ListGroups import ListGroups, ListGroupsInputSet, ListGroupsResultSet, ListGroupsChoreographyExecution
from temboo.Library.Amazon.IAM.ListGroupsForUser import ListGroupsForUser, ListGroupsForUserInputSet, ListGroupsForUserResultSet, ListGroupsForUserChoreographyExecution
from temboo.Library.Amazon.IAM.ListInstanceProfiles import ListInstanceProfiles, ListInstanceProfilesInputSet, ListInstanceProfilesResultSet, ListInstanceProfilesChoreographyExecution
from temboo.Library.Amazon.IAM.ListInstanceProfilesForRole import ListInstanceProfilesForRole, ListInstanceProfilesForRoleInputSet, ListInstanceProfilesForRoleResultSet, ListInstanceProfilesForRoleChoreographyExecution
from temboo.Library.Amazon.IAM.ListMFADevices import ListMFADevices, ListMFADevicesInputSet, ListMFADevicesResultSet, ListMFADevicesChoreographyExecution
from temboo.Library.Amazon.IAM.ListRolePolicies import ListRolePolicies, ListRolePoliciesInputSet, ListRolePoliciesResultSet, ListRolePoliciesChoreographyExecution
from temboo.Library.Amazon.IAM.ListRoles import ListRoles, ListRolesInputSet, ListRolesResultSet, ListRolesChoreographyExecution
from temboo.Library.Amazon.IAM.ListServerCertificates import ListServerCertificates, ListServerCertificatesInputSet, ListServerCertificatesResultSet, ListServerCertificatesChoreographyExecution
from temboo.Library.Amazon.IAM.ListSigningCertificates import ListSigningCertificates, ListSigningCertificatesInputSet, ListSigningCertificatesResultSet, ListSigningCertificatesChoreographyExecution
from temboo.Library.Amazon.IAM.ListUserPolicies import ListUserPolicies, ListUserPoliciesInputSet, ListUserPoliciesResultSet, ListUserPoliciesChoreographyExecution
from temboo.Library.Amazon.IAM.ListUsers import ListUsers, ListUsersInputSet, ListUsersResultSet, ListUsersChoreographyExecution
from temboo.Library.Amazon.IAM.ListVirtualMFADevices import ListVirtualMFADevices, ListVirtualMFADevicesInputSet, ListVirtualMFADevicesResultSet, ListVirtualMFADevicesChoreographyExecution
from temboo.Library.Amazon.IAM.PutGroupPolicy import PutGroupPolicy, PutGroupPolicyInputSet, PutGroupPolicyResultSet, PutGroupPolicyChoreographyExecution
from temboo.Library.Amazon.IAM.PutRolePolicy import PutRolePolicy, PutRolePolicyInputSet, PutRolePolicyResultSet, PutRolePolicyChoreographyExecution
from temboo.Library.Amazon.IAM.PutUserPolicy import PutUserPolicy, PutUserPolicyInputSet, PutUserPolicyResultSet, PutUserPolicyChoreographyExecution
from temboo.Library.Amazon.IAM.RemoveRoleFromInstanceProfile import RemoveRoleFromInstanceProfile, RemoveRoleFromInstanceProfileInputSet, RemoveRoleFromInstanceProfileResultSet, RemoveRoleFromInstanceProfileChoreographyExecution
from temboo.Library.Amazon.IAM.RemoveUserFromGroup import RemoveUserFromGroup, RemoveUserFromGroupInputSet, RemoveUserFromGroupResultSet, RemoveUserFromGroupChoreographyExecution
from temboo.Library.Amazon.IAM.ResyncMFADevice import ResyncMFADevice, ResyncMFADeviceInputSet, ResyncMFADeviceResultSet, ResyncMFADeviceChoreographyExecution
from temboo.Library.Amazon.IAM.UpdateAccessKey import UpdateAccessKey, UpdateAccessKeyInputSet, UpdateAccessKeyResultSet, UpdateAccessKeyChoreographyExecution
from temboo.Library.Amazon.IAM.UpdateAccountPasswordPolicy import UpdateAccountPasswordPolicy, UpdateAccountPasswordPolicyInputSet, UpdateAccountPasswordPolicyResultSet, UpdateAccountPasswordPolicyChoreographyExecution
from temboo.Library.Amazon.IAM.UpdateGroup import UpdateGroup, UpdateGroupInputSet, UpdateGroupResultSet, UpdateGroupChoreographyExecution
from temboo.Library.Amazon.IAM.UpdateLoginProfile import UpdateLoginProfile, UpdateLoginProfileInputSet, UpdateLoginProfileResultSet, UpdateLoginProfileChoreographyExecution
from temboo.Library.Amazon.IAM.UpdateServerCertificate import UpdateServerCertificate, UpdateServerCertificateInputSet, UpdateServerCertificateResultSet, UpdateServerCertificateChoreographyExecution
from temboo.Library.Amazon.IAM.UpdateSigningCertificate import UpdateSigningCertificate, UpdateSigningCertificateInputSet, UpdateSigningCertificateResultSet, UpdateSigningCertificateChoreographyExecution
from temboo.Library.Amazon.IAM.UpdateUser import UpdateUser, UpdateUserInputSet, UpdateUserResultSet, UpdateUserChoreographyExecution
from temboo.Library.Amazon.IAM.UploadServerCertificate import UploadServerCertificate, UploadServerCertificateInputSet, UploadServerCertificateResultSet, UploadServerCertificateChoreographyExecution
from temboo.Library.Amazon.IAM.UploadSigningCertificate import UploadSigningCertificate, UploadSigningCertificateInputSet, UploadSigningCertificateResultSet, UploadSigningCertificateChoreographyExecution
| 166.294118 | 228 | 0.91705 | 737 | 11,308 | 14.070556 | 0.371777 | 0.064609 | 0.109836 | 0.148602 | 0.167985 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.041475 | 11,308 | 67 | 229 | 168.776119 | 0.95673 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.059701 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.