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
ec5bf03166a319a22c25f2e0b53e44d387acb7e6
821
py
Python
federatedscope/gfl/model/__init__.py
alibaba/FederatedScope
fcf6d237624769ea094cfd68803901622f14fc23
[ "Apache-2.0" ]
9
2022-03-24T07:59:37.000Z
2022-03-31T06:47:52.000Z
federatedscope/gfl/model/__init__.py
alibaba/FederatedScope
fcf6d237624769ea094cfd68803901622f14fc23
[ "Apache-2.0" ]
1
2022-03-28T13:52:17.000Z
2022-03-28T13:52:17.000Z
federatedscope/gfl/model/__init__.py
alibaba/FederatedScope
fcf6d237624769ea094cfd68803901622f14fc23
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function from __future__ import division from federatedscope.core.mlp import MLP from federatedscope.gfl.model.model_builder import get_gnn from federatedscope.gfl.model.gcn import GCN_Net from federatedscope.gfl.model.sage import SAGE_Net from federatedscope.gfl.model.gin import GIN_Net from federatedscope.gfl.model.gat import GAT_Net from federatedscope.gfl.model.gpr import GPR_Net from federatedscope.gfl.model.graph_level import GNN_Net_Graph from federatedscope.gfl.model.link_level import GNN_Net_Link from federatedscope.gfl.model.fedsageplus import LocalSage_Plus, FedSage_Plus __all__ = [ 'get_gnn', 'GCN_Net', 'SAGE_Net', 'GIN_Net', 'GAT_Net', 'GPR_Net', 'GNN_Net_Graph', 'GNN_Net_Link', 'LocalSage_Plus', 'FedSage_Plus', 'MLP' ]
41.05
77
0.825822
123
821
5.146341
0.235772
0.28436
0.298578
0.369668
0.229068
0
0
0
0
0
0
0
0.095006
821
19
78
43.210526
0.851952
0
0
0
0
0
0.118149
0
0
0
0
0
0
1
0
false
0
0.764706
0
0.764706
0.058824
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
ec80b881669259a3a1f80bb5344bd93a63ffb83e
4,863
py
Python
tests/test_chunker.py
platiagro/tasks
a6103cb101eeed26381cdb170a11d0e1dc53d3ad
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
2
2021-02-16T12:39:57.000Z
2021-07-21T11:36:39.000Z
tests/test_chunker.py
platiagro/tasks
a6103cb101eeed26381cdb170a11d0e1dc53d3ad
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
20
2020-10-26T18:05:27.000Z
2021-11-30T19:05:22.000Z
tests/test_chunker.py
platiagro/tasks
a6103cb101eeed26381cdb170a11d0e1dc53d3ad
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
7
2020-10-13T18:12:22.000Z
2021-08-13T19:16:21.000Z
import os import unittest import uuid import papermill import pandas as pd from tests import datasets, server EXPERIMENT_ID = str(uuid.uuid4()) OPERATOR_ID = str(uuid.uuid4()) RUN_ID = str(uuid.uuid4()) TEMPORARY_DIR = "tmp" LOCAL_TEST_DATA_PATH = f"/{TEMPORARY_DIR}/data/paracrawl_en_pt_test.csv" EXPERIMENT_NOTEBOOK = "Experiment.ipynb" DEPLOYMENT_NOTEBOOK = "Deployment.ipynb" DEV_DIR = "/dev/null" class TestChunker(unittest.TestCase): def setUp(self): # Set environment variables needed to run notebooks os.environ["EXPERIMENT_ID"] = EXPERIMENT_ID os.environ["OPERATOR_ID"] = OPERATOR_ID os.environ["RUN_ID"] = RUN_ID datasets.paracrawl() os.chdir("tasks/chunker") def tearDown(self): datasets.clean() os.chdir("../../") def test_experiment_paracrawl_word(self): papermill.execute_notebook( EXPERIMENT_NOTEBOOK, DEV_DIR, parameters=dict( dataset=LOCAL_TEST_DATA_PATH, text_column_name = "text_portuguese", output_column_name = "text_chunk", chunkenizer = "word", chunk_size = 5, chunk_overlap = 2, replicate_data = "sim", ), ) # Verify output data out_data = pd.read_csv(LOCAL_TEST_DATA_PATH) self.assertEqual(out_data.columns.tolist(), ['text_english', 'text_portuguese', 'text_chunk']) self.assertEqual(out_data.loc[0, 'text_chunk'], "Deste modo, a vida civil") self.assertEqual(out_data.loc[1, 'text_chunk'], "vida civil de uma nação") # Deployment pipeline papermill.execute_notebook( DEPLOYMENT_NOTEBOOK, DEV_DIR, ) data = datasets.paracrawl_test_data() with server.Server() as s: response = s.test(data=data) names = response["names"] ndarray = response["ndarray"] self.assertEqual(len(ndarray), 7) # 7 chunked lines of texts self.assertEqual(len(names), 3) # 1 extra feature (total of 3) def test_experiment_paracrawl_sentence(self): papermill.execute_notebook( EXPERIMENT_NOTEBOOK, DEV_DIR, parameters=dict( dataset=LOCAL_TEST_DATA_PATH, text_column_name = "text_portuguese", output_column_name = "text_chunk", chunkenizer = "sentence", chunk_size = 2, chunk_overlap = 1, replicate_data = "sim", ), ) # Verify output data out_data = pd.read_csv(LOCAL_TEST_DATA_PATH) self.assertEqual(out_data.columns.tolist(), ['text_english', 'text_portuguese', 'text_chunk']) self.assertEqual(out_data.loc[0, 'text_chunk'].strip(), "Deste modo, a vida civil de uma nação amadurece, fazendo com que todos os cidadãos gozem dos frutos da tolerância genuína e do respeito mútuo.") # Deployment pipeline papermill.execute_notebook( DEPLOYMENT_NOTEBOOK, DEV_DIR, ) data = datasets.paracrawl_test_data() with server.Server() as s: response = s.test(data=data) names = response["names"] ndarray = response["ndarray"] self.assertEqual(len(ndarray), 2) # 2 chunked lines of texts self.assertEqual(len(names), 3) # 1 extra feature (total of 3) def test_experiment_paracrawl_not_replicate_data(self): papermill.execute_notebook( EXPERIMENT_NOTEBOOK, DEV_DIR, parameters=dict( dataset=LOCAL_TEST_DATA_PATH, text_column_name = "text_portuguese", output_column_name = "text_chunk", chunkenizer = "word", chunk_size = 12, chunk_overlap = 2, replicate_data = "não", ), ) # Verify output data out_data = pd.read_csv(LOCAL_TEST_DATA_PATH) self.assertEqual(out_data.columns.tolist(), ['text_english', 'text_portuguese', 'text_chunk']) self.assertEqual(out_data.loc[0, 'text_chunk'], "['Deste modo, a vida civil de uma nação amadurece, fazendo com que', 'com que todos os cidadãos gozem dos frutos da tolerância genuína e', 'genuína e do respeito mútuo.']") # Deployment pipeline papermill.execute_notebook( DEPLOYMENT_NOTEBOOK, DEV_DIR, ) data = datasets.paracrawl_test_data() with server.Server() as s: response = s.test(data=data) names = response["names"] ndarray = response["ndarray"] self.assertEqual(len(ndarray), 2) # 2 chunked lines of texts self.assertEqual(len(names), 3) # 1 extra feature (total of 3)
34.489362
229
0.606416
552
4,863
5.11413
0.228261
0.03684
0.032235
0.042154
0.769748
0.740347
0.740347
0.740347
0.740347
0.740347
0
0.008482
0.296936
4,863
140
230
34.735714
0.817198
0.067448
0
0.59633
0
0.018349
0.173673
0.010177
0
0
0
0
0.119266
1
0.045872
false
0
0.055046
0
0.110092
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
ecbd34e3cbe3e41d112ea2124d0fabda7b16863e
90
py
Python
listings/admin.py
huynhduyman/realestatecrm
66fed5766f60260f45bff4f8ab58a895860d0d4a
[ "MIT" ]
null
null
null
listings/admin.py
huynhduyman/realestatecrm
66fed5766f60260f45bff4f8ab58a895860d0d4a
[ "MIT" ]
null
null
null
listings/admin.py
huynhduyman/realestatecrm
66fed5766f60260f45bff4f8ab58a895860d0d4a
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Listing admin.site.register(Listing)
22.5
32
0.833333
13
90
5.769231
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.1
90
4
33
22.5
0.925926
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
ecc5a104d6e8329dfac18ee6a8e62fa49fea36b6
32
py
Python
document retrieval/sample.py
amudalab/concept-graphs
59748671dd510bfb6fd1098c99aac048f93e9821
[ "MIT" ]
1
2021-02-15T02:09:32.000Z
2021-02-15T02:09:32.000Z
document retrieval/sample.py
amudalab/concept-graphs
59748671dd510bfb6fd1098c99aac048f93e9821
[ "MIT" ]
null
null
null
document retrieval/sample.py
amudalab/concept-graphs
59748671dd510bfb6fd1098c99aac048f93e9821
[ "MIT" ]
4
2017-03-07T12:01:58.000Z
2019-02-28T10:03:57.000Z
import os os.remove('re.txt')
10.666667
20
0.65625
6
32
3.5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.15625
32
2
21
16
0.777778
0
0
0
0
0
0.2
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
ece1e82c2156965bfedc36fe287afa5dc0b763c5
4,381
py
Python
insights/parsers/tests/test_db2licm.py
akshay196/insights-core
598865e6563119089c77152599300de38a77c72c
[ "Apache-2.0" ]
null
null
null
insights/parsers/tests/test_db2licm.py
akshay196/insights-core
598865e6563119089c77152599300de38a77c72c
[ "Apache-2.0" ]
null
null
null
insights/parsers/tests/test_db2licm.py
akshay196/insights-core
598865e6563119089c77152599300de38a77c72c
[ "Apache-2.0" ]
null
null
null
import doctest import pytest from insights.parsers import ParseException from insights.tests import context_wrap from insights.parsers import db2licm from insights.parsers.db2licm import DB2Info INVALID_OUTPUT = "".strip() VALID_OUTPUT = """ Product name: DB2 Enterprise Server Edition License type: CPU Option Expiry date: Permanent Product identifier: db2ese Version information: 9.7 Enforcement policy: Soft Stop Features: DB2 Performance Optimization ESE: Not licensed DB2 Storage Optimization: Not licensed DB2 Advanced Access Control: Not licensed IBM Homogeneous Replication ESE: Not licensed """.strip() VALID_OUTPUT_MULTIPLE = """ Product name: DB2 Enterprise Server Edition License type: CPU Option Expiry date: Permanent Product identifier: db2ese Version information: 9.7 Enforcement policy: Soft Stop Features: DB2 Performance Optimization ESE: Not licensed DB2 Storage Optimization: Not licensed DB2 Advanced Access Control: Not licensed IBM Homogeneous Replication ESE: Not licensed Product name: DB2 Connect Server Expiry date: Expired Product identifier: db2consv Version information: 9.7 Concurrent connect user policy: Disabled Enforcement policy: Soft Stop """.strip() def test_valid_command_output_1(): parser_result = DB2Info(context_wrap(VALID_OUTPUT)) assert parser_result is not None assert parser_result["DB2 Enterprise Server Edition"]["License type"] == "CPU Option" assert parser_result["DB2 Enterprise Server Edition"]["Expiry date"] == "Permanent" assert parser_result["DB2 Enterprise Server Edition"]["Product identifier"] == "db2ese" assert parser_result["DB2 Enterprise Server Edition"]["Version information"] == "9.7" assert parser_result["DB2 Enterprise Server Edition"]["Enforcement policy"] == "Soft Stop" assert parser_result["DB2 Enterprise Server Edition"]["DB2 Performance Optimization ESE"] == "Not licensed" assert parser_result["DB2 Enterprise Server Edition"]["DB2 Storage Optimization"] == "Not licensed" assert parser_result["DB2 Enterprise Server Edition"]["DB2 Advanced Access Control"] == "Not licensed" assert parser_result["DB2 Enterprise Server Edition"]["IBM Homogeneous Replication ESE"] == "Not licensed" def test_valid_command_output_2(): parser_result = DB2Info(context_wrap(VALID_OUTPUT_MULTIPLE)) assert parser_result is not None assert parser_result["DB2 Enterprise Server Edition"]["License type"] == "CPU Option" assert parser_result["DB2 Enterprise Server Edition"]["Expiry date"] == "Permanent" assert parser_result["DB2 Enterprise Server Edition"]["Product identifier"] == "db2ese" assert parser_result["DB2 Enterprise Server Edition"]["Version information"] == "9.7" assert parser_result["DB2 Enterprise Server Edition"]["Enforcement policy"] == "Soft Stop" assert parser_result["DB2 Enterprise Server Edition"]["DB2 Performance Optimization ESE"] == "Not licensed" assert parser_result["DB2 Enterprise Server Edition"]["DB2 Storage Optimization"] == "Not licensed" assert parser_result["DB2 Enterprise Server Edition"]["DB2 Advanced Access Control"] == "Not licensed" assert parser_result["DB2 Enterprise Server Edition"]["IBM Homogeneous Replication ESE"] == "Not licensed" assert parser_result["DB2 Connect Server"]["Expiry date"] == "Expired" assert parser_result["DB2 Connect Server"]["Product identifier"] == "db2consv" assert parser_result["DB2 Connect Server"]["Version information"] == "9.7" assert parser_result["DB2 Connect Server"]["Enforcement policy"] == "Soft Stop" assert parser_result["DB2 Connect Server"]["Concurrent connect user policy"] == "Disabled" def test_invalid_command_output(): with pytest.raises(ParseException) as e: DB2Info(context_wrap(INVALID_OUTPUT)) assert "Unable to parse db2licm info: []" == str(e.value) def test_db2licm_doc_examples(): env = { 'parser_result': DB2Info( context_wrap(VALID_OUTPUT_MULTIPLE)), } failed, total = doctest.testmod(db2licm, globs=env) assert failed == 0
46.115789
111
0.702808
501
4,381
6.031936
0.173653
0.111185
0.148908
0.159828
0.819325
0.779616
0.727664
0.707148
0.64593
0.64593
0
0.019828
0.205661
4,381
94
112
46.606383
0.848563
0
0
0.582278
0
0
0.583428
0
0
0
0
0
0.341772
1
0.050633
false
0
0.075949
0
0.126582
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
ece33282877fbb47c09a5b65832683083dd7ab32
209
py
Python
stormpath/__init__.py
denibertovic/stormpath-sdk-python
e594a1bb48de3fa8eff26558bf4f72bb056e9d00
[ "Apache-2.0" ]
null
null
null
stormpath/__init__.py
denibertovic/stormpath-sdk-python
e594a1bb48de3fa8eff26558bf4f72bb056e9d00
[ "Apache-2.0" ]
null
null
null
stormpath/__init__.py
denibertovic/stormpath-sdk-python
e594a1bb48de3fa8eff26558bf4f72bb056e9d00
[ "Apache-2.0" ]
null
null
null
__author__ = 'Stormpath, Inc.' __copyright__ = 'Copyright 2012-2014 Stormpath, Inc.' __version_info__ = ('1', '3', '1') __version__ = '.'.join(__version_info__) __short_version__ = '.'.join(__version_info__)
29.857143
53
0.722488
23
209
5.173913
0.521739
0.277311
0.302521
0.369748
0
0
0
0
0
0
0
0.058824
0.105263
209
6
54
34.833333
0.57754
0
0
0
0
0
0.263158
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
01b194f4221308edfa23271315c048fd3f1f7ede
147
py
Python
osf/files/addons-bitbucket-local.py
sifulan-access-federation/helm-charts
ea6a36cedc0e5743d6b04440816c9dd8071a23e2
[ "Apache-2.0" ]
null
null
null
osf/files/addons-bitbucket-local.py
sifulan-access-federation/helm-charts
ea6a36cedc0e5743d6b04440816c9dd8071a23e2
[ "Apache-2.0" ]
null
null
null
osf/files/addons-bitbucket-local.py
sifulan-access-federation/helm-charts
ea6a36cedc0e5743d6b04440816c9dd8071a23e2
[ "Apache-2.0" ]
null
null
null
import os # Bitbucket application credentials CLIENT_ID = os.environ['BITBUCKET_CLIENT_ID'] CLIENT_SECRET = os.environ['BITBUCKET_CLIENT_SECRET']
24.5
53
0.823129
19
147
6.052632
0.473684
0.13913
0.313043
0.417391
0
0
0
0
0
0
0
0
0.088435
147
5
54
29.4
0.858209
0.22449
0
0
0
0
0.375
0.205357
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
01e0bca3579a5459b41614e2a3e22c0fdce83d8f
53
py
Python
nima/__init__.py
supertassu/nima
36b18332cdfa6aaf14465e6fb9056f15177afaf4
[ "MIT" ]
null
null
null
nima/__init__.py
supertassu/nima
36b18332cdfa6aaf14465e6fb9056f15177afaf4
[ "MIT" ]
null
null
null
nima/__init__.py
supertassu/nima
36b18332cdfa6aaf14465e6fb9056f15177afaf4
[ "MIT" ]
null
null
null
import nima.cli import nima.config import nima.nginx
13.25
18
0.830189
9
53
4.888889
0.555556
0.681818
0
0
0
0
0
0
0
0
0
0
0.113208
53
3
19
17.666667
0.93617
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
bf163b3565995c5e910652e77ff6c751d39e1257
673
py
Python
satsim/__init__.py
0saurabh0/p1
af172de29f08e6fe21c810e0e87c06644af16c1f
[ "MIT" ]
null
null
null
satsim/__init__.py
0saurabh0/p1
af172de29f08e6fe21c810e0e87c06644af16c1f
[ "MIT" ]
null
null
null
satsim/__init__.py
0saurabh0/p1
af172de29f08e6fe21c810e0e87c06644af16c1f
[ "MIT" ]
null
null
null
from .exceptions import * from .kernel.publication import Publication from .kernel.object import Object from .kernel.component import Component from .kernel.composite import Composite from .kernel.container import Container from .kernel.model import Model from .kernel.entry_point import EntryPoint from .kernel.service import Service from .kernel.services.logger import Logger from .kernel.services.time_keeper import TimeKeeper from .kernel.services.event_manager import EventManager from .kernel.services.scheduler import Scheduler from .kernel.services.resolver import Resolver from .kernel.services.link_registry import LinkRegistry from .simulator import Simulator
35.421053
55
0.846954
87
673
6.505747
0.321839
0.24735
0.190813
0
0
0
0
0
0
0
0
0
0.098068
673
18
56
37.388889
0.932455
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
1758501ae17d098353edff73641e5e87780589a5
105
py
Python
tests/reservoir_sampler.py
syedwaseemjan/StreamSampler
cb2b860e6ff513400ea13dff928cbf08cd667886
[ "MIT" ]
null
null
null
tests/reservoir_sampler.py
syedwaseemjan/StreamSampler
cb2b860e6ff513400ea13dff928cbf08cd667886
[ "MIT" ]
null
null
null
tests/reservoir_sampler.py
syedwaseemjan/StreamSampler
cb2b860e6ff513400ea13dff928cbf08cd667886
[ "MIT" ]
null
null
null
import unittest class ReservoirSampler(unittest): def test_get_sample(self, strlen): pass
13.125
38
0.714286
12
105
6.083333
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.219048
105
7
39
15
0.890244
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
17809f9dacbe9e4b3df0605f0a7426092069a353
19
py
Python
applications/bhouts/modules/stripe/version.py
bhouts/web2py
619d01f6df69d4dbfd14db5347383b0cc73b3a0e
[ "BSD-3-Clause" ]
null
null
null
applications/bhouts/modules/stripe/version.py
bhouts/web2py
619d01f6df69d4dbfd14db5347383b0cc73b3a0e
[ "BSD-3-Clause" ]
null
null
null
applications/bhouts/modules/stripe/version.py
bhouts/web2py
619d01f6df69d4dbfd14db5347383b0cc73b3a0e
[ "BSD-3-Clause" ]
null
null
null
VERSION = '1.41.1'
9.5
18
0.578947
4
19
2.75
0.75
0
0
0
0
0
0
0
0
0
0
0.25
0.157895
19
1
19
19
0.4375
0
0
0
0
0
0.315789
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
178e089e4e5b21fe989445b93f45a2d7c9f43b52
74
py
Python
catstuff/core_plugins/actions/commands/__init__.py
modora/catstuff
7a4ea67e26774e42e90d0c71a4b2c299fe506d73
[ "MIT" ]
null
null
null
catstuff/core_plugins/actions/commands/__init__.py
modora/catstuff
7a4ea67e26774e42e90d0c71a4b2c299fe506d73
[ "MIT" ]
7
2017-12-16T06:16:56.000Z
2017-12-26T06:21:18.000Z
catstuff/core_plugins/actions/commands/__init__.py
modora/catstuff
7a4ea67e26774e42e90d0c71a4b2c299fe506d73
[ "MIT" ]
null
null
null
from .main import Commands from . import config from .parser import Parser
24.666667
26
0.810811
11
74
5.454545
0.545455
0
0
0
0
0
0
0
0
0
0
0
0.148649
74
3
27
24.666667
0.952381
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
bd6fa367280aca47bd4db7015323ca5b2f26ec6c
223
py
Python
foe/admin.py
JosmanPS/foe-gae
a392dc186e4084ffe5acf951a5c742a723252e48
[ "MIT" ]
null
null
null
foe/admin.py
JosmanPS/foe-gae
a392dc186e4084ffe5acf951a5c742a723252e48
[ "MIT" ]
null
null
null
foe/admin.py
JosmanPS/foe-gae
a392dc186e4084ffe5acf951a5c742a723252e48
[ "MIT" ]
null
null
null
from django.contrib import admin from models import * # Register your models here. admin.site.register(OrganizacionEstudiantil) admin.site.register(Miembro) admin.site.register(DatosBancarios) admin.site.register(Comite)
22.3
44
0.825112
28
223
6.571429
0.5
0.195652
0.369565
0
0
0
0
0
0
0
0
0
0.085202
223
9
45
24.777778
0.901961
0.116592
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
bdee34499e3d076c915220a208df57bfd49e3ed4
110
py
Python
Python Fundamentals/4. Functions/Lab/05. Calculate Rectangle Area.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
Python Fundamentals/4. Functions/Lab/05. Calculate Rectangle Area.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
Python Fundamentals/4. Functions/Lab/05. Calculate Rectangle Area.py
a-shiro/SoftUni-Courses
7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77
[ "MIT" ]
null
null
null
def area_of_rectangle(a,b): return a * b a = int(input()) b = int(input()) print(area_of_rectangle(a,b))
15.714286
29
0.654545
21
110
3.238095
0.47619
0.088235
0.441176
0.470588
0.5
0
0
0
0
0
0
0
0.163636
110
7
29
15.714286
0.73913
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0.2
0.4
0.2
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
1
0
0
0
5
da2dc87199aa37f72f64134b2fde1539a86ee161
67
py
Python
jinete/algorithms/heuristics/local_search/strategies/plannings/__init__.py
PhilippeGalvan/jinete
b7b22f8265935bc41b42ad8c4bf7464dc21ab424
[ "MIT" ]
null
null
null
jinete/algorithms/heuristics/local_search/strategies/plannings/__init__.py
PhilippeGalvan/jinete
b7b22f8265935bc41b42ad8c4bf7464dc21ab424
[ "MIT" ]
null
null
null
jinete/algorithms/heuristics/local_search/strategies/plannings/__init__.py
PhilippeGalvan/jinete
b7b22f8265935bc41b42ad8c4bf7464dc21ab424
[ "MIT" ]
null
null
null
from .reallocation import ( ReallocationLocalSearchStrategy, )
16.75
36
0.791045
4
67
13.25
1
0
0
0
0
0
0
0
0
0
0
0
0.149254
67
3
37
22.333333
0.929825
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
da84741c6227a6cf3f278bc149f02814b871b25d
1,522
py
Python
Paper_Specific_Versions/2019_DTI/Code/9-ADNI_classification_balanced_data.py
adamwild/AD-ML
e4ac0b7d312ab482b9b52bb3f5c6745cc06431e9
[ "MIT" ]
null
null
null
Paper_Specific_Versions/2019_DTI/Code/9-ADNI_classification_balanced_data.py
adamwild/AD-ML
e4ac0b7d312ab482b9b52bb3f5c6745cc06431e9
[ "MIT" ]
null
null
null
Paper_Specific_Versions/2019_DTI/Code/9-ADNI_classification_balanced_data.py
adamwild/AD-ML
e4ac0b7d312ab482b9b52bb3f5c6745cc06431e9
[ "MIT" ]
null
null
null
from clinica_ml_dwi.mlworkflow_dwi_utils import run_voxel_based_classification # ######################## # ### Original classification # ######################## caps_directory= 'PATH/TO/CAPS' output_dir = 'PATH/TO/CLASSIFICATION_OUTPUT' n_threads = 72 n_iterations = 250 test_size = 0.2 grid_search_folds = 10 # ######################## # ### Balanced classification # ######################## balanced_down_sample = True ##### CN vs pMCI task='CN_vs_pMCI_VB' diagnoses_tsv = 'PATH/TO/DIAGONISIS_TSV' subjects_visits_tsv = 'PATH/TO/SUBJECTS_VISITS_TSV' run_voxel_based_classification(caps_directory, diagnoses_tsv, subjects_visits_tsv, output_dir, task, n_threads, n_iterations, test_size, grid_search_folds, balanced_down_sample=balanced_down_sample) ###### CN vs MCI task='CN_vs_MCI_VB' diagnoses_tsv = 'PATH/TO/DIAGONISIS_TSV' subjects_visits_tsv = 'PATH/TO/SUBJECTS_VISITS_TSV' run_voxel_based_classification(caps_directory, diagnoses_tsv, subjects_visits_tsv, output_dir, task, n_threads, n_iterations, test_size, grid_search_folds, balanced_down_sample=balanced_down_sample) ###### sMCI vs pMCI task='sMCI_vs_pMCI_VB' diagnoses_tsv = 'PATH/TO/DIAGONISIS_TSV' subjects_visits_tsv = 'PATH/TO/SUBJECTS_VISITS_TSV' run_voxel_based_classification(caps_directory, diagnoses_tsv, subjects_visits_tsv, output_dir, task, n_threads, n_iterations, test_size, grid_search_folds, balanced_down_sample=balanced_down_sample)
40.052632
135
0.721419
198
1,522
5.065657
0.237374
0.125623
0.152542
0.119641
0.708873
0.708873
0.708873
0.708873
0.708873
0.708873
0
0.006844
0.136005
1,522
38
136
40.052632
0.755894
0.057819
0
0.521739
0
0
0.174445
0.13466
0
0
0
0
0
1
0
false
0
0.043478
0
0.043478
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
da925443df8a7646d69d37487d3bd8f3a346c91b
65
py
Python
Modules - Lab/Modules/Triangle test.py
DiyanKalaydzhiev23/Advanced---Python
ed2c60bb887c49e5a87624719633e2b8432f6f6b
[ "MIT" ]
null
null
null
Modules - Lab/Modules/Triangle test.py
DiyanKalaydzhiev23/Advanced---Python
ed2c60bb887c49e5a87624719633e2b8432f6f6b
[ "MIT" ]
null
null
null
Modules - Lab/Modules/Triangle test.py
DiyanKalaydzhiev23/Advanced---Python
ed2c60bb887c49e5a87624719633e2b8432f6f6b
[ "MIT" ]
null
null
null
from Create_Triangle import create_triangle create_triangle(5)
21.666667
44
0.861538
9
65
5.888889
0.555556
0.792453
0
0
0
0
0
0
0
0
0
0.017241
0.107692
65
3
45
21.666667
0.896552
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
e53ebec21a3c7a297e37845200041ed7b9fb65d9
46
py
Python
src/semaphore/github/__init__.py
lsst-sqre/semaphore
73164618ac0c8d0a03f3122f3ffe8b3820fa43f0
[ "MIT" ]
null
null
null
src/semaphore/github/__init__.py
lsst-sqre/semaphore
73164618ac0c8d0a03f3122f3ffe8b3820fa43f0
[ "MIT" ]
2
2022-03-08T00:01:27.000Z
2022-03-28T17:45:01.000Z
src/semaphore/github/__init__.py
lsst-sqre/semaphore
73164618ac0c8d0a03f3122f3ffe8b3820fa43f0
[ "MIT" ]
null
null
null
"""GitHub App functionality for Semaphore."""
23
45
0.73913
5
46
6.8
1
0
0
0
0
0
0
0
0
0
0
0
0.108696
46
1
46
46
0.829268
0.847826
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
e5443a0f6edeaeb343fa9181824da29da2389c0f
225
py
Python
lambda-code/decompress_zlib/lambda_function.py
aws-samples/amazon-s3-object-lambda-decompression
ebe3851d5f0f867863e5efa73ff8e089c2581d9d
[ "MIT-0" ]
5
2021-04-06T14:37:49.000Z
2022-01-04T13:41:01.000Z
lambda-code/decompress_zlib/lambda_function.py
aws-samples/amazon-s3-object-lambda-decompression
ebe3851d5f0f867863e5efa73ff8e089c2581d9d
[ "MIT-0" ]
null
null
null
lambda-code/decompress_zlib/lambda_function.py
aws-samples/amazon-s3-object-lambda-decompression
ebe3851d5f0f867863e5efa73ff8e089c2581d9d
[ "MIT-0" ]
2
2021-04-19T13:51:14.000Z
2021-06-10T18:54:04.000Z
import common_functions import zlib import stream_decompressor def decompress(event, context): return common_functions.decompress(event, lambda data: stream_decompressor.StreamDecompressor(data, zlib.decompressobj()))
25
126
0.831111
25
225
7.32
0.6
0.163934
0
0
0
0
0
0
0
0
0
0
0.097778
225
8
127
28.125
0.901478
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.6
0.2
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
1
1
0
0
5
e555c8fd83c13f782f6d04c3d7a3e424166f4644
7,871
py
Python
practicas/sudoku/vent.py
mrfreedeer/Arquitectura-Cliente-Servidor
aac90b50d150de29a2cee276050013f7bb826d72
[ "MIT" ]
null
null
null
practicas/sudoku/vent.py
mrfreedeer/Arquitectura-Cliente-Servidor
aac90b50d150de29a2cee276050013f7bb826d72
[ "MIT" ]
null
null
null
practicas/sudoku/vent.py
mrfreedeer/Arquitectura-Cliente-Servidor
aac90b50d150de29a2cee276050013f7bb826d72
[ "MIT" ]
null
null
null
import string import random import hashlib import zmq import time import sys from random import sample from operator import itemgetter # Init context context = zmq.Context() # socket with workers workers = context.socket(zmq.PUSH) workers.bind("tcp://*:5557") # socket with recv sink recvsink = context.socket(zmq.PULL) recvsink.connect("tcp://localhost:5560") ## FUNCTIONS ## Alain T's function https://stackoverflow.com/questions/45471152/how-to-create-a-sudoku-puzzle-in-python def genBoard(): base = 3 # Will generate any size of random sudoku board in O(n^2) time side = base*base nums = sample(range(1,side+1),side) # random numbers board = [[nums[(base*(r%base)+r//base+c)%side] for c in range(side) ] for r in range(side)] rows = [ r for g in sample(range(base),base) for r in sample(range(g*base,(g+1)*base),base) ] cols = [ c for g in sample(range(base),base) for c in sample(range(g*base,(g+1)*base),base) ] board = [[board[r][c] for c in cols] for r in rows] return board # List of nine lists def genSudoku(board): side = 0 squares = side*side empties = squares * 3//4 for p in sample(range(squares),empties): board[p//side][p%side] = 0 print("Solving sudoku:") numSize = len(str(side)) # for line in board: print("["+" ".join(f"{n or '.':{numSize}}" for n in line)+"]") return board def printSolution(sudoku): print('Solution Found') for line in sudoku: print(line) def filterSudokus(work, hashList, globalTodo): print("LEN WORK",len(work)) print('hashlist len', len(hashList)) print('------------------------') filteredList = list(filter(lambda x: hash(str(x[0])) not in hashList, work)) # print("filteredList", filteredList) print('------------------------') hashList += list(map(lambda x: hash(str(x)), filteredList)) globalTodo.extend(filteredList) print("gtodo len", len(globalTodo)) globalTodo = sorted(globalTodo, key=itemgetter(1), reverse=True) print("blank space") print(set(i[1] for i in globalTodo)) print("-------------------") return filteredList board = genBoard() sudoku = genSudoku(board) #hardest sudoku according to Finnish mathematician #Arto Inkala. Rated 11 in difficulty in a five star system sudoku = [[8,0,0,0,0,0,0,0,0], [0,0,3,6,0,0,0,0,0], [0,7,0,0,9,0,2,0,0], [0,5,0,0,0,7,0,0,0], [0,0,0,0,4,5,7,0,0], [0,0,0,1,0,0,0,3,0], [0,0,1,0,0,0,0,6,8], [0,0,8,5,0,0,0,1,0], [0,9,0,0,0,0,4,0,0]] # sudoku = [[8,0,9,0,10,0,0,12,16,0,15,0,0,0,0,4], # [0,0,15,0,0,0,5,0,0,7,0,10,0,0,13,0], # [2,0,0,0,0,0,0,4,0,0,0,0,0,16,0,14], # [0,6,0,3,0,0,14,0,0,0,11,0,9,0,0,0], # [0,0,0,0,0,9,0,0,1,0,0,2,0,0,0,7], # [11,0,0,0,14,0,0,6,0,0,0,0,0,13,0,0], # [0,7,0,16,0,2,0,0,12,0,0,0,0,0,1,0], # [0,0,0,5,8,0,0,13,0,3,0,0,0,0,0,9], # [12,0,4,0,0,0,7,0,13,0,8,0,11,0,0,0], # [0,5,0,8,0,13,0,10,0,16,0,4,0,0,0,0], # [0,0,14,0,0,0,9,0,6,0,0,11,0,1,0,3], # [1,0,0,0,3,0,0,5,0,0,0,0,6,0,16,0], # [14,0,7,0,0,0,10,0,0,12,0,9,0,8,2,0], # [0,16,0,12,0,14,0,3,0,0,0,0,13,0,0,11], # [5,10,0,0,6,0,11,0,0,0,14,0,0,7,0,0], # [15,0,1,0,0,0,0,2,0,0,0,5,0,0,0,12]] # sudoku = [[15, 2, 12, 0, 9, 0, 0, 0, 0, 8, 5, 0, 0, 0, 3, 0], # [0, 0, 11, 13, 0, 0, 14, 0, 0, 9, 0, 7, 0, 0, 0, 12], # [9, 0, 0, 7, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 8, 5], # [0, 0, 0, 0, 0, 12, 0, 0, 0, 3, 0, 13, 0,0, 9, 10], # [0, 6, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,0, 0, 0, 1], # [11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 2], # [0, 0, 2, 15, 0, 1, 0, 0, 0, 5, 0, 8, 0, 0, 0, 0], # [0, 0, 1, 0, 11, 0, 0, 0, 7, 0, 2, 0, 8, 0, 5, 0], # [0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 15, 0, 16, 0, 4, 0], # [6, 12, 0, 0, 0, 0, 0, 0, 5, 0, 8, 0, 0, 0, 13, 0], # [13, 11, 0, 0, 0, 0, 0, 16, 10, 0, 0,0, 0, 12, 6, 10], # [0, 0, 0, 16, 0, 0, 0, 0, 0, 13, 0, 0, 2, 0, 7, 0], # [16, 0, 0, 0, 14, 0, 0, 5, 0, 1, 0, 0, 0, 0, 2, 0], # [0, 0, 0, 0, 0, 0, 8, 0, 9, 0, 0, 0, 0, 0, 14, 0], # [0, 0, 6, 0, 2, 0, 9, 0, 0, 0, 0, 0, 0, 3, 0, 10], # [2, 0, 7, 12, 0, 0, 0, 0, 0, 0, 6, 5, 0, 0, 0, 0]] # sudoku = [[15, 2, 12, 0, 9, 0, 0, 0, 0, 8, 5, 0, 0, 0, 3, 0], # [0, 0, 11, 13, 0, 0, 14, 0, 0, 9, 0, 7, 0, 0, 0, 12], # [9, 0, 0, 7, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 8, 5], # [0, 0, 0, 0, 0, 12, 0, 0, 0, 3, 0, 13, 0,0, 9, 10], # [0, 6, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0,0, 0, 0, 1], # [11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 2], # [0, 0, 2, 15, 0, 1, 0, 0, 0, 5, 0, 8, 0, 0, 0, 0], # [0, 0, 1, 0, 11, 0, 0, 0, 7, 0, 2, 0, 8, 0, 5, 0], # [0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 15, 0, 16, 0, 4, 0], # [6, 12, 0, 0, 0, 0, 0, 0, 5, 0, 8, 0, 0, 0, 13, 0], # [13, 11, 0, 0, 0, 0, 0, 16, 10, 0, 0,0, 0, 12, 6, 10], # [0, 0, 0, 16, 0, 0, 0, 0, 0, 13, 0, 0, 2, 0, 7, 0], # [16, 0, 0, 0, 14, 0, 0, 5, 0, 1, 0, 0, 0, 0, 2, 0], # [0, 0, 0, 0, 0, 0, 8, 0, 9, 0, 0, 0, 0, 0, 14, 0], # [0, 0, 6, 0, 2, 0, 9, 0, 0, 0, 0, 0, 0, 3, 0, 10], # [2, 0, 7, 12, 0, 0, 0, 0, 0, 0, 6, 5, 0, 0, 0, 0]] # sudoku = [[8,0,0,0,0,0,0,0,0], # [0,0,3,6,0,0,0,0,0], # [0,7,0,0,9,0,2,0,0], # [0,5,0,0,0,7,0,0,0], # [0,0,0,0,4,5,7,0,0], # [0,0,0,1,0,0,0,3,0], # [0,0,1,0,0,0,0,6,8], # [0,0,8,5,0,0,0,1,0], # [0,9,0,0,0,0,4,0,0]] # 159 0s Solvable. Solution not found, 630000 dead paths. #Runtime: 2h # sudoku = [[0,9,0,0,0,0,0,0,0,0,2,10,1,15,0,0], # [0,0,0,3,15,2,0,0,0,0,16,0,4,9,10,0], # [0,0,0,7,12,0,8,0,1,0,0,0,14,0,0,0], # [16,0,0,15,0,0,3,0,0,8,4,0,0,0,11,2], # [0,11,0,2,0,15,10,0,4,0,0,0,0,0,0,6], # [0,0,3,0,6,16,1,0,0,0,0,0,0,7,0,12], # [12,0,0,0,13,0,0,0,16,0,15,3,9,0,0,0], # [15,0,10,4,3,0,11,0,0,14,7,9,0,0,0,0], # [10,0,0,0,0,8,7,0,0,1,0,12,0,11,5,0], # [0,1,6,9,0,0,0,0,0,0,0,0,3,0,0,0], # [0,15,11,12,0,0,0,0,7,0,0,0,0,10,0,0], # [2,7,0,0,0,0,0,9,0,16,11,0,0,0,0,1], # [0,8,0,0,0,11,2,0,15,0,0,1,0,3,12,0], # [3,16,0,1,0,0,12,0,0,9,5,0,0,0,0,0], # [0,0,0,13,0,0,0,0,0,0,0,0,2,1,0,15], # [0,0,0,0,7,0,9,0,13,0,10,0,5,14,16,11]] #159 0s Solvable. Solution found, 0.4 s with 4 workers # sudoku = [ # [12,8,0,0,4,0,1,7,16,0,0,3,0,5,0,0], # [11,9,14,0,0,8,0,0,0,0,4,0,0,3,0,0], # [4,10,0,0,0,0,0,0,9,0,0,0,0,2,0,0], # [6,0,13,0,0,0,0,0,8,0,0,0,1,7,0,4], # [7,0,0,0,0,0,0,4,0,0,0,0,0,0,0,2], # [3,0,0,4,0,0,0,0,0,0,0,0,0,0,0,7], # [5,0,9,6,0,0,0,0,0,0,7,0,0,4,0,3], # [2,0,8,0,0,0,0,0,0,0,0,0,0,0,0,5], # [0,4,3,0,0,6,5,9,0,2,0,8,7,0,0,1], # [0,12,7,0,0,4,3,0,0,5,0,9,2,8,0,0], # [0,0,2,8,0,0,7,0,0,3,0,0,0,9,0,0], # [0,0,5,9,0,0,2,0,0,7,1,0,3,0,4,0], # [8,0,0,0,0,2,0,0,0,4,0,0,6,0,3,9], # [0,7,0,1,9,0,6,0,0,0,0,0,0,0,2,10], # [9,3,0,0,8,5,0,0,2,0,0,0,0,1,7,0], # [10,0,0,15,0,7,0,1,3,6,9,0,0,14,5,8] # ] blankspaces = 0 for i in sudoku: for j in i: if j == 0: blankspaces += 1 printSolution(sudoku) print("Blankspaces: ", blankspaces) print("Press enter when workers are ready...") _ = input() print("sending tasks to workers") sudokusize = len(sudoku) # Send initial sudoku tstart = time.time() workers.send_json({ 'sudoku': sudoku, 'size': sudokusize }) solutionFound = False hashList = [] globalTodo = [] hashList.append(hash(str(sudoku))) while not solutionFound: sink_msg = recvsink.recv_json() solutionFound = sink_msg["solved"] print("Len hashList:", len(hashList)) if solutionFound: tend = time.time() printSolution(sink_msg['solution']) print("TIME:", tend-tstart) break else: work = sink_msg["work"] globalTodo.extend(work) print("gtodo len", len(globalTodo)) globalTodo = sorted(globalTodo, key=itemgetter(1), reverse=True) print("blank space", set(i[1] for i in globalTodo)) cont = 0 while cont < 3: if (len(globalTodo) > 0): workers.send_json({ 'sudoku': globalTodo.pop()[0], 'size' : sudokusize }) else: print('no global todo') cont += 1 cont = 0
33.636752
110
0.50667
1,947
7,871
2.044171
0.088855
0.30804
0.296985
0.251256
0.44799
0.403266
0.369095
0.331156
0.296734
0.260553
0
0.263551
0.200737
7,871
234
111
33.636752
0.369099
0.550502
0
0.169811
0
0
0.096821
0.013998
0
0
0
0
0
1
0.037736
false
0
0.075472
0
0.141509
0.207547
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
e58818e562f93ac8ebce342dae2871f36dc2acaa
315
py
Python
safe_eval/errors.py
bentheiii/safe_eval
caf9e7a6df3d6029e4bdac2abe11326d55c09ed2
[ "MIT" ]
1
2021-05-16T17:24:05.000Z
2021-05-16T17:24:05.000Z
safe_eval/errors.py
bentheiii/safe_eval
caf9e7a6df3d6029e4bdac2abe11326d55c09ed2
[ "MIT" ]
null
null
null
safe_eval/errors.py
bentheiii/safe_eval
caf9e7a6df3d6029e4bdac2abe11326d55c09ed2
[ "MIT" ]
null
null
null
class UnauthorizedEvalError(ValueError): pass class UnauthorizedNameAccess(UnauthorizedEvalError, NameError): pass class UnauthorizedCall(UnauthorizedEvalError): pass class UnauthorizedAttributeAccess(UnauthorizedEvalError): pass class UnauthorizedSubscript(UnauthorizedEvalError): pass
16.578947
63
0.809524
21
315
12.142857
0.428571
0.141176
0.235294
0
0
0
0
0
0
0
0
0
0.139683
315
18
64
17.5
0.940959
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
1
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
e58cba279d87ceebfef6c247e149e4f51e255c3d
136
py
Python
setup.py
oneoffcoder/lasso-bbn
f3e16bb23fe1b76f5a02eeb7b784044501fed922
[ "Apache-2.0" ]
null
null
null
setup.py
oneoffcoder/lasso-bbn
f3e16bb23fe1b76f5a02eeb7b784044501fed922
[ "Apache-2.0" ]
null
null
null
setup.py
oneoffcoder/lasso-bbn
f3e16bb23fe1b76f5a02eeb7b784044501fed922
[ "Apache-2.0" ]
null
null
null
from setuptools import setup, find_packages setup( packages=find_packages(exclude=('*.tests', '*.tests.*', 'tests.*', 'tests')), )
22.666667
81
0.669118
15
136
5.933333
0.533333
0.337079
0.337079
0
0
0
0
0
0
0
0
0
0.117647
136
5
82
27.2
0.741667
0
0
0
0
0
0.205882
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
e5ad5342870c698cd52d06464ba2b53ba8e4c627
124
py
Python
src/pygim/__init__.py
Debith/pygim
b412b8493164efb78fd4edeb0523877051da9b6b
[ "MIT" ]
null
null
null
src/pygim/__init__.py
Debith/pygim
b412b8493164efb78fd4edeb0523877051da9b6b
[ "MIT" ]
null
null
null
src/pygim/__init__.py
Debith/pygim
b412b8493164efb78fd4edeb0523877051da9b6b
[ "MIT" ]
null
null
null
""" This module imports all Domain Driven Design related modules. """ from .system import Factory, Unset from .ddd import *
20.666667
61
0.75
17
124
5.470588
0.882353
0
0
0
0
0
0
0
0
0
0
0
0.16129
124
6
62
20.666667
0.894231
0.491935
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e5b531d7e1e82d2134fd4105ee192f4e01826a62
43
py
Python
tests/socket_test.py
evolvIQ/python-pipe-rpc
c1e4607a152f57326f79da9528e8dd6c97a841e2
[ "Apache-2.0" ]
2
2019-01-24T22:06:59.000Z
2019-03-19T13:30:58.000Z
tests/socket_test.py
rickardp/streamrpc
c1e4607a152f57326f79da9528e8dd6c97a841e2
[ "Apache-2.0" ]
null
null
null
tests/socket_test.py
rickardp/streamrpc
c1e4607a152f57326f79da9528e8dd6c97a841e2
[ "Apache-2.0" ]
null
null
null
from . import xmlrpc_test import streamrpc
14.333333
25
0.837209
6
43
5.833333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.139535
43
2
26
21.5
0.945946
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
e5d4e9964894d43148b7fa971b190d5810da8f25
4,423
py
Python
tonberry/expose.py
Ayehavgunne/Cactuar
d7a25c44321f9ab20701147c42580f0f56c4b27f
[ "MIT" ]
31
2020-02-03T08:57:55.000Z
2021-11-29T06:13:46.000Z
tonberry/expose.py
Ayehavgunne/Cactuar
d7a25c44321f9ab20701147c42580f0f56c4b27f
[ "MIT" ]
1
2020-06-13T18:10:47.000Z
2020-06-13T18:39:54.000Z
tonberry/expose.py
Ayehavgunne/Tonberry
d7a25c44321f9ab20701147c42580f0f56c4b27f
[ "MIT" ]
null
null
null
import sys from typing import Callable, Optional, Union from tonberry.exceptions import FigureItOutLaterException from tonberry.models import Methods, RouteMapping class _Expose: _registrar = Methods() @classmethod def _new_registrar(cls) -> None: cls._registrar = Methods() @classmethod def _register( cls, func: Callable, http_method: str, route: Optional[Union[str, Callable]] = None, frame_index: int = 3, ) -> None: if route is None or not isinstance(route, str): route = func.__name__ # noinspection PyProtectedMember parents = sys._getframe(frame_index).f_locals if "__qualname__" in parents and "__module__" in parents: module_name = parents["__module__"] qual_name = parents["__qualname__"] else: raise FigureItOutLaterException cls._registrar.get(http_method).mappings.append( RouteMapping(route, func, module_name, qual_name, http_method) ) @classmethod def get(cls, route: Union[str, Callable] = None) -> Callable: def wrapper(wrapped_func: Callable, frame_index: int = 2) -> Callable: cls._register(wrapped_func, "GET", route, frame_index) return wrapped_func if callable(route): func = route route = None return wrapper(func, 3) else: return wrapper @classmethod def post(cls, route: Union[str, Callable] = None) -> Callable: def wrapper(wrapped_func: Callable, frame_index: int = 2) -> Callable: cls._register(wrapped_func, "POST", route, frame_index) return wrapped_func if callable(route): func = route route = None return wrapper(func, 3) else: return wrapper @classmethod def put(cls, route: Union[str, Callable] = None) -> Callable: def wrapper(wrapped_func: Callable, frame_index: int = 2) -> Callable: cls._register(wrapped_func, "PUT", route, frame_index) return wrapped_func if callable(route): func = route route = None return wrapper(func, 3) else: return wrapper @classmethod def delete(cls, route: Union[str, Callable] = None) -> Callable: def wrapper(wrapped_func: Callable, frame_index: int = 2) -> Callable: cls._register(wrapped_func, "DELETE", route, frame_index) return wrapped_func if callable(route): func = route route = None return wrapper(func, 3) else: return wrapper @classmethod def patch(cls, route: Union[str, Callable] = None) -> Callable: def wrapper(wrapped_func: Callable, frame_index: int = 2) -> Callable: cls._register(wrapped_func, "PATCH", route, frame_index) return wrapped_func if callable(route): func = route route = None return wrapper(func, 3) else: return wrapper @classmethod def head(cls, route: Union[str, Callable] = None) -> Callable: def wrapper(wrapped_func: Callable, frame_index: int = 2) -> Callable: cls._register(wrapped_func, "HEAD", route, frame_index) return wrapped_func if callable(route): func = route route = None return wrapper(func, 3) else: return wrapper @classmethod def options(cls, route: Union[str, Callable] = None) -> Callable: def wrapper(wrapped_func: Callable, frame_index: int = 2) -> Callable: cls._register(wrapped_func, "OPTIONS", route, frame_index) return wrapped_func if callable(route): func = route route = None return wrapper(func, 3) else: return wrapper @classmethod def websocket(cls, route: Union[str, Callable] = None) -> Callable: def wrapper(wrapped_func: Callable, frame_index: int = 2) -> Callable: cls._register(wrapped_func, "WEBSOCKET", route, frame_index) return wrapped_func if callable(route): func = route route = None return wrapper(func, 3) else: return wrapper
31.820144
78
0.586028
468
4,423
5.354701
0.136752
0.105347
0.057462
0.071828
0.706305
0.706305
0.706305
0.706305
0.706305
0.706305
0
0.005707
0.326475
4,423
138
79
32.050725
0.835515
0.006783
0
0.646552
0
0
0.019358
0
0
0
0
0
0
1
0.155172
false
0
0.034483
0
0.413793
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
e5e8417163cde8d3917476ec473ac9195ac981cf
205
py
Python
examples/niteo.co/htmldoom_pages/render.py
suryasr007/htmldoom
ce116ee442127c5f04d4ed5fc3547c23873287db
[ "MIT" ]
null
null
null
examples/niteo.co/htmldoom_pages/render.py
suryasr007/htmldoom
ce116ee442127c5f04d4ed5fc3547c23873287db
[ "MIT" ]
null
null
null
examples/niteo.co/htmldoom_pages/render.py
suryasr007/htmldoom
ce116ee442127c5f04d4ed5fc3547c23873287db
[ "MIT" ]
null
null
null
from htmldoom_pages.index import render as _render def render(): return _render({"doctitle": "Niteo - Empowering small businesses online since '07"}) if __name__ == "__main__": print(render())
20.5
88
0.712195
25
205
5.4
0.84
0
0
0
0
0
0
0
0
0
0
0.011765
0.170732
205
9
89
22.777778
0.782353
0
0
0
0
0
0.331707
0
0
0
0
0
0
1
0.2
true
0
0.2
0.2
0.6
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
0
0
1
0
0
1
1
0
0
5
f902d7c8be9cccd2f0a3c58bfd4fcb3bb242ce5b
4,182
py
Python
api_tests/institutions/views/test_institution_nodes_list.py
alexschiller/osf.io
4122d4be152c6189142c2ebb19cfdee09c77035d
[ "Apache-2.0" ]
null
null
null
api_tests/institutions/views/test_institution_nodes_list.py
alexschiller/osf.io
4122d4be152c6189142c2ebb19cfdee09c77035d
[ "Apache-2.0" ]
null
null
null
api_tests/institutions/views/test_institution_nodes_list.py
alexschiller/osf.io
4122d4be152c6189142c2ebb19cfdee09c77035d
[ "Apache-2.0" ]
null
null
null
from nose.tools import * # flake8: noqa from tests.base import ApiTestCase from osf_tests.factories import InstitutionFactory, AuthUserFactory, ProjectFactory, NodeFactory from api.base.settings.defaults import API_BASE class TestInstitutionNodeList(ApiTestCase): def setUp(self): super(TestInstitutionNodeList, self).setUp() self.institution = InstitutionFactory() self.node1 = ProjectFactory(is_public=True) self.node1.affiliated_institutions.add(self.institution) self.node1.save() self.user1 = AuthUserFactory() self.node2 = ProjectFactory(creator=self.user1, is_public=False) self.node2.affiliated_institutions.add(self.institution) self.node2.save() self.node3 = ProjectFactory(is_public=False) self.node3.affiliated_institutions.add(self.institution) self.node3.save() self.institution_node_url = '/{0}institutions/{1}/nodes/'.format(API_BASE, self.institution._id) def test_return_all_public_nodes(self): res = self.app.get(self.institution_node_url) assert_equal(res.status_code, 200) ids = [each['id'] for each in res.json['data']] assert_in(self.node1._id, ids) assert_not_in(self.node2._id, ids) assert_not_in(self.node3._id, ids) def test_does_not_return_private_nodes_with_auth(self): res = self.app.get(self.institution_node_url, auth=self.user1.auth) assert_equal(res.status_code, 200) ids = [each['id'] for each in res.json['data']] assert_in(self.node1._id, ids) assert_not_in(self.node2._id, ids) assert_not_in(self.node3._id, ids) def test_affiliated_component_with_affiliated_parent_not_returned(self): # version < 2.2 self.component = NodeFactory(parent=self.node1, is_public=True) self.component.affiliated_institutions.add(self.institution) self.component.save() res = self.app.get(self.institution_node_url, auth=self.user1.auth) affiliated_node_ids = [node['id'] for node in res.json['data']] assert_equal(res.status_code, 200) assert_in(self.node1._id, affiliated_node_ids) assert_not_in(self.component._id, affiliated_node_ids) def test_affiliated_component_without_affiliated_parent_not_returned(self): # version < 2.2 self.node = ProjectFactory(is_public=True) self.component = NodeFactory(parent=self.node, is_public=True) self.component.affiliated_institutions.add(self.institution) self.component.save() res = self.app.get(self.institution_node_url, auth=self.user1.auth) affiliated_node_ids = [node['id'] for node in res.json['data']] assert_equal(res.status_code, 200) assert_not_in(self.node._id, affiliated_node_ids) assert_not_in(self.component._id, affiliated_node_ids) def test_affiliated_component_with_affiliated_parent_returned(self): # version 2.2 self.component = NodeFactory(parent=self.node1, is_public=True) self.component.affiliated_institutions.add(self.institution) self.component.save() url = '{}?version=2.2'.format(self.institution_node_url) res = self.app.get(url, auth=self.user1.auth) affiliated_node_ids = [node['id'] for node in res.json['data']] assert_equal(res.status_code, 200) assert_in(self.node1._id, affiliated_node_ids) assert_in(self.component._id, affiliated_node_ids) def test_affiliated_component_without_affiliated_parent_returned(self): # version 2.2 self.node = ProjectFactory(is_public=True) self.component = NodeFactory(parent=self.node, is_public=True) self.component.affiliated_institutions.add(self.institution) self.component.save() url = '{}?version=2.2'.format(self.institution_node_url) res = self.app.get(url, auth=self.user1.auth) affiliated_node_ids = [node['id'] for node in res.json['data']] assert_equal(res.status_code, 200) assert_not_in(self.node._id, affiliated_node_ids) assert_in(self.component._id, affiliated_node_ids)
44.489362
104
0.703969
550
4,182
5.092727
0.132727
0.085684
0.072831
0.042842
0.783292
0.772581
0.725455
0.725455
0.710104
0.686898
0
0.017373
0.187948
4,182
93
105
44.967742
0.80742
0.015304
0
0.643836
0
0
0.022136
0.006568
0
0
0
0
0.273973
1
0.09589
false
0
0.054795
0
0.164384
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
00defdb4e108bef819a824dce5b3678ffc5a5b77
57
py
Python
pythonHelloWorld.py
abhilashkr1996/HelloWorld
07615245ef7e7023c119bc5e51b1dc261e3fbb26
[ "Apache-2.0" ]
7
2020-07-26T08:47:22.000Z
2020-10-30T10:27:35.000Z
pythonHelloWorld.py
abhilashkr1996/HelloWorld
07615245ef7e7023c119bc5e51b1dc261e3fbb26
[ "Apache-2.0" ]
null
null
null
pythonHelloWorld.py
abhilashkr1996/HelloWorld
07615245ef7e7023c119bc5e51b1dc261e3fbb26
[ "Apache-2.0" ]
null
null
null
# Python Program to say Hello World print("Hello World")
19
35
0.754386
9
57
4.777778
0.777778
0.465116
0
0
0
0
0
0
0
0
0
0
0.157895
57
2
36
28.5
0.895833
0.578947
0
0
0
0
0.5
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
00e84ab923ca4cad44cf5c3212cf9d16c26f9163
240
py
Python
lib/jnpr/eznc/resrc/srx/nat/__init__.py
cro/py-junos-eznc
4c111476cc8eb7599462379ddf55743ae30bbf5c
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-07-18T15:41:24.000Z
2021-07-18T15:41:24.000Z
lib/jnpr/junos/cfg/srx/nat/__init__.py
stoned/py-junos-eznc
93e5530e998a8d6aae758aa7ad1cca420e6501b8
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
lib/jnpr/junos/cfg/srx/nat/__init__.py
stoned/py-junos-eznc
93e5530e998a8d6aae758aa7ad1cca420e6501b8
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
from .nat_src_pool import NatSrcPool from .nat_src_ruleset import NatSrcRuleSet from .nat_src_rule import NatSrcRule from .nat_st_ruleset import NatStaticRuleSet from .nat_st_rule import NatStaticRule from .nat_proxy_arp import NatProxyArp
34.285714
44
0.875
36
240
5.5
0.444444
0.212121
0.151515
0
0
0
0
0
0
0
0
0
0.1
240
7
45
34.285714
0.916667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
daa7b5665d5d328d1436bdfcdfc4743e3496c10d
50
py
Python
codesignal/arcade/python/intro_05_shape_area.py
tinesife94/random
b802924dce4635ae074d30dc03962d4301bd6d8b
[ "MIT" ]
null
null
null
codesignal/arcade/python/intro_05_shape_area.py
tinesife94/random
b802924dce4635ae074d30dc03962d4301bd6d8b
[ "MIT" ]
null
null
null
codesignal/arcade/python/intro_05_shape_area.py
tinesife94/random
b802924dce4635ae074d30dc03962d4301bd6d8b
[ "MIT" ]
null
null
null
def solution(n): return 2 * n * n - 2 * n + 1
16.666667
32
0.48
10
50
2.4
0.6
0.166667
0
0
0
0
0
0
0
0
0
0.09375
0.36
50
2
33
25
0.65625
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
daaa15c1d9cd15d4f50ce77db04faebfec4206ef
40
py
Python
awsjar/exceptions.py
ysawa0/awsjar2
87f538da606635c93eaa4629a20a7873c3066d95
[ "Apache-2.0" ]
6
2019-01-12T06:41:51.000Z
2020-12-14T21:46:07.000Z
awsjar/exceptions.py
ysawa0/awsjar2
87f538da606635c93eaa4629a20a7873c3066d95
[ "Apache-2.0" ]
5
2019-01-07T02:34:02.000Z
2019-04-05T07:36:56.000Z
awsjar/exceptions.py
ysawa0/awsjar2
87f538da606635c93eaa4629a20a7873c3066d95
[ "Apache-2.0" ]
null
null
null
class ClientError(ValueError): pass
13.333333
30
0.75
4
40
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.175
40
2
31
20
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
dac4e4f4d9b4cbe501f51bc06988f28a0cb50b7d
143
py
Python
Mundo 2/ex048.py
lucashsbarros/Python_Curso
01f7b5c89636cacc774d38b39951ac2b73272c63
[ "MIT" ]
null
null
null
Mundo 2/ex048.py
lucashsbarros/Python_Curso
01f7b5c89636cacc774d38b39951ac2b73272c63
[ "MIT" ]
null
null
null
Mundo 2/ex048.py
lucashsbarros/Python_Curso
01f7b5c89636cacc774d38b39951ac2b73272c63
[ "MIT" ]
null
null
null
'''Faça um programa que calcule a soma entre todos os numeros impares que são multiplos de tres e que se encontram no intervalo de 1 até 500'''
71.5
97
0.776224
27
143
4.111111
0.888889
0
0
0
0
0
0
0
0
0
0
0.034188
0.181818
143
2
98
71.5
0.91453
0.958042
0
null
0
null
0
0
null
0
0
0.5
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
0
0
0
0
0
5
9704b31feef51c1737237b3b930bb6c227114c53
17,336
py
Python
sdk/python/pulumi_checkly/dashboard.py
stack72/pulumi-checkly-1
d63bdf5ea95b54a69a9ce07f42210bf3483491ba
[ "MIT" ]
5
2022-02-16T01:28:17.000Z
2022-02-16T14:56:56.000Z
sdk/python/pulumi_checkly/dashboard.py
checkly/pulumi-chekly
0e4b7f0e20e857765876fce2661e49bc8f197a20
[ "MIT" ]
null
null
null
sdk/python/pulumi_checkly/dashboard.py
checkly/pulumi-chekly
0e4b7f0e20e857765876fce2661e49bc8f197a20
[ "MIT" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['DashboardArgs', 'Dashboard'] @pulumi.input_type class DashboardArgs: def __init__(__self__, *, custom_domain: pulumi.Input[str], custom_url: pulumi.Input[str], header: pulumi.Input[str], hide_tags: pulumi.Input[bool], logo: pulumi.Input[str], paginate: pulumi.Input[bool], pagination_rate: pulumi.Input[int], refresh_rate: pulumi.Input[int], tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, width: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a Dashboard resource. """ pulumi.set(__self__, "custom_domain", custom_domain) pulumi.set(__self__, "custom_url", custom_url) pulumi.set(__self__, "header", header) pulumi.set(__self__, "hide_tags", hide_tags) pulumi.set(__self__, "logo", logo) pulumi.set(__self__, "paginate", paginate) pulumi.set(__self__, "pagination_rate", pagination_rate) pulumi.set(__self__, "refresh_rate", refresh_rate) if tags is not None: pulumi.set(__self__, "tags", tags) if width is not None: pulumi.set(__self__, "width", width) @property @pulumi.getter(name="customDomain") def custom_domain(self) -> pulumi.Input[str]: return pulumi.get(self, "custom_domain") @custom_domain.setter def custom_domain(self, value: pulumi.Input[str]): pulumi.set(self, "custom_domain", value) @property @pulumi.getter(name="customUrl") def custom_url(self) -> pulumi.Input[str]: return pulumi.get(self, "custom_url") @custom_url.setter def custom_url(self, value: pulumi.Input[str]): pulumi.set(self, "custom_url", value) @property @pulumi.getter def header(self) -> pulumi.Input[str]: return pulumi.get(self, "header") @header.setter def header(self, value: pulumi.Input[str]): pulumi.set(self, "header", value) @property @pulumi.getter(name="hideTags") def hide_tags(self) -> pulumi.Input[bool]: return pulumi.get(self, "hide_tags") @hide_tags.setter def hide_tags(self, value: pulumi.Input[bool]): pulumi.set(self, "hide_tags", value) @property @pulumi.getter def logo(self) -> pulumi.Input[str]: return pulumi.get(self, "logo") @logo.setter def logo(self, value: pulumi.Input[str]): pulumi.set(self, "logo", value) @property @pulumi.getter def paginate(self) -> pulumi.Input[bool]: return pulumi.get(self, "paginate") @paginate.setter def paginate(self, value: pulumi.Input[bool]): pulumi.set(self, "paginate", value) @property @pulumi.getter(name="paginationRate") def pagination_rate(self) -> pulumi.Input[int]: return pulumi.get(self, "pagination_rate") @pagination_rate.setter def pagination_rate(self, value: pulumi.Input[int]): pulumi.set(self, "pagination_rate", value) @property @pulumi.getter(name="refreshRate") def refresh_rate(self) -> pulumi.Input[int]: return pulumi.get(self, "refresh_rate") @refresh_rate.setter def refresh_rate(self, value: pulumi.Input[int]): pulumi.set(self, "refresh_rate", value) @property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: return pulumi.get(self, "tags") @tags.setter def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "tags", value) @property @pulumi.getter def width(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "width") @width.setter def width(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "width", value) @pulumi.input_type class _DashboardState: def __init__(__self__, *, custom_domain: Optional[pulumi.Input[str]] = None, custom_url: Optional[pulumi.Input[str]] = None, header: Optional[pulumi.Input[str]] = None, hide_tags: Optional[pulumi.Input[bool]] = None, logo: Optional[pulumi.Input[str]] = None, paginate: Optional[pulumi.Input[bool]] = None, pagination_rate: Optional[pulumi.Input[int]] = None, refresh_rate: Optional[pulumi.Input[int]] = None, tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, width: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering Dashboard resources. """ if custom_domain is not None: pulumi.set(__self__, "custom_domain", custom_domain) if custom_url is not None: pulumi.set(__self__, "custom_url", custom_url) if header is not None: pulumi.set(__self__, "header", header) if hide_tags is not None: pulumi.set(__self__, "hide_tags", hide_tags) if logo is not None: pulumi.set(__self__, "logo", logo) if paginate is not None: pulumi.set(__self__, "paginate", paginate) if pagination_rate is not None: pulumi.set(__self__, "pagination_rate", pagination_rate) if refresh_rate is not None: pulumi.set(__self__, "refresh_rate", refresh_rate) if tags is not None: pulumi.set(__self__, "tags", tags) if width is not None: pulumi.set(__self__, "width", width) @property @pulumi.getter(name="customDomain") def custom_domain(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "custom_domain") @custom_domain.setter def custom_domain(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "custom_domain", value) @property @pulumi.getter(name="customUrl") def custom_url(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "custom_url") @custom_url.setter def custom_url(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "custom_url", value) @property @pulumi.getter def header(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "header") @header.setter def header(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "header", value) @property @pulumi.getter(name="hideTags") def hide_tags(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "hide_tags") @hide_tags.setter def hide_tags(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "hide_tags", value) @property @pulumi.getter def logo(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "logo") @logo.setter def logo(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "logo", value) @property @pulumi.getter def paginate(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "paginate") @paginate.setter def paginate(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "paginate", value) @property @pulumi.getter(name="paginationRate") def pagination_rate(self) -> Optional[pulumi.Input[int]]: return pulumi.get(self, "pagination_rate") @pagination_rate.setter def pagination_rate(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "pagination_rate", value) @property @pulumi.getter(name="refreshRate") def refresh_rate(self) -> Optional[pulumi.Input[int]]: return pulumi.get(self, "refresh_rate") @refresh_rate.setter def refresh_rate(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "refresh_rate", value) @property @pulumi.getter def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: return pulumi.get(self, "tags") @tags.setter def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "tags", value) @property @pulumi.getter def width(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "width") @width.setter def width(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "width", value) class Dashboard(pulumi.CustomResource): @overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, custom_domain: Optional[pulumi.Input[str]] = None, custom_url: Optional[pulumi.Input[str]] = None, header: Optional[pulumi.Input[str]] = None, hide_tags: Optional[pulumi.Input[bool]] = None, logo: Optional[pulumi.Input[str]] = None, paginate: Optional[pulumi.Input[bool]] = None, pagination_rate: Optional[pulumi.Input[int]] = None, refresh_rate: Optional[pulumi.Input[int]] = None, tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, width: Optional[pulumi.Input[str]] = None, __props__=None): """ Create a Dashboard resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. """ ... @overload def __init__(__self__, resource_name: str, args: DashboardArgs, opts: Optional[pulumi.ResourceOptions] = None): """ Create a Dashboard resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param DashboardArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. """ ... def __init__(__self__, resource_name: str, *args, **kwargs): resource_args, opts = _utilities.get_resource_args_opts(DashboardArgs, pulumi.ResourceOptions, *args, **kwargs) if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, custom_domain: Optional[pulumi.Input[str]] = None, custom_url: Optional[pulumi.Input[str]] = None, header: Optional[pulumi.Input[str]] = None, hide_tags: Optional[pulumi.Input[bool]] = None, logo: Optional[pulumi.Input[str]] = None, paginate: Optional[pulumi.Input[bool]] = None, pagination_rate: Optional[pulumi.Input[int]] = None, refresh_rate: Optional[pulumi.Input[int]] = None, tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, width: Optional[pulumi.Input[str]] = None, __props__=None): if opts is None: opts = pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = _utilities.get_version() if opts.plugin_download_url is None: opts.plugin_download_url = _utilities.get_plugin_download_url() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = DashboardArgs.__new__(DashboardArgs) if custom_domain is None and not opts.urn: raise TypeError("Missing required property 'custom_domain'") __props__.__dict__["custom_domain"] = custom_domain if custom_url is None and not opts.urn: raise TypeError("Missing required property 'custom_url'") __props__.__dict__["custom_url"] = custom_url if header is None and not opts.urn: raise TypeError("Missing required property 'header'") __props__.__dict__["header"] = header if hide_tags is None and not opts.urn: raise TypeError("Missing required property 'hide_tags'") __props__.__dict__["hide_tags"] = hide_tags if logo is None and not opts.urn: raise TypeError("Missing required property 'logo'") __props__.__dict__["logo"] = logo if paginate is None and not opts.urn: raise TypeError("Missing required property 'paginate'") __props__.__dict__["paginate"] = paginate if pagination_rate is None and not opts.urn: raise TypeError("Missing required property 'pagination_rate'") __props__.__dict__["pagination_rate"] = pagination_rate if refresh_rate is None and not opts.urn: raise TypeError("Missing required property 'refresh_rate'") __props__.__dict__["refresh_rate"] = refresh_rate __props__.__dict__["tags"] = tags __props__.__dict__["width"] = width super(Dashboard, __self__).__init__( 'checkly:index/dashboard:Dashboard', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, custom_domain: Optional[pulumi.Input[str]] = None, custom_url: Optional[pulumi.Input[str]] = None, header: Optional[pulumi.Input[str]] = None, hide_tags: Optional[pulumi.Input[bool]] = None, logo: Optional[pulumi.Input[str]] = None, paginate: Optional[pulumi.Input[bool]] = None, pagination_rate: Optional[pulumi.Input[int]] = None, refresh_rate: Optional[pulumi.Input[int]] = None, tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, width: Optional[pulumi.Input[str]] = None) -> 'Dashboard': """ Get an existing Dashboard resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _DashboardState.__new__(_DashboardState) __props__.__dict__["custom_domain"] = custom_domain __props__.__dict__["custom_url"] = custom_url __props__.__dict__["header"] = header __props__.__dict__["hide_tags"] = hide_tags __props__.__dict__["logo"] = logo __props__.__dict__["paginate"] = paginate __props__.__dict__["pagination_rate"] = pagination_rate __props__.__dict__["refresh_rate"] = refresh_rate __props__.__dict__["tags"] = tags __props__.__dict__["width"] = width return Dashboard(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter(name="customDomain") def custom_domain(self) -> pulumi.Output[str]: return pulumi.get(self, "custom_domain") @property @pulumi.getter(name="customUrl") def custom_url(self) -> pulumi.Output[str]: return pulumi.get(self, "custom_url") @property @pulumi.getter def header(self) -> pulumi.Output[str]: return pulumi.get(self, "header") @property @pulumi.getter(name="hideTags") def hide_tags(self) -> pulumi.Output[bool]: return pulumi.get(self, "hide_tags") @property @pulumi.getter def logo(self) -> pulumi.Output[str]: return pulumi.get(self, "logo") @property @pulumi.getter def paginate(self) -> pulumi.Output[bool]: return pulumi.get(self, "paginate") @property @pulumi.getter(name="paginationRate") def pagination_rate(self) -> pulumi.Output[int]: return pulumi.get(self, "pagination_rate") @property @pulumi.getter(name="refreshRate") def refresh_rate(self) -> pulumi.Output[int]: return pulumi.get(self, "refresh_rate") @property @pulumi.getter def tags(self) -> pulumi.Output[Optional[Sequence[str]]]: return pulumi.get(self, "tags") @property @pulumi.getter def width(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "width")
38.610245
134
0.625288
1,994
17,336
5.169007
0.07322
0.109925
0.121665
0.070438
0.805569
0.780052
0.736781
0.68371
0.640633
0.622393
0
0.000078
0.256576
17,336
448
135
38.696429
0.799659
0.064317
0
0.67507
1
0
0.090954
0.002059
0
0
0
0
0
1
0.159664
false
0.002801
0.014006
0.084034
0.268908
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
9713f42844f2045e4a92c4fb00166d4e6c9e6900
547
py
Python
conductor/app/db/base.py
PHT-EU/central-conductor
59e394128be1385664064f62400914b98a2e9104
[ "MIT" ]
null
null
null
conductor/app/db/base.py
PHT-EU/central-conductor
59e394128be1385664064f62400914b98a2e9104
[ "MIT" ]
null
null
null
conductor/app/db/base.py
PHT-EU/central-conductor
59e394128be1385664064f62400914b98a2e9104
[ "MIT" ]
null
null
null
# Import all the models, so that Base has them before being # imported by Alembic from conductor.app.db.base_class import Base # noqa from conductor.app.models.train import Train, TrainState # noqa from conductor.app.models.util import TrainLink, User from conductor.app.models.protocol import AdvertiseKeysMessage, ShareKeysMessage from conductor.app.models.station import Station from conductor.app.models.dl_models import DLModel from conductor.app.models.discovery import DiscoveryResult # from conductor.app.models.user import User # noqa
45.583333
80
0.826325
78
547
5.769231
0.423077
0.231111
0.284444
0.342222
0.115556
0
0
0
0
0
0
0
0.111517
547
11
81
49.727273
0.925926
0.250457
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
97179f26fe83b64e8f3eaf3098ed9f9a522271d3
515
py
Python
OpenGLCffi/GLX/EXT/NV/copy_buffer.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
OpenGLCffi/GLX/EXT/NV/copy_buffer.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
OpenGLCffi/GLX/EXT/NV/copy_buffer.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
from OpenGLCffi.GLX import params @params(api='glx', prms=['dpy', 'readCtx', 'writeCtx', 'readTarget', 'writeTarget', 'readOffset', 'writeOffset', 'size']) def glXCopyBufferSubDataNV(dpy, readCtx, writeCtx, readTarget, writeTarget, readOffset, writeOffset, size): pass @params(api='glx', prms=['dpy', 'readCtx', 'writeCtx', 'readBuffer', 'writeBuffer', 'readOffset', 'writeOffset', 'size']) def glXNamedCopyBufferSubDataNV(dpy, readCtx, writeCtx, readBuffer, writeBuffer, readOffset, writeOffset, size): pass
42.916667
121
0.737864
51
515
7.45098
0.411765
0.105263
0.189474
0.084211
0.757895
0.757895
0.757895
0.673684
0
0
0
0
0.093204
515
11
122
46.818182
0.813705
0
0
0.285714
0
0
0.261209
0
0
0
0
0
0
1
0.285714
false
0.285714
0.142857
0
0.428571
0
0
0
0
null
0
1
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
973d77669feef53c7197d80f34a594b3387c4656
133
py
Python
oop-2d-array.py
syedmurad1/OOP-Python
d09627269c12ce901677ec1053bdf565861030d7
[ "MIT" ]
null
null
null
oop-2d-array.py
syedmurad1/OOP-Python
d09627269c12ce901677ec1053bdf565861030d7
[ "MIT" ]
null
null
null
oop-2d-array.py
syedmurad1/OOP-Python
d09627269c12ce901677ec1053bdf565861030d7
[ "MIT" ]
null
null
null
number_grid = [ [1, 2, 4], [2, 5, 6], [3, 4, 6] ] print(number_grid[0][0]) print(number_grid[2][2])
19
27
0.421053
21
133
2.52381
0.47619
0.566038
0.566038
0
0
0
0
0
0
0
0
0.152941
0.360902
133
6
28
22.166667
0.470588
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
1
0
0
null
1
1
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
5
975abe8dd8d75cf85f9f4cc5f57db2be4ddeeca9
164
py
Python
fp17/__init__.py
openhealthcare/python-fp17
61a665d90b04dc5e94d433dc7fbb16b901c70e7b
[ "BSD-3-Clause" ]
1
2021-02-23T05:48:01.000Z
2021-02-23T05:48:01.000Z
fp17/__init__.py
openhealthcare/python-fp17
61a665d90b04dc5e94d433dc7fbb16b901c70e7b
[ "BSD-3-Clause" ]
9
2018-03-20T15:53:44.000Z
2018-07-09T10:56:18.000Z
fp17/__init__.py
openhealthcare/python-fp17
61a665d90b04dc5e94d433dc7fbb16b901c70e7b
[ "BSD-3-Clause" ]
2
2018-03-22T14:24:41.000Z
2021-02-23T05:48:02.000Z
USERNAME = None PASSWORD = None REQUESTS_URL = 'https://ebusiness.dpb.nhs.uk/claimsrequests.asp' RESPONSE_URL = 'https://ebusiness.dpb.nhs.uk/claimsresponses.asp'
27.333333
65
0.77439
22
164
5.681818
0.636364
0.128
0.272
0.32
0.4
0.4
0
0
0
0
0
0
0.079268
164
5
66
32.8
0.827815
0
0
0
0
0
0.579268
0
0
0
0
0
0
1
0
false
0.25
0
0
0
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
975f0dea340aaf15b89399a758efde28b352937b
110
py
Python
commands/cookiecutter/rps_cookie.py
hdm-dt-fb/rvt_model_services
af911b66add106b4135bfbe2b0f3af2547a2c127
[ "MIT" ]
28
2017-06-08T11:58:59.000Z
2020-08-12T15:02:01.000Z
commands/cookiecutter/rps_cookie.py
hdm-dt-fb/rvt_model_services
af911b66add106b4135bfbe2b0f3af2547a2c127
[ "MIT" ]
13
2017-07-31T07:36:15.000Z
2020-04-17T15:19:47.000Z
commands/cookiecutter/rps_cookie.py
hdm-dt-fb/rvt_model_services
af911b66add106b4135bfbe2b0f3af2547a2c127
[ "MIT" ]
13
2017-06-22T17:47:36.000Z
2020-01-03T20:58:50.000Z
print("Hi there, I am your rps_cookie.py script message!\n" "Thank you for using rvt_model_services!!")
36.666667
59
0.718182
19
110
4
1
0
0
0
0
0
0
0
0
0
0
0
0.172727
110
2
60
55
0.835165
0
0
0
0
0
0.827273
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
8adb3b7839471f857ee65ae3cf00e21e24611283
70
py
Python
features/steps/pages/__init__.py
Aga-Ma/behave_demo
669d36ab9215384d1871940a9ff3f1d9ac39b584
[ "MIT" ]
null
null
null
features/steps/pages/__init__.py
Aga-Ma/behave_demo
669d36ab9215384d1871940a9ff3f1d9ac39b584
[ "MIT" ]
null
null
null
features/steps/pages/__init__.py
Aga-Ma/behave_demo
669d36ab9215384d1871940a9ff3f1d9ac39b584
[ "MIT" ]
null
null
null
from .SearchPage import SearchPage from .ResultsPage import ResultPage
35
35
0.871429
8
70
7.625
0.625
0
0
0
0
0
0
0
0
0
0
0
0.1
70
2
35
35
0.968254
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
8adce3a9054236f76b7df0cfd22f81390f94453d
1,378
py
Python
entente/shuffle.py
metabolize/entente
c1b16bb7c7fb83b31db4e8ddaf65f1504374fe7a
[ "MIT" ]
4
2019-05-09T17:11:58.000Z
2022-01-28T20:27:39.000Z
entente/shuffle.py
metabolize/entente
c1b16bb7c7fb83b31db4e8ddaf65f1504374fe7a
[ "MIT" ]
94
2018-10-02T15:45:55.000Z
2021-07-14T14:20:38.000Z
entente/shuffle.py
metabolize/entente
c1b16bb7c7fb83b31db4e8ddaf65f1504374fe7a
[ "MIT" ]
3
2019-01-21T00:59:24.000Z
2022-01-28T20:26:28.000Z
import lacecore import numpy as np def shuffle_vertices(mesh, ret_new_ordering=False): """ Shuffle the mesh's vertex ordering, preserving the integrity of the faces. The mesh is mutated. Args: mesh (lacecore.Mesh): A mesh. ret_new_ordering (bool): When `True`, return the new vertex ordering. Returns: object: When `ret_new_ordering` is `True`, return a tuple containing the new mesh and the new vertex ordering. When `False`, return only the new mesh. """ ordering = np.random.permutation(len(mesh.v)) new_mesh = lacecore.reindex_vertices(mesh, ordering) if ret_new_ordering: return new_mesh, ordering else: return new_mesh def shuffle_faces(mesh, ret_new_ordering=False): """ Shuffle the mesh's face ordering. The mesh is mutated. Args: mesh (lacecore.Mesh): A mesh. ret_new_ordering (bool): When `True`, return the new face ordering. Returns: object: When `ret_new_ordering` is `True`, return a tuple containing the new mesh and the new vertex ordering. When `False`, return only the new mesh. """ ordering = np.random.permutation(len(mesh.f)) new_mesh = lacecore.reindex_faces(mesh, ordering) if ret_new_ordering: return new_mesh, ordering else: return new_mesh
29.956522
79
0.6582
188
1,378
4.68617
0.228723
0.079455
0.127128
0.081725
0.785471
0.785471
0.785471
0.785471
0.785471
0.699205
0
0
0.261248
1,378
45
80
30.622222
0.865422
0.53701
0
0.5
0
0
0
0
0
0
0
0
0
1
0.125
false
0
0.125
0
0.5
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
8af396cef741dfb1cfa3cf3d0f688cf8729c4a09
45
py
Python
hannah/exceptions.py
suganthsundar/hannah
e3e841850199f565bf2e19ebc9a0eb3d00a7a968
[ "MIT" ]
null
null
null
hannah/exceptions.py
suganthsundar/hannah
e3e841850199f565bf2e19ebc9a0eb3d00a7a968
[ "MIT" ]
null
null
null
hannah/exceptions.py
suganthsundar/hannah
e3e841850199f565bf2e19ebc9a0eb3d00a7a968
[ "MIT" ]
null
null
null
class OperationNotFound(Exception): pass
15
35
0.777778
4
45
8.75
1
0
0
0
0
0
0
0
0
0
0
0
0.155556
45
2
36
22.5
0.921053
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
c138f6d9c9ec4f7145484e5c6066ccec869ca902
128
py
Python
backend/users_setting/admin.py
Yashbontala/django-whatsapp
9d4dc33e11e68c8614173cf5d21ef33db1d7baf7
[ "MIT" ]
7
2019-03-10T17:37:07.000Z
2021-05-14T13:28:13.000Z
backend/users_setting/admin.py
Yashbontala/django-whatsapp
9d4dc33e11e68c8614173cf5d21ef33db1d7baf7
[ "MIT" ]
2
2019-05-22T14:54:36.000Z
2019-05-30T23:59:45.000Z
backend/users_setting/admin.py
Yashbontala/django-whatsapp
9d4dc33e11e68c8614173cf5d21ef33db1d7baf7
[ "MIT" ]
1
2021-04-05T12:01:23.000Z
2021-04-05T12:01:23.000Z
from django.contrib import admin from .models import Setting, Webhook admin.site.register(Setting) admin.site.register(Webhook)
25.6
36
0.828125
18
128
5.888889
0.555556
0.169811
0.320755
0
0
0
0
0
0
0
0
0
0.085938
128
5
37
25.6
0.905983
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
c177fbccc54fd3a7545d9bf1fa18b656d9bd6239
187
py
Python
flask/boxwise_flask/graph_ql/type_defs.py
boxwise/boxtribute
b87d3bf52e29cb485d98e669b4b43d1934abf310
[ "Apache-2.0" ]
3
2020-10-17T06:37:10.000Z
2021-06-08T16:58:38.000Z
flask/boxwise_flask/graph_ql/type_defs.py
boxwise/boxtribute
b87d3bf52e29cb485d98e669b4b43d1934abf310
[ "Apache-2.0" ]
166
2020-10-25T20:45:32.000Z
2022-03-28T08:18:26.000Z
flask/boxwise_flask/graph_ql/type_defs.py
boxwise/boxtribute
b87d3bf52e29cb485d98e669b4b43d1934abf310
[ "Apache-2.0" ]
4
2021-01-01T18:03:57.000Z
2022-03-10T08:43:23.000Z
from pathlib import Path from ariadne import load_schema_from_path MODULE_DIRECTORY = Path(__file__).resolve().parent type_defs = load_schema_from_path(MODULE_DIRECTORY / "types.gql")
23.375
65
0.823529
27
187
5.222222
0.592593
0.141844
0.198582
0.255319
0.468085
0.468085
0
0
0
0
0
0
0.101604
187
7
66
26.714286
0.839286
0
0
0
0
0
0.048128
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
c195b0d5cfa058a4573ffedd3f6934c149065244
130
py
Python
python_modules/libraries/dagster-dbt/dagster_dbt/cloud/__init__.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
1
2021-01-31T19:16:29.000Z
2021-01-31T19:16:29.000Z
python_modules/libraries/dagster-dbt/dagster_dbt/cloud/__init__.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-dbt/dagster_dbt/cloud/__init__.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
1
2019-09-11T03:02:27.000Z
2019-09-11T03:02:27.000Z
from .ops import dbt_cloud_run_op from .resources import DbtCloudResourceV2, dbt_cloud_resource from .types import DbtCloudOutput
32.5
61
0.869231
18
130
6
0.666667
0.148148
0
0
0
0
0
0
0
0
0
0.008547
0.1
130
3
62
43.333333
0.91453
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c1b9bdf61c05b5180e26f5fe9ca1ff4409493f6e
8,132
py
Python
dfdatetime/precisions.py
puccia/dfdatetime
4535e2f20015b195c2508095d9e1da2d55a06725
[ "Apache-2.0" ]
null
null
null
dfdatetime/precisions.py
puccia/dfdatetime
4535e2f20015b195c2508095d9e1da2d55a06725
[ "Apache-2.0" ]
null
null
null
dfdatetime/precisions.py
puccia/dfdatetime
4535e2f20015b195c2508095d9e1da2d55a06725
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Date and time precision helpers.""" from __future__ import unicode_literals import decimal from dfdatetime import definitions class DateTimePrecisionHelper(object): """Date time precision helper interface. This is the super class of different date and time precision helpers. Time precision helpers provide functionality for converting date and time values between different precisions. """ @classmethod def CopyMicrosecondsToFractionOfSecond(cls, microseconds): """Copies the number of microseconds to a fraction of second value. Args: microseconds (int): number of microseconds. Returns: decimal.Decimal: fraction of second, which must be a value between 0.0 and 1.0. """ raise NotImplementedError() @classmethod def CopyToDateTimeString(cls, time_elements_tuple, fraction_of_second): """Copies the time elements and fraction of second to a string. Args: time_elements_tuple (tuple[int, int, int, int, int, int]): time elements, contains year, month, day of month, hours, minutes and seconds. fraction_of_second (decimal.Decimal): fraction of second, which must be a value between 0.0 and 1.0. Returns: str: date and time value formatted as: YYYY-MM-DD hh:mm:ss with fraction of second part that corresponds to the precision. """ raise NotImplementedError() class SecondsPrecisionHelper(DateTimePrecisionHelper): """Seconds precision helper.""" @classmethod def CopyMicrosecondsToFractionOfSecond(cls, microseconds): """Copies the number of microseconds to a fraction of second value. Args: microseconds (int): number of microseconds. Returns: decimal.Decimal: fraction of second, which must be a value between 0.0 and 1.0. For the seconds precision helper this will always be 0.0. Raises: ValueError: if the number of microseconds is out of bounds. """ if microseconds < 0 or microseconds >= definitions.MICROSECONDS_PER_SECOND: raise ValueError( 'Number of microseconds value: {0:d} out of bounds.'.format( microseconds)) return decimal.Decimal(0.0) @classmethod def CopyToDateTimeString(cls, time_elements_tuple, fraction_of_second): """Copies the time elements and fraction of second to a string. Args: time_elements_tuple (tuple[int, int, int, int, int, int]): time elements, contains year, month, day of month, hours, minutes and seconds. fraction_of_second (decimal.Decimal): fraction of second, which must be a value between 0.0 and 1.0. Returns: str: date and time value formatted as: YYYY-MM-DD hh:mm:ss Raises: ValueError: if the fraction of second is out of bounds. """ if fraction_of_second < 0.0 or fraction_of_second >= 1.0: raise ValueError('Fraction of second value: {0:f} out of bounds.'.format( fraction_of_second)) return '{0:04d}-{1:02d}-{2:02d} {3:02d}:{4:02d}:{5:02d}'.format( time_elements_tuple[0], time_elements_tuple[1], time_elements_tuple[2], time_elements_tuple[3], time_elements_tuple[4], time_elements_tuple[5]) class MillisecondsPrecisionHelper(DateTimePrecisionHelper): """Milliseconds precision helper.""" @classmethod def CopyMicrosecondsToFractionOfSecond(cls, microseconds): """Copies the number of microseconds to a fraction of second value. Args: microseconds (int): number of microseconds. Returns: decimal.Decimal: fraction of second, which must be a value between 0.0 and 1.0. Raises: ValueError: if the number of microseconds is out of bounds. """ if microseconds < 0 or microseconds >= definitions.MICROSECONDS_PER_SECOND: raise ValueError( 'Number of microseconds value: {0:d} out of bounds.'.format( microseconds)) milliseconds, _ = divmod( microseconds, definitions.MICROSECONDS_PER_MILLISECOND) return decimal.Decimal(milliseconds) / definitions.MILLISECONDS_PER_SECOND @classmethod def CopyToDateTimeString(cls, time_elements_tuple, fraction_of_second): """Copies the time elements and fraction of second to a string. Args: time_elements_tuple (tuple[int, int, int, int, int, int]): time elements, contains year, month, day of month, hours, minutes and seconds. fraction_of_second (decimal.Decimal): fraction of second, which must be a value between 0.0 and 1.0. Returns: str: date and time value formatted as: YYYY-MM-DD hh:mm:ss.### Raises: ValueError: if the fraction of second is out of bounds. """ if fraction_of_second < 0.0 or fraction_of_second >= 1.0: raise ValueError('Fraction of second value: {0:f} out of bounds.'.format( fraction_of_second)) milliseconds = int(fraction_of_second * definitions.MILLISECONDS_PER_SECOND) return '{0:04d}-{1:02d}-{2:02d} {3:02d}:{4:02d}:{5:02d}.{6:03d}'.format( time_elements_tuple[0], time_elements_tuple[1], time_elements_tuple[2], time_elements_tuple[3], time_elements_tuple[4], time_elements_tuple[5], milliseconds) class MicrosecondsPrecisionHelper(DateTimePrecisionHelper): """Microseconds precision helper.""" @classmethod def CopyMicrosecondsToFractionOfSecond(cls, microseconds): """Copies the number of microseconds to a fraction of second value. Args: microseconds (int): number of microseconds. Returns: decimal.Decimal: fraction of second, which must be a value between 0.0 and 1.0. Raises: ValueError: if the number of microseconds is out of bounds. """ if microseconds < 0 or microseconds >= definitions.MICROSECONDS_PER_SECOND: raise ValueError( 'Number of microseconds value: {0:d} out of bounds.'.format( microseconds)) return decimal.Decimal(microseconds) / definitions.MICROSECONDS_PER_SECOND @classmethod def CopyToDateTimeString(cls, time_elements_tuple, fraction_of_second): """Copies the time elements and fraction of second to a string. Args: time_elements_tuple (tuple[int, int, int, int, int, int]): time elements, contains year, month, day of month, hours, minutes and seconds. fraction_of_second (decimal.Decimal): fraction of second, which must be a value between 0.0 and 1.0. Returns: str: date and time value formatted as: YYYY-MM-DD hh:mm:ss.###### Raises: ValueError: if the fraction of second is out of bounds. """ if fraction_of_second < 0.0 or fraction_of_second >= 1.0: raise ValueError('Fraction of second value: {0:f} out of bounds.'.format( fraction_of_second)) microseconds = int(fraction_of_second * definitions.MICROSECONDS_PER_SECOND) return '{0:04d}-{1:02d}-{2:02d} {3:02d}:{4:02d}:{5:02d}.{6:06d}'.format( time_elements_tuple[0], time_elements_tuple[1], time_elements_tuple[2], time_elements_tuple[3], time_elements_tuple[4], time_elements_tuple[5], microseconds) class PrecisionHelperFactory(object): """Date time precision helper factory.""" _PRECISION_CLASSES = { definitions.PRECISION_1_MICROSECOND: MicrosecondsPrecisionHelper, definitions.PRECISION_1_MILLISECOND: MillisecondsPrecisionHelper, definitions.PRECISION_1_SECOND: SecondsPrecisionHelper, } @classmethod def CreatePrecisionHelper(cls, precision): """Creates a precision helper. Args: precision (str): precision of the date and time value, which should be one of the PRECISION_VALUES in definitions. Returns: class: date time precision helper class. Raises: ValueError: if the precision value is unsupported. """ precision_helper_class = cls._PRECISION_CLASSES.get(precision, None) if not precision_helper_class: raise ValueError('Unsupported precision: {0!s}'.format(precision)) return precision_helper_class
33.883333
80
0.69454
1,034
8,132
5.337524
0.117021
0.076101
0.121761
0.026092
0.743613
0.706106
0.706106
0.706106
0.706106
0.706106
0
0.022016
0.218028
8,132
239
81
34.025105
0.845888
0.455976
0
0.592105
0
0.039474
0.118428
0.038558
0
0
0
0
0
1
0.118421
false
0
0.039474
0
0.328947
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
de086143b5b507fedca677e6d0759310907e9658
191
py
Python
dmpr/exceptions.py
protocollabs/dmpr-core
20810f3caba9f1299d5404dd633ed864db1cbc03
[ "MIT" ]
3
2017-04-07T11:31:46.000Z
2018-09-24T06:57:39.000Z
dmpr/exceptions.py
protocollabs/dmpr-core
20810f3caba9f1299d5404dd633ed864db1cbc03
[ "MIT" ]
27
2017-01-16T22:43:58.000Z
2019-04-09T16:40:13.000Z
dmpr/exceptions.py
protocollabs/dmpr-core
20810f3caba9f1299d5404dd633ed864db1cbc03
[ "MIT" ]
3
2017-01-16T18:30:27.000Z
2017-08-23T12:40:11.000Z
class ConfigurationException(Exception): pass class InternalException(Exception): pass class InvalidMessage(Exception): pass class InvalidPartialUpdate(Exception): pass
12.733333
40
0.759162
16
191
9.0625
0.4375
0.358621
0.372414
0
0
0
0
0
0
0
0
0
0.17801
191
14
41
13.642857
0.923567
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
a9b119a55acd56c62f82a8a9f3a178309e32e537
194
py
Python
chimeranet/datasets/__init__.py
leichtrhino/ChimeraNet
2a9ecc4eabfc720cfd816e4414f3f96e87d90246
[ "MIT" ]
6
2019-11-21T14:49:06.000Z
2021-05-18T00:48:41.000Z
chimeranet/datasets/__init__.py
arity-r/ChimeraNet
2a9ecc4eabfc720cfd816e4414f3f96e87d90246
[ "MIT" ]
6
2019-01-31T06:49:38.000Z
2019-08-14T07:05:13.000Z
chimeranet/datasets/__init__.py
leichtrhino/ChimeraNet
2a9ecc4eabfc720cfd816e4414f3f96e87d90246
[ "MIT" ]
2
2019-11-05T06:24:50.000Z
2021-05-18T00:48:47.000Z
from .base import Dataset, DirDataset, ZipDataset, TarDataset from .voxceleb import VoxCeleb from .dsd100 import DSD100, DSD100Melody, DSD100Vocal from .esc50 import ESC50 from .lmd import LMD
27.714286
61
0.814433
25
194
6.32
0.52
0
0
0
0
0
0
0
0
0
0
0.095238
0.134021
194
6
62
32.333333
0.845238
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a9c4d1d670d6ba909561f04ef47e4fc5dce41e6f
68
py
Python
task/__init__.py
HUMANAMUH/task-executor-py
04bb2852b8068e5b26f1df967684e2eab207a9e9
[ "Apache-2.0" ]
2
2016-10-25T03:10:37.000Z
2016-11-03T12:25:50.000Z
task/__init__.py
HUMANAMUH/task-executor-py
04bb2852b8068e5b26f1df967684e2eab207a9e9
[ "Apache-2.0" ]
2
2016-10-25T03:40:23.000Z
2016-11-04T04:05:37.000Z
task/__init__.py
HUMANAMUH/task-executor-py
04bb2852b8068e5b26f1df967684e2eab207a9e9
[ "Apache-2.0" ]
null
null
null
from task import common event_loop = common.get_common_event_loop()
22.666667
43
0.838235
11
68
4.818182
0.636364
0.415094
0.566038
0
0
0
0
0
0
0
0
0
0.102941
68
3
43
22.666667
0.868852
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
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
a9e01d190d0056f6c06c30460dcdb952896b8180
760
py
Python
slack/web/classes/dialog_elements.py
timgates42/python-slack-sdk
6339fbe81031c9aec3f95927ac03706fd31f3544
[ "MIT" ]
null
null
null
slack/web/classes/dialog_elements.py
timgates42/python-slack-sdk
6339fbe81031c9aec3f95927ac03706fd31f3544
[ "MIT" ]
null
null
null
slack/web/classes/dialog_elements.py
timgates42/python-slack-sdk
6339fbe81031c9aec3f95927ac03706fd31f3544
[ "MIT" ]
null
null
null
from slack_sdk.models.dialoags import AbstractDialogSelector # noqa from slack_sdk.models.dialoags import DialogChannelSelector # noqa from slack_sdk.models.dialoags import DialogConversationSelector # noqa from slack_sdk.models.dialoags import DialogExternalSelector # noqa from slack_sdk.models.dialoags import DialogStaticSelector # noqa from slack_sdk.models.dialoags import DialogTextArea # noqa from slack_sdk.models.dialoags import DialogTextComponent # noqa from slack_sdk.models.dialoags import DialogTextField # noqa from slack_sdk.models.dialoags import DialogUserSelector # noqa from slack_sdk.models.dialoags import TextElementSubtypes # noqa from slack import deprecation deprecation.show_message(__name__, "slack_sdk.models.blocks")
50.666667
72
0.847368
92
760
6.826087
0.23913
0.157643
0.245223
0.286624
0.566879
0.566879
0.515924
0
0
0
0
0
0.102632
760
14
73
54.285714
0.920821
0.064474
0
0
0
0
0.032857
0.032857
0
0
0
0
0
1
0
true
0
0.916667
0
0.916667
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
a9efd0d6cf41fdd837fa014ffa959e308fadcd21
121
py
Python
bdd/scenarios/bdd_scenarios.py
ElenaUS/automation
9f1b948590dae5fcc1a2ad247961e92b99d7a88d
[ "Apache-2.0" ]
null
null
null
bdd/scenarios/bdd_scenarios.py
ElenaUS/automation
9f1b948590dae5fcc1a2ad247961e92b99d7a88d
[ "Apache-2.0" ]
null
null
null
bdd/scenarios/bdd_scenarios.py
ElenaUS/automation
9f1b948590dae5fcc1a2ad247961e92b99d7a88d
[ "Apache-2.0" ]
null
null
null
from pytest_bdd import scenario @scenario('../feature/bdd.feature', 'Login and check amount') def test_new(): pass
17.285714
61
0.719008
17
121
5
0.823529
0
0
0
0
0
0
0
0
0
0
0
0.14876
121
6
62
20.166667
0.825243
0
0
0
0
0
0.363636
0.181818
0
0
0
0
0
1
0.25
true
0.25
0.25
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
1
1
1
0
0
0
0
0
5
e70595922867b595dc3c5f002e21ee2dbbe31467
290
py
Python
src/waldur_mastermind/marketplace_support/extension.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
26
2017-10-18T13:49:58.000Z
2021-09-19T04:44:09.000Z
src/waldur_mastermind/marketplace_support/extension.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
14
2018-12-10T14:14:51.000Z
2021-06-07T10:33:39.000Z
src/waldur_mastermind/marketplace_support/extension.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
32
2017-09-24T03:10:45.000Z
2021-10-16T16:41:09.000Z
from waldur_core.core import WaldurExtension class MarketplaceSupportExtension(WaldurExtension): class Settings: pass @staticmethod def django_app(): return 'waldur_mastermind.marketplace_support' @staticmethod def is_assembly(): return True
19.333333
54
0.713793
27
290
7.481481
0.740741
0.19802
0
0
0
0
0
0
0
0
0
0
0.231034
290
14
55
20.714286
0.90583
0
0
0.2
0
0
0.127586
0.127586
0
0
0
0
0
1
0.2
true
0.1
0.1
0.2
0.7
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
0
1
1
0
0
5
e7257122b7971ee34be1b5076e4bee0119ee4c41
41
py
Python
src/towncrier/__main__.py
hawkowl/towncrier
ab2b5ac824032c1a0f04409c8e26efebc4f5f59d
[ "MIT" ]
252
2015-12-27T19:55:54.000Z
2020-04-02T09:37:48.000Z
src/towncrier/__main__.py
hawkowl/towncrier
ab2b5ac824032c1a0f04409c8e26efebc4f5f59d
[ "MIT" ]
166
2015-12-27T14:30:14.000Z
2020-04-01T10:38:38.000Z
src/towncrier/__main__.py
hawkowl/towncrier
ab2b5ac824032c1a0f04409c8e26efebc4f5f59d
[ "MIT" ]
56
2015-12-29T13:06:49.000Z
2020-02-12T07:13:30.000Z
from towncrier._shell import cli cli()
8.2
32
0.756098
6
41
5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.170732
41
4
33
10.25
0.882353
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
e72b275b8e08526f8f460424a6a1f5d51041a544
56
py
Python
tests/proj3/proj3/__init__.py
maphew/nimporter
b0a6b8126b1d66d07ee6c1f00cf88697ae177cc5
[ "MIT" ]
656
2019-12-06T01:35:40.000Z
2022-03-29T23:43:42.000Z
tests/proj3/proj3/__init__.py
juancarlospaco/nimporter
d230e0e4ea40370d162f3806fafa168aef560672
[ "MIT" ]
52
2019-12-06T23:15:56.000Z
2022-03-25T22:42:15.000Z
tests/proj3/proj3/__init__.py
juancarlospaco/nimporter
d230e0e4ea40370d162f3806fafa168aef560672
[ "MIT" ]
32
2019-12-07T04:06:16.000Z
2022-02-19T14:04:55.000Z
from proj3.proj3 import foo, bar, baz import proj3.lib3
18.666667
37
0.785714
10
56
4.4
0.7
0
0
0
0
0
0
0
0
0
0
0.083333
0.142857
56
2
38
28
0.833333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e73095a951a46fa3296289c3c55db525fb0f13ce
3,093
py
Python
teraserver/python/tests/modules/FlaskModule/API/participant/test_ParticipantRefreshToken.py
introlab/opentera
bfc4de672c9de40b7c9a659be2138731e7ee4e94
[ "Apache-2.0" ]
10
2020-03-16T14:46:06.000Z
2022-02-11T16:07:38.000Z
teraserver/python/tests/modules/FlaskModule/API/participant/test_ParticipantRefreshToken.py
introlab/opentera
bfc4de672c9de40b7c9a659be2138731e7ee4e94
[ "Apache-2.0" ]
114
2019-09-16T13:02:50.000Z
2022-03-22T19:17:36.000Z
teraserver/python/tests/modules/FlaskModule/API/participant/test_ParticipantRefreshToken.py
introlab/opentera
bfc4de672c9de40b7c9a659be2138731e7ee4e94
[ "Apache-2.0" ]
null
null
null
import unittest import os from requests import get import json class ParticipantRefreshTokenTest(unittest.TestCase): host = '127.0.0.1' port = 40075 login_endpoint = '/api/participant/login' refresh_token_endpoint = '/api/participant/refresh_token' def setUp(self): pass def tearDown(self): pass def _make_url(self, hostname, port, endpoint): return 'https://' + hostname + ':' + str(port) + endpoint def _http_auth(self, username, password): url = self._make_url(self.host, self.port, self.login_endpoint) return get(url=url, verify=False, auth=(username, password)) def _token_auth(self, token): url = self._make_url(self.host, self.port, self.login_endpoint) request_headers = {'Authorization': 'OpenTera ' + token} return get(url=url, verify=False, headers=request_headers) def _refresh_token(self, token): url = self._make_url(self.host, self.port, self.refresh_token_endpoint) request_headers = {'Authorization': 'OpenTera ' + token} return get(url=url, verify=False, headers=request_headers) def test_valid_refresh_token(self): # Get the token from http auth httpauth_response = self._http_auth('participant1', 'opentera') self.assertEqual(httpauth_response.status_code, 200) self.assertEqual(httpauth_response.headers['Content-Type'], 'application/json') json_data = httpauth_response.json() self.assertGreater(len(json_data), 0) self.assertTrue('participant_token' in json_data) login_token = json_data['participant_token'] self.assertGreater(len(login_token), 0) # Try to refresh token response = self._refresh_token(login_token) self.assertEqual(response.status_code, 200) refresh_info = response.json() self.assertTrue('refresh_token' in refresh_info) def test_invalid_refresh_token(self): # Try to refresh token response = self._refresh_token('') self.assertEqual(response.status_code, 401) def test_invalid_refresh_token_from_disabled_token(self): # Get the token from http auth httpauth_response = self._http_auth('participant1', 'opentera') self.assertEqual(httpauth_response.status_code, 200) self.assertEqual(httpauth_response.headers['Content-Type'], 'application/json') json_data = httpauth_response.json() self.assertGreater(len(json_data), 0) self.assertTrue('participant_token' in json_data) login_token = json_data['participant_token'] self.assertGreater(len(login_token), 0) # Try to refresh token, should work response = self._refresh_token(login_token) self.assertEqual(response.status_code, 200) refresh_info = response.json() self.assertTrue('refresh_token' in refresh_info) # Try to refresh same login token, should not work because it is disabled response = self._refresh_token(login_token) self.assertEqual(response.status_code, 401)
39.151899
87
0.689945
375
3,093
5.453333
0.197333
0.093888
0.052812
0.060636
0.761369
0.735941
0.723227
0.704156
0.684108
0.684108
0
0.014321
0.209829
3,093
78
88
39.653846
0.822422
0.066279
0
0.614035
0
0
0.105519
0.018049
0
0
0
0
0.280702
1
0.157895
false
0.070175
0.070175
0.017544
0.385965
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
e73555d7e928f1266d5407c4510c2e615a8a114d
106
py
Python
src/calculate_bill.py
kaiocesar/pybill-br
e40f23bcf2e4cb091dbc8ed3215621f81ffbc17e
[ "MIT" ]
null
null
null
src/calculate_bill.py
kaiocesar/pybill-br
e40f23bcf2e4cb091dbc8ed3215621f81ffbc17e
[ "MIT" ]
null
null
null
src/calculate_bill.py
kaiocesar/pybill-br
e40f23bcf2e4cb091dbc8ed3215621f81ffbc17e
[ "MIT" ]
null
null
null
class CalculateBill(object): def calculate(self, paybill, tax): return tax.calculate(paybill)
26.5
38
0.707547
12
106
6.25
0.75
0
0
0
0
0
0
0
0
0
0
0
0.188679
106
3
39
35.333333
0.872093
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
e7373efe774e5f263a26dea2c5ba71d2c826a0a3
167
py
Python
_21.CollectionList.py
yash001dev/learnpython
d311d86e8da43abddd33c9a9c8c9015fc9e858eb
[ "MIT" ]
2
2020-06-19T17:05:08.000Z
2021-04-05T18:04:25.000Z
_21.CollectionList.py
yash001dev/learnpython
d311d86e8da43abddd33c9a9c8c9015fc9e858eb
[ "MIT" ]
null
null
null
_21.CollectionList.py
yash001dev/learnpython
d311d86e8da43abddd33c9a9c8c9015fc9e858eb
[ "MIT" ]
null
null
null
names=['yash','manan','jahnavi','rahul','rutu','Harry'] print(names[0]) names[1]='Manan Sanghavi' print(names[1]) names[1]=3 print(names[1]) print(type(names))
20.875
56
0.646707
26
167
4.153846
0.5
0.222222
0.203704
0
0
0
0
0
0
0
0
0.039474
0.08982
167
7
57
23.857143
0.671053
0
0
0.285714
0
0
0.275
0
0
0
0
0
0
1
0
false
0
0
0
0
0.571429
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
e73b571748520742b09e4060caa9d3975abf6d8f
142
py
Python
python/magent/builtin/tf_model/__init__.py
mununum/MAgent
7272cd726182280444597310d52369fac5e13e37
[ "MIT" ]
1
2021-06-22T10:22:26.000Z
2021-06-22T10:22:26.000Z
python/magent/builtin/tf_model/__init__.py
mununum/MAgent
7272cd726182280444597310d52369fac5e13e37
[ "MIT" ]
null
null
null
python/magent/builtin/tf_model/__init__.py
mununum/MAgent
7272cd726182280444597310d52369fac5e13e37
[ "MIT" ]
null
null
null
from .dqn import DeepQNetwork from .drqn import DeepRecurrentQNetwork from .a2c import AdvantageActorCritic from .mapg import MAPolicyGradient
35.5
39
0.866197
16
142
7.6875
0.625
0
0
0
0
0
0
0
0
0
0
0.007874
0.105634
142
4
40
35.5
0.96063
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e7662b528d5c7951255de70e6919e6a8215a2a4d
48
py
Python
pipenv_tools/core.py
rochacbruno/pipenv_tools
9de077840cccd9490d075d78edf7ab71914ec2e6
[ "MIT" ]
9
2017-09-23T21:14:13.000Z
2018-06-25T10:04:02.000Z
pipenv_tools/core.py
rochacbruno/pipenv_tools
9de077840cccd9490d075d78edf7ab71914ec2e6
[ "MIT" ]
null
null
null
pipenv_tools/core.py
rochacbruno/pipenv_tools
9de077840cccd9490d075d78edf7ab71914ec2e6
[ "MIT" ]
null
null
null
# This will be tools to publish pipenv packages
24
47
0.791667
8
48
4.75
1
0
0
0
0
0
0
0
0
0
0
0
0.1875
48
1
48
48
0.974359
0.9375
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
e767f4f9061b6a6f78fd4bd762e4d0f4a0720d40
239
py
Python
djangocms_time_wizard/models.py
azagler/djangocms-time-wizard
8c8cfae732fd843bc9650a9acab657cdd9ca0887
[ "BSD-2-Clause" ]
null
null
null
djangocms_time_wizard/models.py
azagler/djangocms-time-wizard
8c8cfae732fd843bc9650a9acab657cdd9ca0887
[ "BSD-2-Clause" ]
null
null
null
djangocms_time_wizard/models.py
azagler/djangocms-time-wizard
8c8cfae732fd843bc9650a9acab657cdd9ca0887
[ "BSD-2-Clause" ]
null
null
null
from cms.models import CMSPlugin from time_wizard.mixins import TimeWizardInlineMixin, TimeWizardMixin class TimeWizardModel(TimeWizardMixin, CMSPlugin): pass class TimeWizardInlineModel(TimeWizardInlineMixin, CMSPlugin): pass
21.727273
69
0.832636
22
239
9
0.636364
0.131313
0
0
0
0
0
0
0
0
0
0
0.121339
239
10
70
23.9
0.942857
0
0
0.333333
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
5
e7810bd8975b48bce2bc6f5856e391988311bf9b
699
py
Python
forms.py
BCTBB/PyPass
7c6e66c83f76bf741bc3904865979e4bb418e800
[ "MIT" ]
null
null
null
forms.py
BCTBB/PyPass
7c6e66c83f76bf741bc3904865979e4bb418e800
[ "MIT" ]
null
null
null
forms.py
BCTBB/PyPass
7c6e66c83f76bf741bc3904865979e4bb418e800
[ "MIT" ]
null
null
null
from flask_wtf import Form from wtforms import StringField, IntegerField, TextAreaField, SubmitField, RadioField, SelectField from wtforms import validators, ValidationError class loginForm(Form): UserName = StringField("Username", [validators.DataRequired("Please enter your name.")]) PWLength = StringField("Length of the password", [validators.DataRequired("Please enter length of Password from 1-40.")]) retention = StringField("Number of days to retain password", [validators.DataRequired("Please enter a number of days to retain password")]) Number = StringField("Retrieval Code", [validators.DataRequired("Please enter your Retreival code")]) submit = SubmitField("Send")
69.9
143
0.773963
80
699
6.75
0.5
0.162963
0.207407
0.244444
0.377778
0.103704
0
0
0
0
0
0.004918
0.127325
699
10
144
69.9
0.880328
0
0
0
0
0
0.322857
0
0
0
0
0
0
1
0
false
0.222222
0.333333
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
5
e7a6b32eac9428f57934f94f5668245a155acc96
83
py
Python
enthought/pyface/workbench/action/reset_all_perspectives_action.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/pyface/workbench/action/reset_all_perspectives_action.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/pyface/workbench/action/reset_all_perspectives_action.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from pyface.workbench.action.reset_all_perspectives_action import *
27.666667
67
0.855422
11
83
6.181818
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.084337
83
2
68
41.5
0.894737
0.144578
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e7a7cd12c0723062fa1ac9c731c5ae44f53dc84a
769
py
Python
boa/blockchain/vm/Neo/TransactionType.py
chisleu/neo-boa
799bb37f7e7862215f94f479cfe74a4dd4b8cba2
[ "MIT" ]
2
2017-11-27T08:45:34.000Z
2021-03-08T03:08:56.000Z
boa/blockchain/vm/Neo/TransactionType.py
chisleu/neo-boa
799bb37f7e7862215f94f479cfe74a4dd4b8cba2
[ "MIT" ]
2
2018-02-13T07:30:09.000Z
2021-06-01T22:02:52.000Z
boa/blockchain/vm/Neo/TransactionType.py
localhuman/neo-boa
799bb37f7e7862215f94f479cfe74a4dd4b8cba2
[ "MIT" ]
null
null
null
def MinerTransaction(): """ :return: """ return b'\x00' def IssueTransaction(): """ :return: """ return b'\x01' def ClaimTransaction(): """ :return: """ return b'\x02' def EnrollmentTransaction(): """ :return: """ return b'\x20' def VotingTransaction(): """ :return: """ return b'\x24' def RegisterTransaction(): """ :return: """ return b'\x40' def ContractTransaction(): """ :return: """ return b'\x80' def AgencyTransaction(): """ :return: """ return b'\xb0' def PublishTransaction(): """ :return: """ return b'\xd0' def InvocationTransaction(): """ :return: """ return b'\xd1'
9.6125
28
0.481144
60
769
6.166667
0.383333
0.324324
0.351351
0
0
0
0
0
0
0
0
0.033333
0.336801
769
79
29
9.734177
0.692157
0.115735
0
0
0
0
0.07722
0
0
0
0
0
0
1
0.5
true
0
0
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
1
0
0
5
e7b1def773bcb25345bc7b7e5b5cf4ff2f9a4bdc
164
py
Python
lib/pylint/test/functional/generated_members.py
willemneal/Docky
d3504e1671b4a6557468234c263950bfab461ce4
[ "MIT" ]
3
2018-11-25T01:09:55.000Z
2021-08-24T01:56:36.000Z
lib/pylint/test/functional/generated_members.py
willemneal/Docky
d3504e1671b4a6557468234c263950bfab461ce4
[ "MIT" ]
null
null
null
lib/pylint/test/functional/generated_members.py
willemneal/Docky
d3504e1671b4a6557468234c263950bfab461ce4
[ "MIT" ]
3
2018-11-09T03:38:09.000Z
2020-02-24T06:26:10.000Z
"""Test the generated-members config option.""" class Klass(object): """A class with a generated member.""" print Klass().DoesNotExist print Klass().aBC_set1
20.5
47
0.713415
22
164
5.272727
0.727273
0.172414
0
0
0
0
0
0
0
0
0
0.007092
0.140244
164
7
48
23.428571
0.815603
0
0
0
1
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.666667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
99c522c10dbbbbd739ada20a3b129cb6cbf3956e
43
py
Python
dthm4kaiako/secret_pages/__init__.py
taskmaker1/dthm4kaiako
681babc10b3223b5ae7fdf19b98c53d2bef4ea1a
[ "MIT" ]
3
2018-12-10T07:03:02.000Z
2021-04-12T02:18:30.000Z
dthm4kaiako/secret_pages/__init__.py
taskmaker1/dthm4kaiako
681babc10b3223b5ae7fdf19b98c53d2bef4ea1a
[ "MIT" ]
566
2018-09-30T02:54:28.000Z
2022-03-28T01:20:01.000Z
dthm4kaiako/secret_pages/__init__.py
taskmaker1/dthm4kaiako
681babc10b3223b5ae7fdf19b98c53d2bef4ea1a
[ "MIT" ]
3
2019-04-04T19:53:39.000Z
2021-05-16T02:04:46.000Z
"""Module for secret pages application."""
21.5
42
0.72093
5
43
6.2
1
0
0
0
0
0
0
0
0
0
0
0
0.116279
43
1
43
43
0.815789
0.837209
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
99cbd99520713fed36ef757ac8d2416cf05b0797
463
py
Python
channels_api/permissions.py
sean-dooher/channels-api
72f6165720eda75f370d68ee4f2e2c4b2c4bd71c
[ "MIT" ]
null
null
null
channels_api/permissions.py
sean-dooher/channels-api
72f6165720eda75f370d68ee4f2e2c4b2c4bd71c
[ "MIT" ]
null
null
null
channels_api/permissions.py
sean-dooher/channels-api
72f6165720eda75f370d68ee4f2e2c4b2c4bd71c
[ "MIT" ]
null
null
null
class BasePermission(object): def __init__(self, queryset, lookup_field): self.queryset = queryset self.lookup_field = lookup_field def has_permission(self, user, action, pk): pass class AllowAny(BasePermission): def has_permission(self, user, action, pk): return True class IsAuthenticated(BasePermission): def has_permission(self, user, action, pk): return user.pk and user.is_authenticated
20.130435
48
0.684665
54
463
5.666667
0.407407
0.107843
0.156863
0.196078
0.444444
0.444444
0.444444
0.339869
0.339869
0
0
0
0.233261
463
22
49
21.045455
0.861972
0
0
0.25
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.083333
0
0.166667
0.75
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
1
1
0
0
5
99e8a2650c626b0a44581912042cc155d6c1c0bb
55
py
Python
src/mist/api/images/__init__.py
SpiralUp/mist.api
a3b5233ab4aa3f6a0a2dea6333ff1e5a260af934
[ "Apache-2.0" ]
6
2017-08-24T00:34:30.000Z
2022-01-16T21:29:22.000Z
src/mist/api/images/__init__.py
SpiralUp/mist.api
a3b5233ab4aa3f6a0a2dea6333ff1e5a260af934
[ "Apache-2.0" ]
9
2021-03-31T18:50:47.000Z
2022-01-09T23:20:02.000Z
src/mist/api/images/__init__.py
SpiralUp/mist.api
a3b5233ab4aa3f6a0a2dea6333ff1e5a260af934
[ "Apache-2.0" ]
13
2017-09-21T18:17:02.000Z
2022-02-21T04:29:25.000Z
from mist.api.clouds.models import Cloud # noqa: F401
27.5
54
0.763636
9
55
4.666667
1
0
0
0
0
0
0
0
0
0
0
0.06383
0.145455
55
1
55
55
0.829787
0.181818
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
820bd4ac0a0f6bf311daf64c48da935be4b47807
113
py
Python
test/import_tests.py
dbehrlich/sisyphus2
4e99c5f9b5de78d6011d7a6d0a0a76ac729b7fb2
[ "MIT" ]
null
null
null
test/import_tests.py
dbehrlich/sisyphus2
4e99c5f9b5de78d6011d7a6d0a0a76ac729b7fb2
[ "MIT" ]
null
null
null
test/import_tests.py
dbehrlich/sisyphus2
4e99c5f9b5de78d6011d7a6d0a0a76ac729b7fb2
[ "MIT" ]
2
2018-08-13T00:54:54.000Z
2018-09-13T21:09:11.000Z
import numpy as np import tensorflow as tf from backend.networks import Model import backend.visualizations as V
22.6
34
0.840708
18
113
5.277778
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.141593
113
4
35
28.25
0.979381
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
82153385e77c2204cb8718e9e2542d36a1437043
10,064
py
Python
eduid_am/tests/test_tasks.py
johanlundberg/eduid-am
a8b03778292cfb49577ca31a0115f5263bd147d8
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
eduid_am/tests/test_tasks.py
johanlundberg/eduid-am
a8b03778292cfb49577ca31a0115f5263bd147d8
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
eduid_am/tests/test_tasks.py
johanlundberg/eduid-am
a8b03778292cfb49577ca31a0115f5263bd147d8
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
from __future__ import absolute_import import eduid_userdb from eduid_userdb.testing import MongoTestCase, MOCKED_USER_STANDARD as M from eduid_userdb.locked_identity import LockedIdentityList, LockedIdentityNin from eduid_userdb.exceptions import MultipleUsersReturned, UserDoesNotExist, EduIDUserDBError from bson import ObjectId from eduid_am.consistency_checks import unverify_duplicates, check_locked_identity from eduid_am.celery import celery, get_attribute_manager class TestTasks(MongoTestCase): def setUp(self): super(TestTasks, self).setUp(celery, get_attribute_manager) def test_get_user_by_id(self): user = self.amdb.get_user_by_id(M['_id']) self.assertEqual(user.mail_addresses.primary.email, M['mail']) with self.assertRaises(UserDoesNotExist): self.amdb.get_user_by_id('123456789012') def test_get_user_by_mail(self): user = self.amdb.get_user_by_mail(M['mailAliases'][0]['email']) self.assertEqual(user.user_id, M['_id']) # Test unverified mail address in mailAliases, should raise UserDoesNotExist with self.assertRaises(UserDoesNotExist): self.amdb.get_user_by_mail(M['mailAliases'][2]['email'], raise_on_missing=True) def test_user_duplication_exception(self): user1 = self.amdb.get_user_by_mail(M['mail']) user2_doc = user1.to_dict() user2_doc['_id'] = ObjectId() # make up a new unique identifier del user2_doc['modified_ts'] # defeat sync-check mechanism self.amdb.save(eduid_userdb.User(data=user2_doc)) with self.assertRaises(MultipleUsersReturned): self.amdb.get_user_by_mail(M['mail']) def test_unverify_duplicate_mail(self): user_id = ObjectId('901234567890123456789012') # johnsmith@example.org / babba-labba attributes = { '$set': { 'mailAliases': [{ 'email': 'johnsmith@example.com', # hubba-bubba's primary mail address 'verified': True, 'primary': True, 'created_ts': True }] } } stats = unverify_duplicates(self.amdb, user_id, attributes) user = self.amdb.get_user_by_eppn('hubba-bubba') self.assertNotEqual(user.mail_addresses.primary.email, 'johnsmith@example.com') self.assertFalse(user.mail_addresses.find('johnsmith@example.com').is_verified) self.assertTrue(user.mail_addresses.primary) self.assertEqual(stats['mail_count'], 1) def test_unverify_duplicate_phone(self): user_id = ObjectId('901234567890123456789012') # johnsmith@example.org / babba-labba attributes = { '$set': { 'phone': [{ 'verified': True, 'number': '+34609609609', # hubba-bubba's primary phone 'primary': True }] } } stats = unverify_duplicates(self.amdb, user_id, attributes) user = self.amdb.get_user_by_eppn('hubba-bubba') self.assertNotEqual(user.phone_numbers.primary.number, '+34609609609') self.assertFalse(user.phone_numbers.find('+34609609609').is_verified) self.assertTrue(user.phone_numbers.primary) self.assertEqual(stats['phone_count'], 1) def test_unverify_duplicate_nins(self): user_id = ObjectId('901234567890123456789012') # johnsmith@example.org / babba-labba attributes = { '$set': { 'nins': [{ 'verified': True, 'number': '197801011234', # hubba-bubba's primary nin 'primary': True }] } } stats = unverify_duplicates(self.amdb, user_id, attributes) user = self.amdb.get_user_by_eppn('hubba-bubba') self.assertIsNone(user.nins.primary) self.assertFalse(user.nins.find('197801011234').is_verified) self.assertEqual(stats['nin_count'], 1) def test_unverify_duplicate_all(self): user_id = ObjectId('901234567890123456789012') # johnsmith@example.org / babba-labba attributes = { '$set': { 'mailAliases': [{ 'email': 'johnsmith@example.com', # hubba-bubba's primary mail address 'verified': True, 'primary': True, 'created_ts': True }], 'phone': [{ 'verified': True, 'number': '+34609609609', # hubba-bubba's primary phone 'primary': True }], 'nins': [{ 'verified': True, 'number': '197801011234', # hubba-bubba's primary nin 'primary': True }], } } stats = unverify_duplicates(self.amdb, user_id, attributes) user = self.amdb.get_user_by_eppn('hubba-bubba') self.assertNotEqual(user.mail_addresses.primary.email, 'johnsmith@example.com') self.assertFalse(user.mail_addresses.find('johnsmith@example.com').is_verified) self.assertTrue(user.mail_addresses.primary) self.assertNotEqual(user.phone_numbers.primary.number, '+34609609609') self.assertFalse(user.phone_numbers.find('+34609609609').is_verified) self.assertTrue(user.phone_numbers.primary) self.assertIsNone(user.nins.primary) self.assertFalse(user.nins.find('197801011234').is_verified) self.assertEqual(stats['mail_count'], 1) self.assertEqual(stats['phone_count'], 1) self.assertEqual(stats['nin_count'], 1) def test_unverify_duplicate_multiple_attribute_values(self): user_id = ObjectId('901234567890123456789012') # johnsmith@example.org / babba-labba attributes = { '$set': { 'mailAliases': [{ 'email': 'johnsmith@example.net', 'verified': True, 'primary': True, 'created_ts': True }, { 'email': 'johnsmith@example.com', # hubba-bubba's primary mail address 'verified': True, 'primary': True, 'created_ts': True }] } } stats = unverify_duplicates(self.amdb, user_id, attributes) user = self.amdb.get_user_by_eppn('hubba-bubba') self.assertNotEqual(user.mail_addresses.primary.email, 'johnsmith@example.com') self.assertFalse(user.mail_addresses.find('johnsmith@example.com').is_verified) self.assertTrue(user.mail_addresses.primary) self.assertEqual(stats['mail_count'], 1) def test_create_locked_identity(self): user_id = ObjectId('901234567890123456789012') # johnsmith@example.org / babba-labba attributes = { '$set': { 'nins': [{ 'verified': True, 'number': '200102031234', 'primary': True }], } } new_attributes = check_locked_identity(self.amdb, user_id, attributes, 'test') locked_nin = LockedIdentityNin('200102031234', 'test', True) locked_identities = LockedIdentityList({}).add(locked_nin) attributes['$set']['locked_identity'] = locked_identities.to_list_of_dicts() self.assertDictEqual(attributes, new_attributes) def test_check_locked_identity(self): user_id = ObjectId('012345678901234567890123') # johnsmith@example.com / hubba-bubba user = self.amdb.get_user_by_id(user_id) user.locked_identity.add(LockedIdentityNin('197801011234', 'test', True)) self.amdb.save(user) attributes = { '$set': { 'nins': [{ 'verified': True, 'number': '197801011234', # hubba-bubba's primary nin 'primary': True }], } } new_attributes = check_locked_identity(self.amdb, user_id, attributes, 'test') locked_nin = LockedIdentityNin('197801011234', 'test', True) locked_identities = LockedIdentityList({}).add(locked_nin) attributes['$set']['locked_identity'] = locked_identities.to_list_of_dicts() self.assertDictEqual(attributes, new_attributes) def test_check_locked_identity_wrong_nin(self): user_id = ObjectId('901234567890123456789012') # johnsmith@example.org / babba-labba user = self.amdb.get_user_by_id(user_id) user.locked_identity.add(LockedIdentityNin('200102031234', 'test', True)) self.amdb.save(user) attributes = { '$set': { 'nins': [{ 'verified': True, 'number': '200506076789', 'primary': True }], } } with self.assertRaises(EduIDUserDBError): check_locked_identity(self.amdb, user_id, attributes, 'test') def test_check_locked_identity_no_verified_nin(self): user_id = ObjectId('012345678901234567890123') # johnsmith@example.com / hubba-bubba attributes = { '$set': { 'phone': [{ 'verified': True, 'number': '+34609609609', 'primary': True }], } } new_attributes = check_locked_identity(self.amdb, user_id, attributes, 'test') self.assertDictEqual(attributes, new_attributes) attributes = { '$set': { 'nins': [{ 'verified': False, 'number': '200506076789', 'primary': False }], } } new_attributes = check_locked_identity(self.amdb, user_id, attributes, 'test') self.assertDictEqual(attributes, new_attributes)
41.586777
93
0.587738
979
10,064
5.822268
0.134831
0.036491
0.023684
0.034211
0.798421
0.782105
0.760175
0.739474
0.721754
0.694912
0
0.065806
0.299384
10,064
242
94
41.586777
0.74259
0.069257
0
0.685446
0
0
0.144431
0.045576
0
0
0
0
0.169014
1
0.061033
false
0
0.037559
0
0.103286
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
82253d53811f628518c27f5b4cb9a4632a880724
222
py
Python
Numpy/Inner_and_Outer.py
idarlenearaujo/HackerRank_Python
3fc4d0baf37fe321737f1e1ae9320d67e5ee984a
[ "MIT" ]
null
null
null
Numpy/Inner_and_Outer.py
idarlenearaujo/HackerRank_Python
3fc4d0baf37fe321737f1e1ae9320d67e5ee984a
[ "MIT" ]
null
null
null
Numpy/Inner_and_Outer.py
idarlenearaujo/HackerRank_Python
3fc4d0baf37fe321737f1e1ae9320d67e5ee984a
[ "MIT" ]
null
null
null
import numpy as np # array A / B arrayA, arrayB = (np.array([int(i) for i in input().split()]) for _ in range(2)) # produ interno # produ externo print('{}\n{}'.format(np.inner(arrayA, arrayB), np.outer(arrayA, arrayB)))
27.75
80
0.662162
37
222
3.945946
0.675676
0.246575
0.191781
0
0
0
0
0
0
0
0
0.005263
0.144144
222
7
81
31.714286
0.763158
0.175676
0
0
0
0
0.03352
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.333333
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
8244e290441c72d1c79f76086ff3639b32595d2b
93
py
Python
ch3/simple.for.py
ldmcdaniel/learning_python
63717c397cd75e45a8aef909d4b601466cd6036a
[ "MIT" ]
30
2016-10-28T18:14:15.000Z
2021-08-29T15:20:56.000Z
ch3/simple.for.py
ldmcdaniel/learning_python
63717c397cd75e45a8aef909d4b601466cd6036a
[ "MIT" ]
null
null
null
ch3/simple.for.py
ldmcdaniel/learning_python
63717c397cd75e45a8aef909d4b601466cd6036a
[ "MIT" ]
31
2016-09-10T22:47:12.000Z
2022-03-13T04:50:35.000Z
for number in [0, 1, 2, 3, 4]: print(number) for number in range(5): print(number)
13.285714
30
0.591398
17
93
3.235294
0.647059
0.327273
0.4
0
0
0
0
0
0
0
0
0.086957
0.258065
93
6
31
15.5
0.710145
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
412f11298a9c244c2598437989a8d8d8ead48f50
6,839
py
Python
tools/cli_commands/test/test_gpg_encrypt.py
bhushanthakur93/qontract-reconcile
fd8eea9f92d353224113955d08e3592864e37df8
[ "Apache-2.0" ]
null
null
null
tools/cli_commands/test/test_gpg_encrypt.py
bhushanthakur93/qontract-reconcile
fd8eea9f92d353224113955d08e3592864e37df8
[ "Apache-2.0" ]
null
null
null
tools/cli_commands/test/test_gpg_encrypt.py
bhushanthakur93/qontract-reconcile
fd8eea9f92d353224113955d08e3592864e37df8
[ "Apache-2.0" ]
null
null
null
import json from typing import Mapping import pytest from unittest.mock import MagicMock, mock_open, patch from reconcile.queries import UserFilter from reconcile.utils.secret_reader import SecretReader from tools.cli_commands.gpg_encrypt import ( ArgumentException, GPGEncryptCommand, GPGEncryptCommandData, UserException, ) def craft_command( command_data: GPGEncryptCommandData, secret: Mapping[str, str] ) -> GPGEncryptCommand: secret_reader = MagicMock(spec=SecretReader) secret_reader.read_all = MagicMock() secret_reader.read_all.side_effect = [secret] command = GPGEncryptCommand.create( command_data=command_data, secret_reader=secret_reader, ) return command @patch("reconcile.utils.gpg.gpg_encrypt") @patch("reconcile.queries.get_users_by") def test_gpg_encrypt_from_vault(get_users_by_mock, gpg_encrypt_mock): vault_secret_path = "app-sre/test" target_user = "testuser" gpg_key = "xyz" secret = {"x": "y"} user_query = { "org_username": target_user, "public_gpg_key": gpg_key, } command = craft_command( command_data=GPGEncryptCommandData( vault_secret_path=vault_secret_path, target_user=target_user, ), secret=secret, ) secret_reader_mock = command._secret_reader.read_all get_users_by_mock.side_effect = [[user_query]] gpg_encrypt_mock.side_effect = ["encrypted_content"] command.execute() secret_reader_mock.assert_called_once_with({"path": vault_secret_path}) get_users_by_mock.assert_called_once_with( refs=False, filter=UserFilter( org_username=target_user, ), ) gpg_encrypt_mock.assert_called_once_with( content=json.dumps(secret, sort_keys=True, indent=4), public_gpg_key=gpg_key, ) @patch("reconcile.utils.gpg.gpg_encrypt") @patch("reconcile.queries.get_users_by") def test_gpg_encrypt_from_vault_with_version(get_users_by_mock, gpg_encrypt_mock): vault_secret_path = "app-sre/test" target_user = "testuser" gpg_key = "xyz" version = 4 secret = {"x": "y"} user_query = { "org_username": target_user, "public_gpg_key": gpg_key, } command = craft_command( command_data=GPGEncryptCommandData( vault_secret_path=vault_secret_path, vault_secret_version=version, target_user=target_user, ), secret=secret, ) secret_reader_mock = command._secret_reader.read_all get_users_by_mock.side_effect = [[user_query]] gpg_encrypt_mock.side_effect = ["encrypted_content"] command.execute() secret_reader_mock.assert_called_once_with( {"path": vault_secret_path, "version": str(version)} ) get_users_by_mock.assert_called_once_with( refs=False, filter=UserFilter( org_username=target_user, ), ) gpg_encrypt_mock.assert_called_once_with( content=json.dumps(secret, sort_keys=True, indent=4), public_gpg_key=gpg_key, ) @patch("reconcile.queries.get_users_by") @patch("reconcile.queries.get_clusters") def test_gpg_encrypt_oc_bad_path(get_clusters_mock, get_users_by_mock): target_user = "testuser" user_query = { "org_username": target_user, "public_gpg_key": "xyz", } command = craft_command( command_data=GPGEncryptCommandData( openshift_path="cluster/secret", target_user=target_user, ), secret={}, ) get_users_by_mock.side_effect = [[user_query]] get_clusters_mock.side_effect = [[{"name": "cluster"}]] with pytest.raises(ArgumentException) as exc: command.execute() assert "Wrong format!" in str(exc.value) @patch("reconcile.queries.get_users_by") @patch("reconcile.queries.get_clusters_by") def test_gpg_encrypt_oc_cluster_not_exists(get_clusters_mock, get_users_by_mock): target_user = "testuser" user_query = { "org_username": target_user, "public_gpg_key": "xyz", } command = craft_command( command_data=GPGEncryptCommandData( openshift_path="cluster/namespace/secret", target_user=target_user, ), secret={}, ) get_users_by_mock.side_effect = [[user_query]] get_clusters_mock.side_effect = [[]] with pytest.raises(ArgumentException) as exc: command.execute() assert "No cluster found" in str(exc.value) @patch("builtins.open", new_callable=mock_open, read_data="test-data") @patch("reconcile.utils.gpg.gpg_encrypt") @patch("reconcile.queries.get_users_by") def test_gpg_encrypt_from_local_file( get_users_by_mock, gpg_encrypt_mock, mock_file, capsys ): target_user = "testuser" file_path = "/tmp/tmp" encrypted_content = "encrypted_content" user_query = { "org_username": target_user, "public_gpg_key": "xyz", } command = craft_command( command_data=GPGEncryptCommandData( secret_file_path=file_path, target_user=target_user, ), secret={}, ) secret_reader_mock = command._secret_reader.read_all get_users_by_mock.side_effect = [[user_query]] gpg_encrypt_mock.side_effect = [encrypted_content] command.execute() captured = capsys.readouterr() assert captured.out == f"{encrypted_content}\n" mock_file.assert_called_once_with(file_path) secret_reader_mock.read_all.assert_not_called() @patch("reconcile.queries.get_users_by") def test_gpg_encrypt_user_not_found(get_users_by_mock): target_user = "testuser" command = craft_command( command_data=GPGEncryptCommandData( vault_secret_path="/tmp/tmp", target_user=target_user, ), secret={}, ) get_users_by_mock.side_effect = [[]] with pytest.raises(UserException) as exc: command.execute() assert "Expected to find exactly one user" in str(exc.value) @patch("reconcile.queries.get_users_by") def test_gpg_encrypt_user_no_gpg_key(get_users_by_mock): target_user = "testuser" command = craft_command( command_data=GPGEncryptCommandData( vault_secret_path="/tmp/tmp", target_user=target_user, ), secret={}, ) get_users_by_mock.side_effect = [[{"org_username": target_user}]] with pytest.raises(UserException) as exc: command.execute() assert "associated GPG key" in str(exc.value) def test_gpg_encrypt_no_secret_specified(): command = craft_command( command_data=GPGEncryptCommandData( target_user="one_user", ), secret={}, ) with pytest.raises(ArgumentException) as exc: command.execute() assert "No argument given" in str(exc.value)
29.478448
82
0.686358
829
6,839
5.259349
0.137515
0.068807
0.052752
0.051376
0.757569
0.738532
0.713991
0.702064
0.702064
0.663991
0
0.000558
0.213482
6,839
231
83
29.606061
0.810002
0
0
0.603015
0
0
0.130721
0.060097
0
0
0
0
0.070352
1
0.045226
false
0
0.035176
0
0.085427
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
41313ede3e4530a1732b11ddee55571ce1a55ae1
502
py
Python
cygraphblas/lib/complete/ss.py
eriknw/cygraphblas
81ae37591ec38aa698d5f37716464a6c366076f9
[ "Apache-2.0" ]
3
2020-09-03T21:47:25.000Z
2021-08-06T20:24:19.000Z
cygraphblas/lib/complete/ss.py
eriknw/cygraphblas
81ae37591ec38aa698d5f37716464a6c366076f9
[ "Apache-2.0" ]
null
null
null
cygraphblas/lib/complete/ss.py
eriknw/cygraphblas
81ae37591ec38aa698d5f37716464a6c366076f9
[ "Apache-2.0" ]
2
2020-09-03T21:47:52.000Z
2021-08-06T20:24:20.000Z
import cygraphblas.lib.ss import cygraphblas.lib.binary.ss import cygraphblas.lib.descriptor.ss import cygraphblas.lib.dtypes.ss import cygraphblas.lib.monoid.ss import cygraphblas.lib.semiring.ss import cygraphblas.lib.unary.ss import cygraphblas.lib.constants.ss import cygraphblas.lib.constants.desc_field.ss import cygraphblas.lib.constants.desc_value.ss import cygraphblas.lib.constants.info.ss import cygraphblas.lib.constants.mode.ss del cygraphblas from cygraphblas_ss.lib.complete import *
27.888889
46
0.850598
73
502
5.808219
0.260274
0.481132
0.566038
0.570755
0.384434
0.165094
0
0
0
0
0
0
0.065737
502
17
47
29.529412
0.904051
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.928571
0
0.928571
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
415c8ff7ab6e739f9959651198ca3eeb391bf3c6
214
py
Python
teamcity/__init__.py
Points/teamcity-python
58dd0e9d83fea92f9212f2cadaaaeaefd1deb68e
[ "Apache-2.0" ]
1
2018-08-14T16:29:57.000Z
2018-08-14T16:29:57.000Z
teamcity/__init__.py
denisenkom/teamcity-python
25d0008596cfc7b895f367d36de5dd95b6722b4c
[ "Apache-2.0" ]
null
null
null
teamcity/__init__.py
denisenkom/teamcity-python
25d0008596cfc7b895f367d36de5dd95b6722b4c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 __all__ = ['is_running_under_teamcity'] import os TEAMCITY_ENV_PROJECT_NAME = "TEAMCITY_PROJECT_NAME" def is_running_under_teamcity(): return os.getenv(TEAMCITY_ENV_PROJECT_NAME) is not None
19.454545
59
0.803738
32
214
4.8125
0.5625
0.214286
0.181818
0.285714
0
0
0
0
0
0
0
0.005291
0.116822
214
10
60
21.4
0.809524
0.056075
0
0
0
0
0.23
0.23
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.6
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
5
416fd8b417ecb8d25dc2fe2151179abe38d2ddb1
1,820
py
Python
pyaz/afd/rule_set/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/afd/rule_set/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/afd/rule_set/__init__.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
1
2022-02-03T09:12:01.000Z
2022-02-03T09:12:01.000Z
from ... pyaz_utils import _call_az def show(profile_name, resource_group, rule_set_name): ''' Required Parameters: - profile_name -- Name of the CDN profile which is unique within the resource group. - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` - rule_set_name -- Name of the rule set. ''' return _call_az("az afd rule-set show", locals()) def list(profile_name, resource_group): ''' Required Parameters: - profile_name -- Name of the CDN profile which is unique within the resource group. - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` ''' return _call_az("az afd rule-set list", locals()) def create(profile_name, resource_group, rule_set_name): ''' Creates a new rule set under the specified profile. Required Parameters: - profile_name -- Name of the CDN profile which is unique within the resource group. - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` - rule_set_name -- Name of the rule set. ''' return _call_az("az afd rule-set create", locals()) def delete(profile_name, resource_group, rule_set_name, yes=None): ''' Delete the rule set. Required Parameters: - profile_name -- Name of the CDN profile which is unique within the resource group. - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>` - rule_set_name -- Name of the rule set. Optional Parameters: - yes -- Do not prompt for confirmation. ''' return _call_az("az afd rule-set delete", locals())
35
128
0.697802
258
1,820
4.771318
0.186047
0.168968
0.056864
0.073924
0.807474
0.807474
0.807474
0.683184
0.683184
0.683184
0
0
0.212637
1,820
51
129
35.686275
0.859037
0.650549
0
0
0
0
0.167331
0
0
0
0
0
0
1
0.444444
false
0
0.111111
0
1
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
1
0
0
0
0
0
0
0
5
41764a12f76d2083c2e010f3087fe572dcf38435
35
py
Python
try.py
wahsandaruwan/python_ess_exercises
a43cffa1077d1d9af7ee2e81427416894b29b0b6
[ "MIT" ]
null
null
null
try.py
wahsandaruwan/python_ess_exercises
a43cffa1077d1d9af7ee2e81427416894b29b0b6
[ "MIT" ]
null
null
null
try.py
wahsandaruwan/python_ess_exercises
a43cffa1077d1d9af7ee2e81427416894b29b0b6
[ "MIT" ]
null
null
null
# Use this file to practice scripts
35
35
0.8
6
35
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.171429
35
1
35
35
0.965517
0.942857
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
419365f3a482d230dcf1a76814095d2873dabbac
62
py
Python
scraping/__init__.py
kmate/dac
e0dd8207db5f8965b9c66c2bfe5a7f5cd8ea27fb
[ "Apache-2.0" ]
4
2020-01-02T17:38:30.000Z
2022-01-24T00:01:06.000Z
scraping/__init__.py
kmate/dac
e0dd8207db5f8965b9c66c2bfe5a7f5cd8ea27fb
[ "Apache-2.0" ]
17
2020-01-02T12:11:49.000Z
2020-08-03T14:44:05.000Z
scraping/__init__.py
kmate/dac
e0dd8207db5f8965b9c66c2bfe5a7f5cd8ea27fb
[ "Apache-2.0" ]
4
2020-01-03T16:05:12.000Z
2021-02-15T10:28:57.000Z
from scraping.scraper import scrape, start_scheduled_scraping
31
61
0.887097
8
62
6.625
0.875
0
0
0
0
0
0
0
0
0
0
0
0.080645
62
1
62
62
0.929825
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
41c9eb2fb0600b456fead578af280f3f8b310fb1
4,622
py
Python
app.py
Mateus-Toni/workstation-backend
209f32604eaf07261679ac95c4dc8dcab8380a90
[ "MIT" ]
null
null
null
app.py
Mateus-Toni/workstation-backend
209f32604eaf07261679ac95c4dc8dcab8380a90
[ "MIT" ]
null
null
null
app.py
Mateus-Toni/workstation-backend
209f32604eaf07261679ac95c4dc8dcab8380a90
[ "MIT" ]
null
null
null
import dao as Bank import defs_workstation as function from flask import Flask, redirect, url_for, session, render_template, request import random app = Flask(__name__) @app.route("/") def index(): return render_template("index.html") @app.route("/login") def login(): return render_template('login.html') @app.route("/autenticate", methods=['POST']) def autenticar(): if is_email := function.check(request.form['user']): email = request.form['user'] password = request.form['senha'] password_bank, name_bank = Bank.query_exist_email(email) if name_bank: if password == password_bank: cod = random.randint(111111,999999) function.send_email(email, cod) cod_user = request.form['cod_user'] if cod_user == cod: session['usuario_logado'] = name_bank return redirect(url_for("home")) else: return redirect(url_for("login")) return redirect(url_for("login")) return redirect(url_for("login")) else: if is_cpf := function.is_cpf(request.form['user']): cpf = request.form['user'] password = request.form['senha'] password_bank, name_bank, email_bank = Bank.query_exist_cpf(cpf) if name_bank: if password == password_bank: cod = random.randint(111111,999999) function.send_email(email_bank, cod) cod_user = request.form['cod_user'] if cod_user == cod: session['usuario_logado'] = name_bank return redirect(url_for("home")) else: return redirect(url_for("login")) return redirect(url_for("login")) return redirect(url_for("login")) else: cnpj = request.form['user'] password = request.form['senha'] password_bank, name_bank, email_bank = Bank.query_exist_cnpj(cnpj) if name_bank: if password == password_bank: cod = random.randint(111111,999999) function.send_email(email_bank, cod) cod_user = request.form['cod_user'] if cod_user == cod: session['usuario_logado'] = name_bank return redirect(url_for("home")) else: return redirect(url_for("login")) return redirect(url_for("login")) return redirect(url_for("login")) @app.route("/register") def register(): return render_template("register.html") @app.route("/create", methods=['POST']) def create(): name = request.form['nome'] last_name = request.form['sobrenome'] email = request.form['email'] cpf = request.form['cpf'] telefone = request.form['telefone'] data_nasc = request.form['data_nasc'] senha = request.form['senha'] if valid := function.validates(email, cpf, data_nasc): if has := Bank.search(cpf, email): Bank.save_user(name, last_name, email, cpf, telefone, data_nasc, senha) return redirect(url_for("login")) return redirect(url_for('cadastro')) return redirect(url_for('cadastro')) @app.route("/createpj", methods=['POST']) def create_pj(): name = request.form['nome'] last_name = request.form['sobrenome'] email = request.form['email'] cnpj = request.form['cpf'] telefone = request.form['telefone'] data_nasc = request.form['data_nasc'] senha = request.form['senha'] if valid := function.validates_pj(email, cnpj, data_nasc): if has := Bank.search_pj(cnpj, email): Bank.save_user(name, last_name, email, cnpj, telefone, data_nasc, senha) return redirect(url_for("login")) return redirect(url_for('cadastro')) return redirect(url_for('cadastro')) @app.route("/update", methods=['POST']) def update_user(): id_user = request.form['id_user'] name = request.form['nome'] last_name = request.form['sobrenome'] email = request.form['email'] cpf = request.form['cpf'] telefone = request.form['telefone'] data_nasc = request.form['data_nasc'] Bank.update_user(id_user, name, last_name, cpf, data_nasc, telefone, email) if __name__ == "__main__": app.run(debug=True)
30.813333
79
0.569018
518
4,622
4.872587
0.138996
0.139461
0.105388
0.142631
0.727417
0.727417
0.709192
0.709192
0.68225
0.68225
0
0.011222
0.305928
4,622
149
80
31.020134
0.775561
0
0
0.614679
0
0
0.094981
0
0
0
0
0
0
1
0.06422
false
0.082569
0.036697
0.027523
0.293578
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
68e2acdf6dc6995e2068a3ee92ec32cda1973b51
113
py
Python
chap8/making_pizzas.py
wikilike7/python-crash-course
85cd7a2ab6e43a554c282b6e0c1c44c415cca3a3
[ "MIT" ]
null
null
null
chap8/making_pizzas.py
wikilike7/python-crash-course
85cd7a2ab6e43a554c282b6e0c1c44c415cca3a3
[ "MIT" ]
null
null
null
chap8/making_pizzas.py
wikilike7/python-crash-course
85cd7a2ab6e43a554c282b6e0c1c44c415cca3a3
[ "MIT" ]
1
2019-03-05T09:31:27.000Z
2019-03-05T09:31:27.000Z
from pizza import * make_pizza(16, 'pepperoni') make_pizza(12, 'mushrooms', 'green pepperoni', 'extra cheese')
18.833333
62
0.725664
15
113
5.333333
0.733333
0.225
0
0
0
0
0
0
0
0
0
0.040404
0.123894
113
5
63
22.6
0.767677
0
0
0
0
0
0.401786
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
68fbfe9b5c208a08486f158cf3a32ec0cf3596a7
162
py
Python
snakeplan/projects/forms.py
mcrute/snakeplan
019f07587a301f689dc9471eec5db898299ee62a
[ "Apache-2.0" ]
null
null
null
snakeplan/projects/forms.py
mcrute/snakeplan
019f07587a301f689dc9471eec5db898299ee62a
[ "Apache-2.0" ]
null
null
null
snakeplan/projects/forms.py
mcrute/snakeplan
019f07587a301f689dc9471eec5db898299ee62a
[ "Apache-2.0" ]
null
null
null
import models from django.forms import ModelForm class StoryForm(ModelForm): class Meta: model = models.Story fields = ('project', 'name')
16.2
36
0.660494
18
162
5.944444
0.777778
0.261682
0
0
0
0
0
0
0
0
0
0
0.246914
162
9
37
18
0.877049
0
0
0
0
0
0.067901
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
ec0ab65441f9b5c863a64600155f498328cef11a
172
py
Python
moldesign/models/__init__.py
Autodesk/molecular-design-toolkit
5f45a47fea21d3603899a6366cb163024f0e2ec4
[ "Apache-2.0" ]
147
2016-07-15T18:53:55.000Z
2022-01-30T04:36:39.000Z
moldesign/models/__init__.py
cherishyli/molecular-design-toolkit
5f45a47fea21d3603899a6366cb163024f0e2ec4
[ "Apache-2.0" ]
151
2016-07-15T21:35:11.000Z
2019-10-10T08:57:29.000Z
moldesign/models/__init__.py
cherishyli/molecular-design-toolkit
5f45a47fea21d3603899a6366cb163024f0e2ec4
[ "Apache-2.0" ]
33
2016-08-02T00:04:51.000Z
2021-09-02T10:05:04.000Z
from .openmm import * from .pyscf import * from .models import * from .toys import * from .amber import * from .openbabel import * from .nwchem import * from .qmmm import *
21.5
24
0.726744
24
172
5.208333
0.416667
0.56
0
0
0
0
0
0
0
0
0
0
0.180233
172
8
25
21.5
0.886525
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
ec1b9d9f35df7bdddd6c872b5f95019ab8226b9e
149
py
Python
newser/accounts/admin.py
denzow/newser
ab4aa117a72e9b0f4aec8027158e9dc906c13800
[ "MIT" ]
null
null
null
newser/accounts/admin.py
denzow/newser
ab4aa117a72e9b0f4aec8027158e9dc906c13800
[ "MIT" ]
2
2020-02-11T23:12:20.000Z
2020-06-05T17:17:10.000Z
newser/accounts/admin.py
denzow/newser
ab4aa117a72e9b0f4aec8027158e9dc906c13800
[ "MIT" ]
null
null
null
# coding:utf-8 # Register your models here. from django.contrib import admin from accounts.models import CustomUser admin.site.register(CustomUser)
21.285714
38
0.812081
21
149
5.761905
0.714286
0
0
0
0
0
0
0
0
0
0
0.007576
0.114094
149
7
39
21.285714
0.909091
0.261745
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
ec3931a86e6239fec1b78b89d2b8a9a7e282b78c
220
py
Python
dashboard/app/rules/conditions/email.py
robertsimmons514/isthislegit
aa8f2b6cb2ac3de2b0fe03bb93dbceccc4c1f495
[ "BSD-3-Clause" ]
282
2017-07-01T03:47:54.000Z
2022-02-25T00:58:40.000Z
dashboard/app/rules/conditions/email.py
robertsimmons514/isthislegit
aa8f2b6cb2ac3de2b0fe03bb93dbceccc4c1f495
[ "BSD-3-Clause" ]
46
2017-07-26T22:54:13.000Z
2022-02-14T21:39:52.000Z
dashboard/app/rules/conditions/email.py
robertsimmons514/isthislegit
aa8f2b6cb2ac3de2b0fe03bb93dbceccc4c1f495
[ "BSD-3-Clause" ]
53
2017-07-22T15:04:16.000Z
2022-03-16T03:36:28.000Z
from app.rules import Condition class EmailCondition(Condition): ''' EmailCondition matches an attribute of the EmailReport. This is done by a simple regex.''' def match(report, field, value): pass
24.444444
63
0.704545
28
220
5.535714
0.928571
0
0
0
0
0
0
0
0
0
0
0
0.218182
220
8
64
27.5
0.901163
0.4
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
ec41bde27bf1835f5fcfeb31a9d2c5ea4deff2b0
57
py
Python
CodeWars/7 Kyu/Return the closest number multiple of 10.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/7 Kyu/Return the closest number multiple of 10.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/7 Kyu/Return the closest number multiple of 10.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
def closest_multiple_10(i): return round(i / 10) * 10
28.5
29
0.684211
10
57
3.7
0.7
0
0
0
0
0
0
0
0
0
0
0.130435
0.192982
57
2
29
28.5
0.673913
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
ec51707e66d4eaf90eb1c472640bfae23ce05eb6
141
py
Python
apps/inventario/admin.py
alejandrobolivar/sist_inv_coesbicop
36a068f21adb28f1f711b540841786538dbf8411
[ "CC0-1.0" ]
null
null
null
apps/inventario/admin.py
alejandrobolivar/sist_inv_coesbicop
36a068f21adb28f1f711b540841786538dbf8411
[ "CC0-1.0" ]
null
null
null
apps/inventario/admin.py
alejandrobolivar/sist_inv_coesbicop
36a068f21adb28f1f711b540841786538dbf8411
[ "CC0-1.0" ]
null
null
null
from django.contrib import admin # Register your models here. from apps.inventario.models import Inventario admin.site.register(Inventario)
23.5
45
0.829787
19
141
6.157895
0.631579
0
0
0
0
0
0
0
0
0
0
0
0.106383
141
6
46
23.5
0.928571
0.184397
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
ec521f7ce1957b7d6742b15cdeec1107098d6d37
66
py
Python
stdclasses/__init__.py
guimartino/stdclasses
5be27535dfaa8ebbd4d88e60947aba447b80a75f
[ "MIT" ]
null
null
null
stdclasses/__init__.py
guimartino/stdclasses
5be27535dfaa8ebbd4d88e60947aba447b80a75f
[ "MIT" ]
null
null
null
stdclasses/__init__.py
guimartino/stdclasses
5be27535dfaa8ebbd4d88e60947aba447b80a75f
[ "MIT" ]
null
null
null
from .enviaremail import EnviarEmail from .conceitos import IAList
33
36
0.863636
8
66
7.125
0.625
0
0
0
0
0
0
0
0
0
0
0
0.106061
66
2
37
33
0.966102
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
6b5b8fa1cced654b0e2eb0c454fb73f6559034aa
4,153
py
Python
src/io/DataReader.py
szymag/ZFN
d617057ee202e5ac026eb31b8a9598c95b385ba0
[ "MIT" ]
2
2016-09-13T06:19:40.000Z
2017-02-24T21:41:07.000Z
src/io/DataReader.py
szymag/ZFN
d617057ee202e5ac026eb31b8a9598c95b385ba0
[ "MIT" ]
3
2015-11-19T06:28:30.000Z
2016-06-26T19:46:53.000Z
src/io/DataReader.py
szymag/ZFN
d617057ee202e5ac026eb31b8a9598c95b385ba0
[ "MIT" ]
2
2015-11-17T14:46:58.000Z
2017-10-31T21:35:15.000Z
import yaml import warnings class ParsingData: # TODO: Rename class, I guess # TODO: consider static method def __init__(self, input_parameters): if isinstance(input_parameters, str): self.input_parameters = self.load_yaml_file(input_parameters) elif isinstance(input_parameters, dict): self.input_parameters = input_parameters else: raise IOError('Input parameters not understood: ' + str(input_parameters)) def __eq__(self, other): return self.input_parameters == other.input_parameters def _ne__(self, other): return self.input_parameters != other.input_parameters def load_yaml_file(self, input_parameters): with open(input_parameters, 'r') as stream: try: return self.convert_to_value(yaml.safe_load(stream)) except yaml.YAMLError as exc: return exc def convert_to_value(self, d): if len(d) == d or type(d) != dict: return d for k, v in d.items(): if isinstance(v, dict): self.convert_to_value(v) elif isinstance(v, str): try: d[k] = float(v) except Exception: if d[k] == 'None': d[k] = None elif d[k] == 'True': d[k] = True elif d[k] == 'False': d[k] = False else: pass return d def set_new_value(self, value, argument_1, argument_2=None): if argument_2 is None: if not isinstance(self.input_parameters[argument_1], type(value)): warnings.warn('Old values has ' + str(type(self.input_parameters[argument_1])) + ' while new one has ' + str(type(value))) self.input_parameters[argument_1] = value else: if not isinstance(self.input_parameters[argument_1][argument_2], type(value)): warnings.warn('Old values has ' + str(type(self.input_parameters[argument_1][argument_2])) + ' while new one has ' + str(type(value))) self.input_parameters[argument_1][argument_2] = value def bloch_vector(self): return self.input_parameters['q_vector']['start'], self.input_parameters['q_vector']['end'],\ self.input_parameters['q_vector']['dispersion_count'] def lattice_const(self): return self.input_parameters['system_dimensions']['a'], self.input_parameters['system_dimensions']['b'] def thickness(self): return self.input_parameters['system_dimensions']['d'] def rec_vector(self): return self.input_parameters['numerical_parameters']['rec_vector_x'],\ self.input_parameters['numerical_parameters']['rec_vector_y'] def physical_constant(self): return self.input_parameters['physical_parameters']['gamma'],\ self.input_parameters['physical_parameters']['mu0H0'] def fft_data(self): return self.input_parameters['numerical_parameters']['fft_file'] def output_file(self, data_type): if data_type == 'dispersion': return self.input_parameters['numerical_parameters']['output_file'] + '.dys' elif data_type == 'vectors': return self.input_parameters['numerical_parameters']['output_file'] + '.vec' else: return self.input_parameters['numerical_parameters']['output_file'] def x(self): return self.input_parameters['system_dimensions']['x'] def material_constant(self, material_name): return self.input_parameters['material_parameters'][material_name] def mu0(self): return self.input_parameters['physical_parameters']['mu0'] def angle(self): return self.input_parameters['system_dimensions']['angle'] def perpendicular_bloch_vector(self): return self.input_parameters['perp_vector']['angle'], self.input_parameters['perp_vector']['max_value'] if __name__ == "__main__": pass
38.100917
111
0.610161
476
4,153
5.054622
0.228992
0.255611
0.252702
0.166251
0.54655
0.475894
0.4734
0.25187
0.148795
0.148795
0
0.00533
0.277149
4,153
108
112
38.453704
0.796136
0.013484
0
0.142857
0
0
0.146556
0
0
0
0
0.009259
0
1
0.214286
false
0.02381
0.02381
0.154762
0.488095
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
6b727d3068936223822e771d62395515444c3365
156
py
Python
doc/core/apply.py
ponyatov/metaLeds
e017f4b14dcdf87275154d8220fbdae06cd9f370
[ "MIT" ]
null
null
null
doc/core/apply.py
ponyatov/metaLeds
e017f4b14dcdf87275154d8220fbdae06cd9f370
[ "MIT" ]
null
null
null
doc/core/apply.py
ponyatov/metaLeds
e017f4b14dcdf87275154d8220fbdae06cd9f370
[ "MIT" ]
null
null
null
class Object: ## Lisp apply() to `that` object in context def apply(self, env, that): raise NotImplementedError(['apply', self, env, that])
31.2
61
0.641026
20
156
5
0.65
0.18
0.24
0.32
0
0
0
0
0
0
0
0
0.224359
156
4
62
39
0.826446
0.25641
0
0
0
0
0.044248
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
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
1
0
0
0
0
0
0
0
5
6bdeb187cbdbd2f808dc404b1b9318171f30f4d1
64
py
Python
ws/handler/event/enum/appliance/sound/player/__init__.py
fabaff/automate-ws
a9442f287692787e3f253e1ff23758bec8f3902e
[ "MIT" ]
null
null
null
ws/handler/event/enum/appliance/sound/player/__init__.py
fabaff/automate-ws
a9442f287692787e3f253e1ff23758bec8f3902e
[ "MIT" ]
1
2021-12-21T11:34:47.000Z
2021-12-21T11:34:47.000Z
ws/handler/event/enum/appliance/sound/player/__init__.py
fabaff/automate-ws
a9442f287692787e3f253e1ff23758bec8f3902e
[ "MIT" ]
1
2021-12-21T10:10:13.000Z
2021-12-21T10:10:13.000Z
from ws.handler.event.enum.appliance.sound.player import forced
32
63
0.84375
10
64
5.4
1
0
0
0
0
0
0
0
0
0
0
0
0.0625
64
1
64
64
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
6bfe1d6d9c1cb03a3dc3aa6e4bd3f4ef9d038742
35
py
Python
id14.py
bopopescu/Lauecollect
60ae2b05ea8596ba0decf426e37aeaca0bc8b6be
[ "MIT" ]
null
null
null
id14.py
bopopescu/Lauecollect
60ae2b05ea8596ba0decf426e37aeaca0bc8b6be
[ "MIT" ]
1
2019-10-22T21:28:31.000Z
2019-10-22T21:39:12.000Z
id14.py
bopopescu/Lauecollect
60ae2b05ea8596ba0decf426e37aeaca0bc8b6be
[ "MIT" ]
2
2019-06-06T15:06:46.000Z
2020-07-20T02:03:22.000Z
from instrumentation_id14 import *
17.5
34
0.857143
4
35
7.25
1
0
0
0
0
0
0
0
0
0
0
0.064516
0.114286
35
1
35
35
0.870968
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
d42a717df8afd3fd76d42cba95396b208ca61a02
92
py
Python
TaobaoCrawler(new)/save_mysql_redis.py
wangbl11/ECommerceCrawlers
846fd3add04709d0d8b8459436ed79719d91fd88
[ "MIT" ]
3,469
2019-04-09T12:06:38.000Z
2022-03-31T14:06:43.000Z
TaobaoCrawler(new)/save_mysql_redis.py
ruotiankong/ECommerceCrawlers
e2b12cb238208619c712a414f603429b188197c3
[ "MIT" ]
48
2019-06-16T09:24:01.000Z
2022-03-12T00:03:32.000Z
TaobaoCrawler(new)/save_mysql_redis.py
ruotiankong/ECommerceCrawlers
e2b12cb238208619c712a414f603429b188197c3
[ "MIT" ]
1,069
2019-04-30T14:17:18.000Z
2022-03-31T07:12:48.000Z
import pymysql import redis from config import * def save_mysql_redis(res_list): pass
11.5
31
0.771739
14
92
4.857143
0.785714
0
0
0
0
0
0
0
0
0
0
0
0.184783
92
7
32
13.142857
0.906667
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.2
0.6
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
5
d4300d86d93b7b72ba57eb1df1fbe76fe11134ab
25
py
Python
vibora/responses/__init__.py
brettcannon/vibora
1933b631d4df62e7d748016f7463ab746d4695cc
[ "MIT" ]
1
2021-01-03T00:57:53.000Z
2021-01-03T00:57:53.000Z
vibora/responses/__init__.py
brettcannon/vibora
1933b631d4df62e7d748016f7463ab746d4695cc
[ "MIT" ]
null
null
null
vibora/responses/__init__.py
brettcannon/vibora
1933b631d4df62e7d748016f7463ab746d4695cc
[ "MIT" ]
1
2019-06-14T10:40:54.000Z
2019-06-14T10:40:54.000Z
from .responses import *
12.5
24
0.76
3
25
6.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.16
25
1
25
25
0.904762
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
d43fabc1b80062a8335e5986b632fcabec29fbb0
40
py
Python
filters/__init__.py
BTMAN1489-1/International_TelegramBot
5a772394fe151eed10d550b43006c4bc0815de44
[ "MIT" ]
null
null
null
filters/__init__.py
BTMAN1489-1/International_TelegramBot
5a772394fe151eed10d550b43006c4bc0815de44
[ "MIT" ]
null
null
null
filters/__init__.py
BTMAN1489-1/International_TelegramBot
5a772394fe151eed10d550b43006c4bc0815de44
[ "MIT" ]
null
null
null
def setup_filters(dispatcher): pass
13.333333
30
0.75
5
40
5.8
1
0
0
0
0
0
0
0
0
0
0
0
0.175
40
2
31
20
0.878788
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
d446af9b2b9c83487f99521c83231f9053986ed0
53
py
Python
packages/plugin-schema-validator/itly_plugin_schema_validator/__init__.py
amplitude/itly-sdk-python
ee6b1a20a8eab901a7ff897e4980a824388df6c4
[ "MIT" ]
1
2020-11-16T19:42:53.000Z
2020-11-16T19:42:53.000Z
packages/plugin-schema-validator/itly_plugin_schema_validator/__init__.py
iterativelyhq/itly-sdk-python
ee6b1a20a8eab901a7ff897e4980a824388df6c4
[ "MIT" ]
null
null
null
packages/plugin-schema-validator/itly_plugin_schema_validator/__init__.py
iterativelyhq/itly-sdk-python
ee6b1a20a8eab901a7ff897e4980a824388df6c4
[ "MIT" ]
null
null
null
from ._schema_validator import SchemaValidatorPlugin
26.5
52
0.90566
5
53
9.2
1
0
0
0
0
0
0
0
0
0
0
0
0.075472
53
1
53
53
0.938776
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
d4566573e7ff213475ae655561f11f7745bc3a38
602
py
Python
kornia/augmentation/_3d/geometric/__init__.py
Ishticode/kornia
974abb43ec72d12dbd244a2fb247bbbab8498de0
[ "ECL-2.0", "Apache-2.0" ]
418
2018-10-02T22:31:36.000Z
2019-01-16T14:15:45.000Z
kornia/augmentation/_3d/geometric/__init__.py
Ishticode/kornia
974abb43ec72d12dbd244a2fb247bbbab8498de0
[ "ECL-2.0", "Apache-2.0" ]
94
2019-01-17T22:10:45.000Z
2019-05-22T23:47:58.000Z
kornia/augmentation/_3d/geometric/__init__.py
Ishticode/kornia
974abb43ec72d12dbd244a2fb247bbbab8498de0
[ "ECL-2.0", "Apache-2.0" ]
25
2018-10-02T22:50:04.000Z
2019-01-13T18:14:11.000Z
from kornia.augmentation._3d.geometric.affine import RandomAffine3D from kornia.augmentation._3d.geometric.center_crop import CenterCrop3D from kornia.augmentation._3d.geometric.crop import RandomCrop3D from kornia.augmentation._3d.geometric.depthical_flip import RandomDepthicalFlip3D from kornia.augmentation._3d.geometric.horizontal_flip import RandomHorizontalFlip3D from kornia.augmentation._3d.geometric.perspective import RandomPerspective3D from kornia.augmentation._3d.geometric.rotation import RandomRotation3D from kornia.augmentation._3d.geometric.vertical_flip import RandomVerticalFlip3D
66.888889
84
0.893688
68
602
7.735294
0.338235
0.152091
0.334601
0.365019
0.501901
0
0
0
0
0
0
0.02807
0.053156
602
8
85
75.25
0.894737
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
d4803dc440cccd58bf15b1001a6215073de2892a
193
py
Python
payment/admin.py
SanjarbekSaminjonov/payme-integration
72b7d83e48b2713b46df1825c67593b867297b6a
[ "MIT" ]
null
null
null
payment/admin.py
SanjarbekSaminjonov/payme-integration
72b7d83e48b2713b46df1825c67593b867297b6a
[ "MIT" ]
null
null
null
payment/admin.py
SanjarbekSaminjonov/payme-integration
72b7d83e48b2713b46df1825c67593b867297b6a
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth.models import Group, User admin.site.site_header = 'Payment Administration' admin.site.unregister(Group) admin.site.unregister(User)
24.125
50
0.818653
27
193
5.814815
0.518519
0.171975
0.216561
0
0
0
0
0
0
0
0
0
0.088083
193
7
51
27.571429
0.892045
0
0
0
0
0
0.11399
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
00fce64ae0c230ae0f065e5b0fd83097f8719127
206
py
Python
build_tower.py
Kunalpod/codewars
8dc1af2f3c70e209471045118fd88b3ea1e627e5
[ "MIT" ]
null
null
null
build_tower.py
Kunalpod/codewars
8dc1af2f3c70e209471045118fd88b3ea1e627e5
[ "MIT" ]
null
null
null
build_tower.py
Kunalpod/codewars
8dc1af2f3c70e209471045118fd88b3ea1e627e5
[ "MIT" ]
null
null
null
#Kunal Gautam #Codewars : @Kunalpod #Problem name: Build Tower #Problem level: 6 kyu def tower_builder(n_floors): return [' '*(n_floors-x)+'*'*(2*x-1)+' '*(n_floors-x) for x in range(1,n_floors+1)]
25.75
90
0.660194
35
206
3.742857
0.628571
0.21374
0.122137
0
0
0
0
0
0
0
0
0.028571
0.150485
206
7
91
29.428571
0.72
0.373786
0
0
0
0
0.024
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
0
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
1
1
0
0
5
2e195ed145ee52207001d2940816991c51fb043e
58
py
Python
ytpl/ytpl/api.py
zuik/stuff
4bae095f8a857c884b409356a61f56a49b768611
[ "MIT" ]
null
null
null
ytpl/ytpl/api.py
zuik/stuff
4bae095f8a857c884b409356a61f56a49b768611
[ "MIT" ]
null
null
null
ytpl/ytpl/api.py
zuik/stuff
4bae095f8a857c884b409356a61f56a49b768611
[ "MIT" ]
null
null
null
# Todo: Make the api side into an object-oriented version
29
57
0.775862
10
58
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.172414
58
1
58
58
0.9375
0.948276
0
null
0
null
0
0
null
0
0
1
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
0
0
0
0
0
5
2e4a77731a299a1b42947a2351896f730ed8f3a6
76
py
Python
python/8Kyu/Whats the real floor.py
athasv/Codewars-data
5e106466e709fd776f23585ad9f652d0d65b48d3
[ "MIT" ]
null
null
null
python/8Kyu/Whats the real floor.py
athasv/Codewars-data
5e106466e709fd776f23585ad9f652d0d65b48d3
[ "MIT" ]
null
null
null
python/8Kyu/Whats the real floor.py
athasv/Codewars-data
5e106466e709fd776f23585ad9f652d0d65b48d3
[ "MIT" ]
null
null
null
def get_real_floor(n): return n if n <= 0 else n - 1 if n < 13 else n -2
38
53
0.605263
19
76
2.315789
0.631579
0.136364
0
0
0
0
0
0
0
0
0
0.092593
0.289474
76
2
53
38
0.722222
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
2e557d984c35dd7231564c10c17dd32918e34542
5,181
py
Python
tests/Statement_test.py
hhatefi/sc_planner
d704cb8a5eb62075b992eb244ac7b45de52b1203
[ "MIT" ]
2
2020-05-19T19:55:33.000Z
2020-11-17T20:02:32.000Z
tests/Statement_test.py
hhatefi/sc_planner
d704cb8a5eb62075b992eb244ac7b45de52b1203
[ "MIT" ]
null
null
null
tests/Statement_test.py
hhatefi/sc_planner
d704cb8a5eb62075b992eb244ac7b45de52b1203
[ "MIT" ]
1
2021-04-04T15:07:31.000Z
2021-04-04T15:07:31.000Z
import unittest from context import parser as pr from context import entities as en class StatementTest(unittest.TestCase): def test_factory(self): # a single product p=pr.Statement.factory("product p1=10 high") self.assertEqual(p.get_type(), pr.StatementType.PROD_DEF) # a single component p=pr.Statement.factory("component c1=7") self.assertEqual(p.get_type(), pr.StatementType.COMP_DEF) # an AND transition p=pr.Statement.factory("p1<-c1+c2") self.assertEqual(p.get_type(), pr.StatementType.TRAN_DEF) # an invalid statement with self.assertRaises(ValueError): pr.Statement.factory(":p1<-c1+c2") # another invalid statement with self.assertRaises(ValueError): pr.Statement.factory(".") def test_product_parsing(self): # an empty product definition with self.assertRaises(ValueError): pr.Statement.factory("product") # another empty product definition with self.assertRaises(ValueError): pr.Statement.factory("product\n\t") # a single product p=pr.Statement.factory("product p1=10 high") self.assertEqual(p.get_type(), en.EntityType.PROD) self.assertEqual(len(p._products), 1) self.assertEqual(p._products[0]._name, 'p1') self.assertEqual(p._products[0]._order_size, 10) self.assertEqual(p._products[0]._priority, en.ProductPriority.HIGH) # two products p=pr.Statement.factory("product\n _pp1=5 high,_pp2=3") self.assertEqual(p.get_type(), en.EntityType.PROD) self.assertEqual(len(p._products), 2) self.assertEqual(p._products[0]._name, '_pp1') self.assertEqual(p._products[0]._order_size, 5) self.assertEqual(p._products[0]._priority, en.ProductPriority.HIGH) self.assertEqual(p._products[1]._name, '_pp2') self.assertEqual(p._products[1]._order_size, 3) self.assertEqual(p._products[1]._priority, en.ProductPriority.LOW) def test_component_parsing(self): # an empty component definition with self.assertRaises(ValueError): pr.Statement.factory("component") # another empty component definition with self.assertRaises(ValueError): pr.Statement.factory("component\n\t") # a single component p=pr.Statement.factory("component c1=7") self.assertEqual(p.get_type(), en.EntityType.COMP) self.assertEqual(len(p._components), 1) self.assertEqual(p._components[0]._name, 'c1') self.assertEqual(p._components[0]._stock, 7) # two products p=pr.Statement.factory("component\n _cc1=9 \t,_ccc,dd") self.assertEqual(p.get_type(), en.EntityType.COMP) self.assertEqual(len(p._components), 3) self.assertEqual(p._components[0]._name, '_cc1') self.assertEqual(p._components[0]._stock, 9) self.assertEqual(p._components[1]._name, '_ccc') self.assertEqual(p._components[1]._stock, 0) self.assertEqual(p._components[2]._name, 'dd') self.assertEqual(p._components[2]._stock, 0) def test_transition_parsing(self): # an invalid transition with self.assertRaises(ValueError): pr.Statement.factory('1p1<-') # another invalid transition with self.assertRaises(ValueError): pr.Statement.factory('pp4p_1 <<') # an OR transition p=pr.Statement.factory("p1 <- a | c2") self.assertEqual(p._transition._target, 'p1') self.assertEqual(len(p._transition._sources), 2) self.assertEqual(p._transition._sources[0],'a') self.assertEqual(p._transition._sources[1],'c2') self.assertEqual(p._transition._tr_type, en.TransitionType.OR) # an AND transition p=pr.Statement.factory("ppp1<-_cc1+_c2") self.assertEqual(p._transition._target, 'ppp1') self.assertEqual(len(p._transition._sources), 2) self.assertEqual(p._transition._sources[0],'_cc1') self.assertEqual(p._transition._sources[1],'_c2') self.assertEqual(p._transition._tr_type, en.TransitionType.AND) # direct connection to supplier p=pr.Statement.factory("cc1 <- supplier") self.assertEqual(p._transition._target, 'cc1') self.assertEqual(p._transition._sources, None) self.assertEqual(p._transition._tr_type, en.TransitionType.DIR) # another AND transition p=pr.Statement.factory("""__p1<-r+_c2+ dd1+dd4 +cc2""") self.assertEqual(p._transition._target, '__p1') self.assertEqual(len(p._transition._sources), 5) self.assertEqual(p._transition._sources[0],'r') self.assertEqual(p._transition._sources[1],'_c2') self.assertEqual(p._transition._sources[2],'dd1') self.assertEqual(p._transition._sources[3],'dd4') self.assertEqual(p._transition._sources[4],'cc2') self.assertEqual(p._transition._tr_type, en.TransitionType.AND) if __name__=='__main__': unittest.main()
41.119048
75
0.647365
622
5,181
5.181672
0.14791
0.228048
0.208501
0.145206
0.841452
0.744027
0.621781
0.547316
0.532423
0.40211
0
0.023313
0.221772
5,181
125
76
41.448
0.776042
0.082031
0
0.272727
0
0
0.084671
0
0
0
0
0
0.647727
1
0.045455
false
0
0.034091
0
0.090909
0
0
0
0
null
1
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
5
2e5c18a213f20f87c469dfd8d39edc53f0ca0774
37
py
Python
runway/config/models/__init__.py
avosper-intellaegis/runway
757d4e7db269ec16479b044ac82a69f25fa2a450
[ "Apache-2.0" ]
134
2018-02-26T21:35:23.000Z
2022-03-03T00:30:27.000Z
runway/config/models/__init__.py
asksmruti/runway
8aca76df9372e3d13eb35e12f81758f618e89e74
[ "Apache-2.0" ]
937
2018-03-08T22:04:35.000Z
2022-03-30T12:21:47.000Z
runway/config/models/__init__.py
asksmruti/runway
8aca76df9372e3d13eb35e12f81758f618e89e74
[ "Apache-2.0" ]
70
2018-02-26T23:48:11.000Z
2022-03-02T18:44:30.000Z
"""Runway & CFNgin config models."""
18.5
36
0.648649
4
37
6
1
0
0
0
0
0
0
0
0
0
0
0
0.135135
37
1
37
37
0.75
0.810811
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5