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
f3a6363c0a975d7efb2252f7434d61f78e415a2e
50
py
Python
tests/__init__.py
apiology/local_keychain_utils
b3dd0626e2b8f20d0ac2cd9ff6203089b8bb933e
[ "MIT" ]
null
null
null
tests/__init__.py
apiology/local_keychain_utils
b3dd0626e2b8f20d0ac2cd9ff6203089b8bb933e
[ "MIT" ]
235
2018-08-10T13:33:56.000Z
2021-07-11T20:05:05.000Z
tests/__init__.py
apiology/local_keychain_utils
b3dd0626e2b8f20d0ac2cd9ff6203089b8bb933e
[ "MIT" ]
null
null
null
"""Unit test package for local_keychain_utils."""
25
49
0.76
7
50
5.142857
1
0
0
0
0
0
0
0
0
0
0
0
0.1
50
1
50
50
0.8
0.86
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
45ecb68f11d036fc61bcb7c46c054ad3bd6a6aae
293
py
Python
JetMETCorrections/Modules/python/JetResolutionESProducer_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
JetMETCorrections/Modules/python/JetResolutionESProducer_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
JetMETCorrections/Modules/python/JetResolutionESProducer_cfi.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 JetResolutionESProducer_AK4PFchs = cms.ESProducer("JetResolutionESProducer", label = cms.string('AK4PFchs') ) JetResolutionESProducer_SF_AK4PFchs = cms.ESProducer("JetResolutionScaleFactorESProducer", label = cms.string('AK4PFchs') )
29.3
90
0.78157
25
293
9.04
0.52
0.097345
0.185841
0.19469
0
0
0
0
0
0
0
0.015564
0.122867
293
9
91
32.555556
0.863813
0
0
0.285714
0
0
0.249147
0.194539
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
34573d7b505687d4167d4571b41c46d05d6f22fe
1,385
py
Python
test/test_connect_service_api.py
stanionascu/python-embyapi
a3f7aa49aea4052277cc43605c0d89bc6ff21913
[ "BSD-3-Clause" ]
null
null
null
test/test_connect_service_api.py
stanionascu/python-embyapi
a3f7aa49aea4052277cc43605c0d89bc6ff21913
[ "BSD-3-Clause" ]
null
null
null
test/test_connect_service_api.py
stanionascu/python-embyapi
a3f7aa49aea4052277cc43605c0d89bc6ff21913
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 """ Emby Server API Explore the Emby Server API # noqa: E501 OpenAPI spec version: 4.1.1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import embyapi from embyapi.api.connect_service_api import ConnectServiceApi # noqa: E501 from embyapi.rest import ApiException class TestConnectServiceApi(unittest.TestCase): """ConnectServiceApi unit test stubs""" def setUp(self): self.api = ConnectServiceApi() # noqa: E501 def tearDown(self): pass def test_delete_users_by_id_connect_link(self): """Test case for delete_users_by_id_connect_link Removes a Connect link for a user # noqa: E501 """ pass def test_get_connect_exchange(self): """Test case for get_connect_exchange Gets the corresponding local user from a connect user id # noqa: E501 """ pass def test_get_connect_pending(self): """Test case for get_connect_pending Creates a Connect link for a user # noqa: E501 """ pass def test_post_users_by_id_connect_link(self): """Test case for post_users_by_id_connect_link Creates a Connect link for a user # noqa: E501 """ pass if __name__ == '__main__': unittest.main()
22.33871
78
0.662816
182
1,385
4.785714
0.362637
0.064294
0.050517
0.073479
0.3938
0.3938
0.267509
0.222732
0.222732
0.142365
0
0.02544
0.262094
1,385
61
79
22.704918
0.82681
0.436101
0
0.25
1
0
0.012158
0
0
0
0
0
0
1
0.3
false
0.25
0.25
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
caa2e6f03f3285816667106da40a644ef6b19666
268
py
Python
app/controllers/web_controller.py
nadeengamage/flask-mvc-framework
2e21a8c3fad70ec8ac8f6bd95faab34f3bd3680a
[ "MIT" ]
null
null
null
app/controllers/web_controller.py
nadeengamage/flask-mvc-framework
2e21a8c3fad70ec8ac8f6bd95faab34f3bd3680a
[ "MIT" ]
null
null
null
app/controllers/web_controller.py
nadeengamage/flask-mvc-framework
2e21a8c3fad70ec8ac8f6bd95faab34f3bd3680a
[ "MIT" ]
null
null
null
import os from app import application as app from flask import render_template # Web controller for show particular template. class WebController(): # Render welcome template with static files. @app.route('/') def index(): return render_template("welcome.html")
24.363636
46
0.772388
36
268
5.694444
0.694444
0.136585
0
0
0
0
0
0
0
0
0
0
0.145522
268
11
47
24.363636
0.895197
0.324627
0
0
0
0
0.072626
0
0
0
0
0
0
1
0.142857
true
0
0.428571
0.142857
0.857143
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
1
1
0
0
4
caff57c9eed853e2d5ab8b326d6f4d41cbfec848
167
py
Python
Flo et toto/exercise dominik/exturtle.py
geverartsdev/TechnofuturTIC
389b3646d7a70ef91e7f51cbd258ed23ce6943dd
[ "MIT" ]
null
null
null
Flo et toto/exercise dominik/exturtle.py
geverartsdev/TechnofuturTIC
389b3646d7a70ef91e7f51cbd258ed23ce6943dd
[ "MIT" ]
null
null
null
Flo et toto/exercise dominik/exturtle.py
geverartsdev/TechnofuturTIC
389b3646d7a70ef91e7f51cbd258ed23ce6943dd
[ "MIT" ]
null
null
null
from turtle import * triangle = Turtle() triangle.right(60) triangle.forward(120) triangle.right(120) triangle.forward(120) triangle.right(120) triangle.forward(120)
16.7
21
0.784431
23
167
5.695652
0.347826
0.335878
0.412214
0.396947
0.656489
0.656489
0.656489
0.656489
0.656489
0
0
0.111111
0.083832
167
10
22
16.7
0.745098
0
0
0.625
0
0
0
0
0
0
0
0
0
1
0
false
0
0.125
0
0.125
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
0
0
0
0
0
4
1b02c85a68e0b535f1c25c75a64f704ed4dc5ec5
4,285
py
Python
tests/test_samples_cli.py
ebelter/mgi
37ea9cbddb3d64d3f0b9db4357f76f80a16d52e5
[ "MIT" ]
null
null
null
tests/test_samples_cli.py
ebelter/mgi
37ea9cbddb3d64d3f0b9db4357f76f80a16d52e5
[ "MIT" ]
null
null
null
tests/test_samples_cli.py
ebelter/mgi
37ea9cbddb3d64d3f0b9db4357f76f80a16d52e5
[ "MIT" ]
null
null
null
import os, unittest from click.testing import CliRunner from tests.test_base_classes import TestBaseWithDb class SamplesCliTest(TestBaseWithDb): def test_samples_cli(self): from mgi.cli import cli from mgi.samples.cli import samples_cli runner = CliRunner() result = runner.invoke(samples_cli, []) self.assertEqual(result.exit_code, 0) result = runner.invoke(samples_cli, ["--help"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(cli, ["samples"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(cli, ["samples", "-h"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(cli, ["samples", "--help"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(cli, ["samples", "add", "-h"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(cli, ["samples", "add", "--help"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(cli, ["samples", "add"]) self.assertEqual(result.exit_code, 2) result = runner.invoke(cli, ["samples", "list", "-h"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(cli, ["samples", "list", "--help"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(cli, ["samples", "rename", "-h"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(cli, ["samples", "rename", "--help"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(cli, ["samples", "rename"]) self.assertEqual(result.exit_code, 2) def test_add_cmd(self): from mgi.samples.cli import add_cmd as cmd runner = CliRunner() expected_output = "Added 1 of 1 samples." def test_list_cmd(self): from mgi.samples.cli import list_cmd as cmd runner = CliRunner() result = runner.invoke(cmd, ["blah=blah"]) self.assertEqual(result.exit_code, 1) self.assertTrue(result.exception) # FILTER FAILURES result = runner.invoke(cmd, ["blah=blah"]) self.assertEqual(result.exit_code, 1) self.assertTrue(result.exception) result = runner.invoke(cmd, ["name"]) self.assertEqual(result.exit_code, 1) self.assertTrue(result.exception) result = runner.invoke(cmd, ["name="]) self.assertEqual(result.exit_code, 1) self.assertTrue(result.exception) # ALL result = runner.invoke(cmd, []) try: self.assertEqual(result.exit_code, 0) except: print(result.output) raise expected_output = """NAME SETS ------ ------ H_G002 hic""" self.assertEqual(result.output, expected_output) def test_samples_paths_cli(self): from mgi.cli import cli from mgi.samples.cli import samples_cli runner = CliRunner() result = runner.invoke(samples_cli, ["paths", "--help"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(samples_cli, ["paths"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(samples_cli, ["paths", "update", "--help"]) self.assertEqual(result.exit_code, 0) result = runner.invoke(samples_cli, ["paths", "update"]) self.assertEqual(result.exit_code, 2) def test_samples_paths_update_cmd(self): from mgi.samples.cli import samples_paths_update_cmd as cmd from mgi.models import EntityPath runner = CliRunner() fn = os.path.join(self.temp_d.name, "paths.tsv") value = "/mnt/data/sample_111.bam" with open(fn, "w") as f: f.write("\t".join([value])+"\n") result = runner.invoke(cmd, [fn]) try: self.assertEqual(result.exit_code, 0) except: print(result.output) raise expected_output = """Done. Added 1 and updated 0 of 1 given paths. """ self.assertEqual(result.output, expected_output) ep = EntityPath.query.filter(EntityPath.value == value).one_or_none() self.assertTrue(ep) # -- SamplesCliTestTest if __name__ == '__main__': unittest.main(verbosity=2)
34.837398
77
0.616336
511
4,285
5.033268
0.174168
0.145801
0.204121
0.223561
0.764386
0.746501
0.684292
0.6493
0.620529
0.620529
0
0.010863
0.248075
4,285
122
78
35.122951
0.787399
0.009568
0
0.5
0
0
0.087972
0.00566
0
0
0
0
0.3125
1
0.052083
false
0
0.114583
0
0.177083
0.020833
0
0
0
null
0
1
1
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
1b1b18d7f979e278d214e9a25ab29be45b3b44a3
61
py
Python
admincommands/__init__.py
EralpB/django-admin-commands
9d127bac7b1320337a31b0958b2b787f559a1bef
[ "MIT" ]
null
null
null
admincommands/__init__.py
EralpB/django-admin-commands
9d127bac7b1320337a31b0958b2b787f559a1bef
[ "MIT" ]
null
null
null
admincommands/__init__.py
EralpB/django-admin-commands
9d127bac7b1320337a31b0958b2b787f559a1bef
[ "MIT" ]
null
null
null
default_app_config = 'admincommands.apps.AdmincommandsConfig'
61
61
0.885246
6
61
8.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.032787
61
1
61
61
0.881356
0
0
0
0
0
0.612903
0.612903
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
1b2e160e6861814a8919d55a7d3d74cff6ab4af7
2,839
py
Python
hubconf.py
joemarshall/DeepLabV3Plus-Pytorch
8abfc28d90a97e023f6869c9f4d10571ed5cf0ab
[ "MIT" ]
null
null
null
hubconf.py
joemarshall/DeepLabV3Plus-Pytorch
8abfc28d90a97e023f6869c9f4d10571ed5cf0ab
[ "MIT" ]
null
null
null
hubconf.py
joemarshall/DeepLabV3Plus-Pytorch
8abfc28d90a97e023f6869c9f4d10571ed5cf0ab
[ "MIT" ]
null
null
null
dependencies = ['torch','torchvision'] import network import torch from network import deeplabv3_resnet50 as _deeplabv3_resnet50 from network import deeplabv3plus_resnet50 as _deeplabv3plus_resnet50 from network import deeplabv3_resnet101 as _deeplabv3_resnet101 from network import deeplabv3plus_resnet101 as _deeplabv3plus_resnet101 from network import deeplabv3_mobilenet as _deeplabv3_mobilenet from network import deeplabv3plus_mobilenet as _deeplabv3plus_mobilenet def deeplabv3plus_resnet50(pretrained=False,progress=True,**kwargs): model=_deeplabv3plus_resnet50(**kwargs) if pretrained: checkpoint = 'https://github.com/joemarshall/DeepLabV3Plus-Pytorch/releases/download/pretrained_1.0/best_deeplabv3plus_resnet50_voc_os16.pth' model.load_state_dict(torch.hub.load_state_dict_from_url(checkpoint, progress=progress)["model_state"]) return model def deeplabv3_resnet50(pretrained=False,progress=True,**kwargs): model=_deeplabv3_resnet50(**kwargs) if pretrained: checkpoint = 'https://github.com/joemarshall/DeepLabV3Plus-Pytorch/releases/download/pretrained_1.0/best_deeplabv3_resnet50_voc_os16.pth' model.load_state_dict(torch.hub.load_state_dict_from_url(checkpoint, progress=progress)["model_state"]) return model def deeplabv3_resnet101(pretrained=False,progress=True,**kwargs): model=_deeplabv3_resnet101(**kwargs) if pretrained: checkpoint = 'https://github.com/joemarshall/DeepLabV3Plus-Pytorch/releases/download/pretrained_1.0/best_deeplabv3_resnet101_voc_os16.pth' model.load_state_dict(torch.hub.load_state_dict_from_url(checkpoint, progress=progress)["model_state"]) return model def deeplabv3plus_resnet101(pretrained=False,progress=True,**kwargs): model=_deeplabv3plus_resnet101(**kwargs) if pretrained: checkpoint = 'https://github.com/joemarshall/DeepLabV3Plus-Pytorch/releases/download/pretrained_1.0/best_deeplabv3plus_resnet101_voc_os16.pth' model.load_state_dict(torch.hub.load_state_dict_from_url(checkpoint, progress=progress)["model_state"]) return model def deeplabv3_mobilenet(pretrained=False,progress=True,**kwargs): model=_deeplabv3_mobilenet(**kwargs) if pretrained: checkpoint = 'https://github.com/joemarshall/DeepLabV3Plus-Pytorch/releases/download/pretrained_1.0/best_deeplabv3_mobilenet_voc_os16.pth' model.load_state_dict(torch.hub.load_state_dict_from_url(checkpoint, progress=progress)["model_state"]) return model def deeplabv3plus_mobilenet(pretrained=False,progress=True,**kwargs): model=_deeplabv3plus_mobilenet(**kwargs) if pretrained: checkpoint = 'https://github.com/joemarshall/DeepLabV3Plus-Pytorch/releases/download/pretrained_1.0/best_deeplabv3plus_mobilenet_voc_os16.pth' model.load_state_dict(torch.hub.load_state_dict_from_url(checkpoint, progress=progress)["model_state"]) return model
52.574074
146
0.830574
355
2,839
6.338028
0.112676
0.048
0.069333
0.072
0.814222
0.814222
0.814222
0.660444
0.660444
0.660444
0
0.041825
0.073617
2,839
53
147
53.566038
0.813688
0
0
0.4
0
0.133333
0.292356
0
0
0
0
0
0
1
0.133333
false
0
0.177778
0
0.444444
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
1b490fe333b905a9db6698e28a5b0b500bfd460d
1,037
py
Python
packaging/setup/ovirt_engine_setup/firewall_manager_base.py
hbraha/ovirt-engine
a6c17bd73d510d6b44ac72000c0ff686b484746c
[ "Apache-2.0" ]
347
2015-01-20T14:13:21.000Z
2022-03-31T17:53:11.000Z
packaging/setup/ovirt_engine_setup/firewall_manager_base.py
hbraha/ovirt-engine
a6c17bd73d510d6b44ac72000c0ff686b484746c
[ "Apache-2.0" ]
128
2015-05-22T19:14:32.000Z
2022-03-31T08:11:18.000Z
packaging/setup/ovirt_engine_setup/firewall_manager_base.py
hbraha/ovirt-engine
a6c17bd73d510d6b44ac72000c0ff686b484746c
[ "Apache-2.0" ]
202
2015-01-04T06:20:49.000Z
2022-03-08T15:30:08.000Z
# # ovirt-engine-setup -- ovirt engine setup # # Copyright oVirt Authors # SPDX-License-Identifier: Apache-2.0 # # """ Firewall manager base """ from otopi import base from otopi import util @util.export class FirewallManagerBase(base.Base): def __init__(self, plugin): super(FirewallManagerBase, self).__init__() self._plugin = plugin @property def plugin(self): return self._plugin @property def environment(self): return self._plugin.environment @property def name(self): raise RuntimeError('Unset') def __str__(self): return self.name def selectable(self): return True def detect(self): return False def active(self): return False def enable(self): pass def remove(self): pass def prepare_examples(self): pass def print_manual_configuration_instructions(self): pass def review_config(self): pass # vim: expandtab tabstop=4 shiftwidth=4
15.477612
54
0.633558
117
1,037
5.444444
0.470085
0.094192
0.069074
0.059655
0
0
0
0
0
0
0
0.005348
0.278689
1,037
66
55
15.712121
0.846257
0.155256
0
0.294118
0
0
0.005807
0
0
0
0
0
0
1
0.382353
false
0.147059
0.058824
0.176471
0.647059
0.029412
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
1b81f4733e62d54e9372f12637884df0e78b3e37
94
py
Python
mmaction/ops/trajectory_conv_package/__init__.py
evgeny-izutov/mmaction
c92d29af87f2373641e2d29bdb14705939fc5423
[ "Apache-2.0" ]
1
2021-03-13T13:07:39.000Z
2021-03-13T13:07:39.000Z
mmaction/ops/trajectory_conv_package/__init__.py
evgeny-izutov/mmaction
c92d29af87f2373641e2d29bdb14705939fc5423
[ "Apache-2.0" ]
null
null
null
mmaction/ops/trajectory_conv_package/__init__.py
evgeny-izutov/mmaction
c92d29af87f2373641e2d29bdb14705939fc5423
[ "Apache-2.0" ]
1
2020-06-03T18:17:15.000Z
2020-06-03T18:17:15.000Z
from .traj_conv import TrajConvFunction, TrajConv __all__ = ['TrajConvFunction', 'TrajConv']
23.5
49
0.787234
9
94
7.666667
0.777778
0.695652
0
0
0
0
0
0
0
0
0
0
0.106383
94
3
50
31.333333
0.821429
0
0
0
0
0
0.255319
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
1ba083575cf856a4158aeccfc2585bf34f730a49
165
py
Python
arcade/python/arcade-intro/08_Diving Deeper/034_extractEachKth.py
netor27/codefights-arcade-solutions
69701ab06d45902c79ec9221137f90b75969d8c8
[ "MIT" ]
null
null
null
arcade/python/arcade-intro/08_Diving Deeper/034_extractEachKth.py
netor27/codefights-arcade-solutions
69701ab06d45902c79ec9221137f90b75969d8c8
[ "MIT" ]
null
null
null
arcade/python/arcade-intro/08_Diving Deeper/034_extractEachKth.py
netor27/codefights-arcade-solutions
69701ab06d45902c79ec9221137f90b75969d8c8
[ "MIT" ]
null
null
null
def extractEachKth(inputArray, k): return [x for i, x in enumerate(inputArray) if (i + 1) % k != 0] print(extractEachKth([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 3))
33
67
0.593939
30
165
3.266667
0.766667
0
0
0
0
0
0
0
0
0
0
0.108527
0.218182
165
5
68
33
0.651163
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
0.666667
0.333333
0
0
0
null
0
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
4
1ba460ce742d7e66c421e8f688d9ded4a77d5678
567
py
Python
codigo/Live36/functions.py
cassiasamp/live-de-python
00b5e51793097544ba9b75c97a0d30e63970bf45
[ "MIT" ]
572
2018-04-03T03:17:08.000Z
2022-03-31T19:05:32.000Z
codigo/Live36/functions.py
cassiasamp/live-de-python
00b5e51793097544ba9b75c97a0d30e63970bf45
[ "MIT" ]
176
2018-05-18T15:56:16.000Z
2022-03-28T20:39:07.000Z
codigo/Live36/functions.py
cassiasamp/live-de-python
00b5e51793097544ba9b75c97a0d30e63970bf45
[ "MIT" ]
140
2018-04-18T13:59:11.000Z
2022-03-29T00:43:49.000Z
from json import dump from re import sub from bs4 import BeautifulSoup as bs from requests import get def pretty_format(bs_list): return ''.join(map(lambda x: sub(r'</?(br|p)/?>', ' ', str(x)), bs_list.find_all('p'))).replace(' ', ' ').strip() def get_lirycs(base_url, musics_links, music): return bs(get('{}{}'.format(base_url, musics_links[music])).text, 'lxml').find('article') def dict_to_json(path, _dict): with open('{}.json'.format(path), 'w') as fp: dump(dict, fp, indent=2, ensure_ascii=False)
28.35
73
0.617284
84
567
4.011905
0.595238
0.035608
0.077151
0.106825
0.136499
0
0
0
0
0
0
0.004425
0.202822
567
19
74
29.842105
0.74115
0
0
0
0
0
0.070547
0
0
0
0
0
0
1
0.230769
false
0
0.307692
0.153846
0.692308
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
4
1bc38a69a1face4f7436bdf5042fbdc19dbdf3e4
230
py
Python
src/sage/version.py
qedhandle/sage
8453ffb849b047893b6c61dd09176a84c9133342
[ "BSL-1.0" ]
null
null
null
src/sage/version.py
qedhandle/sage
8453ffb849b047893b6c61dd09176a84c9133342
[ "BSL-1.0" ]
null
null
null
src/sage/version.py
qedhandle/sage
8453ffb849b047893b6c61dd09176a84c9133342
[ "BSL-1.0" ]
null
null
null
# Sage version information for Python scripts # This file is auto-generated by the sage-update-version script, do not edit! version = '9.3.beta7' date = '2021-02-07' banner = 'SageMath version 9.3.beta7, Release Date: 2021-02-07'
38.333333
77
0.743478
39
230
4.384615
0.717949
0.093567
0.105263
0.163743
0
0
0
0
0
0
0
0.111675
0.143478
230
5
78
46
0.756345
0.517391
0
0
1
0
0.657407
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
1bd3f664b28f7d2ea42d9f19006e1299388bd242
119
py
Python
src/main.py
wri/process-gddp
de0a68c22c5f878d5f12e2665f8894f9a770d5a0
[ "MIT" ]
1
2021-01-11T17:55:57.000Z
2021-01-11T17:55:57.000Z
src/main.py
wri/process-gddp
de0a68c22c5f878d5f12e2665f8894f9a770d5a0
[ "MIT" ]
null
null
null
src/main.py
wri/process-gddp
de0a68c22c5f878d5f12e2665f8894f9a770d5a0
[ "MIT" ]
1
2020-12-02T21:57:53.000Z
2020-12-02T21:57:53.000Z
#!/usr/bin/env python import sys if __name__ == "__main__": import processgddp processgddp.main(sys.argv[1:])
17
34
0.689076
16
119
4.625
0.75
0
0
0
0
0
0
0
0
0
0
0.010101
0.168067
119
6
35
19.833333
0.737374
0.168067
0
0
0
0
0.081633
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
59f85b96d69d612449228b138bc7dabd907c10b0
585
py
Python
students/k3342/laboratory_works/Demin_Danil/laboratory_work_2-3/django-vue-auth/django_project/django_app/serializers.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
10
2020-03-20T09:06:12.000Z
2021-07-27T13:06:02.000Z
students/k3342/laboratory_works/Demin_Danil/laboratory_work_2-3/django-vue-auth/django_project/django_app/serializers.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
134
2020-03-23T09:47:48.000Z
2022-03-12T01:05:19.000Z
students/k3342/laboratory_works/Demin_Danil/laboratory_work_2-3/django-vue-auth/django_project/django_app/serializers.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
71
2020-03-20T12:45:56.000Z
2021-10-31T19:22:25.000Z
from rest_framework import serializers from .models import * class ChickenSerializer(serializers.ModelSerializer): class Meta: model = Chicken fields = '__all__' class WorkerSerializer(serializers.ModelSerializer): class Meta: model = Worker fields = '__all__' class BreedSerializer(serializers.ModelSerializer): class Meta: model = Chicken fields = '__all__' class CageSerializer(serializers.ModelSerializer): class Meta: model = Cage fields = '__all__' class ReportSerializer(serializers.ModelSerializer): class Meta: model = Report fields = '__all__'
20.172414
53
0.767521
58
585
7.37931
0.362069
0.303738
0.36215
0.408879
0.565421
0.285047
0.285047
0.285047
0.285047
0
0
0
0.152137
585
28
54
20.892857
0.862903
0
0
0.545455
0
0
0.059829
0
0
0
0
0
0
1
0
false
0
0.090909
0
0.545455
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
59fafc7a51319009c33baf129944a956b4ef28d5
23
py
Python
theo/version.py
dandycheung/theo
b1d1425f1479f240027e7be8c39ca9f9bfd94da6
[ "Apache-2.0" ]
233
2019-07-06T16:38:15.000Z
2022-03-30T15:39:12.000Z
theo/version.py
ret2eax/theo
1ca9ac8f6e89e3e48ecb1bcb069a84eb5fc75a28
[ "Apache-2.0" ]
16
2019-07-06T23:02:46.000Z
2022-03-13T19:20:20.000Z
theo/version.py
ret2eax/theo
1ca9ac8f6e89e3e48ecb1bcb069a84eb5fc75a28
[ "Apache-2.0" ]
73
2019-07-23T13:03:06.000Z
2022-03-21T13:34:25.000Z
__version__ = "v0.8.2"
11.5
22
0.652174
4
23
2.75
1
0
0
0
0
0
0
0
0
0
0
0.15
0.130435
23
1
23
23
0.4
0
0
0
0
0
0.26087
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
94258454636f9a51897053796b2fcfb3faa9dfbb
151
py
Python
run.py
MrRomo/Slow-Recorder-
34bbd48bcd0c25520a8e88cea0be5eaa5a13f040
[ "MIT" ]
null
null
null
run.py
MrRomo/Slow-Recorder-
34bbd48bcd0c25520a8e88cea0be5eaa5a13f040
[ "MIT" ]
null
null
null
run.py
MrRomo/Slow-Recorder-
34bbd48bcd0c25520a8e88cea0be5eaa5a13f040
[ "MIT" ]
null
null
null
from SlowRecorder import SlowRecorder import sys if __name__ == "__main__": app = SlowRecorder() app.startApp() sys.exit(app.app.exec_())
18.875
37
0.695364
18
151
5.333333
0.611111
0.375
0
0
0
0
0
0
0
0
0
0
0.18543
151
8
38
18.875
0.780488
0
0
0
0
0
0.052632
0
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
4
942b312792834c32f29099a65e77eab6aa81f94d
62
py
Python
mtalg/alg/__init__.py
WWakker/mtalg
fd63f305d857ef2cfbd5280c1de54f52a309a3fd
[ "MIT" ]
10
2021-12-14T12:39:04.000Z
2022-01-16T15:21:11.000Z
mtalg/alg/__init__.py
WWakker/mtalg
fd63f305d857ef2cfbd5280c1de54f52a309a3fd
[ "MIT" ]
8
2021-12-23T11:50:50.000Z
2021-12-28T19:42:14.000Z
mtalg/alg/__init__.py
WWakker/mtalg
fd63f305d857ef2cfbd5280c1de54f52a309a3fd
[ "MIT" ]
1
2021-12-22T21:39:56.000Z
2021-12-22T21:39:56.000Z
from .elementwise_algebra import add, sub, div, mul, pow, std
31
61
0.758065
10
62
4.6
1
0
0
0
0
0
0
0
0
0
0
0
0.145161
62
1
62
62
0.867925
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
0
0
0
4
9438ae14417602ccb33857f90d6c778e21d07d59
945
py
Python
know/__init__.py
otosense/know
1e0688dedb48335644464c6be35ca91afdb5b2e3
[ "Apache-2.0" ]
null
null
null
know/__init__.py
otosense/know
1e0688dedb48335644464c6be35ca91afdb5b2e3
[ "Apache-2.0" ]
1
2021-11-24T20:46:33.000Z
2021-11-24T20:46:33.000Z
know/__init__.py
otosense/know
1e0688dedb48335644464c6be35ca91afdb5b2e3
[ "Apache-2.0" ]
null
null
null
""" Build live stream tools Essentially being able to do this: The tools are made to be able to create live streams of data (e.g. from sensors) and funnel them into proceses with a consistent interfaces. One important process being the process that will store all or part of the data, through a simple storage-system-agnositic facade. ```python proc = LiveProc( source=Sources( # make a multi-source object (which will manage buffering and timing) audio=AudioSource(...), plc=PlcSource(...), video=VideoSource(...), ), consumers=Consumers( # make a multi-data consumer (and/or writer/transformer) object storage=Store(...), notifications=Notif(...), live_viz=LiveViz(...), ), ... # other settings for the process (logging, etc.) ) proc() # run the process ``` With a variety of sources, target storage systems, etc. """ from know.util import ContextFanout, any_value_is_none
26.25
89
0.692063
128
945
5.078125
0.695313
0.046154
0.030769
0
0
0
0
0
0
0
0
0
0.201058
945
35
90
27
0.860927
0.928042
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
944024c89e16a90e1ee2c4657bf9537892c98a6e
454
py
Python
PTMCMCSampler/nompi4py.py
svigeland/PTMCMCSampler
857bbb61618340b2113d60ca56e8b894a875eb58
[ "MIT" ]
28
2015-03-24T21:13:58.000Z
2022-03-03T09:02:36.000Z
PTMCMCSampler/nompi4py.py
svigeland/PTMCMCSampler
857bbb61618340b2113d60ca56e8b894a875eb58
[ "MIT" ]
36
2019-07-04T14:31:37.000Z
2019-07-30T09:29:32.000Z
PTMCMCSampler/nompi4py.py
svigeland/PTMCMCSampler
857bbb61618340b2113d60ca56e8b894a875eb58
[ "MIT" ]
23
2015-03-24T21:01:43.000Z
2022-03-18T14:50:27.000Z
# Dummy class for packages that have no MPI class MPIDummy(object): def __init__(self): pass def Get_rank(self): return 0 def Get_size(self): return 1 def barrier(self): pass def send(self, lnlike0, dest=1, tag=55): pass def recv(self, source=1, tag=55): pass def Iprobe(self, source=1, tag=55): pass # Global object representing no MPI: COMM_WORLD = MPIDummy()
16.814815
44
0.592511
64
454
4.09375
0.515625
0.10687
0.068702
0.114504
0.21374
0.152672
0
0
0
0
0
0.038462
0.312775
454
26
45
17.461538
0.801282
0.167401
0
0.3125
0
0
0
0
0
0
0
0
0
1
0.4375
false
0.3125
0
0.125
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
9481fabbf36f292b1ca529fe2acd8348fc542fbf
112
py
Python
interlinq/objects/__init__.py
rheaparekh/Distributed_Quantum_Phase_Estimation
3441a023fedd113b8b3e68e6c6c07f6642c0344a
[ "MIT" ]
24
2021-01-27T14:21:53.000Z
2022-03-16T23:43:51.000Z
interlinq/objects/__init__.py
zemenfes-afk/Interlin-q
1c4822c814a9fe8b7ba0a11e4744a51b17d67b6f
[ "MIT" ]
15
2021-02-28T17:58:52.000Z
2021-07-27T15:27:03.000Z
interlinq/objects/__init__.py
zemenfes-afk/Interlin-q
1c4822c814a9fe8b7ba0a11e4744a51b17d67b6f
[ "MIT" ]
8
2021-01-27T10:23:12.000Z
2022-03-12T01:45:57.000Z
from .circuit import Circuit from .layer import Layer from .operation import Operation from .qubit import Qubit
22.4
32
0.821429
16
112
5.75
0.375
0
0
0
0
0
0
0
0
0
0
0
0.142857
112
4
33
28
0.958333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
84a1ff29494d2d9dfb106f19878cce135b3dde80
120
py
Python
sitetables/settings.py
idlesign/django-sitetables
9ed851f646c5517234eb40304cfa38fa71c57884
[ "BSD-3-Clause" ]
4
2020-08-15T14:42:29.000Z
2022-01-16T16:09:20.000Z
sitetables/settings.py
idlesign/django-sitetables
9ed851f646c5517234eb40304cfa38fa71c57884
[ "BSD-3-Clause" ]
null
null
null
sitetables/settings.py
idlesign/django-sitetables
9ed851f646c5517234eb40304cfa38fa71c57884
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings URL_CDN_BASE = getattr(settings, 'SITETABLES_URL_CDN_BASE', '//cdn.datatables.net/')
24
84
0.783333
17
120
5.235294
0.705882
0.134831
0.224719
0
0
0
0
0
0
0
0
0
0.091667
120
4
85
30
0.816514
0
0
0
0
0
0.366667
0.366667
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
84c0682ef71425413577587a0f69dd5b7ac39c4b
182
py
Python
runesanalyzer/utils.py
clemsciences/runes-analyzer
0af8baaf604179c31dcbf28b1a023ca650a9ff34
[ "MIT" ]
5
2018-10-17T15:35:51.000Z
2022-01-23T10:57:55.000Z
runesanalyzer/utils.py
clemsciences/runes-analyzer
0af8baaf604179c31dcbf28b1a023ca650a9ff34
[ "MIT" ]
5
2018-06-25T16:06:00.000Z
2018-09-09T13:50:16.000Z
runesanalyzer/utils.py
clemsciences/runes-analyzer
0af8baaf604179c31dcbf28b1a023ca650a9ff34
[ "MIT" ]
null
null
null
""" """ from enum import Enum __author__ = ["Clément Besnier <clemsciences@aol.com>", ] class AutoName(Enum): def _generate_next_value_(name, a, b, d): return name
13
57
0.648352
23
182
4.782609
0.869565
0
0
0
0
0
0
0
0
0
0
0
0.214286
182
13
58
14
0.769231
0
0
0
1
0
0.218391
0.126437
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
ca178b1228ee4ed4bdc52a5587404db28a887db5
159
py
Python
src/Python/current_month.py
charlesdungy/new-to-streaming-scraper
f49a8e59c3500213ec86d3c9f53c2130b7da47b2
[ "MIT" ]
1
2021-06-09T06:30:26.000Z
2021-06-09T06:30:26.000Z
src/Python/current_month.py
charlesdungy/new-to-streaming-scraper
f49a8e59c3500213ec86d3c9f53c2130b7da47b2
[ "MIT" ]
null
null
null
src/Python/current_month.py
charlesdungy/new-to-streaming-scraper
f49a8e59c3500213ec86d3c9f53c2130b7da47b2
[ "MIT" ]
null
null
null
from datetime import datetime class CurrentMonth: CURRENT_MONTH = datetime.now().strftime('%B') CURRENT_MONTH_INT = int(datetime.now().strftime('%m'))
31.8
58
0.72956
20
159
5.65
0.6
0.212389
0.336283
0
0
0
0
0
0
0
0
0
0.125786
159
5
58
31.8
0.81295
0
0
0
0
0
0.025
0
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ca27c66e2061c21b2d43db5c1de874022f9c2c16
542
py
Python
Calibration/EcalCalibAlgos/python/electronRecalibSCAssociator_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
2
2020-10-26T18:40:32.000Z
2021-04-10T16:33:25.000Z
Calibration/EcalCalibAlgos/python/electronRecalibSCAssociator_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
25
2016-06-24T20:55:32.000Z
2022-02-01T19:24:45.000Z
Calibration/EcalCalibAlgos/python/electronRecalibSCAssociator_cfi.py
PKUfudawei/cmssw
8fbb5ce74398269c8a32956d7c7943766770c093
[ "Apache-2.0" ]
8
2016-03-25T07:17:43.000Z
2021-07-08T17:11:21.000Z
import FWCore.ParameterSet.Config as cms electronRecalibSCAssociator = cms.EDProducer("ElectronRecalibSuperClusterAssociator", superClusterCollectionEB = cms.InputTag("particleFlowSuperClusterECAL:particleFlowSuperClusterECALBarrel"), superClusterCollectionEE = cms.InputTag("particleFlowSuperClusterECAL:particleFlowSuperClusterECALEndcapWithPreshower"), electronSrc = cms.InputTag('gedGsfElectrons'), outputLabel = cms.string('recalibSC') )
60.222222
165
0.710332
28
542
13.75
0.714286
0.085714
0.202597
0
0
0
0
0
0
0
0
0
0.219557
542
8
166
67.75
0.910165
0
0
0
0
0
0.369004
0.324723
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0
1
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
0
0
0
0
0
4
ca2b81591013481468b57511fabb0cc084a9d592
211
py
Python
pytoggl/model/actions/__init__.py
cloew/pytoggl
ec559e532559bfeaeb0de7f18831d30ed84f5ff1
[ "MIT" ]
null
null
null
pytoggl/model/actions/__init__.py
cloew/pytoggl
ec559e532559bfeaeb0de7f18831d30ed84f5ff1
[ "MIT" ]
null
null
null
pytoggl/model/actions/__init__.py
cloew/pytoggl
ec559e532559bfeaeb0de7f18831d30ed84f5ff1
[ "MIT" ]
null
null
null
from .access_api import AccessApi from .create import Create from .delete import Delete from .get import Get from .start_timer import StartTimer from .stop_timer import StopTimer from .update import Update
30.142857
36
0.810427
31
211
5.419355
0.451613
0.130952
0
0
0
0
0
0
0
0
0
0
0.156398
211
7
37
30.142857
0.94382
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
ca3aa5d74ecc75cde3bfdc91d7bb313196c66c07
55
py
Python
tests/__init__.py
frenck/python-toonapi
958a2b8e670b451980ec57ec573cbbf93ea5119e
[ "MIT" ]
5
2020-06-20T16:37:53.000Z
2020-11-25T22:38:32.000Z
tests/__init__.py
frenck/python-toonapi
958a2b8e670b451980ec57ec573cbbf93ea5119e
[ "MIT" ]
3
2020-07-21T09:32:28.000Z
2020-12-08T21:21:24.000Z
tests/__init__.py
frenck/python-toonapi
958a2b8e670b451980ec57ec573cbbf93ea5119e
[ "MIT" ]
3
2020-06-20T17:08:16.000Z
2020-07-20T11:14:13.000Z
"""Asynchronous Python client for the Quby ToonAPI."""
27.5
54
0.745455
7
55
5.857143
1
0
0
0
0
0
0
0
0
0
0
0
0.127273
55
1
55
55
0.854167
0.872727
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
ca428d052d1a49f23176ca88c47ba39a6d695415
407
py
Python
ceph_deploy/tests/unit/hosts/test_remotes.py
Vicente-Cheng/ceph-deploy
bf0a564c8f1f74bca05e898be8210841c7995df4
[ "MIT" ]
1
2020-07-29T15:09:23.000Z
2020-07-29T15:09:23.000Z
ceph_deploy/tests/unit/hosts/test_remotes.py
Vicente-Cheng/ceph-deploy
bf0a564c8f1f74bca05e898be8210841c7995df4
[ "MIT" ]
null
null
null
ceph_deploy/tests/unit/hosts/test_remotes.py
Vicente-Cheng/ceph-deploy
bf0a564c8f1f74bca05e898be8210841c7995df4
[ "MIT" ]
null
null
null
from cStringIO import StringIO from ceph_deploy.hosts import remotes class TestObjectGrep(object): def setup(self): self.file_object = StringIO('foo\n') self.file_object.seek(0) def test_finds_term(self): assert remotes.object_grep('foo', self.file_object) def test_does_not_find_anything(self): assert remotes.object_grep('bar', self.file_object) is False
23.941176
68
0.714988
57
407
4.877193
0.54386
0.115108
0.201439
0.165468
0.194245
0
0
0
0
0
0
0.00304
0.191646
407
16
69
25.4375
0.841945
0
0
0
0
0
0.027027
0
0
0
0
0
0.2
1
0.3
false
0
0.2
0
0.6
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
ca7cc9e802c85159a06096141db839863747a697
276
py
Python
epynet_cps/main/agent/abstract_agent.py
Daveonwave/epynet_CPS
f8ff7369a727d0a7061ddf5bcd63b8fb33f34b01
[ "MIT" ]
null
null
null
epynet_cps/main/agent/abstract_agent.py
Daveonwave/epynet_CPS
f8ff7369a727d0a7061ddf5bcd63b8fb33f34b01
[ "MIT" ]
null
null
null
epynet_cps/main/agent/abstract_agent.py
Daveonwave/epynet_CPS
f8ff7369a727d0a7061ddf5bcd63b8fb33f34b01
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod class AbstractAgent(ABC): @abstractmethod def __init__(self, config_file): pass @abstractmethod def build_env(self, env_file, attacks_file=None): pass @abstractmethod def run(self): pass
16.235294
53
0.655797
31
276
5.580645
0.548387
0.294798
0.242775
0
0
0
0
0
0
0
0
0
0.271739
276
16
54
17.25
0.860697
0
0
0.545455
0
0
0
0
0
0
0
0
0
1
0.272727
false
0.272727
0.090909
0
0.454545
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
0473bb0d0f9d87901b6a63d96fe5a483c2ad5caa
290
py
Python
boa3_test/test_sc/interop_test/contract/CreateMultisigAccountTooManyArguments.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
25
2020-07-22T19:37:43.000Z
2022-03-08T03:23:55.000Z
boa3_test/test_sc/interop_test/contract/CreateMultisigAccountTooManyArguments.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
419
2020-04-23T17:48:14.000Z
2022-03-31T13:17:45.000Z
boa3_test/test_sc/interop_test/contract/CreateMultisigAccountTooManyArguments.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
15
2020-05-21T21:54:24.000Z
2021-11-18T06:17:24.000Z
from typing import Any, List from boa3.builtin.interop.contract import create_multisig_account from boa3.builtin.type import ECPoint, UInt160 def main(minimum_sigs: int, public_keys: List[ECPoint], arg: Any) -> UInt160: return create_multisig_account(minimum_sigs, public_keys, arg)
32.222222
77
0.803448
42
290
5.357143
0.571429
0.071111
0.133333
0
0
0
0
0
0
0
0
0.03125
0.117241
290
8
78
36.25
0.847656
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.6
0.2
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
04803a14eddcf511b2c518f9854634da27dfde12
4,884
py
Python
tests/algorithms/test_connected_component_labelling.py
dekespo/AI_ToolKit
54c7784693189aa0c5d95d48666876f9a18cf922
[ "Apache-2.0" ]
null
null
null
tests/algorithms/test_connected_component_labelling.py
dekespo/AI_ToolKit
54c7784693189aa0c5d95d48666876f9a18cf922
[ "Apache-2.0" ]
56
2018-03-03T14:38:31.000Z
2019-12-29T22:23:25.000Z
tests/algorithms/test_connected_component_labelling.py
dekespo/AI_ToolKit
54c7784693189aa0c5d95d48666876f9a18cf922
[ "Apache-2.0" ]
null
null
null
import unittest from tests.templates.rectangle_world import ( example_wiki_ccl, example_simple_different_regions, ) from dekespo_ai_sdk.algorithms.connected_component_labelling import ( ConnectedComponentLabelling, ) from dekespo_ai_sdk.core.graph import Graph from dekespo_ai_sdk.core.shapes import Shape2DType from dekespo_ai_sdk.core.dimensions import Dim2D from dekespo_ai_sdk.core.raw_data_handler import RawDataHandler from dekespo_ai_sdk.core.neighbour import NeighbourType class ConnectedComponentLabellingTest(unittest.TestCase): def test_wiki_example(self): raw_data_handler = RawDataHandler(example_wiki_ccl()) graph = Graph(raw_data_handler, Shape2DType.RECTANGLE, blocking_values=[0]) labeller = ConnectedComponentLabelling(graph, NeighbourType.CONNECTIVITY_EIGHT) labeller.first_pass() first_pass_data = [ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 3, 3, 0, 0, 4, 4, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 3, 3, 3, 3, 0, 0], [0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 3, 3, 3, 3, 0, 0, 0], [0, 0, 1, 1, 1, 1, 0, 0, 0, 3, 3, 3, 0, 0, 3, 3, 0], [0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 3, 3, 3, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0, 5, 3, 0, 0, 0, 3, 3, 0], [0, 0, 0, 0, 0, 0, 6, 6, 5, 3, 0, 0, 7, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ] self.assertEqual(labeller.get_labels_graph(), first_pass_data) labeller.second_pass() second_pass_data = [ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 4, 4, 0, 0, 4, 4, 0], [0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 4, 4, 4, 4, 0, 0], [0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0], [0, 0, 2, 2, 2, 2, 0, 0, 0, 4, 4, 4, 0, 0, 4, 4, 0], [0, 2, 2, 2, 0, 0, 2, 2, 0, 0, 0, 4, 4, 4, 0, 0, 0], [0, 0, 2, 2, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 4, 4, 0], [0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 4, 4, 4, 4, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ] self.assertEqual(labeller.get_labels_graph(), second_pass_data) regions = labeller.get_regions() self.assertEqual(len(regions), 3) self.assertTrue(Dim2D(0, 0) in regions[0]) self.assertTrue(Dim2D(8, 3) in regions[0]) self.assertTrue(Dim2D(11, 6) in regions[0]) self.assertTrue(Dim2D(1, 2) in regions[2]) self.assertTrue(Dim2D(4, 4) in regions[2]) self.assertTrue(Dim2D(15, 1) in regions[4]) self.assertTrue(Dim2D(13, 5) in regions[4]) def test_different_regions_8_connectivity(self): raw_data_handler = RawDataHandler(example_simple_different_regions()) graph = Graph(raw_data_handler, Shape2DType.RECTANGLE, blocking_values=[1]) labeller = ConnectedComponentLabelling(graph, NeighbourType.CONNECTIVITY_EIGHT) labeller.first_pass() labeller.second_pass() regions = labeller.get_regions() self.assertEqual(len(regions), 3) self.assertTrue(Dim2D(0, 1) in regions[0]) self.assertTrue(Dim2D(2, 1) in regions[0]) self.assertTrue(Dim2D(5, 4) in regions[0]) self.assertTrue(Dim2D(0, 0) in regions[2]) self.assertTrue(Dim2D(0, 4) in regions[2]) self.assertTrue(Dim2D(6, 0) in regions[2]) self.assertTrue(Dim2D(6, 4) in regions[2]) self.assertTrue(Dim2D(3, 0) in regions[2]) self.assertTrue(Dim2D(3, 4) in regions[2]) self.assertTrue(Dim2D(1, 2) in regions[2]) self.assertTrue(Dim2D(5, 2) in regions[2]) self.assertTrue(Dim2D(3, 2) in regions[4]) def test_different_regions_4_connectivity(self): raw_data_handler = RawDataHandler(example_simple_different_regions()) graph = Graph(raw_data_handler, Shape2DType.RECTANGLE, blocking_values=[1]) labeller = ConnectedComponentLabelling(graph, NeighbourType.CONNECTIVITY_FOUR) labeller.first_pass() labeller.second_pass() regions = labeller.get_regions() self.assertEqual(len(regions), 10) self.assertTrue(Dim2D(0, 1) in regions[0]) self.assertTrue(Dim2D(2, 1) in regions[0]) self.assertTrue(Dim2D(5, 4) in regions[0]) self.assertTrue(Dim2D(0, 0) in regions[1]) self.assertTrue(Dim2D(0, 4) in regions[7]) self.assertTrue(Dim2D(6, 0) in regions[3]) self.assertTrue(Dim2D(6, 4) in regions[9]) self.assertTrue(Dim2D(3, 2) in regions[6]) self.assertTrue(Dim2D(3, 0) in regions[2]) self.assertTrue(Dim2D(3, 4) in regions[8]) self.assertTrue(Dim2D(1, 2) in regions[4]) self.assertTrue(Dim2D(5, 2) in regions[5]) if __name__ == "__main__": unittest.main()
47.417476
87
0.586609
789
4,884
3.520913
0.089987
0.108711
0.116631
0.12383
0.822174
0.783657
0.731102
0.576314
0.570914
0.50396
0
0.123412
0.258395
4,884
102
88
47.882353
0.643567
0
0
0.326316
0
0
0.001638
0
0
0
0
0
0.378947
1
0.031579
false
0.105263
0.084211
0
0.126316
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
0488ae53d1a3b1f0606a5e30d643d2d764fc2fdc
94
py
Python
metric/__main__.py
kzulfazriawan/metric
a9a9ddc284a12618a93febe238f12a71f95dd9f1
[ "MIT" ]
1
2020-12-21T06:52:29.000Z
2020-12-21T06:52:29.000Z
metric/__main__.py
kzulfazriawan/metric
a9a9ddc284a12618a93febe238f12a71f95dd9f1
[ "MIT" ]
null
null
null
metric/__main__.py
kzulfazriawan/metric
a9a9ddc284a12618a93febe238f12a71f95dd9f1
[ "MIT" ]
null
null
null
from kommand import control if __name__ == '__main__': control(json_file='metric.json')
15.666667
36
0.723404
12
94
4.916667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.159574
94
5
37
18.8
0.746835
0
0
0
0
0
0.202128
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
04abb3c4b4d45eed15209a4b395c84e8a10a0fde
268
py
Python
poc/classes/AuxSTEbnfString.py
bookofproofs/fpl
527b43b0f8bb3d459ee906e5ed8524a676ce3a2c
[ "MIT" ]
4
2021-11-08T10:09:46.000Z
2021-11-13T22:25:46.000Z
poc/classes/AuxSTEbnfString.py
bookofproofs/fpl
527b43b0f8bb3d459ee906e5ed8524a676ce3a2c
[ "MIT" ]
1
2020-09-04T13:02:09.000Z
2021-06-16T07:07:44.000Z
poc/classes/AuxSTEbnfString.py
bookofproofs/fpl
527b43b0f8bb3d459ee906e5ed8524a676ce3a2c
[ "MIT" ]
1
2021-11-08T10:10:12.000Z
2021-11-08T10:10:12.000Z
from poc.classes.AuxST import AuxSTOutline from poc.classes.AuxSymbolTable import AuxSymbolTable class AuxSTEbnfString(AuxSTOutline): def __init__(self): super().__init__(parent=None, outline=AuxSymbolTable.ebnf_string) # noqa self.string = ""
26.8
81
0.75
29
268
6.62069
0.655172
0.072917
0.145833
0
0
0
0
0
0
0
0
0
0.160448
268
9
82
29.777778
0.853333
0.014925
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
04e15e154b3fbe1120d07b7165e8582e0b003185
51
py
Python
xboxone/__init__.py
PeteCondliffe/hassio-addons
50c1843e1839136783f9967ec2110c29c300fc9f
[ "MIT" ]
6
2019-08-17T19:51:22.000Z
2021-01-01T21:31:23.000Z
xboxone/__init__.py
PeteCondliffe/hassio-addons
50c1843e1839136783f9967ec2110c29c300fc9f
[ "MIT" ]
13
2019-08-15T02:34:27.000Z
2020-06-03T22:07:33.000Z
xboxone/__init__.py
PeteCondliffe/hassio-addons
50c1843e1839136783f9967ec2110c29c300fc9f
[ "MIT" ]
7
2019-08-12T17:05:04.000Z
2020-09-24T13:38:22.000Z
# Required as part of the custom component HA 0.92
25.5
50
0.764706
10
51
3.9
1
0
0
0
0
0
0
0
0
0
0
0.073171
0.196078
51
1
51
51
0.878049
0.941176
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
04ebcdde05537ae0349407989496e17b27059b95
98
py
Python
restaurant/tablebook/apps.py
Evergreenies/restaurent
2f3a460344c341bf1e27b5fc2dded955035daef5
[ "MIT" ]
null
null
null
restaurant/tablebook/apps.py
Evergreenies/restaurent
2f3a460344c341bf1e27b5fc2dded955035daef5
[ "MIT" ]
null
null
null
restaurant/tablebook/apps.py
Evergreenies/restaurent
2f3a460344c341bf1e27b5fc2dded955035daef5
[ "MIT" ]
null
null
null
from django.apps import AppConfig class TablebookConfig(AppConfig): name = 'tablebook'
16.333333
34
0.72449
10
98
7.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.204082
98
5
35
19.6
0.910256
0
0
0
0
0
0.096774
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
04f58ea3a8d17bfc3fde177d06f9a838e7a754db
181
py
Python
test-integration/test_integration/fixtures/failing-project/predict.py
VictorXLR/cog
d98d4b2cf9e352da00365e6945d9991c26a18527
[ "Apache-2.0" ]
354
2021-04-02T21:07:06.000Z
2022-03-30T16:40:01.000Z
test-integration/test_integration/fixtures/failing-project/predict.py
VictorXLR/cog
d98d4b2cf9e352da00365e6945d9991c26a18527
[ "Apache-2.0" ]
351
2021-04-03T18:00:18.000Z
2022-03-30T16:41:58.000Z
test-integration/test_integration/fixtures/failing-project/predict.py
VictorXLR/cog
d98d4b2cf9e352da00365e6945d9991c26a18527
[ "Apache-2.0" ]
22
2021-05-06T21:05:49.000Z
2022-03-07T05:13:55.000Z
import cog class Predictor(cog.Predictor): def setup(self): pass @cog.input("text", type=str) def predict(self, text): raise Exception("over budget")
16.454545
38
0.618785
23
181
4.869565
0.73913
0
0
0
0
0
0
0
0
0
0
0
0.254144
181
10
39
18.1
0.82963
0
0
0
0
0
0.082873
0
0
0
0
0
0
1
0.285714
false
0.142857
0.142857
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
04f925fb96281253b615b81927740f1c12601860
209
py
Python
pycnf/__init__.py
Miachol/pycnf
8fc0f25b0d6f9f3a79dbd30027fcb22c981afa4b
[ "MIT" ]
1
2017-08-25T17:04:39.000Z
2017-08-25T17:04:39.000Z
pycnf/__init__.py
Miachol/pycnf
8fc0f25b0d6f9f3a79dbd30027fcb22c981afa4b
[ "MIT" ]
null
null
null
pycnf/__init__.py
Miachol/pycnf
8fc0f25b0d6f9f3a79dbd30027fcb22c981afa4b
[ "MIT" ]
null
null
null
from pycnf import ConfigFile from read import load, eval, merge, sections, options from write import dump, convert from configtype import is_json_file, is_yaml_file, is_ini_file, is_toml_file, get_config_type
41.8
93
0.837321
35
209
4.714286
0.657143
0.109091
0
0
0
0
0
0
0
0
0
0
0.119617
209
4
94
52.25
0.896739
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
ca0092664f3fac05d8b429dd3d5d05e4b5c70e37
35
py
Python
tests/__init__.py
valleyin-jarvis/get_suggest_word_API
867fbe9fdcd2fa7069a8e3210133cc40fc103c89
[ "MIT" ]
245
2015-01-01T06:10:28.000Z
2021-11-30T10:45:26.000Z
tests/__init__.py
valleyin-jarvis/get_suggest_word_API
867fbe9fdcd2fa7069a8e3210133cc40fc103c89
[ "MIT" ]
54
2015-01-23T16:44:07.000Z
2021-09-14T23:34:23.000Z
tests/__init__.py
valleyin-jarvis/get_suggest_word_API
867fbe9fdcd2fa7069a8e3210133cc40fc103c89
[ "MIT" ]
71
2015-01-11T04:03:44.000Z
2021-04-08T07:49:30.000Z
"""Test module for tornado_json"""
17.5
34
0.714286
5
35
4.8
1
0
0
0
0
0
0
0
0
0
0
0
0.114286
35
1
35
35
0.774194
0.8
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b6d0e4ac3e6d85cefbda8501c6a60a045c5a8cc8
137
py
Python
ok2_backend/urgent_day_suggetion_day_schedule/apps.py
moshe742/ok2-backend
03243a296c3ef753dee2173b589a2d01bd36d2e0
[ "MIT" ]
null
null
null
ok2_backend/urgent_day_suggetion_day_schedule/apps.py
moshe742/ok2-backend
03243a296c3ef753dee2173b589a2d01bd36d2e0
[ "MIT" ]
null
null
null
ok2_backend/urgent_day_suggetion_day_schedule/apps.py
moshe742/ok2-backend
03243a296c3ef753dee2173b589a2d01bd36d2e0
[ "MIT" ]
null
null
null
from django.apps import AppConfig class UrgentDaySuggetionDayScheduleConfig(AppConfig): name = 'urgent_day_suggetion_day_schedule'
22.833333
53
0.839416
14
137
7.928571
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.109489
137
5
54
27.4
0.909836
0
0
0
0
0
0.240876
0.240876
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
8e1d3635104214620b585be50f133593b8fb9ea1
177
py
Python
asl.py
ivaben/signlingo
67d5d6ee99a86786bfbc02b3dafdc68b784bb5d9
[ "MIT" ]
null
null
null
asl.py
ivaben/signlingo
67d5d6ee99a86786bfbc02b3dafdc68b784bb5d9
[ "MIT" ]
null
null
null
asl.py
ivaben/signlingo
67d5d6ee99a86786bfbc02b3dafdc68b784bb5d9
[ "MIT" ]
null
null
null
from flask import Flask def create_app(): app = Flask(__name__) @app.route('/') def root(): return ("<h1>Welcome to Sign-Lingo!</h1>") return app
16.090909
50
0.570621
23
177
4.173913
0.652174
0
0
0
0
0
0
0
0
0
0
0.015625
0.276836
177
11
51
16.090909
0.734375
0
0
0
0
0
0.179775
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.714286
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
8e213aa059040f101d8969545af47a7f19bd4c5f
291
py
Python
alignmentrs/warning.py
yamasampo/alignmentrs
5f963d13ac2db72f4ef23b462de0836526f590b7
[ "MIT" ]
null
null
null
alignmentrs/warning.py
yamasampo/alignmentrs
5f963d13ac2db72f4ef23b462de0836526f590b7
[ "MIT" ]
null
null
null
alignmentrs/warning.py
yamasampo/alignmentrs
5f963d13ac2db72f4ef23b462de0836526f590b7
[ "MIT" ]
null
null
null
import warnings __all__ = ['NoNameWarning', 'DuplicateNameWarning'] class NoNameWarning(UserWarning): """Warning for mismatched/incompatible alignments. """ pass class DuplicateNameWarning(UserWarning): """Warning for mismatched/incompatible alignments. """ pass
19.4
54
0.725086
23
291
9
0.565217
0.173913
0.202899
0.299517
0.550725
0.550725
0.550725
0
0
0
0
0
0.171821
291
15
55
19.4
0.858921
0.343643
0
0.333333
0
0
0.1875
0
0
0
0
0
0
1
0
false
0.333333
0.166667
0
0.5
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
0
0
1
0
0
0
0
0
4
f3f53979c71c41d40255c048a3716b8f444f5763
1,221
py
Python
squalaetp/migrations/0014_auto_20191114_1100.py
Nels885/csd_dashboard
aa5a3b970c50a2a93af722f962bd87c3728f233c
[ "MIT" ]
null
null
null
squalaetp/migrations/0014_auto_20191114_1100.py
Nels885/csd_dashboard
aa5a3b970c50a2a93af722f962bd87c3728f233c
[ "MIT" ]
null
null
null
squalaetp/migrations/0014_auto_20191114_1100.py
Nels885/csd_dashboard
aa5a3b970c50a2a93af722f962bd87c3728f233c
[ "MIT" ]
null
null
null
# Generated by Django 2.2.6 on 2019-11-14 10:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('squalaetp', '0013_auto_20191004_2034'), ] operations = [ migrations.AddField( model_name='corvet', name='electronique_16p', field=models.CharField(blank=True, max_length=200, verbose_name='HDC HARD - Haut de Colonne de Direction (COM200x)'), ), migrations.AddField( model_name='corvet', name='electronique_46p', field=models.CharField(blank=True, max_length=200, verbose_name='HDC FOURN.NO.SERIE - Haut de Colonne de Direction (COM200x)'), ), migrations.AddField( model_name='corvet', name='electronique_56p', field=models.CharField(blank=True, max_length=200, verbose_name='HDC FOURN.DATE.FAB - Haut de Colonne de Direction (COM200x)'), ), migrations.AddField( model_name='corvet', name='electronique_66p', field=models.CharField(blank=True, max_length=200, verbose_name='HDC FOURN.CODE - Haut de Colonne de Direction (COM200x)'), ), ]
35.911765
139
0.622441
138
1,221
5.369565
0.398551
0.097166
0.124157
0.145749
0.748988
0.748988
0.707153
0.641026
0.641026
0.641026
0
0.070078
0.263718
1,221
33
140
37
0.754171
0.036855
0
0.444444
1
0
0.291312
0.019591
0
0
0
0
0
1
0
false
0
0.037037
0
0.148148
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f3f6bdc71b7e31e2134f61aabd7452d7e3df869e
82
py
Python
demo.py
kewlamogh/DuckJS
297d246e3e29cd8453cde65dfc93d4b982f06628
[ "MIT" ]
null
null
null
demo.py
kewlamogh/DuckJS
297d246e3e29cd8453cde65dfc93d4b982f06628
[ "MIT" ]
null
null
null
demo.py
kewlamogh/DuckJS
297d246e3e29cd8453cde65dfc93d4b982f06628
[ "MIT" ]
null
null
null
import serverfetch serverfetch.wsite = "https://crap.com" print(serverfetch.get())
27.333333
38
0.780488
10
82
6.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.060976
82
3
39
27.333333
0.831169
0
0
0
0
0
0.192771
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
6d25067aba9d67789e72f2cf8478cab2b45eb8da
26
py
Python
dockci/__init__.py
sprucedev/DockCI-Logserve
fc891f52d1a81168837879a49853867066695fd4
[ "0BSD" ]
null
null
null
dockci/__init__.py
sprucedev/DockCI-Logserve
fc891f52d1a81168837879a49853867066695fd4
[ "0BSD" ]
null
null
null
dockci/__init__.py
sprucedev/DockCI-Logserve
fc891f52d1a81168837879a49853867066695fd4
[ "0BSD" ]
null
null
null
""" DockCI Log Server """
13
25
0.576923
3
26
5
1
0
0
0
0
0
0
0
0
0
0
0
0.192308
26
1
26
26
0.714286
0.653846
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
6d2a275bee629299da2476f85f2642cf7047f8bd
100
py
Python
src/preprocess.py
konnyakmannan/python-data-project-template
db7e120d3fa51f522b72bf08a2371029bf9007fe
[ "MIT" ]
null
null
null
src/preprocess.py
konnyakmannan/python-data-project-template
db7e120d3fa51f522b72bf08a2371029bf9007fe
[ "MIT" ]
1
2021-06-07T01:22:11.000Z
2021-06-29T08:33:45.000Z
src/preprocess.py
konnyakmannan/python-data-project-template
db7e120d3fa51f522b72bf08a2371029bf9007fe
[ "MIT" ]
null
null
null
import numpy as np def foo(a: np.float64, b: np.float64) -> np.float64: c = a + b return c
16.666667
52
0.6
19
100
3.157895
0.578947
0.45
0
0
0
0
0
0
0
0
0
0.082192
0.27
100
5
53
20
0.739726
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
0
0
0
4
6d5cdbbbf34d2ab160e6237afc998f577c06a94b
236
py
Python
Beer2U_Calculator/test/test_app_modules.py
dih-ves/exam
5ba111afb31c55f38bf775d5a83c1b96d5af4baf
[ "CC0-1.0" ]
null
null
null
Beer2U_Calculator/test/test_app_modules.py
dih-ves/exam
5ba111afb31c55f38bf775d5a83c1b96d5af4baf
[ "CC0-1.0" ]
null
null
null
Beer2U_Calculator/test/test_app_modules.py
dih-ves/exam
5ba111afb31c55f38bf775d5a83c1b96d5af4baf
[ "CC0-1.0" ]
null
null
null
from app import config_app from domain.logic import Fake def test_app_overall_config(): assert True def test_app_modules_config(): assert config_app() == True def test_app_inner_modules_config(): assert Fake().pretend() == True
21.454545
36
0.775424
36
236
4.75
0.416667
0.122807
0.175439
0.163743
0
0
0
0
0
0
0
0
0.135593
236
11
37
21.454545
0.838235
0
0
0
0
0
0
0
0
0
0
0
0.375
1
0.375
true
0
0.25
0
0.625
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
1
0
0
4
eda8d48f9d131cdf9881175892cb1a0249d7cab3
270
py
Python
mmpose/core/visualization/__init__.py
Jackqu/mmpose
ad8acc5ff5da7993c6befdc4b1ced2c2ecb64533
[ "Apache-2.0" ]
null
null
null
mmpose/core/visualization/__init__.py
Jackqu/mmpose
ad8acc5ff5da7993c6befdc4b1ced2c2ecb64533
[ "Apache-2.0" ]
null
null
null
mmpose/core/visualization/__init__.py
Jackqu/mmpose
ad8acc5ff5da7993c6befdc4b1ced2c2ecb64533
[ "Apache-2.0" ]
null
null
null
from .effects import apply_bugeye_effect, apply_sunglasses_effect from .image import imshow_bboxes, imshow_keypoints, imshow_keypoints_3d __all__ = [ 'imshow_keypoints', 'imshow_keypoints_3d', 'imshow_bboxes', 'apply_bugeye_effect', 'apply_sunglasses_effect' ]
33.75
71
0.811111
33
270
6.030303
0.393939
0.301508
0.170854
0.221106
0.703518
0.38191
0
0
0
0
0
0.008299
0.107407
270
7
72
38.571429
0.817427
0
0
0
0
0
0.333333
0.085185
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
edb30a892fac8245beb3766971b45279ad4da96a
18
py
Python
all code (not organized)/negative for loop.py
TaylorChris2/Virtuoso
87a3d59141172d5daff0ae4725b843351b52fe63
[ "Apache-2.0" ]
null
null
null
all code (not organized)/negative for loop.py
TaylorChris2/Virtuoso
87a3d59141172d5daff0ae4725b843351b52fe63
[ "Apache-2.0" ]
null
null
null
all code (not organized)/negative for loop.py
TaylorChris2/Virtuoso
87a3d59141172d5daff0ae4725b843351b52fe63
[ "Apache-2.0" ]
null
null
null
for i in range()
9
17
0.611111
4
18
2.75
1
0
0
0
0
0
0
0
0
0
0
0
0.277778
18
1
18
18
0.846154
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
edce7f32325ae376e9ec136302a066f209d8fc45
155
py
Python
migrations/metadata.py
gntzh/fastapi-tmpl
83cb815c4fb5ced0f87286e485a4089bb0097b8f
[ "MIT" ]
null
null
null
migrations/metadata.py
gntzh/fastapi-tmpl
83cb815c4fb5ced0f87286e485a4089bb0097b8f
[ "MIT" ]
null
null
null
migrations/metadata.py
gntzh/fastapi-tmpl
83cb815c4fb5ced0f87286e485a4089bb0097b8f
[ "MIT" ]
null
null
null
from src.domain import Item, User # noqa: F401 from src.domain.mapper import mapper_registry __all__ = ["metadata"] metadata = mapper_registry.metadata
22.142857
47
0.780645
21
155
5.47619
0.571429
0.121739
0.226087
0
0
0
0
0
0
0
0
0.022388
0.135484
155
6
48
25.833333
0.835821
0.064516
0
0
0
0
0.055944
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
b623cc243cc1ecd70170388bc232b032be1697a6
254
py
Python
external_items/connect4/views.py
natfoster82/sei_examples
35271ab4776cd103a1ee3a29799981d80c087522
[ "MIT" ]
null
null
null
external_items/connect4/views.py
natfoster82/sei_examples
35271ab4776cd103a1ee3a29799981d80c087522
[ "MIT" ]
1
2020-07-05T19:06:08.000Z
2020-07-05T19:06:08.000Z
external_items/connect4/views.py
natfoster82/sei_examples
35271ab4776cd103a1ee3a29799981d80c087522
[ "MIT" ]
null
null
null
from flask import Blueprint, render_template connect4_bp = Blueprint('connect4', __name__, template_folder='templates', static_folder='static', url_prefix='/connect4') @connect4_bp.route('') def connect4(): return render_template('connect4.html')
28.222222
122
0.771654
30
254
6.166667
0.6
0.151351
0.237838
0
0
0
0
0
0
0
0
0.026087
0.094488
254
8
123
31.75
0.778261
0
0
0
0
0
0.177165
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.6
0.4
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
b63f9563b605ca3a78952a23fcf18a1d9c0706a6
177
py
Python
AutotestWebD/all_urls/LittleToolUrl.py
yangjourney/sosotest
2e88099a829749910ca325253c9b1a2e368d21a0
[ "MIT" ]
422
2019-08-18T05:04:20.000Z
2022-03-31T06:49:19.000Z
AutotestWebD/all_urls/LittleToolUrl.py
LinSongJian1985/sosotest
091863dee531b5726650bb63efd6f169267cbeb4
[ "MIT" ]
10
2019-10-24T09:55:38.000Z
2021-09-29T17:28:43.000Z
AutotestWebD/all_urls/LittleToolUrl.py
LinSongJian1985/sosotest
091863dee531b5726650bb63efd6f169267cbeb4
[ "MIT" ]
202
2019-08-18T05:04:27.000Z
2022-03-30T05:57:18.000Z
from django.conf.urls import url from apps.littletool.views import tool urlpatterns = [ #add page url(r'^littletool/jsoncn$', tool.jsoncn, name="LITTLETOOL_jsoncn"), ]
22.125
71
0.728814
24
177
5.333333
0.666667
0.25
0
0
0
0
0
0
0
0
0
0
0.146893
177
8
72
22.125
0.847682
0.045198
0
0
0
0
0.213018
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
b666a5f21fa73cdd9a6f6856b351ca1a14fd5a4e
61
py
Python
RobotFrameworkService/__init__.py
postadress/robotframework-webservice
2fc112b3b4bd7493c6c8cb1e00655b24e20bd1e5
[ "Apache-2.0" ]
5
2021-07-04T13:37:02.000Z
2021-09-22T15:56:57.000Z
RobotFrameworkService/__init__.py
postadress/robotframework-webservice
2fc112b3b4bd7493c6c8cb1e00655b24e20bd1e5
[ "Apache-2.0" ]
null
null
null
RobotFrameworkService/__init__.py
postadress/robotframework-webservice
2fc112b3b4bd7493c6c8cb1e00655b24e20bd1e5
[ "Apache-2.0" ]
1
2021-09-07T07:37:30.000Z
2021-09-07T07:37:30.000Z
from .version import get_version __version__ = get_version()
20.333333
32
0.819672
8
61
5.5
0.5
0.454545
0
0
0
0
0
0
0
0
0
0
0.114754
61
3
33
20.333333
0.814815
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
b66b2d898ca1dc5cdd0e5083df0d3b4265a987a0
85
py
Python
fuzzy/apps.py
the-deep/DEEPL
93f7bf7d61d7424250d01c1fc510347375d767c4
[ "MIT" ]
6
2018-05-17T07:40:16.000Z
2020-09-27T00:04:39.000Z
fuzzy/apps.py
the-deep/DEEPL
93f7bf7d61d7424250d01c1fc510347375d767c4
[ "MIT" ]
10
2018-05-21T08:46:48.000Z
2020-06-11T02:57:21.000Z
fuzzy/apps.py
the-deep/DEEPL
93f7bf7d61d7424250d01c1fc510347375d767c4
[ "MIT" ]
1
2018-10-04T21:27:58.000Z
2018-10-04T21:27:58.000Z
from django.apps import AppConfig class FuzzyConfig(AppConfig): name = 'fuzzy'
14.166667
33
0.741176
10
85
6.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.176471
85
5
34
17
0.9
0
0
0
0
0
0.058824
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b69a69610de98000e7023b73a1d5e449e66d7a03
313
py
Python
NewsHQ App/news/forms.py
ChetanNair/NewsHQ
ea20bbddff2c3a85236e9659a790b20a28d4d6f5
[ "MIT" ]
null
null
null
NewsHQ App/news/forms.py
ChetanNair/NewsHQ
ea20bbddff2c3a85236e9659a790b20a28d4d6f5
[ "MIT" ]
null
null
null
NewsHQ App/news/forms.py
ChetanNair/NewsHQ
ea20bbddff2c3a85236e9659a790b20a28d4d6f5
[ "MIT" ]
null
null
null
from django import forms # Form takes in input URLs from the user for the website whose articles they want to see. class URLForm(forms.Form): url1 = forms.URLField(initial="https://bbc.co.uk") url2 = forms.URLField(initial="https://apnews.com") url3 = forms.URLField(initial="https://reuters.com")
31.3
89
0.71885
47
313
4.787234
0.702128
0.173333
0.266667
0.333333
0
0
0
0
0
0
0
0.011321
0.153355
313
9
90
34.777778
0.837736
0.277955
0
0
0
0
0.241071
0
0
0
0
0
0
1
0
false
0
0.2
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
b69c13554e76d9e81bece8a6792d7d02658a8880
95
py
Python
payments/forms.py
NAU-SuperGeeks/geeksurvey
ee2fd0d2869f3b8b5c058d8a39c64c2d0b0c2a26
[ "MIT" ]
3
2022-01-01T23:00:45.000Z
2022-02-26T23:35:46.000Z
payments/forms.py
NAU-SuperGeeks/geeksurvey
ee2fd0d2869f3b8b5c058d8a39c64c2d0b0c2a26
[ "MIT" ]
5
2022-02-12T17:52:52.000Z
2022-03-02T16:08:08.000Z
payments/forms.py
NAU-SuperGeeks/geeksurvey
ee2fd0d2869f3b8b5c058d8a39c64c2d0b0c2a26
[ "MIT" ]
4
2022-01-12T18:47:20.000Z
2022-01-12T19:11:59.000Z
from django import forms class ClaimFundsForm(forms.Form): email = forms.EmailField()
19
34
0.726316
11
95
6.272727
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.189474
95
4
35
23.75
0.896104
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b69e1eaa47612a57178887ccda1a833ba0957910
35,381
py
Python
messages_func.py
L1mPeX/Casino-Bot
b08be7be75854cc2e386906a9ef8ee3ab768ae78
[ "MIT" ]
2
2020-11-21T17:33:32.000Z
2021-08-17T16:52:57.000Z
messages_func.py
L1mPeX/Casino-Bot
b08be7be75854cc2e386906a9ef8ee3ab768ae78
[ "MIT" ]
null
null
null
messages_func.py
L1mPeX/Casino-Bot
b08be7be75854cc2e386906a9ef8ee3ab768ae78
[ "MIT" ]
null
null
null
#!/usr/bin/python3.6 import func, menu, config import random def error_message(message, bot): bot.send_message(message.chat.id, "Что-то пошло не по плану") def not_enough_money(message, bot, error_sum): chat_id = message.chat.id user_balanse = func.get_user_information(chat_id)[1] bot.send_message(message.chat.id, f"Ваш баланс равен {user_balanse} RUB\nСумма, которую вы ввели равна {error_sum}\nВведенная сумма не может быть больше, чем баланс") def main_profile(message, bot): chat_id = message.chat.id user_information = func.get_user_information(chat_id) user_balanse = user_information[1] if user_information[2] != 0: average_list = user_information[3] / user_information[2] else: average_list = 0 bot.send_message(chat_id, f"👤Профиль:\n\n💰Баланс: {user_balanse} RUB \n\n 📈Средний чек {average_list} RUB", reply_markup = menu.gen_refer_kb()) def refer_system(call, bot, user_data): chat_id = call.message.chat.id user_information = func.get_user_information(chat_id) ref_sum = user_information[4] count_refs = user_information[5] bot.send_message(chat_id, f"👥Реферальная система:\n\nКоличество рефералов {count_refs}\n\nЗаработано с реферальной системы - {ref_sum} RUB\n\nВаша реферальная ссылка - https://t.me/{config.bot_name}?start={chat_id}", reply_markup = menu.gen_ref_system_kb()) def how_work_referal_system(call, bot, user_data): chat_id = call.message.chat.id bot.send_message(chat_id, "Получайте процент с продаж и зарабатывайте вместе с нами! Если пользователь зарегисрируется в боте по вашей ссылке, то вами будет получен процент.\n\nСейчас условия такие:\n\nВы будете получать 5% с каждого пополнения приглашенного пользователя.", reply_markup = menu.gen_return_referal_system_how_it_works()) def main_profile_call(call, bot, user_data): chat_id = call.message.chat.id user_information = func.get_user_information(chat_id) user_balanse = user_information[1] if user_information[2] != 0: average_list = user_information[3] / user_information[2] else: average_list = 0 bot.send_message(chat_id, f"👤Профиль:\n\n💰Баланс: {user_balanse} RUB \n\n 📈Средний чек {average_list} RUB", reply_markup = menu.gen_refer_kb()) def main_user_balanse(message, bot): chat_id = message.chat.id user_balanse = func.get_user_information(chat_id)[1] bot.send_message(chat_id, f"💰Баланс:\n\n💷 {user_balanse} RUB", reply_markup = menu.gen_balanse_kb()) def popolnenye(call, bot, user_data): chat_id = call.message.chat.id bot.send_message(chat_id, "Выберите платежную систему для пополнения", reply_markup = menu.gen_popoln_plateg_sys_kb()) def withdraw(call, bot, user_data): chat_id = call.message.chat.id bot.send_message(chat_id, "Выберите платежную систему для вывода", reply_markup = menu.gen_withdraw_plateg_sys_kb()) def popoln_qiwi(call, bot, user_data): chat_id = call.message.chat.id try: func.delete_last_popoln(chat_id) except: pass bot.register_next_step_handler(bot.send_message(chat_id, "Введите сумму пополнения в рублях"),get_sum_popoln, bot = bot) def popoln_btc(call, bot, user_data): chat_id = call.message.chat.id bot.register_next_step_handler(bot.send_message(chat_id, "Введите ваш BTC кошелек, с которого будет выполнено пополнение, в случае ошибки администрация ответственности не несет"), get_btc_num, bot = bot) def get_sum_popoln(message, bot): try: chat_id = message.chat.id sum_popoln = float(message.text) bot.register_next_step_handler(bot.send_message(chat_id, "Введите номер Qiwi кошелька без знака + с которого будет выполнено пополнение"), get_qiwi_num, bot = bot, sum_popoln = sum_popoln) except: error_message(message, bot) def get_qiwi_num(message, bot, sum_popoln): try: chat_id = message.chat.id qiwi_num = int(message.text) code = random.randint(1000000000, 9999999999) code2 = random.randint(1000000000, 9999999999) func.create_qiwi_popoln(chat_id, sum_popoln, qiwi_num, code) popoln = func.get_last_popoln(chat_id) bot.send_message(chat_id, f"Пополнение #{code2}\n\nСумма пополнения: {popoln[1]} RUB\n\nТелефон для перевода: {config.qiwi_num}\n\nКомментарий для пополнения: {popoln[3]}", reply_markup = menu.gen_check_popoln()) except: error_message(message, bot) def get_btc_num(message, bot): chat_id = message.chat.id btc_num = message.text btc_num = func.create_new_coinbase_plateg() bot.send_message(chat_id, f"Для пополнения прешлите на адресс {btc_num}, ту сумму BTC, на которую вы хотите пополнить", reply_markup = menu.gen_check_btc_kb(btc_num)) def main_user_balanse_call(call, bot, user_data): chat_id = call.message.chat.id user_balanse = func.get_user_information(chat_id)[1] bot.send_message(chat_id, f"💰Баланс:\n\n💷 {user_balanse} RUB", reply_markup = menu.gen_balanse_kb()) def check_popoln(call, bot, user_data): chat_id = call.message.chat.id popoln = func.get_last_popoln(chat_id) S = func.check_qiwi_repl(chat_id) if S: bot.edit_message_text(chat_id = chat_id, message_id = call.message.message_id, text = f"Ваш баланс пополнен на {popoln[1]} RUB") else: pass def check_btc(call, bot, user_data): chat_id = call.message.chat.id sum_pl = func.get_sum_payments_from_adress(user_data) c = func.get_course_btc_rub() sum_rub = sum_pl * c if sum_pl > 0: func.repl_bal(chat_id, sum_rub) bot.edit_message_text(chat_id = chat_id, message_id = call.message.message_id, text = f"Ваш баланс пополнен\nНа {sum_rub} RUB") def withdraw_qiwi(call, bot, user_data): chat_id = call.message.chat.id if func.check_unicless_withdraw(chat_id): mes = bot.send_message(chat_id, "Введите сумму вывода в RUB") bot.register_next_step_handler(mes, get_qiwi_sum_withdraw, bot = bot) else: bot.send_message(chat_id, "Ожидайте подтверждения предыдущего вывода, перед созданием новой заявки") def get_qiwi_sum_withdraw(message, bot): try: chat_id = message.chat.id sum_withdraw = float(message.text) user_balanse = func.get_user_information(chat_id)[1] if sum_withdraw / 100 * (100 + config.withdraw_comission) <= user_balanse: mes = bot.send_message(chat_id, "Введите Qiwi кошелек без знака +") bot.register_next_step_handler(mes, get_qiwi_num_withdraw, bot = bot, sum_withdraw = sum_withdraw) else: not_enough_money(message, bot, sum_withdraw) except: error_message(message, bot) def get_qiwi_num_withdraw(message, bot, sum_withdraw): try: chat_id = message.chat.id qiwi_num = int(message.text) func.withdraw_sum_from_balanse(chat_id, sum_withdraw / 100 * (100 + config.withdraw_comission)) func.create_withdraw(chat_id, sum_withdraw, qiwi_num, 1) bot.send_message(chat_id, "Выплата принята в обработку ожидайте подтверждения") except: error_message(message, bot) def withdraw_btc(call, bot, user_data): chat_id = call.message.chat.id if func.check_unicless_withdraw(chat_id): mes = bot.send_message(chat_id, "Введите сумму вывода в RUB") bot.register_next_step_handler(mes, get_btc_sum_withdraw, bot = bot) else: bot.send_message(chat_id, "Ожидайте подтверждения предыдущего вывода, перед созданием новой заявки") def get_btc_sum_withdraw(message, bot): try: chat_id = message.chat.id sum_withdraw = float(message.text) user_balanse = func.get_user_information(chat_id)[1] c = func.get_course_btc_rub() if sum_withdraw / 100 * (100 + config.withdraw_comission) <= user_balanse: sum_withdraw = sum_withdraw * c mes = bot.send_message(chat_id, "Введите BTC кошелек") bot.register_next_step_handler(mes, get_btc_num_withdraw, bot = bot, sum_withdraw = sum_withdraw) else: not_enough_money(message, bot, sum_withdraw) except: error_message(message, bot) def get_btc_num_withdraw(message, bot, sum_withdraw): chat_id = message.chat.id btc_num = message.text func.withdraw_sum_from_balanse(chat_id, sum_withdraw / 100 * (100 + config.withdraw_comission)) func.create_withdraw(chat_id, sum_withdraw, btc_num, 2) def dice_game(message, bot): chat_id = message.chat.id bot.send_message(chat_id, "Создайте новую игру или выберите из имеющихся", reply_markup = menu.gen_dice_game_kb()) def create_dice_game_step1(call, bot, user_data): chat_id = call.message.chat.id mes = bot.send_message(chat_id, "Введите сумму ставки в RUB") bot.register_next_step_handler(mes, create_dice_game_step2, bot = bot) def create_dice_game_step2(message, bot): try: chat_id = message.chat.id user_balanse = func.get_user_information(chat_id)[1] sum_bet = float(message.text) if sum_bet / 100 * (100 + config.games_comission) <= user_balanse: if sum_bet >= config.min_sum_bet and sum_bet <= config.max_sum_bet: func.withdraw_sum_from_balanse(chat_id, sum_bet / 100 * (100 + config.games_comission)) mes = bot.send_message(chat_id, "Выберите тип игры", reply_markup = menu.gen_dice_step3_kb(sum_bet)) else: bot.send_message(chat_id, f"Минимальная сумма ставки - {config.min_sum_bet}\n\nМаксимальная сумма ставки - {config.max_sum_bet}") else: not_enough_money(message, bot, sum_bet) except: error_message(message, bot) def create_dice_game_one_dice(call, bot, user_data): chat_id = call.message.chat.id sum_bet = float(user_data) mes = bot.send_message(chat_id, "Отправьте одним сообщением - 🎲") bot.register_next_step_handler(mes, get_value_one_dice_game, bot = bot, sum_bet = sum_bet) def get_value_one_dice_game(message, bot, sum_bet): try: chat_id = message.chat.id value = message.dice.value game_hash = random.randint(1000000000000, 999999999999999) func.create_game(game_hash, sum_bet, chat_id, value, '🎲') for i in config.chats_ids: bot.send_message(i, f"🎲🎲 Dice #{game_hash}\n\n💰 Сумма ставки {sum_bet} RUB \n\nИгра создана") bot.send_message(chat_id, f"🎲 Dice #{game_hash}\n\n💰 Сумма ставки {sum_bet} RUB\n\n♠️ Вам выпало число - {value}\n\n✅ Игра создана") bot.send_message(chat_id, "Создайте новую игру или выберите из имеющихся", reply_markup = menu.gen_dice_game_kb()) except: error_message(message, bot) def create_dice_game_two_dice(call, bot, user_data): chat_id = call.message.chat.id sum_bet = float(user_data) mes = bot.send_message(chat_id, "Отправьте одним сообщением - 🎲") bot.register_next_step_handler(mes, get_value_firtht_dice_game, bot = bot, sum_bet = sum_bet) def get_value_firtht_dice_game(message, bot, sum_bet): try: chat_id = message.chat.id value = message.dice.value mes = bot.send_message(chat_id, "Отправьте одним сообщением - 🎲") bot.register_next_step_handler(mes, get_value_second_dice_game, bot = bot, sum_bet = sum_bet, value = value) except: error_message(message, bot) def get_value_second_dice_game(message, bot, sum_bet, value): try: game_hash = random.randint(1000000000000, 999999999999999) chat_id = message.chat.id value = message.dice.value + value func.create_game(game_hash, sum_bet, chat_id, value, '🎲🎲') for i in config.chats_ids: bot.send_message(i, f"🎲🎲 Dice #{game_hash}\n\n💰 Сумма ставки {sum_bet} RUB \n\nИгра создана") bot.send_message(chat_id, f"🎲🎲 Dice #{game_hash}\n\n💰 Сумма ставки {sum_bet} RUB\n\n♠️ Вам выпало число - {value}\n\n✅ Игра создана") bot.send_message(chat_id, "Создайте новую игру или выберите из имеющихся", reply_markup = menu.gen_dice_game_kb()) except: error_message(message, bot) def create_dice_game_basketball_dice(call, bot, user_data): chat_id = call.message.chat.id sum_bet = float(user_data) mes = bot.send_message(chat_id, "Отправьте одним сообщением - 🏀") bot.register_next_step_handler(mes, get_value_basket_dice_game, bot = bot, sum_bet = sum_bet) def get_value_basket_dice_game(message, bot, sum_bet): try: chat_id = message.chat.id value = message.dice.value game_hash = random.randint(1000000000000, 999999999999999) func.create_game(game_hash, sum_bet, chat_id, value, '🏀') bot.send_message(chat_id, f"🏀 Dice #{game_hash}\n\n💰 Сумма ставки {sum_bet} RUB\n\n♠️ Вам выпало число - {value}\n\n✅ Игра создана") chat_id = message.chat.id bot.send_message(chat_id, "Создайте новую игру или выберите из имеющихся", reply_markup = menu.gen_dice_game_kb()) except: error_message(message, bot) def create_dice_game_darts_dice(call, bot, user_data): chat_id = call.message.chat.id sum_bet = float(user_data) mes = bot.send_message(chat_id, "Отправьте одним сообщением - 🎯") bot.register_next_step_handler(mes, get_value_darts_dice_game, bot = bot, sum_bet = sum_bet) def get_value_darts_dice_game(message, bot, sum_bet): try: chat_id = message.chat.id value = message.dice.value game_hash = random.randint(1000000000000, 999999999999999) func.create_game(game_hash, sum_bet, chat_id, value, '🎯') bot.send_message(chat_id, f"🎯 Dice #{game_hash}\n\n💰 Сумма ставки {sum_bet} RUB\n\n♠️ Вам выпало число - {value}\n\n✅ Игра создана") chat_id = message.chat.id bot.send_message(chat_id, "Создайте новую игру или выберите из имеющихся", reply_markup = menu.gen_dice_game_kb()) except: error_message(message, bot) def create_dice_game_football_dice(call, bot, user_data): chat_id = call.message.chat.id sum_bet = float(user_data) mes = bot.send_message(chat_id, "Отправьте одним сообщением - ⚽️") bot.register_next_step_handler(mes, get_value_football_dice_game, bot = bot, sum_bet = sum_bet) def get_value_football_dice_game(message, bot, sum_bet): try: chat_id = message.chat.id game_hash = random.randint(1000000000000, 999999999999999) value = message.dice.value func.create_game(game_hash, sum_bet, chat_id, value, '⚽️') bot.send_message(chat_id, f"⚽️ Dice #{game_hash}\n\n💰 Сумма ставки {sum_bet} RUB\n\n♠️ Вам выпало число - {value}\n\n✅ Игра создана") chat_id = message.chat.id bot.send_message(chat_id, "Создайте новую игру или выберите из имеющихся", reply_markup = menu.gen_dice_game_kb()) except: error_message(message, bot) def play_dice(call, bot, user_data): chat_id = call.message.chat.id bot.send_message(chat_id, "Выберите игру в которую хотите сыграть", reply_markup = menu.create_kb_dices()) def dice_game_call(call, bot, user_data): chat_id = call.message.chat.id bot.send_message(chat_id, "Создайте новую игру или выберите из имеющихся", reply_markup = menu.gen_dice_game_kb()) def get_game_information(call, bot, user_data): chat_id = call.message.chat.id game = func.get_dice_by_hash(user_data) bot.send_message(chat_id, f"{game[6]} Dice #{game[0]}\n\n💰 Сумма ставки {game[1]} RUB", reply_markup = menu.create_kb_play_dice(user_data)) def play_dice_step_1(call, bot, user_data): chat_id = call.message.chat.id sum_bet = func.get_dice_by_hash(user_data)[1] type = func.get_dice_by_hash(user_data)[6] user_balanse = func.get_user_information(chat_id)[1] if sum_bet / 100 * (100 + config.games_comission) <= user_balanse: if func.check_non_true_user(chat_id): if type != "🎲🎲": mes = bot.send_message(chat_id, f"Отправьте одним сообщением - {type}") bot.register_next_step_handler(mes, get_player_value_dice_game, bot = bot, game_hash = user_data) else: mes = bot.send_message(chat_id, "Отправьте одним сообщением - 🎲") bot.register_next_step_handler(mes, get_firtht_player_value_dice_game, bot = bot, game_hash = user_data) else: if type != "🎲🎲": player_value = func.get_dice_by_hash(user_data)[4] if player_value == 6: play_non_true_user(chat_id, bot, user_data, 6) else: play_non_true_user(chat_id, bot, user_data, player_value + 1) else: player_value = func.get_dice_by_hash(user_data)[4] if player_value == 12: play_non_true_user(chat_id, bot, user_data, 12) else: play_non_true_user(chat_id, bot, user_data, player_value + 1) else: not_enough_money(call.message, bot, sum_bet) def get_firtht_player_value_dice_game(message, bot, game_hash): chat_id = message.chat.id player_value = message.dice.value mes = bot.send_message(chat_id, "Отправьте одним сообщением - 🎲") bot.register_next_step_handler(mes, get_second_player_value_dice_game, bot = bot, game_hash = game_hash, value = player_value) def get_second_player_value_dice_game(message, bot, game_hash, value): chat_id = message.chat.id player_value = message.dice.value + value game = func.get_dice_by_hash(game_hash) func.withdraw_sum_from_balanse(chat_id, game[1] / 100 * (100 + config.games_comission)) if game[4] > player_value: winner_message(game[2], game[1], game[4], player_value, game[6], game_hash, bot) lose_message(chat_id, game[1], player_value, game[4], game[6], game_hash, bot) elif game[4] < player_value: lose_message(game[2], game[1], game[4], player_value, game[6], game_hash, bot) winner_message(chat_id, game[1], player_value, game[4], game[6], game_hash, bot) elif game[4] == player_value: func.popoln_user_balanse(chat_id, game[1]) func.popoln_user_balanse(game[2], game[1]) bot.send_message(chat_id, f"{game[6]} Dice #{game[0]}\n\n Ничья") bot.send_message(game[2], f"{game[6]} Dice #{game[0]}\n\n Ничья") func.delete_dice_game_by_hash(game_hash) def get_player_value_dice_game(message, bot, game_hash): chat_id = message.chat.id player_value = message.dice.value game = func.get_dice_by_hash(game_hash) func.withdraw_sum_from_balanse(chat_id, game[1] / 100 * (config.games_comission)) if game[4] > player_value: winner_message(game[2], game[1], game[4], player_value, game[6], game_hash, bot) lose_message(chat_id, game[1], player_value, game[4], game[6], game_hash, bot) elif game[4] < player_value: lose_message(game[2], game[1], game[4], player_value, game[6], game_hash, bot) winner_message(chat_id, game[1], player_value, game[4], game[6], game_hash, bot) elif game[4] == player_value: func.popoln_user_balanse(chat_id, game[1]) func.popoln_user_balanse(game[2], game[1]) bot.send_message(chat_id, f"{game[6]} Dice #{game[0]}\n\n Ничья") bot.send_message(game[2], f"{game[6]} Dice #{game[0]}\n\n Ничья") func.delete_dice_game_by_hash(game_hash) def winner_message(chat_id, sum_bet, value, vrag_value, type, game_hash, bot): bot.send_message(chat_id, f"{type} Dice #{game_hash}\n\n💰 Сумма ставки {sum_bet} RUB\n\n👆 Ваше число {value}\n\n👇 Число соперника {vrag_value}\n\n✅Сумма выигрыша {sum_bet * 2} RUB") func.popoln_user_balanse(chat_id, sum_bet * 2) func.create_new_history(chat_id, game_hash, sum_bet * 2) func.update_user_count_games(chat_id) func.update_user_sum_games(chat_id, sum_bet * 2) def lose_message(chat_id, sum_bet, value, vrag_value, type, game_hash, bot): bot.send_message(chat_id, f"{type} Dice #{game_hash}\n\n💰 Сумма ставки {sum_bet} RUB\n\n👆Число соперника {vrag_value}\n\n👇 Ваше число {value}\n\n❌Вы проиграли, повезет в следующий раз") func.create_new_history(chat_id, game_hash, 0) func.update_user_count_games(chat_id) def help_dice(call, bot, user_data): chat_id = call.message.chat.id bot.send_message(chat_id, config.dice_help, reply_markup = menu.create_kb_retrun_main_dice()) def get_all_games(call, bot, user_data): chat_id = call.message.chat.id games = func.get_all_history(chat_id) mes = "Ваши игры:\n" for i in games: mes += f"Dice #{i[1]} Сумма выигрыша {i[2]}\n" bot.send_message(chat_id, mes, reply_markup = menu.create_kb_retrun_main_dice()) def get_rating(call, bot, user_data): chat_id = call.message.chat.id count, all_users_count = func.get_rating(chat_id) bot.send_message(chat_id, f"Вы занимаете {count} место 🏆 из {all_users_count} пользователей👥", reply_markup = menu.create_kb_retrun_main_dice()) def play_non_true_user(chat_id, bot, game_hash, value_non_true_user): player_value = value_non_true_user game = func.get_dice_by_hash(game_hash) func.withdraw_sum_from_balanse(chat_id, game[1] / 100 * (config.games_comission)) if game[4] > player_value: winner_message(game[2], game[1], game[4], player_value, game[6], game_hash, bot) lose_message(chat_id, game[1], player_value, game[4], game[6], game_hash, bot) elif game[4] < player_value: lose_message(game[2], game[1], game[4], player_value, game[6], game_hash, bot) winner_message(chat_id, game[1], player_value, game[4], game[6], game_hash, bot) elif game[4] == player_value: func.popoln_user_balanse(chat_id, game[1]) func.popoln_user_balanse(game[2], game[1]) bot.send_message(chat_id, f"{game[6]} Dice #{game[0]}\n\n Ничья") bot.send_message(game[2], f"{game[6]} Dice #{game[0]}\n\n Ничья") func.delete_dice_game_by_hash(game_hash) def update_user_balanse(call, bot, user_data): chat_id = call.message.chat.id mes = bot.send_message(chat_id, "Введите ID пользователя для обновления баланса") bot.register_next_step_handler(mes, update_user_balanse_step1, bot = bot) def update_user_balanse_step1(message, bot): try: chat_id = message.chat.id Id = int(message.text) mes = bot.send_message(chat_id, "Введите новую сумму баланса пользователя в рублях") bot.register_next_step_handler(mes, update_user_balanse_step2, bot = bot, Id = Id) except: error_message(message, bot) def update_user_balanse_step2(message, bot, Id): try: sum_update = float(message.text) chat_id = message.chat.id func.update_user_balanse(Id, sum_update) usrname = bot.get_chat(Id).username bot.send_message(chat_id, f"Баланс пользователя @{usrname} Равен {sum_update} RUB") bot.send_message(message.chat.id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) except: error_message(message, bot) def ban_user(call, bot, user_data): chat_id = call.message.chat.id mes = bot.send_message(chat_id, "Введите ID пользователя для блокировки") bot.register_next_step_handler(mes, ban_user_step1, bot = bot) def ban_user_step1(message, bot): try: chat_id = message.chat.id Id = int(message.text) func.add_user_to_ban(Id) usrname = bot.get_chat(Id).username bot.send_message(chat_id, f"Пользователь @{usrname} заблокирован") bot.send_message(message.chat.id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) except: error_message(message, bot) def unban_user(call, bot, user_data): chat_id = call.message.chat.id mes = bot.send_message(chat_id, "Введите ID пользователя для разблокировки") bot.register_next_step_handler(mes, unban_user_step1, bot = bot) def unban_user_step1(message, bot): try: chat_id = message.chat.id Id = int(message.text) func.delete_user_from_ban(Id) usrname = bot.get_chat(Id).username bot.send_message(chat_id, f"Пользователь @{usrname} разблокирован") bot.send_message(message.chat.id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) except: error_message(message, bot) def send_messages_all_users(call, bot, user_data): chat_id = call.message.chat.id mes = bot.send_message(chat_id, "Введите сообщение для рассылки пользователям") bot.register_next_step_handler(mes, send_messages_all_users_step1, bot = bot) def send_messages_all_users_step1(message, bot): chat_id = message.chat.id Users = func.get_all_users_inform() Count = 0 try: for i in Users: i = i[0] Count = Count + 1 if message.text != None: bot.send_message(i, message.text) elif message.photo != None: try: file_info = bot.get_file(message.photo[len(message.photo)-1].file_id) downloaded_file = bot.download_file(file_info.file_path) src= file_info.file_path with open(src, 'wb') as new_file: new_file.write(downloaded_file) except Exception as e: bot.reply_to(message,e ) with open(src, 'rb') as f: contents = f.read() if message.caption != None: C = message.caption bot.send_photo(i, contents, caption = C) else: bot.send_photo(i, contents) elif message.video != None: try: file_info = bot.get_file(message.video.file_id) downloaded_file = bot.download_file(file_info.file_path) src= file_info.file_path with open(src, 'wb') as new_file: new_file.write(downloaded_file) except Exception as e: bot.reply_to(message,e ) with open(src, 'rb') as f: contents = f.read() if message.caption != None: C = message.caption bot.send_video(i, contents, caption = C) else: bot.send_video(i, contents) except: error_message(message) bot.send_message(chat_id, "Сообщение отправлено " + str(Count) + " пользователям") bot.send_message(chat_id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) def check_withdraws(call, bot, user_data): chat_id = call.message.chat.id withdraw = func.get_last_withdraw() if withdraw == 0: bot.send_message(chat_id, "Выводов нет") else: usrname = bot.get_chat(withdraw[0]).username type_withdraw = withdraw[3] if type_withdraw == 1: type_withdraw = "🥝 Qiwi" else: type_withdraw = "☢️ Bitcoin" bot.send_message(chat_id, f"Вывод от @{usrname}\n\nТип вывода {type_withdraw}\n\nСумма вывода {withdraw[1]}\n\nКошелек для вывода {withdraw[2]}", reply_markup = menu.gen_check_withdraw_kb(withdraw[0])) def confirm_withdraw(call, bot, user_data): bot.send_message(user_data, "Ваша выплата произведена") bot.send_message(call.message.chat.id, "Вы подтвердили данную заявку на вывод") bot.send_message(call.message.chat.id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) func.delete_withdraw(user_data) def delete_withdraw(call, bot, user_data): bot.send_message(user_data, "Ваша выплата удалена") bot.send_message(call.message.chat.id, "Вы подтвердили данную заявку на вывод") bot.send_message(call.message.chat.id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) func.delete_withdraw(user_data) def add_no_true_user(call, bot, user_data): chat_id = call.message.chat.id mes = bot.send_message(chat_id, "Введите Id пользователя, у которого будет функция подкрутки") bot.register_next_step_handler(mes, get_id_non_true_user, bot = bot) def get_id_non_true_user(message, bot): try: chat_id = message.chat.id Id = message.text func.add_non_true_user(Id) username = bot.get_chat(Id).username bot.send_message(chat_id, f"Теперь пользователь @{username} будет выигрывать") bot.send_message(message.chat.id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) except: error_message(message, bot) def delete_non_true_user(call, bot, user_data): chat_id = call.message.chat.id mes = bot.send_message(chat_id, "Введите Id пользователя, у которого будет недоступна функция подкрутки") bot.register_next_step_handler(mes, delete_non_true_user_step1, bot = bot) def delete_non_true_user_step1(message, bot): try: chat_id = message.chat.id Id = message.text func.delete_non_true_user(Id) username = bot.get_chat(Id).username bot.send_message(chat_id, f"Теперь пользователь @{username} не будет выигрывать") bot.send_message(message.chat.id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) except: error_message(message, bot) def get_last_message_support(call, bot, user_data): chat_id = call.message.chat.id quetion = func.get_last_quetion() if quetion != 0: username = bot.get_chat(quetion[0]).username bot.send_message(chat_id, f"Вопрос от @{username}\n\nСам вопрос {quetion[1]}", reply_markup = menu.answer_quetion_support(quetion[0])) else: bot.send_message(chat_id, "Вопросов нет") bot.send_message(call.message.chat.id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) def delete_quetion(call, bot, user_data): chat_id = call.message.chat.id quetion = func.get_last_quetion() username = bot.get_chat(quetion[0]).username func.delete_quetion(quetion[0]) bot.send_message(quetion[0], "Ваш запрос в поддержку был удален") bot.send_message(chat_id, f"Вы удалили вопрос от @{username}") bot.send_message(call.message.chat.id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) def answer_quetion(call, bot, user_data): chat_id = call.message.chat.id username = bot.get_chat(user_data).username mes = bot.send_message(chat_id, f"Введите ответ на вопрос от @{username}") bot.register_next_step_handler(mes, answer_quetion_step1, bot = bot, user_id = user_data) def answer_quetion_step1(message, bot, user_id): chat_id = message.chat.id answer = message.text quetion = func.get_last_quetion() func.delete_quetion(quetion[0]) username = bot.get_chat(quetion[0]).username bot.send_message(quetion[0], f"На ваш вопрос в поддержку был дан ответ\n\nВопрос:{quetion[1]}\n\nОтвет:{answer}") bot.send_message(chat_id, f"Вы ответили на вопрос вопрос от @{username}") bot.send_message(message.chat.id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) def add_answer(call, bot, message): chat_id = call.message.chat.id mes = bot.send_message(chat_id, "Введите вопрос") bot.register_next_step_handler(mes, add_answer_step1, bot = bot) def add_answer_step1(message, bot): chat_id = message.chat.id quetion = message.text mes = bot.send_message(chat_id, "Введите ответ на вопрос") bot.register_next_step_handler(mes, add_answer_step2, bot = bot, quetion = quetion) def add_answer_step2(message, bot, quetion): chat_id = message.chat.id hash = random.randint(1000000000000, 999999999999999) answer = message.text func.create_answer(hash, quetion, answer) bot.send_message(chat_id, "Вопрос создан") bot.send_message(message.chat.id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) def delete_answer(call, bot, user_data): chat_id = call.message.chat.id answers = func.get_all_answers() mes = "Введите хэш вопроса, который вы хотите удалить:\n" for i in answers: mes += str(i[0]) + " " + str(i[1]) + "\n" mes = bot.send_message(chat_id, mes) bot.register_next_step_handler(mes,delete_answer_step1, bot = bot) def delete_answer_step1(message, bot): chat_id = message.chat.id func.delete_answer(message.text) bot.send_message(chat_id, "Вопрос удален") bot.send_message(message.chat.id, "Добро пожаловать в меню администратора", reply_markup = menu.gen_admin_kb()) def main_support(message, bot): chat_id = message.chat.id bot.send_message(chat_id, '❓Бот работает полностью в автоматическом режиме. Перед написанием сообщения в службу поддержки просьба ознакомиться с разделом "Ответы на вопросы"', reply_markup = menu.gen_support_kb()) def rules(call, bot, user_data): chat_id = call.message.chat.id bot.send_message(chat_id, config.rules_bot, reply_markup = menu.return_support()) def support_call(call, bot, user_data): chat_id = call.message.chat.id bot.send_message(chat_id, '❓Бот работает полностью в автоматическом режиме. Перед написанием сообщения в службу поддержки просьба ознакомиться с разделом "Ответы на вопросы"', reply_markup = menu.gen_support_kb()) def create_support(call, bot, user_data): chat_id = call.message.chat.id if func.check_unik_quetion(chat_id): bot.register_next_step_handler(bot.send_message(chat_id, "Введите ваш вопрос, пожалуйста", reply_markup = menu.return_support()), get_support_message, bot = bot) else: bot.send_message(chat_id, "Перед созданием нового вопроса дождитесь ответ на старый") def get_support_message(message, bot): chat_id = message.chat.id func.create_support_quetion(chat_id, message.text) bot.send_message(chat_id, "Ваш вопрос отослан в поддержку, ожидайте ответа в течении 3-х дней") bot.send_message(chat_id, '❓Бот работает полностью в автоматическом режиме. Перед написанием сообщения в службу поддержки просьба ознакомиться с разделом "Ответы на вопросы"', reply_markup = menu.gen_support_kb()) def get_answers_message(call, bot, user_data): chat_id = call.message.chat.id bot.send_message(chat_id, "Выберите вопрос, который вас интересует", reply_markup = menu.create_answers_kb()) def get_answer(call, bot, user_data): chat_id = call.message.chat.id answer = func.get_answer_by_hash(user_data) bot.send_message(chat_id, f"Вопрос: {answer[1]}\n\nОтвет на вопрос {answer[2]}", reply_markup = menu.create_return_answers_kb())
52.030882
341
0.683418
5,268
35,381
4.324601
0.079727
0.087174
0.110131
0.070319
0.801247
0.758713
0.713985
0.682732
0.648451
0.617286
0
0.015973
0.210791
35,381
679
342
52.107511
0.797013
0.000537
0
0.563813
0
0.030695
0.180901
0.008535
0
0
0
0
0
1
0.132472
false
0.003231
0.003231
0
0.135703
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
fcb3a990e16c777ce06dfee05a577a5ba890f1bb
194
py
Python
kkutil/__init__.py
kaka19ace/kkutils
1ac449488d85ba2c6b18c5dc9cf77a0bc36579b1
[ "MIT" ]
1
2015-12-13T18:42:52.000Z
2015-12-13T18:42:52.000Z
kkutil/__init__.py
kaka19ace/kkutil
1ac449488d85ba2c6b18c5dc9cf77a0bc36579b1
[ "MIT" ]
null
null
null
kkutil/__init__.py
kaka19ace/kkutil
1ac449488d85ba2c6b18c5dc9cf77a0bc36579b1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @file __init__.py # from .common import * from .sugar import * from .config import Config from .loader import Loader from .regex import *
14.923077
26
0.664948
27
194
4.62963
0.62963
0.16
0
0
0
0
0
0
0
0
0
0.00641
0.195876
194
12
27
16.166667
0.794872
0.329897
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
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
fcc792485df591753c155c2454cff5ecc7ee2c69
276
py
Python
xmlsoccer/utils.py
LuberLinder/xmlsoccer
b79d80247b3cefd02eafa9db3931b714ea2b87c5
[ "MIT" ]
3
2019-11-26T12:31:22.000Z
2020-05-24T03:33:53.000Z
xmlsoccer/utils.py
LuberLinder/xmlsoccer
b79d80247b3cefd02eafa9db3931b714ea2b87c5
[ "MIT" ]
1
2018-12-05T15:02:26.000Z
2018-12-05T15:02:26.000Z
xmlsoccer/utils.py
LuberLinder/xmlsoccer
b79d80247b3cefd02eafa9db3931b714ea2b87c5
[ "MIT" ]
1
2018-11-12T20:39:02.000Z
2018-11-12T20:39:02.000Z
from datetime import datetime def parse_dt(s): try: return datetime.strptime(s.replace(":", ""), "%Y-%m-%dT%H%M%S%z") except ValueError: return datetime.strptime(s[:19], "%Y-%m-%dT%H:%M:%S") def parse_bool(s): return True if s == 'Yes' else False
27.6
73
0.601449
45
276
3.644444
0.533333
0.097561
0.268293
0.280488
0.085366
0.085366
0
0
0
0
0
0.00905
0.199275
276
10
74
27.6
0.733032
0
0
0
0
0
0.137184
0
0
0
0
0
0
1
0.25
false
0
0.125
0.125
0.75
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
1e1f7edd3cf4acdca3bc0a92b75c154e68475640
168
py
Python
docs/examples/source/wrap_text.py
seveas/github3.py
749656b8b3b282d11a4221bb84e48291ca23ecc6
[ "BSD-3-Clause" ]
4
2019-05-20T13:15:28.000Z
2019-05-23T04:49:47.000Z
docs/examples/source/wrap_text.py
seveas/github3.py
749656b8b3b282d11a4221bb84e48291ca23ecc6
[ "BSD-3-Clause" ]
4
2020-10-19T13:02:37.000Z
2020-10-25T19:01:25.000Z
docs/examples/source/wrap_text.py
seveas/github3.py
749656b8b3b282d11a4221bb84e48291ca23ecc6
[ "BSD-3-Clause" ]
3
2020-01-08T16:14:31.000Z
2021-10-31T21:35:54.000Z
import github3 import textwrap i = github3.issue('kennethreitz', 'requests', 868) for line in textwrap.wrap(i.body_text, 78, replace_whitespace=False): print line
24
69
0.761905
24
168
5.25
0.791667
0
0
0
0
0
0
0
0
0
0
0.047945
0.130952
168
6
70
28
0.815068
0
0
0
0
0
0.119048
0
0
0
0
0
0
0
null
null
0
0.4
null
null
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
4
1e28493c3c59becf5e25ffacef3dc7110a25cc1e
113
py
Python
proj/manageapp/apps.py
10sr/kvkv
10af20915852325849eb755bea2d0830eaf1f3f9
[ "Apache-2.0" ]
null
null
null
proj/manageapp/apps.py
10sr/kvkv
10af20915852325849eb755bea2d0830eaf1f3f9
[ "Apache-2.0" ]
3
2019-02-04T10:19:54.000Z
2020-04-17T09:12:49.000Z
proj/manageapp/apps.py
10sr/kvkv
10af20915852325849eb755bea2d0830eaf1f3f9
[ "Apache-2.0" ]
null
null
null
import django.apps class AppConfig(django.apps.AppConfig): name = "proj.manageapp" lavel = "manageapp"
16.142857
39
0.707965
13
113
6.153846
0.692308
0.25
0
0
0
0
0
0
0
0
0
0
0.176991
113
6
40
18.833333
0.860215
0
0
0
0
0
0.20354
0
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
1e2fc753ff5423b70da6d3da01cc9ce90aaa4211
102
py
Python
intern_xplorer_api/intern_xplorer/apps.py
NenadPantelic/Intern-xplorer
c1d6ea0ecf43fd1019a9c95cd436056d6bdaeb00
[ "MIT" ]
null
null
null
intern_xplorer_api/intern_xplorer/apps.py
NenadPantelic/Intern-xplorer
c1d6ea0ecf43fd1019a9c95cd436056d6bdaeb00
[ "MIT" ]
9
2020-11-17T13:30:51.000Z
2020-11-19T21:06:42.000Z
intern_xplorer_api/intern_xplorer/apps.py
NenadPantelic/Intern-xplorer
c1d6ea0ecf43fd1019a9c95cd436056d6bdaeb00
[ "MIT" ]
null
null
null
from django.apps import AppConfig class InternXplorerConfig(AppConfig): name = 'intern_xplorer'
17
37
0.784314
11
102
7.181818
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.147059
102
5
38
20.4
0.908046
0
0
0
0
0
0.137255
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
1e9f6c099622a7dff31b065e00afc9c83c59c9d0
129
py
Python
setup.py
indigo360/bluecat-openstack-drivers
f508f543e1b42629015a3bb658a70338d03b1861
[ "Apache-2.0" ]
1
2018-03-16T12:48:11.000Z
2018-03-16T12:48:11.000Z
setup.py
indigo360/bluecat-openstack-drivers
f508f543e1b42629015a3bb658a70338d03b1861
[ "Apache-2.0" ]
2
2018-03-19T07:12:03.000Z
2018-03-28T07:00:05.000Z
setup.py
indigo360/bluecat-openstack-drivers
f508f543e1b42629015a3bb658a70338d03b1861
[ "Apache-2.0" ]
null
null
null
import setuptools try: import multiprocessing except ImportError: pass setuptools.setup( setup_requires=['pbr'], pbr=True)
11.727273
24
0.775194
15
129
6.6
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.131783
129
10
25
12.9
0.883929
0
0
0
0
0
0.023256
0
0
0
0
0
0
1
0
true
0.125
0.375
0
0.375
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
0
0
0
4
1eaf65b04064b80680346636fa0bf4cfea96ca42
650
py
Python
api/helpers/secure.py
javier00vela/coupon-rfid
95c16809774f2d149fab695f60d7b60c714aac64
[ "BSD-2-Clause" ]
null
null
null
api/helpers/secure.py
javier00vela/coupon-rfid
95c16809774f2d149fab695f60d7b60c714aac64
[ "BSD-2-Clause" ]
null
null
null
api/helpers/secure.py
javier00vela/coupon-rfid
95c16809774f2d149fab695f60d7b60c714aac64
[ "BSD-2-Clause" ]
null
null
null
from jwt import encode ,decode from config import config from flask import request import base64 def encode_string(string): return string def generate_token(json): return encode({'payload' : json} , config.app.config["TOKEN"], algorithm='HS256') def validate_token(fun): def wrapper(): try: variable = "" payload = decode( variable , config.app.config["TOKEN"] ,algorithms=["HS256"]) if not payload: return {'message':'Unauthorized','status': 401} return fun() except: return {'message':'Unauthorized','status': 401} return wrapper
25
90
0.612308
70
650
5.642857
0.457143
0.04557
0.075949
0.101266
0.202532
0.202532
0
0
0
0
0
0.029474
0.269231
650
25
91
26
0.802105
0
0
0.105263
1
0
0.118827
0
0
0
0
0
0
1
0.210526
false
0
0.210526
0.105263
0.736842
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
1ebeed0bc9a75849a067aa7a2eb75da1bc85a0aa
746
py
Python
mealsdb/mealster_api/api/serializers.py
2achary/mealster
9cfafca36dfa19d125408ce304f95edf72798798
[ "MIT" ]
1
2017-11-06T15:01:55.000Z
2017-11-06T15:01:55.000Z
mealsdb/mealster_api/api/serializers.py
2achary/mealster
9cfafca36dfa19d125408ce304f95edf72798798
[ "MIT" ]
1
2018-02-13T21:10:58.000Z
2018-02-14T01:55:46.000Z
mealsdb/mealster_api/api/serializers.py
2achary/mealster
9cfafca36dfa19d125408ce304f95edf72798798
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User, Group from rest_framework import serializers from .models import Meal, MealItem, Ingredient, UnitOfMeasure class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = ('url', 'username', 'email', 'groups') class GroupSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Group fields = ('url', 'name') class MealSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Meal fields = ('name', 'serves', ) #'meal_items', class MealItemSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = MealItem fields = ('name', 'quantity')
26.642857
65
0.69571
68
746
7.602941
0.470588
0.286267
0.324952
0.355899
0.394584
0
0
0
0
0
0
0
0.203753
746
27
66
27.62963
0.87037
0.017426
0
0.210526
0
0
0.069672
0
0
0
0
0
0
1
0
false
0
0.157895
0
0.578947
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
949fa351e8cb7efe4e45717866efdf234be5da97
99
py
Python
secrets.py
P1N2O/CloudDump
c586f103db4095f61c826f18c52b67d57f750b61
[ "MIT" ]
10
2018-12-01T04:58:16.000Z
2021-09-23T07:46:45.000Z
secrets.py
P1N2O/CloudDump
c586f103db4095f61c826f18c52b67d57f750b61
[ "MIT" ]
null
null
null
secrets.py
P1N2O/CloudDump
c586f103db4095f61c826f18c52b67d57f750b61
[ "MIT" ]
2
2019-11-10T20:41:16.000Z
2022-01-25T17:19:06.000Z
from dotenv import load_dotenv load_dotenv() import os account_id = os.environ.get('account_id')
14.142857
41
0.787879
16
99
4.625
0.5625
0.324324
0
0
0
0
0
0
0
0
0
0
0.121212
99
6
42
16.5
0.850575
0
0
0
0
0
0.10101
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
94a07164113f3a10646ea72853155beb25d39096
972
py
Python
test/test_service_now_configurations_page_all_of.py
CiscoDevNet/python-msx-sdk
d7e0a08c656504b4f4551d263e67c671a2a04b3f
[ "MIT" ]
null
null
null
test/test_service_now_configurations_page_all_of.py
CiscoDevNet/python-msx-sdk
d7e0a08c656504b4f4551d263e67c671a2a04b3f
[ "MIT" ]
null
null
null
test/test_service_now_configurations_page_all_of.py
CiscoDevNet/python-msx-sdk
d7e0a08c656504b4f4551d263e67c671a2a04b3f
[ "MIT" ]
null
null
null
""" MSX SDK MSX SDK client. # noqa: E501 The version of the OpenAPI document: 1.0.9 Generated by: https://openapi-generator.tech """ import sys import unittest import python_msx_sdk from python_msx_sdk.model.service_now_configuration import ServiceNowConfiguration globals()['ServiceNowConfiguration'] = ServiceNowConfiguration from python_msx_sdk.model.service_now_configurations_page_all_of import ServiceNowConfigurationsPageAllOf class TestServiceNowConfigurationsPageAllOf(unittest.TestCase): """ServiceNowConfigurationsPageAllOf unit test stubs""" def setUp(self): pass def tearDown(self): pass def testServiceNowConfigurationsPageAllOf(self): """Test ServiceNowConfigurationsPageAllOf""" # FIXME: construct object with mandatory attributes with example values # model = ServiceNowConfigurationsPageAllOf() # noqa: E501 pass if __name__ == '__main__': unittest.main()
25.578947
105
0.748971
96
972
7.364583
0.572917
0.042433
0.050919
0.045262
0.087694
0.087694
0.087694
0
0
0
0
0.011278
0.179012
972
37
106
26.27027
0.874687
0.353909
0
0.2
1
0
0.052365
0.038851
0
0
0
0.027027
0
1
0.2
false
0.2
0.333333
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
1
0
0
0
0
1
1
0
0
0
0
4
94fca15a5e4f9229688128691da381c1b27575e3
204
py
Python
utils/models.py
zinaukarenku/zkr-platform
8daf7d1206c482f1f8e0bcd54d4fde783e568774
[ "Apache-2.0" ]
2
2018-11-16T21:45:17.000Z
2019-02-03T19:55:46.000Z
utils/models.py
zinaukarenku/zkr-platform
8daf7d1206c482f1f8e0bcd54d4fde783e568774
[ "Apache-2.0" ]
13
2018-08-17T19:12:11.000Z
2022-03-11T23:27:41.000Z
utils/models.py
zinaukarenku/zkr-platform
8daf7d1206c482f1f8e0bcd54d4fde783e568774
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from typing import Optional @dataclass(frozen=True) class RequestInformation: client_ip: str client_user_agent: Optional[str] client_country: Optional[str]
20.4
36
0.789216
25
204
6.28
0.64
0.11465
0
0
0
0
0
0
0
0
0
0
0.151961
204
9
37
22.666667
0.907514
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.285714
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
0
0
1
0
0
4
bf79634065cc346348b3272f9c63085ef97c9d5e
134
py
Python
executor/__init__.py
Reed-CompBio/GrapheryExecutor
5692a06c9f4322fd2c6233eac487c653d2fd558f
[ "MIT" ]
null
null
null
executor/__init__.py
Reed-CompBio/GrapheryExecutor
5692a06c9f4322fd2c6233eac487c653d2fd558f
[ "MIT" ]
null
null
null
executor/__init__.py
Reed-CompBio/GrapheryExecutor
5692a06c9f4322fd2c6233eac487c653d2fd558f
[ "MIT" ]
null
null
null
from .settings import SERVER_VERSION from .utils.cli import main __version__ = SERVER_VERSION if __name__ == "__main__": main()
16.75
36
0.753731
17
134
5.117647
0.588235
0.298851
0
0
0
0
0
0
0
0
0
0
0.164179
134
7
37
19.142857
0.776786
0
0
0
0
0
0.059701
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
bfa496abb8ea30fe3374ac64783714d7d53d4e8e
104
py
Python
common/custom_libraries/etc/canonicalpath.py
sainarala421/RobotFrameworkAppiumWorkspace
32f3cbbb0456409d8d55189349aed19d6c254fd8
[ "MIT" ]
1
2021-01-09T21:13:22.000Z
2021-01-09T21:13:22.000Z
common/custom_libraries/etc/canonicalpath.py
sainarala421/RobotFrameworkAppiumWorkspace
32f3cbbb0456409d8d55189349aed19d6c254fd8
[ "MIT" ]
null
null
null
common/custom_libraries/etc/canonicalpath.py
sainarala421/RobotFrameworkAppiumWorkspace
32f3cbbb0456409d8d55189349aed19d6c254fd8
[ "MIT" ]
null
null
null
import os def get_canonical_path(abspath): canpath = os.path.realpath(abspath) return canpath
14.857143
39
0.740385
14
104
5.357143
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.182692
104
6
40
17.333333
0.882353
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
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
bfc2cdfd82e65b6e78314bd6dc9c113582a43a8b
8,998
py
Python
cctbx/eltbx/e_scattering.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
cctbx/eltbx/e_scattering.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
cctbx/eltbx/e_scattering.py
rimmartin/cctbx_project
644090f9432d9afc22cfb542fc3ab78ca8e15e5d
[ "BSD-3-Clause-LBNL" ]
null
null
null
from __future__ import division from cctbx.eltbx.xray_scattering import gaussian # http://it.iucr.org/Cb/ch4o3v0001/sec4o3o2/ 2011-04-25 # Elastic atomic scattering factors of electrons for neutral atoms # and s up to 2.0 A^-1 ito_vol_c_2011_table_4_3_2_2 = """\ H 1 0.0349 0.1201 0.1970 0.0573 0.1195 0.5347 3.5867 12.3471 18.9525 38.6269 He 2 0.0317 0.0838 0.1526 0.1334 0.0164 0.2507 1.4751 4.4938 12.6646 31.1653 Li 3 0.0750 0.2249 0.5548 1.4954 0.9354 0.3864 2.9383 15.3829 53.5545 138.7337 Be 4 0.0780 0.2210 0.6740 1.3867 0.6925 0.3131 2.2381 10.1517 30.9061 78.3273 B 5 0.0909 0.2551 0.7738 1.2136 0.4606 0.2995 2.1155 8.3816 24.1292 63.1314 C 6 0.0893 0.2563 0.7570 1.0487 0.3575 0.2465 1.7100 6.4094 18.6113 50.2523 N 7 0.1022 0.3219 0.7982 0.8197 0.1715 0.2451 1.7481 6.1925 17.3894 48.1431 O 8 0.0974 0.2921 0.6910 0.6990 0.2039 0.2067 1.3815 4.6943 12.7105 32.4726 F 9 0.1083 0.3175 0.6487 0.5846 0.1421 0.2057 1.3439 4.2788 11.3932 28.7881 Ne 10 0.1269 0.3535 0.5582 0.4674 0.1460 0.2200 1.3779 4.0203 9.4934 23.1278 Na 11 0.2142 0.6853 0.7692 1.6589 1.4482 0.3334 2.3446 10.0830 48.3037 138.2700 Mg 12 0.2314 0.6866 0.9677 2.1882 1.1339 0.3278 2.2720 10.9241 39.2898 101.9748 Al 13 0.2390 0.6573 1.2011 2.5586 1.2312 0.3138 2.1063 10.4163 34.4552 98.5344 Si 14 0.2519 0.6372 1.3795 2.5082 1.0500 0.3075 2.0174 9.6746 29.3744 80.4732 P 15 0.2548 0.6106 1.4541 2.3204 0.8477 0.2908 1.8740 8.5176 24.3434 63.2996 S 16 0.2497 0.5628 1.3899 2.1865 0.7715 0.2681 1.6711 7.0267 19.5377 50.3888 Cl 17 0.2443 0.5397 1.3919 2.0197 0.6621 0.2468 1.5242 6.1537 16.6687 42.3086 Ar 18 0.2385 0.5017 1.3428 1.8899 0.6079 0.2289 1.3694 5.2561 14.0928 35.5361 K 19 0.4115 1.4031 2.2784 2.6742 2.2162 0.3703 3.3874 13.1029 68.9592 194.4329 Ca 20 0.4054 1.3880 2.1602 3.7532 2.2063 0.3499 3.0991 11.9608 53.9353 142.3892 Sc 21 0.3787 1.2181 2.0594 3.2618 2.3870 0.3133 2.5856 9.5813 41.7688 116.7282 Ti 22 0.3825 1.2598 2.0008 3.0617 2.0694 0.3040 2.4863 9.2783 39.0751 109.4583 V 23 0.3876 1.2750 1.9109 2.8314 1.8979 0.2967 2.3780 8.7981 35.9528 101.7201 Cr 24 0.4046 1.3696 1.8941 2.0800 1.2196 0.2986 2.3958 9.1406 37.4701 113.7121 Mn 25 0.3796 1.2094 1.7815 2.5420 1.5937 0.2699 2.0455 7.4726 31.0604 91.5622 Fe 26 0.3946 1.2725 1.7031 2.3140 1.4795 0.2717 2.0443 7.6007 29.9714 86.2265 Co 27 0.4118 1.3161 1.6493 2.1930 1.2830 0.2742 2.0372 7.7205 29.9680 84.9383 Ni 28 0.3860 1.1765 1.5451 2.0730 1.3814 0.2478 1.7660 6.3107 25.2204 74.3146 Cu 29 0.4314 1.3208 1.5236 1.4671 0.8562 0.2694 1.9223 7.3474 28.9892 90.6246 Zn 30 0.4288 1.2646 1.4472 1.8294 1.0934 0.2593 1.7998 6.7500 25.5860 73.5284 Ga 31 0.4818 1.4032 1.6561 2.4605 1.1054 0.2825 1.9785 8.7546 32.5238 98.5523 Ge 32 0.4655 1.3014 1.6088 2.6998 1.3003 0.2647 1.7926 7.6071 26.5541 77.5238 As 33 0.4517 1.2229 1.5852 2.7958 1.2638 0.2493 1.6436 6.8154 22.3681 62.0390 Se 34 0.4477 1.1678 1.5843 2.8087 1.1956 0.2405 1.5442 6.3231 19.4610 52.0233 Br 35 0.4798 1.1948 1.8695 2.6953 0.8203 0.2504 1.5963 6.9653 19.8492 50.3233 Kr 36 0.4546 1.0993 1.7696 2.7068 0.8672 0.2309 1.4279 5.9449 16.6752 42.2243 Rb 37 1.0160 2.8528 3.5466 -7.7804 12.1148 0.4853 5.0925 25.7851 130.4515 138.6775 Sr 38 0.6703 1.4926 3.3368 4.4600 3.1501 0.3190 2.2287 10.3504 52.3291 151.2216 Y 39 0.6894 1.5474 3.2450 4.2126 2.9764 0.3189 2.2904 10.0062 44.0771 125.0120 Zr 40 0.6719 1.4684 3.1668 3.9557 2.8920 0.3036 2.1249 8.9236 36.8458 108.2049 Nb 41 0.6123 1.2677 3.0348 3.3841 2.3683 0.2709 1.7683 7.2489 27.9465 98.5624 Mo 42 0.6773 1.4798 3.1788 3.0824 1.8384 0.2920 2.0606 8.1129 30.5336 100.0658 Tc 43 0.7082 1.6392 3.1993 3.4327 1.8711 0.2976 2.2106 8.5246 33.1456 96.6377 Ru 44 0.6735 1.4934 3.0966 2.7254 1.5597 0.2773 1.9716 7.3249 26.6891 90.5581 Rh 45 0.6413 1.3690 2.9854 2.6952 1.5433 0.2580 1.7721 6.3854 23.2549 85.1517 Pd 46 0.5904 1.1775 2.6519 2.2875 0.8689 0.2324 1.5019 5.1591 15.5428 46.8213 Ag 47 0.6377 1.3790 2.8294 2.3631 1.4553 0.2466 1.6974 5.7656 20.0943 76.7372 Cd 48 0.6364 1.4247 2.7802 2.5973 1.7886 0.2407 1.6823 5.6588 20.7219 69.1109 In 49 0.6768 1.6589 2.7740 3.1835 2.1326 0.2522 1.8545 6.2936 25.1457 84.5448 Sn 50 0.7224 1.9610 2.7161 3.5603 1.8972 0.2651 2.0604 7.3011 27.5493 81.3349 Sb 51 0.7106 1.9247 2.6149 3.8322 1.8899 0.2562 1.9646 6.8852 24.7648 68.9168 Te 52 0.6947 1.8690 2.5356 4.0013 1.8955 0.2459 1.8542 6.4411 22.1730 59.2206 I 53 0.7047 1.9484 2.5940 4.1526 1.5057 0.2455 1.8638 6.7639 21.8007 56.4395 Xe 54 0.6737 1.7908 2.4129 4.2100 1.7058 0.2305 1.6890 5.8218 18.3928 47.2496 Cs 55 1.2704 3.8018 5.6618 0.9205 4.8105 0.4356 4.2058 23.4342 136.7783 171.7561 Ba 56 0.9049 2.6076 4.8498 5.1603 4.7388 0.3066 2.4363 12.1821 54.6135 161.9978 La 57 0.8405 2.3863 4.6139 5.1514 4.7949 0.2791 2.1410 10.3400 41.9148 132.0204 Ce 58 0.8551 2.3915 4.5772 5.0278 4.5118 0.2805 2.1200 10.1808 42.0633 130.9893 Pr 59 0.9096 2.5313 4.5266 4.6376 4.3690 0.2939 2.2471 10.8266 48.8842 147.6020 Nd 60 0.8807 2.4183 4.4448 4.6858 4.1725 0.2802 2.0836 10.0357 47.4506 146.9976 Pm 61 0.9471 2.5463 4.3523 4.4789 3.9080 0.2977 2.2276 10.5762 49.3619 145.3580 Sm 62 0.9699 2.5837 4.2778 4.4575 3.5985 0.3003 2.2447 10.6487 50.7994 146.4179 Eu 63 0.8694 2.2413 3.9196 3.9694 4.5498 0.2653 1.8590 8.3998 36.7397 125.7089 Gd 64 0.9673 2.4702 4.1148 4.4972 3.2099 0.2909 2.1014 9.7067 43.4270 125.9474 Tb 65 0.9325 2.3673 3.8791 3.9674 3.7996 0.2761 1.9511 8.9296 41.5937 131.0122 Dy 66 0.9505 2.3705 3.8218 4.0471 3.4451 0.2773 1.9469 8.8862 43.0938 133.1396 Ho 67 0.9248 2.2428 3.6182 3.7910 3.7912 0.2660 1.8183 7.9655 33.1129 101.8139 Er 68 1.0373 2.4824 3.6558 3.8925 3.0056 0.2944 2.0797 9.4156 45.8056 132.7720 Tm 69 1.0075 2.3787 3.5440 3.6932 3.1759 0.2816 1.9486 8.7162 41.8420 125.0320 Yb 70 1.0347 2.3911 3.4619 3.6556 3.0052 0.2855 1.9679 8.7619 42.3304 125.6499 Lu 71 0.9927 2.2436 3.3554 3.7813 3.0994 0.2701 1.8073 7.8112 34.4849 103.3526 Hf 72 1.0295 2.2911 3.4110 3.9497 2.4925 0.2761 1.8625 8.0961 34.2712 98.5295 Ta 73 1.0190 2.2291 3.4097 3.9252 2.2679 0.2694 1.7962 7.6944 31.0942 91.1089 W 74 0.9853 2.1167 3.3570 3.7981 2.2798 0.2569 1.6745 7.0098 26.9234 81.3910 Re 75 0.9914 2.0858 3.4531 3.8812 1.8526 0.2548 1.6518 6.8845 26.7234 81.7215 Os 76 0.9813 2.0322 3.3665 3.6235 1.9741 0.2487 1.5973 6.4737 23.2817 70.9254 Ir 77 1.0194 2.0645 3.4425 3.4914 1.6976 0.2554 1.6475 6.5966 23.2269 70.0272 Pt 78 0.9148 1.8096 3.2134 3.2953 1.5754 0.2263 1.3813 5.3243 17.5987 60.0171 Au 79 0.9674 1.8916 3.3993 3.0524 1.2607 0.2358 1.4712 5.6758 18.7119 61.5286 Hg 80 1.0033 1.9469 3.4396 3.1548 1.4180 0.2413 1.5298 5.8009 19.4520 60.5753 Tl 81 1.0689 2.1038 3.6039 3.4927 1.8283 0.2540 1.6715 6.3509 23.1531 78.7099 Pb 82 1.0891 2.1867 3.6160 3.8031 1.8994 0.2552 1.7174 6.5131 23.9170 74.7039 Bi 83 1.1007 2.2306 3.5689 4.1549 2.0382 0.2546 1.7351 6.4948 23.6464 70.3780 Po 84 1.1568 2.4353 3.6459 4.4064 1.7179 0.2648 1.8786 7.1749 25.1766 69.2821 At 85 1.0909 2.1976 3.3831 4.6700 2.1277 0.2466 1.6707 6.0197 20.7657 57.2663 Rn 86 1.0756 2.1630 3.3178 4.8852 2.0489 0.2402 1.6169 5.7644 19.4568 52.5009 Fr 87 1.4282 3.5081 5.6767 4.1964 3.8946 0.3183 2.6889 13.4816 54.3866 200.8321 Ra 88 1.3127 3.1243 5.2988 5.3891 5.4133 0.2887 2.2897 10.8276 43.5389 145.6109 Ac 89 1.3128 3.1021 5.3385 5.9611 4.7562 0.2861 2.2509 10.5287 41.7796 128.2973 Th 90 1.2553 2.9178 5.0862 6.1206 4.7122 0.2701 2.0636 9.3051 34.5977 107.9200 Pa 91 1.3218 3.1444 5.4371 5.6444 4.0107 0.2827 2.2250 10.2454 41.1162 124.4449 U 92 1.3382 3.2043 5.4558 5.4839 3.6342 0.2838 2.2452 10.2519 41.7251 124.9023 Np 93 1.5193 4.0053 6.5327 -.1402 6.7489 0.3213 2.8206 14.8878 68.9103 81.7257 Pu 94 1.3517 3.2937 5.3213 4.6466 3.5714 0.2813 2.2418 9.9952 42.7939 132.1739 Am 95 1.2135 2.7962 4.7545 4.5731 4.4786 0.2483 1.8437 7.5421 29.3841 112.4579 Cm 96 1.2937 3.1100 5.0393 4.7546 3.5031 0.2638 2.0341 8.7101 35.2992 109.4972 Bk 97 1.2915 3.1023 4.9309 4.6009 3.4661 0.2611 2.0023 8.4377 34.1559 105.8911 Cf 98 1.2089 2.7391 4.3482 4.0047 4.6497 0.2421 1.7487 6.7262 23.2153 80.3108 """.splitlines() __cache = None def __get_cache(): global __cache if (__cache is None): from cctbx.eltbx.xray_scattering import get_standard_label from libtbx.containers import OrderedDict __cache = OrderedDict() assert len(ito_vol_c_2011_table_4_3_2_2) == 98 for line in ito_vol_c_2011_table_4_3_2_2: flds = line.split() assert len(flds) == 12 std_lbl = get_standard_label(flds[0], exact=True) assert flds[0] == std_lbl assert std_lbl not in __cache assert flds[1] == str(len(__cache)+1) def vals(i,j): return [float(s) for s in flds[i:j]] array_of_a = vals(2,7) array_of_b = vals(7,12) __cache[std_lbl] = gaussian(array_of_a, array_of_b) return __cache def ito_vol_c_2011_table_4_3_2_2_elements(): return __get_cache().keys() def ito_vol_c_2011_table_4_3_2_2_entry_as_gaussian(label, exact=False): from cctbx.eltbx import xray_scattering std_lbl = xray_scattering.get_standard_label(label=label, exact=exact) return __get_cache().get(std_lbl)
66.161765
82
0.721271
2,379
8,998
2.687264
0.515343
0.005631
0.005475
0.008603
0.027217
0.027217
0.016581
0.016581
0.016581
0.007195
0
0.713647
0.155479
8,998
135
83
66.651852
0.127648
0.01567
0
0
0
0.765625
0.868858
0
0
0
0
0
0.039063
1
0.03125
false
0
0.039063
0.015625
0.09375
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
bfcb59a1422408f7e1634a8ee915d59e491a06ec
280
py
Python
mlrose_hiive/algorithms/mutators/__init__.py
sridatta/mlrose
d9fe33df157bd801a33b13a803d737c4f8e48ebb
[ "BSD-3-Clause" ]
63
2019-09-24T14:09:51.000Z
2022-03-09T02:36:25.000Z
mlrose_hiive/algorithms/mutators/__init__.py
kunla/mlrose
306c96b156182a847f5c9e6ffb62eb805d266fef
[ "BSD-3-Clause" ]
6
2019-10-04T01:04:21.000Z
2021-08-31T19:06:13.000Z
mlrose_hiive/algorithms/mutators/__init__.py
kunla/mlrose
306c96b156182a847f5c9e6ffb62eb805d266fef
[ "BSD-3-Clause" ]
104
2019-09-23T22:44:43.000Z
2022-03-13T18:50:53.000Z
""" GA Mutators.""" # Author: Genevieve Hayes # Modified: Andrew Rollings # License: BSD 3 clause from .change_one_mutator import ChangeOneMutator from .discrete_mutator import DiscreteMutator from .swap_mutator import SwapMutator from .shift_one_mutator import ShiftOneMutator
25.454545
48
0.817857
34
280
6.558824
0.705882
0.233184
0.143498
0
0
0
0
0
0
0
0
0.004065
0.121429
280
10
49
28
0.902439
0.303571
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
44a779b9b975dca43096036a76a292dc84298c4d
86
py
Python
demo/resources/Hello.py
tinghaoMa/python
10a2180468e1e20e5b9f09c253d119587b6fe5b3
[ "Apache-2.0" ]
null
null
null
demo/resources/Hello.py
tinghaoMa/python
10a2180468e1e20e5b9f09c253d119587b6fe5b3
[ "Apache-2.0" ]
null
null
null
demo/resources/Hello.py
tinghaoMa/python
10a2180468e1e20e5b9f09c253d119587b6fe5b3
[ "Apache-2.0" ]
null
null
null
#!/user/bin/python # -*- coding: utf-8 -*- """ 文件读取 测试 """ print('hello world')
10.75
24
0.511628
11
86
4
1
0
0
0
0
0
0
0
0
0
0
0.014706
0.209302
86
7
25
12.285714
0.632353
0.55814
0
0
0
0
0.44
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
44c428933ad3fa2a4c0d87e8fd1209fd43fd2e49
106
py
Python
sample_script.py
matteofigliuzzi/IVF_extremes
c5dd97556d25f3e40a19422185815ffc7dad17e1
[ "MIT" ]
null
null
null
sample_script.py
matteofigliuzzi/IVF_extremes
c5dd97556d25f3e40a19422185815ffc7dad17e1
[ "MIT" ]
null
null
null
sample_script.py
matteofigliuzzi/IVF_extremes
c5dd97556d25f3e40a19422185815ffc7dad17e1
[ "MIT" ]
null
null
null
filename='data/Sample_IVF_data.csv' import IVF_extremes.batch_check as IVF_analyzer IVF_analyzer(filename)
35.333333
47
0.877358
17
106
5.117647
0.647059
0.252874
0
0
0
0
0
0
0
0
0
0
0.04717
106
3
48
35.333333
0.861386
0
0
0
0
0
0.224299
0.224299
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
4
44e9c5a3116fb36b5459e94d8cbe5be6b2e3bb49
146
py
Python
jupyter/password.py
panchohumeres/state-of-open-data
3a648730bd3da4f54f32467910453a5221e91e86
[ "MIT" ]
4
2020-08-10T07:35:10.000Z
2022-03-31T23:03:32.000Z
jupyter/password.py
panchohumeres/superJupyter
cc0ce98da2c58a7ab0ae502b5b07250db0c78b89
[ "MIT" ]
2
2021-02-02T22:51:16.000Z
2021-06-02T02:19:17.000Z
jupyter/password.py
panchohumeres/state-of-open-data
3a648730bd3da4f54f32467910453a5221e91e86
[ "MIT" ]
1
2022-02-08T01:46:19.000Z
2022-02-08T01:46:19.000Z
from notebook.auth import passwd import os PASSWORD=os.environ['PASSWORD'] with open('/tmp/sha1-psswd', 'w') as f: f.write(passwd(PASSWORD))
20.857143
39
0.719178
23
146
4.565217
0.73913
0
0
0
0
0
0
0
0
0
0
0.007813
0.123288
146
7
40
20.857143
0.8125
0
0
0
0
0
0.163265
0
0
0
0
0
0
1
0
false
0.6
0.4
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
4
78075a6005f21e48f6d585d7e9b58d6ee0be0091
400
py
Python
soil_moisture_bp.py
bUsernameIsUnavailable/Proiect-Inginerie-Software
4dae6a079bd16ad970eb63aa907159e87aa565b8
[ "MIT" ]
null
null
null
soil_moisture_bp.py
bUsernameIsUnavailable/Proiect-Inginerie-Software
4dae6a079bd16ad970eb63aa907159e87aa565b8
[ "MIT" ]
3
2022-01-31T18:18:03.000Z
2022-02-01T22:24:25.000Z
soil_moisture_bp.py
bUsernameIsUnavailable/Proiect-Inginerie-Software
4dae6a079bd16ad970eb63aa907159e87aa565b8
[ "MIT" ]
3
2022-02-02T15:10:56.000Z
2022-02-03T16:49:08.000Z
from flask import Blueprint from auth import login_required import soil_moisture bp = Blueprint('soil_moisture_bp', __name__, url_prefix='/soil_moisture') @bp.route('/', methods=['GET']) @login_required def get_soil_moisture(): return soil_moisture.get_soil_moisture() @bp.route('/set', methods=['POST']) @login_required def set_soil_moisture(): return soil_moisture.set_soil_moisture()
22.222222
73
0.7675
55
400
5.181818
0.363636
0.378947
0.196491
0.133333
0.210526
0
0
0
0
0
0
0
0.105
400
17
74
23.529412
0.796089
0
0
0.166667
0
0
0.105
0
0
0
0
0
0
1
0.166667
false
0
0.25
0.166667
0.583333
0.166667
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
780841934c6762867c0b71eda04ce969da9f5f52
1,352
py
Python
utils/time_utilities.py
spoofer-ix/spoofer-ix
31471c827d9ce400ac03020cfa14f967804f083c
[ "MIT" ]
2
2020-12-19T08:25:39.000Z
2021-03-10T05:29:17.000Z
utils/time_utilities.py
spoofer-ix/spoofer-ix
31471c827d9ce400ac03020cfa14f967804f083c
[ "MIT" ]
null
null
null
utils/time_utilities.py
spoofer-ix/spoofer-ix
31471c827d9ce400ac03020cfa14f967804f083c
[ "MIT" ]
1
2020-02-25T17:26:47.000Z
2020-02-25T17:26:47.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime def time_in_range(start, end, x): """ Return true if x is in the range [start, end] """ if start <= end: return start <= x <= end else: return start <= x or x <= end def formated_date(timestamp): return datetime.datetime.fromtimestamp(int(timestamp)).strftime("%Y-%m-%d %H:%M:%S") def full_formated_date(timestamp): return datetime.datetime.fromtimestamp(int(timestamp)).strftime("%Y-%m-%d %H:%M:%S.%f") def short_formated_date(timestamp): return datetime.datetime.fromtimestamp(int(timestamp)).strftime("%Y-%m-%d") def time_now(): return int(datetime.datetime.utcnow().strftime("%s")) def ts_to_date(ts): return datetime.datetime.fromtimestamp(int(ts)) def date_to_ts(dt): return int(dt.strftime("%s")) def ymd_to_date(year, month, day): return datetime.datetime(year, month, day) def strf_to_date(str_formated_date): return datetime.datetime.strptime(str_formated_date, '%Y-%m-%d %H:%M:%S') def strff_to_date(str_formated_date): return datetime.datetime.strptime(str_formated_date, '%Y-%m-%d %H:%M:%S.%f') def strsf_to_date(str_short_formated_date): return datetime.datetime.strptime(str_short_formated_date, '%Y-%m-%d') def epoch(): return ymd_to_date(1970, 1, 1) EPOCH = epoch()
21.806452
91
0.680473
206
1,352
4.291262
0.262136
0.122172
0.199095
0.158371
0.56448
0.504525
0.504525
0.446833
0.437783
0.437783
0
0.006135
0.156065
1,352
61
92
22.163934
0.768624
0.065089
0
0
0
0
0.075381
0
0
0
0
0
0
1
0.413793
false
0
0.034483
0.37931
0.896552
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
0
1
1
0
0
4
78161988ab675df96144f9a693f9f7e09424186e
85
py
Python
source/specs/apps.py
rubiorubio/online-shop
75b15cc9834a3548fe4beb67a34aca33d2df9b3d
[ "Apache-2.0" ]
null
null
null
source/specs/apps.py
rubiorubio/online-shop
75b15cc9834a3548fe4beb67a34aca33d2df9b3d
[ "Apache-2.0" ]
null
null
null
source/specs/apps.py
rubiorubio/online-shop
75b15cc9834a3548fe4beb67a34aca33d2df9b3d
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class SpecsConfig(AppConfig): name = 'specs'
14.166667
33
0.741176
10
85
6.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.176471
85
5
34
17
0.9
0
0
0
0
0
0.058824
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
782e26cfc259b09c8fc64e6ac5339d3fa2958c21
31
py
Python
example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Spheroidal Wave Functions/obl_rad2_cv Oblate spheroidal radial function obl_rad2 for precomputed characteristic value.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Spheroidal Wave Functions/obl_rad2_cv Oblate spheroidal radial function obl_rad2 for precomputed characteristic value.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Spheroidal Wave Functions/obl_rad2_cv Oblate spheroidal radial function obl_rad2 for precomputed characteristic value.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
1
2021-02-04T04:51:48.000Z
2021-02-04T04:51:48.000Z
special.obl_rad2_cv(m,n,c,cv,x)
31
31
0.774194
9
31
2.444444
0.888889
0
0
0
0
0
0
0
0
0
0
0.032258
0
31
1
31
31
0.677419
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
78569bb0cbc69dc56fa2e5f96b72f86c7cc32ba2
170
py
Python
content/07_design_patterns_in_python/singleton.py
aviadr1/learn-python3
e90f05aa026772c6db7fd4f3ccc2518d983ac4fa
[ "MIT" ]
null
null
null
content/07_design_patterns_in_python/singleton.py
aviadr1/learn-python3
e90f05aa026772c6db7fd4f3ccc2518d983ac4fa
[ "MIT" ]
null
null
null
content/07_design_patterns_in_python/singleton.py
aviadr1/learn-python3
e90f05aa026772c6db7fd4f3ccc2518d983ac4fa
[ "MIT" ]
null
null
null
def make_singleton(class_): def __new__(cls, *args, **kwargs): raise Exception('class', cls.__name__, 'is a singleton') class_.__new__ = __new__
28.333333
64
0.635294
20
170
4.45
0.65
0.314607
0
0
0
0
0
0
0
0
0
0
0.235294
170
5
65
34
0.684615
0
0
0
0
0
0.111765
0
0
0
0
0
0
1
0.5
false
0
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
7889500595c40fa7e6638113c98e7696a98ad40b
4,251
py
Python
src/code_generation/MIPS/ast.py
stdevAdrianPaez/cool-compiler-2020
7a783a0a69eabe9d7c80bdeddeabbb9d06445aba
[ "MIT" ]
null
null
null
src/code_generation/MIPS/ast.py
stdevAdrianPaez/cool-compiler-2020
7a783a0a69eabe9d7c80bdeddeabbb9d06445aba
[ "MIT" ]
null
null
null
src/code_generation/MIPS/ast.py
stdevAdrianPaez/cool-compiler-2020
7a783a0a69eabe9d7c80bdeddeabbb9d06445aba
[ "MIT" ]
null
null
null
class Node: pass class BinaryNode(Node): def __init__(self, des, src1, src2): self.des=des self.src1=src1 self.src2=src2 class AdduNode(BinaryNode): def __str__(self): return f'addu {self.des}, {self.src1}, {self.src2}' class MuloNode(BinaryNode): def __str__(self): return f'mulo {self.des}, {self.src1}, {self.src2}' class DivuNode(BinaryNode): def __str__(self): return f'divu {self.des}, {self.src1}, {self.src2}' class SubuNode(BinaryNode): def __str__(self): return f'subu {self.des}, {self.src1}, {self.src2}' class SeqNode(BinaryNode): def __str__(self): return f'seq {self.des}, {self.src1}, {self.src2}' class SneNode(BinaryNode): def __str__(self): return f'sne {self.des}, {self.src1}, {self.src2}' class SgeuNode(BinaryNode): def __str__(self): return f'sgeu {self.des}, {self.src1}, {self.src2}' class SgtuNode(BinaryNode): def __str__(self): return f'sgtu {self.des}, {self.src1}, {self.src2}' class SleuNode(BinaryNode): def __str__(self): return f'sleu {self.des}, {self.src1}, {self.src2}' class SltuNode(BinaryNode): def __str__(self): return f'sltu {self.des}, {self.src1}, {self.src2}' class BNode(Node): def __init__(self, lab): self.lab=lab def __str__(self): return f'b {self.lab}' class BeqzNode(Node): def __init__(self,src, lab): self.src=src self.lab=lab def __str__(self): return f'beqz {self.src}, {self.lab}' class JNode(Node): def __init__(self, lab): self.lab=lab def __str__(self): return f'j {self.lab}' class JrNode(Node): def __init__(self, src): self.src=src def __str__(self): return f'jr {self.src}' class AddressNode(Node): pass class ConstAddrNode(AddressNode): def __init__(self, const): self.const=const def __str__(self): return self.const class RegAddrNode(AddressNode): def __init__(self, reg, const=None): self.const=const self.reg=reg def __str__(self): if self.const: return f'{self.const}({self.reg})' else: return f'({self.reg})' class SymbolAddrNode(AddressNode): def __init__(self, symbol, const=None, reg=None): self.symbol=symbol self.const=const self.reg=reg def __str__(self): if self.const and self.reg: return f'{self.symbol} + {self.const}({self.reg})' if self.const: return f'{self.symbol} + {self.const}' return self.symbol class LoadAddrNode(Node): def __init__(self, des, addr): self.des=des self.addr=addr class LaNode(LoadAddrNode): def __str__(self): return f'la {self.des}, {self.addr}' class LbuNode(LoadAddrNode): def __str__(self): return f'lbu {self.des}, {self.addr}' class LhuNode(LoadAddrNode): def __str__(self): return f'lhu {self.des}, {self.addr}' class LwNode(LoadAddrNode): def __str__(self): return f'lw {self.des}, {self.addr}' class Ulhu(LoadAddrNode): def __str__(self): return f'ulhu {self.des}, {self.addr}' class Ulw(LoadAddrNode): def __str__(self): return f'ulw {self.des}, {self.addr}' class LoadConstNode(Node): def __init__(self, des, const): self.des=des self.const=const class LuiNode(LoadConstNode): def __str__(self): return f'lui {self.des}, {self.const}' class LiNode(LoadConstNode): def __str__(self): return f'li {self.des}, {self.const}' class Move(Node): def __init__(self, src, des): self.des=des self.src=src def __str__(self): return f'move {self.des}, {self.src}' class UnaryNode(Node): def __init__(self, des, src): self.des=des self.src=src class NotNode(UnaryNode): def __str__(self): return f'la {self.des}, {self.src}' class SyscallNode(Node): def __str__(self): return 'syscall'
22.373684
62
0.584568
541
4,251
4.297597
0.140481
0.087312
0.12043
0.178925
0.643441
0.512688
0.258495
0.138065
0.103226
0.077419
0
0.008469
0.277817
4,251
190
63
22.373684
0.74886
0
0
0.390977
0
0
0.200141
0.011289
0
0
0
0
0
1
0.300752
false
0.015038
0
0.195489
0.789474
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
78899c1d8641f4fdd21ff9e8611614c99cec95e0
39
py
Python
tests/rate_distortion/__init__.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
1
2020-03-13T10:30:11.000Z
2020-03-13T10:30:11.000Z
tests/rate_distortion/__init__.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
null
null
null
tests/rate_distortion/__init__.py
Ejjaffe/dit
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
[ "BSD-3-Clause" ]
null
null
null
""" Tests for dit.rate_distortion. """
9.75
30
0.666667
5
39
5
1
0
0
0
0
0
0
0
0
0
0
0
0.128205
39
3
31
13
0.735294
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
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
78a4c2598ebe09123d1e70d89f386070de4fc851
48
py
Python
easygraphics/turtle/__init__.py
strakam/PyEasyGraphics
57a586aa92385d26725d4ec3d61b2bbbe970195d
[ "BSD-3-Clause" ]
5
2019-09-23T05:15:47.000Z
2021-01-17T08:06:47.000Z
easygraphics/turtle/__init__.py
strakam/PyEasyGraphics
57a586aa92385d26725d4ec3d61b2bbbe970195d
[ "BSD-3-Clause" ]
3
2019-05-03T05:25:17.000Z
2021-04-15T04:53:16.000Z
easygraphics/turtle/__init__.py
strakam/PyEasyGraphics
57a586aa92385d26725d4ec3d61b2bbbe970195d
[ "BSD-3-Clause" ]
4
2019-05-04T13:42:40.000Z
2021-04-15T10:38:48.000Z
from .turtle import * __all__ = turtle.__all__
12
24
0.75
6
48
4.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.166667
48
3
25
16
0.7
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
78bf50910afe8503b0dd2e23ff5d5a7c022eaaeb
90
py
Python
src/clb_py_tools/exception_decorators.py
HumanBrainProject/clb-py-tools
8a64686e08b74aba2d21b5f4e192463f78c40f28
[ "Apache-2.0" ]
null
null
null
src/clb_py_tools/exception_decorators.py
HumanBrainProject/clb-py-tools
8a64686e08b74aba2d21b5f4e192463f78c40f28
[ "Apache-2.0" ]
1
2020-03-03T15:10:46.000Z
2020-03-03T15:10:46.000Z
src/clb_py_tools/exception_decorators.py
HumanBrainProject/clb-py-tools
8a64686e08b74aba2d21b5f4e192463f78c40f28
[ "Apache-2.0" ]
null
null
null
"""Decorators for authorization that raise an error when the user is not authorizated."""
45
89
0.777778
13
90
5.384615
1
0
0
0
0
0
0
0
0
0
0
0
0.144444
90
1
90
90
0.909091
0.922222
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
78c01a5ee0674ee5888a1926e423d6b225d21328
81
py
Python
day03/t03/apps.py
SunShuoJia/pyproject
71f3cada463fd90243b2cdac8c982fb622f9ef9c
[ "Apache-2.0" ]
null
null
null
day03/t03/apps.py
SunShuoJia/pyproject
71f3cada463fd90243b2cdac8c982fb622f9ef9c
[ "Apache-2.0" ]
null
null
null
day03/t03/apps.py
SunShuoJia/pyproject
71f3cada463fd90243b2cdac8c982fb622f9ef9c
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class T03Config(AppConfig): name = 't03'
13.5
33
0.728395
10
81
5.9
0.9
0
0
0
0
0
0
0
0
0
0
0.060606
0.185185
81
5
34
16.2
0.833333
0
0
0
0
0
0.037037
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
152cedfb2b47691414847432b2e5811cc24b8546
119
py
Python
algotradingstuff/accounts/errors.py
dcl10/AlgoTradingStuff
06115b9ecbb67632d60a29e2dfb1c13f6d18e532
[ "MIT" ]
null
null
null
algotradingstuff/accounts/errors.py
dcl10/AlgoTradingStuff
06115b9ecbb67632d60a29e2dfb1c13f6d18e532
[ "MIT" ]
1
2020-04-04T12:52:06.000Z
2020-04-04T12:52:06.000Z
algotradingstuff/accounts/errors.py
dcl10/AlgoTradingStuff
06115b9ecbb67632d60a29e2dfb1c13f6d18e532
[ "MIT" ]
null
null
null
class AccountError(Exception): """ Raised when the API can't locate any accounts for the user """ pass
19.833333
62
0.647059
16
119
4.8125
0.9375
0
0
0
0
0
0
0
0
0
0
0
0.268908
119
5
63
23.8
0.885057
0.487395
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
15334f3759e262fee5454279dd8b3e352709f824
25
py
Python
data/studio21_generated/introductory/4855/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/4855/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/4855/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
def vert_mirror(strng):
12.5
23
0.76
4
25
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.12
25
2
24
12.5
0.818182
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
15692e3ce2ede0892230667975dc530b6b22449b
338
py
Python
posts/admin.py
Gomax-07/emporium
d99722ba352830b38122a2db1b5b5135db665f5d
[ "MIT" ]
null
null
null
posts/admin.py
Gomax-07/emporium
d99722ba352830b38122a2db1b5b5135db665f5d
[ "MIT" ]
null
null
null
posts/admin.py
Gomax-07/emporium
d99722ba352830b38122a2db1b5b5135db665f5d
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from posts.models import Image, Location class ImageAdmin(admin.ModelAdmin): pass admin.site.register(Image, ImageAdmin) class ProjectAdmin(admin.ModelAdmin): pass class LocationAdmin(admin.ModelAdmin): pass admin.site.register(Location, LocationAdmin)
14.695652
44
0.772189
40
338
6.525
0.475
0.172414
0.218391
0.183908
0.275862
0.275862
0
0
0
0
0
0
0.147929
338
22
45
15.363636
0.90625
0.076923
0
0.3
0
0
0
0
0
0
0
0
0
1
0
true
0.3
0.2
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
15a869b252666a34f12313bb2fe6fdd83305a5dd
193
py
Python
django_playground/schema.py
Mohamed-Kaizen/django_playground
0ca623041857f15c06bd2f9c8edcd2b54b4c4897
[ "MIT" ]
null
null
null
django_playground/schema.py
Mohamed-Kaizen/django_playground
0ca623041857f15c06bd2f9c8edcd2b54b4c4897
[ "MIT" ]
3
2021-06-08T21:15:15.000Z
2022-03-12T00:35:49.000Z
django_playground/schema.py
Mohamed-Kaizen/django_playground
0ca623041857f15c06bd2f9c8edcd2b54b4c4897
[ "MIT" ]
null
null
null
import graphene from graphene_django.debug import DjangoDebug class Query(graphene.ObjectType): debug = graphene.Field(DjangoDebug, name="_debug") schema = graphene.Schema(query=Query)
19.3
54
0.787565
23
193
6.521739
0.521739
0
0
0
0
0
0
0
0
0
0
0
0.119171
193
9
55
21.444444
0.882353
0
0
0
0
0
0.031088
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
15bf88a198d29631e21bc1fe1a31ccf2f947652d
93
py
Python
python/testData/inspections/PyTypeCheckerInspection/IterateOverParamWithNoAttributes.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/inspections/PyTypeCheckerInspection/IterateOverParamWithNoAttributes.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/inspections/PyTypeCheckerInspection/IterateOverParamWithNoAttributes.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def f(xs): ys = 'string' for x in xs: g(ys) def g(x): return x.lower()
10.333333
20
0.451613
17
93
2.470588
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.387097
93
8
21
11.625
0.736842
0
0
0
0
0
0.064516
0
0
0
0
0
0
1
0.333333
false
0
0
0.166667
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
ec8a7cd90920d197f9c191edc89d452d31c1b098
40
py
Python
ELECTRONJS/pythons/archivoPython.py
opensourcesuperiorcomercio/sistemabiblioteca
5e1c907d816cde49827d0d78d35793fdc7fba746
[ "MIT" ]
null
null
null
ELECTRONJS/pythons/archivoPython.py
opensourcesuperiorcomercio/sistemabiblioteca
5e1c907d816cde49827d0d78d35793fdc7fba746
[ "MIT" ]
null
null
null
ELECTRONJS/pythons/archivoPython.py
opensourcesuperiorcomercio/sistemabiblioteca
5e1c907d816cde49827d0d78d35793fdc7fba746
[ "MIT" ]
null
null
null
for i in range (5): print("matias")
20
20
0.575
7
40
3.285714
1
0
0
0
0
0
0
0
0
0
0
0.033333
0.25
40
2
21
20
0.733333
0
0
0
0
0
0.15
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
eca06f9ae5fe4c63c4d45a06f851d0a7341fc1d7
54
py
Python
tests/__init__.py
OlivierBeq/ProDEC
b3723bc54a5a7ab4eedf2ab9a23a210e935b05fe
[ "MIT" ]
null
null
null
tests/__init__.py
OlivierBeq/ProDEC
b3723bc54a5a7ab4eedf2ab9a23a210e935b05fe
[ "MIT" ]
null
null
null
tests/__init__.py
OlivierBeq/ProDEC
b3723bc54a5a7ab4eedf2ab9a23a210e935b05fe
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Unit tests for ProDEC."""
13.5
28
0.518519
7
54
4
1
0
0
0
0
0
0
0
0
0
0
0.022727
0.185185
54
3
29
18
0.613636
0.833333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
eccdb79bfc65c122139b1ee05d1e4d7f5929d60d
6,476
py
Python
tests/test_avatars.py
new-valley/new-valley
8810739cab52ad4dea2f4005a59b8b7afea1e2db
[ "MIT" ]
null
null
null
tests/test_avatars.py
new-valley/new-valley
8810739cab52ad4dea2f4005a59b8b7afea1e2db
[ "MIT" ]
null
null
null
tests/test_avatars.py
new-valley/new-valley
8810739cab52ad4dea2f4005a59b8b7afea1e2db
[ "MIT" ]
null
null
null
def test_client_can_get_avatars(client): resp = client.get('/api/avatars') assert resp.status_code == 200 def test_client_gets_correct_avatars_fields(client): resp = client.get('/api/avatars') assert 'offset' in resp.json assert resp.json['offset'] is None assert 'total' in resp.json assert 'data' in resp.json assert resp.json['total'] == len(resp.json['data']) assert { 'avatar_id', 'category', 'uri', 'created_at', 'updated_at', } == set(resp.json['data'][0].keys()) def test_client_filters_avatars_fields(client): resp = client.get('/api/avatars?fields=category,created_at') avatars = resp.json['data'] assert { 'category', 'created_at', } == set(avatars[0].keys()) def test_client_offsets_avatars(client): resp_1 = client.get('/api/avatars') resp_2 = client.get('/api/avatars?offset=2') assert len(resp_1.json['data']) \ == len(resp_2.json['data']) + min(2, len(resp_1.json['data'])) def test_client_limits_avatars(client): resp_1 = client.get('/api/avatars?max_n_results=1') resp_2 = client.get('/api/avatars?max_n_results=2') assert len(resp_1.json['data']) <= 1 assert len(resp_2.json['data']) <= 2 def test_logged_off_client_cannot_create_avatar(client): resp = client.post('/api/avatars', data={ 'uri': 'http://newavatars.com/img.png', 'category': 'dummy', } ) assert resp.status_code == 401 def test_logged_in_user_cannot_create_avatar(client_with_tok): resp = client_with_tok.post('/api/avatars', data={ 'uri': 'http://newavatars.com/img.png', 'category': 'dummy', } ) assert resp.status_code == 401 def test_logged_in_mod_cannot_create_avatar(mod_with_tok): resp = mod_with_tok.post('/api/avatars', data={ 'uri': 'http://newavatars.com/img.png', 'category': 'dummy', } ) assert resp.status_code == 401 def test_logged_in_admin_can_create_avatar(admin_with_tok): resp = admin_with_tok.post('/api/avatars', data={ 'uri': 'http://newavatars.com/img.png', 'category': 'dummy', } ) assert resp.status_code == 200 def test_logged_in_admin_gets_correct_data_on_user_creation(admin_with_tok): resp = admin_with_tok.post('/api/avatars', data={ 'uri': 'http://newavatars.com/img.png', 'category': 'dummy', } ) assert 'data' in resp.json assert resp.json['data']['uri'] == 'http://newavatars.com/img.png' assert resp.json['data']['category'] == 'dummy' def test_client_can_get_avatar(client, avatar_id): resp = client.get('/api/avatars/{}'.format(avatar_id)) assert resp.status_code == 200 assert 'data' in resp.json def test_client_gets_correct_avatar_fields(client, avatar_id): resp = client.get('/api/avatars/{}'.format(avatar_id)) assert 'data' in resp.json assert { 'avatar_id', 'category', 'uri', 'created_at', 'updated_at', } == set(resp.json['data'].keys()) def test_logged_off_client_cannot_edit_avatar(client, avatar_id): resp = client.put('/api/avatars/{}'.format(avatar_id), data={ 'uri': 'http://newavatars.com/newimg.png', } ) assert resp.status_code == 401 def test_logged_in_user_cannot_edit_avatar(client_with_tok, avatar_id): resp = client_with_tok.put('/api/avatars/{}'.format(avatar_id), data={ 'uri': 'http://newavatars.com/newimg.png', } ) assert resp.status_code == 401 def test_logged_in_mod_cannot_edit_avatar(mod_with_tok, avatar_id): resp = mod_with_tok.put('/api/avatars/{}'.format(avatar_id), data={ 'uri': 'http://newavatars.com/newimg.png', } ) assert resp.status_code == 401 def test_logged_in_admin_can_edit_avatar(admin_with_tok, avatar_id): resp = admin_with_tok.put('/api/avatars/{}'.format(avatar_id), data={ 'uri': 'http://newavatars.com/img.png', 'category': 'dummy', } ) assert resp.status_code == 200 def test_logged_in_admin_gets_correct_put_fields(admin_with_tok, avatar_id): resp = admin_with_tok.put('/api/avatars/{}'.format(avatar_id), data={ 'category': 'newcategory', } ) assert 'data' in resp.json assert { 'avatar_id', 'category', 'uri', 'created_at', 'updated_at', } == set(resp.json['data'].keys()) def test_logged_in_admin_corretly_edits_avatar(admin_with_tok, avatar_id): resp_1 = admin_with_tok.get('/api/avatars/{}'.format(avatar_id)) resp_2 = admin_with_tok.put('/api/avatars/{}'.format(avatar_id), data={ 'category': resp_1.json['data']['category'] + '_altered', 'uri': resp_1.json['data']['uri'] + '.png', } ) resp_3 = admin_with_tok.get('/api/avatars/{}'.format(avatar_id)) assert resp_1.status_code == 200 assert resp_2.status_code == 200 assert resp_3.status_code == 200 assert resp_3.json['data']['category'] \ == resp_1.json['data']['category'] + '_altered' assert resp_3.json['data']['uri'] \ == resp_1.json['data']['uri'] + '.png' def test_logged_off_client_cannot_delete_avatar(client, avatar_id): resp = client.delete('/api/avatars/{}'.format(avatar_id)) assert resp.status_code == 401 def test_logged_in_user_cannot_delete_avatar(client_with_tok, avatar_id): resp = client_with_tok.delete('/api/avatars/{}'.format(avatar_id)) assert resp.status_code == 401 def test_logged_in_mod_cannot_delete_avatar(mod_with_tok, avatar_id): resp = mod_with_tok.delete('/api/avatars/{}'.format(avatar_id)) assert resp.status_code == 401 def test_logged_in_admin_can_delete_avatar(admin_with_tok, avatar_id): resp = admin_with_tok.delete('/api/avatars/{}'.format(avatar_id)) assert resp.status_code == 204 def test_logged_in_admin_corretly_deletes_avatar(admin_with_tok, avatar_id): resp_1 = admin_with_tok.get('/api/avatars/{}'.format(avatar_id)) resp_2 = admin_with_tok.delete('/api/avatars/{}'.format(avatar_id)) resp_3 = admin_with_tok.get('/api/avatars/{}'.format(avatar_id)) assert resp_1.status_code == 200 assert resp_2.status_code == 204 assert resp_3.status_code == 404
30.403756
76
0.638048
878
6,476
4.384966
0.084282
0.068571
0.056104
0.097143
0.885974
0.826234
0.755844
0.697143
0.622338
0.610909
0
0.018544
0.208925
6,476
212
77
30.54717
0.732969
0
0
0.482143
0
0
0.189314
0.017912
0
0
0
0
0.238095
1
0.136905
false
0
0
0
0.136905
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ecdb1058af0eb29b8c6f8b0423bc0d8cb37af627
146
py
Python
runner.py
alissongranemann/real-state-scrapper
6ae3f57d6965bb8275501102d10b24e28408a9cd
[ "Apache-2.0" ]
null
null
null
runner.py
alissongranemann/real-state-scrapper
6ae3f57d6965bb8275501102d10b24e28408a9cd
[ "Apache-2.0" ]
4
2019-12-22T05:18:22.000Z
2022-03-02T15:07:44.000Z
runner.py
alissongranemann/real-estate-scrapper
6ae3f57d6965bb8275501102d10b24e28408a9cd
[ "Apache-2.0" ]
null
null
null
from scrapy.cmdline import execute # VSCode debug helper execute(["scrapy", "runspider", "./olx/spiders/properties/sell.py", "-a", "state=sc"])
24.333333
86
0.705479
19
146
5.421053
0.894737
0
0
0
0
0
0
0
0
0
0
0
0.10274
146
5
87
29.2
0.78626
0.130137
0
0
0
0
0.456
0.256
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
ecec6fcac3866d35542027cb8fdc45710fe4805c
314
py
Python
urllockdown/forms.py
jayvdb/django-url-lockdown
d1cad0b453bfc13532b18e7bb6411ff1b521b9bf
[ "MIT" ]
1
2021-01-13T02:37:05.000Z
2021-01-13T02:37:05.000Z
urllockdown/forms.py
jayvdb/django-url-lockdown
d1cad0b453bfc13532b18e7bb6411ff1b521b9bf
[ "MIT" ]
null
null
null
urllockdown/forms.py
jayvdb/django-url-lockdown
d1cad0b453bfc13532b18e7bb6411ff1b521b9bf
[ "MIT" ]
1
2020-09-16T09:32:54.000Z
2020-09-16T09:32:54.000Z
# -*- coding: utf-8 -*- """ """ from django import forms from django.forms import forms from django.forms import ModelForm from urllockdown.models import URL class URLForm(ModelForm): password = forms.CharField(widget=forms.PasswordInput()) class Meta: model = URL fields = ['password']
19.625
60
0.684713
37
314
5.810811
0.540541
0.139535
0.139535
0.195349
0.269767
0.269767
0
0
0
0
0
0.003984
0.200637
314
15
61
20.933333
0.85259
0.066879
0
0
0
0
0.028169
0
0
0
0
0
0
1
0
false
0.222222
0.444444
0
0.777778
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
4
ecf0389cc3c04b5078c7879c98c209ac57814952
484
py
Python
Lesson11/pages/page_with_cart_control.py
zhukovsv/Sel-15_test-repository
86d1c279eddebb5b97491d514a0430deb40077cc
[ "Apache-2.0" ]
null
null
null
Lesson11/pages/page_with_cart_control.py
zhukovsv/Sel-15_test-repository
86d1c279eddebb5b97491d514a0430deb40077cc
[ "Apache-2.0" ]
null
null
null
Lesson11/pages/page_with_cart_control.py
zhukovsv/Sel-15_test-repository
86d1c279eddebb5b97491d514a0430deb40077cc
[ "Apache-2.0" ]
null
null
null
from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from pages.base_page import Base_Page class Page_With_Cart_Control(Base_Page): def get_products_amount(self): return int(self.driver.find_element(By.CSS_SELECTOR, '#cart .quantity').text) def go_to_checkout_page(self): self.driver.find_element(By.PARTIAL_LINK_TEXT, 'Checkout').click() self.wait.until(EC.title_is('Checkout | My Store'))
32.266667
85
0.760331
72
484
4.861111
0.611111
0.068571
0.12
0.12
0.131429
0
0
0
0
0
0
0
0.13843
484
14
86
34.571429
0.839329
0
0
0
0
0
0.086777
0
0
0
0
0
0
1
0.222222
false
0
0.333333
0.111111
0.777778
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
4
ecf44e627d1e75ea9e4503f051aa732ebc5474e5
247
py
Python
psppi/responses/api.py
the-fool/psppi
a280cfc6f294c85119b0b5a326d2930300d6ab93
[ "MIT" ]
null
null
null
psppi/responses/api.py
the-fool/psppi
a280cfc6f294c85119b0b5a326d2930300d6ab93
[ "MIT" ]
null
null
null
psppi/responses/api.py
the-fool/psppi
a280cfc6f294c85119b0b5a326d2930300d6ab93
[ "MIT" ]
null
null
null
from rest_framework import generics from .models import Demography from .serializers import DemographySerializer class DemographyListView(generics.ListAPIView): serializer_class = DemographySerializer queryset = Demography.objects.all()
27.444444
47
0.82996
24
247
8.458333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.121457
247
8
48
30.875
0.935484
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
bf07239c241aa2f03771ae074af0fb4a152b90ed
12,152
py
Python
nba_data/data/box_scores.py
jaebradley/nba_data
30d817bbc1c5474774f97f3800354492e382d206
[ "MIT" ]
8
2017-01-07T13:32:16.000Z
2019-08-08T17:36:26.000Z
nba_data/data/box_scores.py
jaebradley/nba_data
30d817bbc1c5474774f97f3800354492e382d206
[ "MIT" ]
72
2016-09-01T01:21:07.000Z
2021-03-25T21:41:38.000Z
nba_data/data/box_scores.py
jaebradley/nba_data
30d817bbc1c5474774f97f3800354492e382d206
[ "MIT" ]
4
2016-12-06T10:30:59.000Z
2021-09-08T21:23:43.000Z
class AdvancedBoxScore: def __init__(self, seconds_played, offensive_rating, defensive_rating, teammate_assist_percentage, assist_to_turnover_ratio, assists_per_100_possessions, offensive_rebound_percentage, defensive_rebound_percentage, turnovers_per_100_possessions, effective_field_goal_percentage, true_shooting_percentage): self.seconds_played = seconds_played self.offensive_rating = offensive_rating self.defensive_rating = defensive_rating self.teammate_assist_percentage = teammate_assist_percentage self.assist_to_turnover_ratio = assist_to_turnover_ratio self.assists_per_100_possessions = assists_per_100_possessions self.offensive_rebound_percentage = offensive_rebound_percentage self.defensive_rebound_percentage = defensive_rebound_percentage self.turnovers_per_100_possessions = turnovers_per_100_possessions self.effective_field_goal_percentage = effective_field_goal_percentage self.true_shooting_percentage = true_shooting_percentage def __unicode__(self): return '{0} | {1}'.format(self.get_additional_unicode(), self.get_base_unicode) def get_base_unicode(self): return 'seconds played: {seconds_played} | offensive rating: {offensive_rating} | ' \ 'defensive rating: {defensive_rating} | teammate assist percentage: {teammate_assist_percentage} |' \ 'assist to turnover ratio: {assist_to_turnover_ratio} | ' \ 'assists per 100 possessions: {assists_per_100_possessions} | ' \ 'offensive rebound percentage: {offensive_rebound_percentage} |' \ 'defensive rebound percentage: {defensive_rebound_percentage} |' \ 'turnovers per 100 possessions: {turnovers_per_100_possessions} |' \ 'effective field goal percentage: {effective_field_goal_percentage} |' \ 'true shooting percentage: {true_shooting_percentage}'\ .format(seconds_played=self.seconds_played, offensive_rating=self.offensive_rating, defensive_rating=self.defensive_rating, teammate_assist_percentage=self.teammate_assist_percentage, assist_to_turnover_ratio=self.assist_to_turnover_ratio, assists_per_100_possessions=self.assists_per_100_possessions, offensive_rebound_percentage=self.offensive_rebound_percentage, defensive_rebound_percentage=self.defensive_rebound_percentage, turnovers_per_100_possessions=self.turnovers_per_100_possessions, effective_field_goal_percentage=self.effective_field_goal_percentage, true_shooting_percentage=self.true_shooting_percentage) def get_additional_unicode(self): return NotImplementedError('Should be implemented in concrete class') class AdvancedPlayerBoxScore(AdvancedBoxScore): def __init__(self, player, seconds_played, offensive_rating, defensive_rating, teammate_assist_percentage, assist_to_turnover_ratio, assists_per_100_possessions, offensive_rebound_percentage, defensive_rebound_percentage, turnovers_per_100_possessions, effective_field_goal_percentage, true_shooting_percentage, usage_percentage): self.player = player self.usage_percentage = usage_percentage AdvancedBoxScore.__init__(self, seconds_played=seconds_played, offensive_rating=offensive_rating, defensive_rating=defensive_rating, teammate_assist_percentage=teammate_assist_percentage, assist_to_turnover_ratio=assist_to_turnover_ratio, assists_per_100_possessions=assists_per_100_possessions, offensive_rebound_percentage=offensive_rebound_percentage, defensive_rebound_percentage=defensive_rebound_percentage, turnovers_per_100_possessions=turnovers_per_100_possessions, effective_field_goal_percentage=effective_field_goal_percentage, true_shooting_percentage=true_shooting_percentage) def get_additional_unicode(self): return 'player: {player} | usage percentage: {usage_percentage}'.format(player=self.player, usage_percentage=self.usage_percentage) class AdvancedTeamBoxScore(AdvancedBoxScore): def __init__(self, team, seconds_played, offensive_rating, defensive_rating, teammate_assist_percentage, assist_to_turnover_ratio, assists_per_100_possessions, offensive_rebound_percentage, defensive_rebound_percentage, turnovers_per_100_possessions, effective_field_goal_percentage, true_shooting_percentage): self.team = team AdvancedBoxScore.__init__(self, seconds_played=seconds_played, offensive_rating=offensive_rating, defensive_rating=defensive_rating, teammate_assist_percentage=teammate_assist_percentage, assist_to_turnover_ratio=assist_to_turnover_ratio, assists_per_100_possessions=assists_per_100_possessions, offensive_rebound_percentage=offensive_rebound_percentage, defensive_rebound_percentage=defensive_rebound_percentage, turnovers_per_100_possessions=turnovers_per_100_possessions, effective_field_goal_percentage=effective_field_goal_percentage, true_shooting_percentage=true_shooting_percentage) def get_additional_unicode(self): return 'team: {team}'.format(team=self.team) class TraditionalBoxScore: def __init__(self, seconds_played, field_goals_made, field_goals_attempted, three_point_field_goals_made, three_point_field_goals_attempted, free_throws_made, free_throws_attempted, offensive_rebounds, defensive_rebounds, assists, steals, blocks, turnovers, personal_fouls): self.seconds_played = seconds_played self.field_goals_made = field_goals_made self.field_goals_attempted = field_goals_attempted self.three_point_field_goals_made = three_point_field_goals_made self.three_point_field_goals_attempted = three_point_field_goals_attempted self.free_throws_made = free_throws_made self.free_throws_attempted = free_throws_attempted self.offensive_rebounds = offensive_rebounds self.defensive_rebounds = defensive_rebounds self.assists = assists self.steals = steals self.blocks = blocks self.turnovers = turnovers self.personal_fouls = personal_fouls def __unicode__(self): return '{0} | {1}'.format(self.get_additional_unicode(), self.get_base_unicode()) def get_base_unicode(self): return 'seconds played: {seconds_played} | field goals made: {field_goals_made} |' \ 'field goals attempted: {field_goals_attempted} | ' \ 'three point field goals made: {three_point_field_goals_made} | ' \ 'three point field goals attempted: {three_point_field_goals_attempted} | ' \ 'free throws made: {free_throws_made} |' 'free throws attempted: {free_throws_attempted} | ' \ 'offensive rebounds: {offensive rebounds} |' 'defensive rebounds: {defensive rebounds} | ' \ 'assists: {assists} | steals: {steals} | blocks: {blocks} | turnovers: {turnovers} | ' \ 'personal fouls: {personal_fouls}'.format(seconds_played=self.seconds_played, field_goals_made=self.field_goals_made, field_goals_attempted=self.field_goals_attempted, three_point_field_goals_made=self.three_point_field_goals_made, three_point_field_goals_attempted=self.three_point_field_goals_attempted, free_throws_made=self.free_throws_made, free_throws_attempted=self.free_throws_attempted, offensive_rebounds=self.offensive_rebounds, defensive_rebounds=self.defensive_rebounds, assists=self.assists, steals=self.steals, blocks=self.blocks, turnovers=self.turnovers, personal_fouls=self.personal_fouls) def get_additional_unicode(self): raise NotImplementedError('Implement in concrete classes') class TraditionalPlayerBoxScore(TraditionalBoxScore): def __init__(self, player, seconds_played, field_goals_made, field_goals_attempted, three_point_field_goals_made, three_point_field_goals_attempted, free_throws_made, free_throws_attempted, offensive_rebounds, defensive_rebounds, assists, steals, blocks, turnovers, personal_fouls, plus_minus): self.player = player self.plus_minus = plus_minus TraditionalBoxScore.__init__(self, seconds_played=seconds_played, field_goals_made=field_goals_made, field_goals_attempted=field_goals_attempted, three_point_field_goals_made=three_point_field_goals_made, three_point_field_goals_attempted=three_point_field_goals_attempted, free_throws_made=free_throws_made, free_throws_attempted=free_throws_attempted, offensive_rebounds=offensive_rebounds, defensive_rebounds=defensive_rebounds, assists=assists, steals=steals, blocks=blocks, turnovers=turnovers, personal_fouls=personal_fouls) def get_additional_unicode(self): return 'player: {player} | plus minus: {plus_minus}'.format(player=self.player, plus_minus=self.plus_minus) class TraditionalTeamBoxScore(TraditionalBoxScore): def __init__(self, team, seconds_played, field_goals_made, field_goals_attempted, free_throws_attempted, three_point_field_goals_made, three_point_field_goals_attempted, free_throws_made, offensive_rebounds, defensive_rebounds, assists, steals, blocks, turnovers, personal_fouls): self.team = team TraditionalBoxScore.__init__(self, seconds_played=seconds_played, field_goals_made=field_goals_made, field_goals_attempted=field_goals_attempted, three_point_field_goals_made=three_point_field_goals_made, three_point_field_goals_attempted=three_point_field_goals_attempted, free_throws_made=free_throws_made, free_throws_attempted=free_throws_attempted, offensive_rebounds=offensive_rebounds, defensive_rebounds=defensive_rebounds, assists=assists, steals=steals, blocks=blocks, turnovers=turnovers, personal_fouls=personal_fouls) def get_additional_unicode(self): return 'team: {team}'.format(self.team) class GameBoxScore: def __init__(self, game_id, player_box_scores, team_box_scores): self.game_id = game_id self.player_box_scores = player_box_scores self.team_box_scores = team_box_scores
67.511111
130
0.661619
1,175
12,152
6.317447
0.060426
0.070053
0.059545
0.070053
0.845884
0.815708
0.730971
0.699852
0.631685
0.620504
0
0.009432
0.284562
12,152
179
131
67.888268
0.844375
0
0
0.426752
0
0.006369
0.111011
0.028308
0
0
0
0
0
1
0.10828
false
0
0
0.057325
0.210191
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
170ac5a8aa0da76c0b27ce649424b8209ee797b6
402
py
Python
services/common/domain/player_cache_interface.py
tkblackbelt/Asteroids-Multiplayer-Backend
e09b110ec8698657d8f22f2600e95acc663b1ba0
[ "Apache-2.0" ]
null
null
null
services/common/domain/player_cache_interface.py
tkblackbelt/Asteroids-Multiplayer-Backend
e09b110ec8698657d8f22f2600e95acc663b1ba0
[ "Apache-2.0" ]
null
null
null
services/common/domain/player_cache_interface.py
tkblackbelt/Asteroids-Multiplayer-Backend
e09b110ec8698657d8f22f2600e95acc663b1ba0
[ "Apache-2.0" ]
null
null
null
from abc import ABC, abstractmethod from typing import Optional from common.domain.game import Player class PlayerCacheInterface(ABC): @abstractmethod def add_player(self, player: Player) -> bool: pass @abstractmethod def update_player(self, game: Player) -> bool: pass @abstractmethod def get_player(self, player_id: str) -> Optional[Player]: pass
21.157895
61
0.691542
47
402
5.829787
0.446809
0.186131
0.116788
0.20438
0.226277
0
0
0
0
0
0
0
0.228856
402
18
62
22.333333
0.883871
0
0
0.461538
0
0
0
0
0
0
0
0
0
1
0.230769
false
0.230769
0.230769
0
0.538462
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
1734f44b941370348bb9f30b8f259d220222a961
96
py
Python
enthought/scripting/recorder.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/scripting/recorder.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/scripting/recorder.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from __future__ import absolute_import from apptools.scripting.recorder import *
24
41
0.84375
12
96
6.333333
0.75
0
0
0
0
0
0
0
0
0
0
0
0.114583
96
3
42
32
0.894118
0.125
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
0
0
0
4
bd80b9463f221077dd45d5d76a106f798bfd8205
4,653
py
Python
tests/arrow/partitioned_test.py
sethvargo/vaex
c610324316b2c0a14b8ceac2a30e202adc9da28b
[ "MIT" ]
337
2016-02-11T07:36:35.000Z
2018-12-10T07:17:35.000Z
tests/arrow/partitioned_test.py
sethvargo/vaex
c610324316b2c0a14b8ceac2a30e202adc9da28b
[ "MIT" ]
127
2016-07-06T15:43:14.000Z
2018-12-11T18:46:27.000Z
tests/arrow/partitioned_test.py
sethvargo/vaex
c610324316b2c0a14b8ceac2a30e202adc9da28b
[ "MIT" ]
29
2016-10-05T14:15:28.000Z
2018-11-29T10:17:00.000Z
from pathlib import Path import shutil import glob import numpy as np import pyarrow as pa import pyarrow.parquet as pq import pyarrow.dataset import vaex path = Path(__file__).parent.parent data_path = path / 'data' countries = ['US', 'US', 'NL', 'FR', 'NL', 'NL'] years = [2020, 2021, 2020, 2020, 2019, 2020] values = [1, 2, 3, 4, 5, 6] table = pa.table({ 'country': countries, 'year': years, 'value': values, }) def test_partitioning_basics_hive(): shutil.rmtree(data_path / 'parquet_dataset_partitioned_hive', ignore_errors=True) pq.write_to_dataset(table, data_path / 'parquet_dataset_partitioned_hive', partition_cols=['year', 'country']) ds = pa.dataset.dataset(data_path / 'parquet_dataset_partitioned_hive', partitioning="hive") #, format="parquet", ) # import pdb; pdb.set_trace() df = vaex.open(data_path / 'parquet_dataset_partitioned_hive', partitioning="hive") # import pdb; pdb.set_trace() assert set(df.value.tolist()) == set(values) assert set(df.year.tolist()) == set(years) assert set(df.country.tolist()) == set(countries) def test_partitioning_write_parquet(): shutil.rmtree(data_path / 'parquet_dataset_partitioned_vaex', ignore_errors=True) df = vaex.from_arrow_table(table) df.export_partitioned(data_path / 'parquet_dataset_partitioned_vaex', ['country', 'year']) df = vaex.open(data_path / 'parquet_dataset_partitioned_vaex', partitioning="hive") assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_vaex/*/*/*.parquet'))) == 5 # 5 unique values assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_vaex/country=US/year=2020/*.parquet'))) == 1 assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_vaex/country=NL/year=2020/*.parquet'))) == 1 # import pdb; pdb.set_trace() assert set(df.value.tolist()) == set(values) assert set(df.year.tolist()) == set(years) assert set(df.country.tolist()) == set(countries) def test_partitioning_write_hdf5(): shutil.rmtree(data_path / 'parquet_dataset_partitioned_vaex', ignore_errors=True) df = vaex.from_arrow_table(table) df.export_partitioned(data_path / 'parquet_dataset_partitioned_vaex_my_choice/{subdir}/{i}.hdf5', ['country']) assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_vaex_my_choice/*/*.hdf5'))) == 3 # 3 unique values assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_vaex_my_choice/country=US/[012].hdf5'))) == 1 assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_vaex_my_choice/country=NL/[012].hdf5'))) == 1 assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_vaex_my_choice/country=FR/[012].hdf5'))) == 1 def test_partitioning_write_directory(): shutil.rmtree(data_path / 'parquet_dataset_partitioned_directory1', ignore_errors=True) shutil.rmtree(data_path / 'parquet_dataset_partitioned_directory2', ignore_errors=True) partitioning = pa.dataset.partitioning( pa.schema([("country", pa.string())]) ) df = vaex.from_arrow_table(table) df.export_partitioned(data_path / 'parquet_dataset_partitioned_directory1', ['country'], directory_format='{value}') assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_directory1/*/*.parquet'))) == 3 # 3 unique values assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_directory1/US/*.parquet'))) == 1 assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_directory1/NL/*.parquet'))) == 1 assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_directory1/FR/*.parquet'))) == 1 assert set(df.value.tolist()) == set(values) assert set(df.year.tolist()) == set(years) assert set(df.country.tolist()) == set(countries) # now with 2 keys partitioning = pa.dataset.partitioning( pa.schema([("year", pa.int64()), ("country", pa.string())]) ) df.export_partitioned(data_path / 'parquet_dataset_partitioned_directory2', ['year', 'country'], directory_format='{value}') assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_directory2/*/*/*.parquet'))) == 5 # 5 unique values assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_directory2/2020/US/*.parquet'))) == 1 assert len(glob.glob(str(data_path / 'parquet_dataset_partitioned_directory2/2020/NL/*.parquet'))) == 1 df = vaex.open(data_path / 'parquet_dataset_partitioned_directory2', partitioning=partitioning) assert set(df.value.tolist()) == set(values) assert set(df.year.tolist()) == set(years) assert set(df.country.tolist()) == set(countries)
47.969072
128
0.723189
623
4,653
5.141252
0.128411
0.072432
0.131127
0.19232
0.790821
0.784577
0.729316
0.684983
0.603185
0.603185
0
0.023153
0.127445
4,653
96
129
48.46875
0.765764
0.039759
0
0.267606
0
0
0.316439
0.288854
0
0
0
0
0.366197
1
0.056338
false
0
0.112676
0
0.169014
0
0
0
0
null
0
0
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4