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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cd8e16021da58cdec065951c38143bce7bd5876b
| 5,072
|
py
|
Python
|
pokermon/poker/rules_test.py
|
ghl3/Pokermon
|
ef4434884ee294fe845c906ab0d2f871af44f406
|
[
"MIT"
] | null | null | null |
pokermon/poker/rules_test.py
|
ghl3/Pokermon
|
ef4434884ee294fe845c906ab0d2f871af44f406
|
[
"MIT"
] | null | null | null |
pokermon/poker/rules_test.py
|
ghl3/Pokermon
|
ef4434884ee294fe845c906ab0d2f871af44f406
|
[
"MIT"
] | 1
|
2020-11-05T11:57:25.000Z
|
2020-11-05T11:57:25.000Z
|
from pokermon.poker import rules
from pokermon.poker.game import Game, Move, Street
from pokermon.poker.game_runner import GameRunner
from pokermon.poker.rules import (
Error,
Metadata,
ValidationResult,
get_pot_payouts,
voluntary_action_allowed,
)
def test_street_over():
game = Game(starting_stacks=[100, 200, 300])
assert rules.street_over(game.view()) is False
game.add_action(game.view().small_blind())
assert rules.street_over(game.view()) is False
game.add_action(game.view().big_blind())
assert rules.street_over(game.view()) is False
game.add_action(game.view().bet_raise(to=10))
assert rules.street_over(game.view()) is False
game.add_action(game.view().call())
assert rules.street_over(game.view()) is False
game.add_action(game.view().call())
assert rules.street_over(game.view()) is True
# Flop
game.set_street(Street.FLOP)
assert rules.street_over(game.view()) is False
game.add_action(game.view().call())
assert rules.street_over(game.view()) is False
game.add_action(game.view().call())
assert rules.street_over(game.view()) is False
game.add_action(game.view().call())
assert rules.street_over(game.view()) is True
# Turn
game.set_street(Street.TURN)
assert rules.street_over(game.view()) is False
game.add_action(game.view().bet_raise(to=20))
assert rules.street_over(game.view()) is False
game.add_action(game.view().fold())
assert rules.street_over(game.view()) is False
game.add_action(game.view().call())
assert rules.street_over(game.view()) is True
# River
game.set_street(Street.RIVER)
assert rules.street_over(game.view()) is False
game.add_action(game.view().call())
assert rules.street_over(game.view()) is False
game.add_action(game.view().bet_raise(to=30))
assert rules.street_over(game.view()) is False
game.add_action(game.view().call())
assert rules.street_over(game.view()) is True
def test_street_over_all_fold():
game = Game(starting_stacks=[100, 200, 300])
game.add_action(game.view().small_blind())
game.add_action(game.view().big_blind())
game.add_action(game.view().bet_raise(to=10))
game.add_action(game.view().fold())
game.add_action(game.view().fold())
assert rules.street_over(game.view()) is True
game.set_street(Street.FLOP)
assert rules.street_over(game.view()) is True
game.set_street(Street.TURN)
assert rules.street_over(game.view()) is True
game.set_street(Street.RIVER)
assert rules.street_over(game.view()) is True
def test_pot_payouts():
assert get_pot_payouts([[0], [1]], [20, 20]) == {0: 40, 1: 0}
assert get_pot_payouts([[0], [1], [2]], [10, 25, 25]) == {0: 30, 1: 30, 2: 0}
assert get_pot_payouts([[2], [0], [1], [3]], [0, 10, 10, 10]) == {
2: 30,
1: 0,
0: 0,
3: 0,
}
assert get_pot_payouts([[0, 1], [2], [3]], [10, 20, 30, 30]) == {
0: 20,
1: 20 + 30,
2: 20,
3: 0,
}
assert get_pot_payouts([[0], [1, 2], [3]], [10, 20, 30, 30]) == {
0: 40,
1: 15,
2: 15 + 20,
3: 0,
}
assert get_pot_payouts([[0, 1, 2], [3], [4]], [50, 50, 50, 50, 50]) == {
0: 84,
1: 83,
2: 83,
3: 0,
4: 0,
}
assert get_pot_payouts([[0, 1, 2], [3], [4]], [50, 50, 50, 100, 100]) == {
0: 84,
1: 83,
2: 83,
3: 100,
4: 0,
}
def test_call_or_raise_all_in():
game = GameRunner(starting_stacks=[30, 20])
game.start_game()
# Raise to 10, which is 8 on top
game.bet_raise(to=30)
assert voluntary_action_allowed(
game.game_view().bet_raise(to=20), game.game_view()
) == ValidationResult(
error=Error.INVALID_MOVE,
metadata={Metadata.ALLOWED_MOVES_ARE: [Move.FOLD, Move.CHECK_CALL]},
)
assert voluntary_action_allowed(
game.game_view().call(), game.game_view()
) == ValidationResult(error=None, metadata={})
def test_min_raise():
game = GameRunner(starting_stacks=[20, 20])
game.start_game()
# Raise to 10, which is 8 on top
game.bet_raise(to=10)
assert voluntary_action_allowed(
game.game_view().bet_raise(to=17), game.game_view()
) == ValidationResult(
error=Error.MIN_RAISE_REQUIRED, metadata={Metadata.RAISE_MUST_BE_GE: 8}
)
def test_min_raise_when_all_in():
game = GameRunner(starting_stacks=[20, 12])
game.start_game()
# Raise to 10, which is 8 on top
game.bet_raise(to=10)
# You can go all in
assert voluntary_action_allowed(
game.game_view().bet_raise(to=12), game.game_view()
) == ValidationResult(error=None, metadata={})
# But you must do the right all in amount
assert voluntary_action_allowed(
game.game_view().bet_raise(to=20), game.game_view()
) == ValidationResult(
error=Error.INVALID_AMOUNT_ADDED,
metadata={Metadata.AMOUNT_ADDED_SHOULD_BE_LE: 10},
)
| 26.978723
| 81
| 0.630915
| 754
| 5,072
| 4.05305
| 0.12069
| 0.133508
| 0.105366
| 0.151178
| 0.805956
| 0.787631
| 0.737893
| 0.64627
| 0.638743
| 0.627291
| 0
| 0.055891
| 0.216877
| 5,072
| 187
| 82
| 27.122995
| 0.713494
| 0.032729
| 0
| 0.580153
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.259542
| 1
| 0.045802
| false
| 0
| 0.030534
| 0
| 0.076336
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
26b1ffedd66064850dc18b9e1c95a6874ca0d757
| 81
|
py
|
Python
|
x3d/apps.py
|
coderextreme/x3dpython
|
d91c7d213c7b55ce3d51feff8d42f9a9480aa37b
|
[
"BSD-2-Clause"
] | null | null | null |
x3d/apps.py
|
coderextreme/x3dpython
|
d91c7d213c7b55ce3d51feff8d42f9a9480aa37b
|
[
"BSD-2-Clause"
] | 1
|
2020-06-06T16:01:43.000Z
|
2020-06-06T16:01:43.000Z
|
x3d/apps.py
|
coderextreme/x3dpython
|
d91c7d213c7b55ce3d51feff8d42f9a9480aa37b
|
[
"BSD-2-Clause"
] | null | null | null |
from django.apps import AppConfig
class X3DConfig(AppConfig):
name = 'x3d'
| 13.5
| 33
| 0.728395
| 10
| 81
| 5.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030303
| 0.185185
| 81
| 5
| 34
| 16.2
| 0.863636
| 0
| 0
| 0
| 0
| 0
| 0.037037
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
26b8c0df97081f864ab53b7c051e8ebb47cb2bbf
| 3,506
|
py
|
Python
|
tests/pubsub.py
|
yujinrobot/redis-py
|
0066b5c4c293cd4076f9c0fd69597f9a524b91ba
|
[
"MIT"
] | null | null | null |
tests/pubsub.py
|
yujinrobot/redis-py
|
0066b5c4c293cd4076f9c0fd69597f9a524b91ba
|
[
"MIT"
] | null | null | null |
tests/pubsub.py
|
yujinrobot/redis-py
|
0066b5c4c293cd4076f9c0fd69597f9a524b91ba
|
[
"MIT"
] | null | null | null |
import unittest
from redis._compat import b, next
from redis.exceptions import ConnectionError
import redis
class PubSubTestCase(unittest.TestCase):
def setUp(self):
self.connection_pool = redis.ConnectionPool()
self.client = redis.Redis(connection_pool=self.connection_pool)
self.pubsub = self.client.pubsub()
def tearDown(self):
self.connection_pool.disconnect()
def test_channel_subscribe(self):
# subscribe doesn't return anything
self.assertEquals(
self.pubsub.subscribe('foo'),
None
)
# send a message
self.assertEquals(self.client.publish('foo', 'hello foo'), 1)
# there should be now 2 messages in the buffer, a subscribe and the
# one we just published
self.assertEquals(
next(self.pubsub.listen()),
{
'type': 'subscribe',
'pattern': None,
'channel': 'foo',
'data': 1
}
)
self.assertEquals(
next(self.pubsub.listen()),
{
'type': 'message',
'pattern': None,
'channel': 'foo',
'data': b('hello foo')
}
)
# unsubscribe
self.assertEquals(
self.pubsub.unsubscribe('foo'),
None
)
# unsubscribe message should be in the buffer
self.assertEquals(
next(self.pubsub.listen()),
{
'type': 'unsubscribe',
'pattern': None,
'channel': 'foo',
'data': 0
}
)
def test_pattern_subscribe(self):
# psubscribe doesn't return anything
self.assertEquals(
self.pubsub.psubscribe('f*'),
None
)
# send a message
self.assertEquals(self.client.publish('foo', 'hello foo'), 1)
# there should be now 2 messages in the buffer, a subscribe and the
# one we just published
self.assertEquals(
next(self.pubsub.listen()),
{
'type': 'psubscribe',
'pattern': None,
'channel': 'f*',
'data': 1
}
)
self.assertEquals(
next(self.pubsub.listen()),
{
'type': 'pmessage',
'pattern': 'f*',
'channel': 'foo',
'data': b('hello foo')
}
)
# unsubscribe
self.assertEquals(
self.pubsub.punsubscribe('f*'),
None
)
# unsubscribe message should be in the buffer
self.assertEquals(
next(self.pubsub.listen()),
{
'type': 'punsubscribe',
'pattern': None,
'channel': 'f*',
'data': 0
}
)
class PubSubRedisDownTestCase(unittest.TestCase):
def setUp(self):
self.connection_pool = redis.ConnectionPool(port=6390)
self.client = redis.Redis(connection_pool=self.connection_pool)
self.pubsub = self.client.pubsub()
def tearDown(self):
self.connection_pool.disconnect()
def test_channel_subscribe(self):
got_exception = False
try:
self.pubsub.subscribe('foo')
except ConnectionError:
got_exception = True
self.assertTrue(got_exception)
| 28.274194
| 75
| 0.502852
| 315
| 3,506
| 5.539683
| 0.228571
| 0.074499
| 0.061891
| 0.082521
| 0.762751
| 0.706017
| 0.706017
| 0.706017
| 0.653295
| 0.601719
| 0
| 0.005618
| 0.390759
| 3,506
| 123
| 76
| 28.504065
| 0.81133
| 0.110097
| 0
| 0.515152
| 0
| 0
| 0.084326
| 0
| 0
| 0
| 0
| 0
| 0.131313
| 1
| 0.070707
| false
| 0
| 0.040404
| 0
| 0.131313
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
26c395f9cc70df02e5bd094e13b7aa17a8fa97ea
| 1,171
|
py
|
Python
|
node/blockchain/tests/fixtures/blockchain_structure/genesis.py
|
thenewboston-developers/Node
|
e71a405f4867786a54dd17ddd97595dd3a630018
|
[
"MIT"
] | 18
|
2021-11-30T04:02:13.000Z
|
2022-03-24T12:33:57.000Z
|
node/blockchain/tests/fixtures/blockchain_structure/genesis.py
|
thenewboston-developers/Node
|
e71a405f4867786a54dd17ddd97595dd3a630018
|
[
"MIT"
] | 1
|
2022-02-04T17:07:38.000Z
|
2022-02-04T17:07:38.000Z
|
node/blockchain/tests/fixtures/blockchain_structure/genesis.py
|
thenewboston-developers/Node
|
e71a405f4867786a54dd17ddd97595dd3a630018
|
[
"MIT"
] | 5
|
2022-01-31T05:28:13.000Z
|
2022-03-08T17:25:31.000Z
|
import pytest
from node.blockchain.tests.factories.block_message.genesis import make_genesis_block_message
from node.blockchain.tests.factories.signed_change_request.genesis import make_genesis_signed_change_request
from node.blockchain.tests.factories.signed_change_request_message.genesis import (
make_genesis_signed_change_request_message
)
@pytest.fixture
def genesis_signed_change_request_message(primary_validator_key_pair, treasury_account_key_pair, treasury_amount, db):
return make_genesis_signed_change_request_message(
primary_validator_key_pair.public, treasury_account_key_pair.public, treasury_amount
)
@pytest.fixture
def genesis_signed_change_request(genesis_signed_change_request_message, primary_validator_key_pair):
return make_genesis_signed_change_request(genesis_signed_change_request_message, primary_validator_key_pair)
@pytest.fixture
def genesis_block_message(
genesis_signed_change_request_message, primary_validator_key_pair, primary_validator_node, db
):
return make_genesis_block_message(
genesis_signed_change_request_message, primary_validator_key_pair.private, primary_validator_node
)
| 40.37931
| 118
| 0.869342
| 153
| 1,171
| 6.098039
| 0.176471
| 0.154341
| 0.244373
| 0.278671
| 0.796356
| 0.721329
| 0.69239
| 0.565916
| 0.456592
| 0.336549
| 0
| 0
| 0.085397
| 1,171
| 28
| 119
| 41.821429
| 0.871148
| 0
| 0
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.190476
| 0.142857
| 0.47619
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 1
| 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
| 0
| 0
|
0
| 4
|
26e623eae8eee53034375c90e5bf007678e394c2
| 192
|
py
|
Python
|
scraper/recipe_crawler/translators/__init__.py
|
yukinext/tools-python
|
c98cd6afd7be06d6662131f975e3cfb8440bbfa8
|
[
"MIT"
] | 1
|
2019-05-01T00:33:47.000Z
|
2019-05-01T00:33:47.000Z
|
scraper/recipe_crawler/translators/__init__.py
|
yukinext/tools-python
|
c98cd6afd7be06d6662131f975e3cfb8440bbfa8
|
[
"MIT"
] | null | null | null |
scraper/recipe_crawler/translators/__init__.py
|
yukinext/tools-python
|
c98cd6afd7be06d6662131f975e3cfb8440bbfa8
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 30 22:37:33 2019
@author: yuki_next
"""
from .evernote_translator import *
from .evernote_local_enex_translator import *
| 19.2
| 45
| 0.713542
| 29
| 192
| 4.551724
| 0.862069
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.084848
| 0.140625
| 192
| 10
| 45
| 19.2
| 0.715152
| 0.515625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f814a092d5d0ef2a6b59cdc3b2e44ec18b093a5d
| 13
|
py
|
Python
|
test_project/app/core/views.py
|
chaitanyadevle/django_tenants_q
|
531b76ac73ae873cc645bc91fdb769f4e5811814
|
[
"MIT"
] | 2
|
2020-03-23T09:25:15.000Z
|
2020-05-12T10:50:56.000Z
|
test_project/app/core/views.py
|
chaitanyadevle/django_tenants_q
|
531b76ac73ae873cc645bc91fdb769f4e5811814
|
[
"MIT"
] | null | null | null |
test_project/app/core/views.py
|
chaitanyadevle/django_tenants_q
|
531b76ac73ae873cc645bc91fdb769f4e5811814
|
[
"MIT"
] | null | null | null |
# Views file
| 6.5
| 12
| 0.692308
| 2
| 13
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 13
| 1
| 13
| 13
| 0.9
| 0.769231
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f825a0508bc53e982b4d035b252132af97fa9ceb
| 358
|
py
|
Python
|
library/humidity.py
|
juby-gif/air-quality-lib
|
dee707a7cf1479bf7a8d9f4661a87a0c523c895f
|
[
"BSD-3-Clause"
] | 1
|
2019-09-22T22:20:35.000Z
|
2019-09-22T22:20:35.000Z
|
library/humidity.py
|
juby-gif/air-quality-lib
|
dee707a7cf1479bf7a8d9f4661a87a0c523c895f
|
[
"BSD-3-Clause"
] | null | null | null |
library/humidity.py
|
juby-gif/air-quality-lib
|
dee707a7cf1479bf7a8d9f4661a87a0c523c895f
|
[
"BSD-3-Clause"
] | null | null | null |
#a2.t2 #This program is to create a function to assess humidity
#taking advantage of python statistics library
import statistics
def get_humidity_value(humidity_value):
if statistics.median(humidity_value) < 30:
return "It is Dry"
elif statistics.median(humidity_value) > 60:
return "High Humidity"
else:
return "It's OK"
| 32.545455
| 63
| 0.717877
| 50
| 358
| 5.04
| 0.66
| 0.206349
| 0.190476
| 0.230159
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021277
| 0.212291
| 358
| 10
| 64
| 35.8
| 0.87234
| 0.296089
| 0
| 0
| 0
| 0
| 0.116466
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0.125
| 0
| 0.625
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
f82f4a35dd624e926edf238e5873392407eab06c
| 242
|
py
|
Python
|
Python Programming/01. Primitive Types/06-numbers.py
|
luckyrabbit85/Python
|
ed134fd70b4a7b84b183b87b85ad5190f54c9526
|
[
"MIT"
] | 1
|
2021-07-15T18:40:26.000Z
|
2021-07-15T18:40:26.000Z
|
Python Programming/01. Primitive Types/06-numbers.py
|
luckyrabbit85/Python
|
ed134fd70b4a7b84b183b87b85ad5190f54c9526
|
[
"MIT"
] | null | null | null |
Python Programming/01. Primitive Types/06-numbers.py
|
luckyrabbit85/Python
|
ed134fd70b4a7b84b183b87b85ad5190f54c9526
|
[
"MIT"
] | null | null | null |
x = 1 # int
print(type(x))
x = 1.1 # float
print(type(x))
x = 1 + 2j # complex number
print(type(x))
print(10 + 3)
print(10 - 3)
print(10 * 3)
print(10 / 3)
print(10 // 3)
print(10 % 3)
print(10 ** 3)
x = 10
x = x + 3
x += 3
print(x)
| 10.521739
| 28
| 0.53719
| 51
| 242
| 2.54902
| 0.215686
| 0.376923
| 0.430769
| 0.6
| 0.615385
| 0.430769
| 0.430769
| 0.430769
| 0.430769
| 0.430769
| 0
| 0.166667
| 0.256198
| 242
| 22
| 29
| 11
| 0.555556
| 0.099174
| 0
| 0.176471
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.647059
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
f8390aff1c72d5006df1da6c92ead6c95f2976aa
| 557
|
py
|
Python
|
apps/profiles/migrations/0004_auto_20200514_1056.py
|
lsdlab/djshop_toturial
|
6d450225cc05e6a1ecd161de2b522e1af0b68cc0
|
[
"MIT"
] | null | null | null |
apps/profiles/migrations/0004_auto_20200514_1056.py
|
lsdlab/djshop_toturial
|
6d450225cc05e6a1ecd161de2b522e1af0b68cc0
|
[
"MIT"
] | 6
|
2020-06-07T15:18:58.000Z
|
2021-09-22T19:07:33.000Z
|
apps/profiles/migrations/0004_auto_20200514_1056.py
|
lsdlab/djshop_toturial
|
6d450225cc05e6a1ecd161de2b522e1af0b68cc0
|
[
"MIT"
] | null | null | null |
# Generated by Django 3.0.5 on 2020-05-14 10:56
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('profiles', '0003_auto_20200427_1633'),
]
operations = [
migrations.RemoveField(
model_name='profile',
name='is_vip',
),
migrations.RemoveField(
model_name='profile',
name='vip_expired_datetime',
),
migrations.RemoveField(
model_name='profile',
name='vip_session',
),
]
| 21.423077
| 48
| 0.558348
| 53
| 557
| 5.679245
| 0.641509
| 0.209302
| 0.259136
| 0.299003
| 0.428571
| 0.428571
| 0.292359
| 0
| 0
| 0
| 0
| 0.083333
| 0.332136
| 557
| 25
| 49
| 22.28
| 0.725806
| 0.08079
| 0
| 0.473684
| 1
| 0
| 0.17451
| 0.045098
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.052632
| 0
| 0.210526
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f861baa0aa1d39889b5ef0ed79e5badd243c6583
| 183
|
py
|
Python
|
exercicios/lista2/exercicio13.py
|
lagcrs/algoritmos
|
5ee860c71db8ac2ef8bbe6cc87726938b1ca9c72
|
[
"Apache-2.0"
] | null | null | null |
exercicios/lista2/exercicio13.py
|
lagcrs/algoritmos
|
5ee860c71db8ac2ef8bbe6cc87726938b1ca9c72
|
[
"Apache-2.0"
] | null | null | null |
exercicios/lista2/exercicio13.py
|
lagcrs/algoritmos
|
5ee860c71db8ac2ef8bbe6cc87726938b1ca9c72
|
[
"Apache-2.0"
] | null | null | null |
num = int(input('Digite um número: '))
if num < 20:
print(f'{num} é menor que 20')
elif num > 20:
print(f'{num} é maior que 20')
else:
print(f'{num} é igual a 20')
| 22.875
| 39
| 0.562842
| 34
| 183
| 3.029412
| 0.529412
| 0.174757
| 0.262136
| 0.291262
| 0.291262
| 0.291262
| 0
| 0
| 0
| 0
| 0
| 0.074627
| 0.26776
| 183
| 8
| 40
| 22.875
| 0.69403
| 0
| 0
| 0
| 0
| 0
| 0.429379
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.428571
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
f865903bf47fb0d46ff503a6a73cf6c0f016cce1
| 40
|
py
|
Python
|
rltoolkit/algorithms/sac/__init__.py
|
raznem/sac_ppo
|
c18e9bd32a70fcc4bc413565c6b885d7560b8b5a
|
[
"MIT"
] | 7
|
2020-06-15T12:25:53.000Z
|
2021-11-03T01:08:47.000Z
|
rltoolkit/algorithms/sac/__init__.py
|
raznem/sac_ppo
|
c18e9bd32a70fcc4bc413565c6b885d7560b8b5a
|
[
"MIT"
] | null | null | null |
rltoolkit/algorithms/sac/__init__.py
|
raznem/sac_ppo
|
c18e9bd32a70fcc4bc413565c6b885d7560b8b5a
|
[
"MIT"
] | 1
|
2020-12-21T11:21:22.000Z
|
2020-12-21T11:21:22.000Z
|
from .sac import SAC
__all__ = ["SAC"]
| 10
| 20
| 0.65
| 6
| 40
| 3.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 40
| 3
| 21
| 13.333333
| 0.6875
| 0
| 0
| 0
| 0
| 0
| 0.075
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f8840b99e9c54d0eb650b2197fab9d94541c120f
| 273
|
py
|
Python
|
Morpheus/Fornecedores/api/viewsets.py
|
tr0v40/Morpheus-API
|
5a0b61303c8334b4030130998ffddc3fddc0ef10
|
[
"MIT"
] | null | null | null |
Morpheus/Fornecedores/api/viewsets.py
|
tr0v40/Morpheus-API
|
5a0b61303c8334b4030130998ffddc3fddc0ef10
|
[
"MIT"
] | null | null | null |
Morpheus/Fornecedores/api/viewsets.py
|
tr0v40/Morpheus-API
|
5a0b61303c8334b4030130998ffddc3fddc0ef10
|
[
"MIT"
] | null | null | null |
from rest_framework.viewsets import ModelViewSet
from .serializers import FornecedoresSerializer
from Fornecedores.models import Fornecedores
class FornecedoresViewSet(ModelViewSet):
queryset = Fornecedores.objects.all()
serializer_class = FornecedoresSerializer
| 30.333333
| 48
| 0.846154
| 25
| 273
| 9.16
| 0.64
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10989
| 273
| 9
| 49
| 30.333333
| 0.942387
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f886d0fbdd2434435241dcb03942c54fb3d7ae75
| 2,950
|
py
|
Python
|
misc/userAgent.py
|
howardwkim/CTCI
|
de3cfcdf73f940df9e9782cc7fc49cfc115c48bc
|
[
"BSD-2-Clause"
] | null | null | null |
misc/userAgent.py
|
howardwkim/CTCI
|
de3cfcdf73f940df9e9782cc7fc49cfc115c48bc
|
[
"BSD-2-Clause"
] | null | null | null |
misc/userAgent.py
|
howardwkim/CTCI
|
de3cfcdf73f940df9e9782cc7fc49cfc115c48bc
|
[
"BSD-2-Clause"
] | null | null | null |
F = open("jb_10000_Original.tsv", "r")
s1 = "d2d3519d-cdea-4040-a075-7314eae3ae92\tcom.brein.api.servlet.DispatcherServlet\t{\"apiRequest\":{\"ipAddress\":\"10.168.118.245\",\"userAgent\":\"Java/1.8.0_101\",\"signature\":\"VN0KL7qKm1U9/MBNgaln5db70v8oHjGlgSRqKR3fKxw\\u003d\",\"apiKey\":\"02AA-0A7A-4B78-4CC2-A04D-B507-948D-AC73\",\"unixTimestamp\":1483033383,\"user\":{\"firstName\":\"Thomas\",\"lastName\":\"Richardson\",\"email\":\"tjrichard9@gmail.com\",\"userId\":\"23038\",\"additional\":{}},\"activity\":{\"type\":\"identify\"}},\"apiResponse\":{\"payload\":{},\"responseCode\":200}}\t/activity\t02AA-0A7A-4B78-4CC2-A04D-B507-948D-AC73\tnull\tnull\tnull\t17164\t1483033529514\n"
s2 = "0b4a8b27-ca63-4e30-8ec4-edcd66aaaf0f\tcom.brein.api.servlet.DispatcherServlet\t{\"apiRequest\":{\"ipAddress\":\"66.250.94.169\",\"userAgent\":\"Java/1.8.0_101\",\"signature\":\"/kCthqfM02+yWswplQylj8yykW//Zzb/jYVumFOdBGY\\u003d\",\"apiKey\":\"02AA-0A7A-4B78-4CC2-A04D-B507-948D-AC73\",\"unixTimestamp\":1484950821,\"user\":{\"userId\":\"23038\",\"sessionId\":\"9c92d010-a6f8-446f-ba41-eb7f6106bd7a\",\"additional\":{\"referrer\":\"https://joybird.com/desks/xavier-desk/\",\"userAgent\":\"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36\",\"url\":\"https://joybird.com/cart/\"}},\"activity\":{\"type\":\"Viewed Checkout Step\",\"tags\":{\"ap_enabled\":0.0,\"step\":1.0,\"ap_ready\":0.0}}},\"apiResponse\":{\"payload\":{},\"responseCode\":200}}\t/activity\t02AA-0A7A-4B78-4CC2-A04D-B507-948D-AC73\tnull\tnull\tnull\t17186\t1484950822222\n"
s3 = "0285ca63-6b9f-4d88-8c12-c169b4e54035\tcom.brein.api.servlet.DispatcherServlet\t{\"apiRequest\":{\"ipAddress\":\"76.174.89.122\",\"userAgent\":\"Java/1.8.0_101\",\"signature\":\"f7wI2B67SrUAmHWi4stUEe8TSv6yrFEjosjwJs3vjF0\\u003d\",\"apiKey\":\"02AA-0A7A-4B78-4CC2-A04D-B507-948D-AC73\",\"unixTimestamp\":1483033384,\"user\":{\"userId\":\"23038\",\"sessionId\":\"d162e6f2-ae28-4bab-bde2-e545a765cdb3\",\"additional\":{\"referrer\":\"https://joybird.com/customer/login/r/1/\",\"userAgent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0.2 Safari/602.3.12\",\"url\":\"https://joybird.com/checkout/\"}},\"activity\":{\"type\":\"Viewed Checkout Step\",\"tags\":{\"Arm_Orientation\":\"DEFAULT\",\"Chaise_Face\":\"DEFAULT\",\"Wood_Stain\":\"DEFAULT\",\"Wood\":\"DEFAULT\",\"Parent\":\"DEFAULT\",\"Color\":\"DEFAULT\",\"Cushion\":\"DEFAULT\",\"Orientation\":\"DEFAULT\",\"Sleeper_Orientation\":\"DEFAULT\",\"Bumper_Orientation\":\"DEFAULT\",\"Mattress_Type\":\"DEFAULT\",\"Bed_Size\":\"DEFAULT\",\"Leather_Color\":\"DEFAULT\",\"step\":2.0,\"Fabric_Color\":\"DEFAULT\",\"Leg_Type\":\"DEFAULT\"}}},\"apiResponse\":{\"payload\":{},\"responseCode\":200}}\t/activity\t02AA-0A7A-4B78-4CC2-A04D-B507-948D-AC73\tnull\tnull\tnull\t17164\t1483033518116\n"
def grabUserAgent(string):
a
print grabUserAgent(s1)
| 210.714286
| 1,299
| 0.686102
| 368
| 2,950
| 5.44837
| 0.486413
| 0.02394
| 0.03591
| 0.04788
| 0.416958
| 0.38404
| 0.350125
| 0.308229
| 0.224439
| 0.224439
| 0
| 0.158621
| 0.016949
| 2,950
| 13
| 1,300
| 226.923077
| 0.532759
| 0
| 0
| 0
| 0
| 0.857143
| 0.3
| 0.191186
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.142857
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6ef6bf63995da09097b87cc57229584848383977
| 44,433
|
py
|
Python
|
model_search/proto/phoenix_spec_pb2.py
|
dywsjtu/model_search
|
116c4f9016d8b89cf06d057dda020dae3371f211
|
[
"Apache-2.0"
] | null | null | null |
model_search/proto/phoenix_spec_pb2.py
|
dywsjtu/model_search
|
116c4f9016d8b89cf06d057dda020dae3371f211
|
[
"Apache-2.0"
] | null | null | null |
model_search/proto/phoenix_spec_pb2.py
|
dywsjtu/model_search
|
116c4f9016d8b89cf06d057dda020dae3371f211
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: model_search/proto/phoenix_spec.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from model_search.proto import distillation_spec_pb2 as model__search_dot_proto_dot_distillation__spec__pb2
from model_search.proto import ensembling_spec_pb2 as model__search_dot_proto_dot_ensembling__spec__pb2
from model_search.proto import hparam_pb2 as model__search_dot_proto_dot_hparam__pb2
from model_search.proto import transfer_learning_spec_pb2 as model__search_dot_proto_dot_transfer__learning__spec__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='model_search/proto/phoenix_spec.proto',
package='learning.adanets.phoenix.proto',
syntax='proto2',
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n%model_search/proto/phoenix_spec.proto\x12\x1elearning.adanets.phoenix.proto\x1a*model_search/proto/distillation_spec.proto\x1a(model_search/proto/ensembling_spec.proto\x1a\x1fmodel_search/proto/hparam.proto\x1a/model_search/proto/transfer_learning_spec.proto\"\x85\x04\n\x0cLearningSpec\x12&\n\x17\x61pply_exponential_decay\x18\x01 \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0fmin_decay_times\x18\x02 \x01(\x05:\x01\x31\x12\x1a\n\x0fmax_decay_times\x18\x03 \x01(\x05:\x01\x35\x12*\n\x1cmin_learning_rate_decay_rate\x18\x04 \x01(\x02:\x04\x30.75\x12*\n\x1cmax_learning_rate_decay_rate\x18\x05 \x01(\x02:\x04\x30.95\x12&\n\x17\x61pply_gradient_clipping\x18\x06 \x01(\x08:\x05\x66\x61lse\x12*\n\x1fmin_gradient_norm_when_clipping\x18\x07 \x01(\x05:\x01\x32\x12*\n\x1fmax_gradient_norm_when_clipping\x18\x08 \x01(\x05:\x01\x35\x12&\n\x17\x61pply_l2_regularization\x18\t \x01(\x08:\x05\x66\x61lse\x12 \n\x15min_l2_regularization\x18\n \x01(\x02:\x01\x30\x12#\n\x15max_l2_regularization\x18\x0b \x01(\x02:\x04\x30.05\x12\x1a\n\x0flr_warmup_steps\x18\x0c \x01(\x05:\x01\x30\x12\x18\n\x0bmin_dropout\x18\r \x01(\x02:\x03\x30.1\x12\x18\n\x0bmax_dropout\x18\x0e \x01(\x02:\x03\x30.6\"Q\n\x0fTowerSuggestion\x12\x14\n\x0c\x61rchitecture\x18\x01 \x03(\t\x12(\n\x07hparams\x18\x02 \x01(\x0b\x32\x17.model_search.HParamDef\"\x92\x01\n\x08TaskSpec\x12\x12\n\nlabel_name\x18\x01 \x01(\t\x12\x1c\n\x11number_of_classes\x18\x02 \x01(\x05:\x01\x32\x12\x14\n\x0c\x61rchitecture\x18\x03 \x03(\t\x12\x1b\n\x13weight_feature_name\x18\x04 \x01(\t\x12!\n\x13weight_is_a_feature\x18\x05 \x01(\x08:\x04true\"\xb1\x02\n\x0fLinearModelSpec\x12k\n\x11network_alignment\x18\x01 \x01(\x0e\x32@.learning.adanets.phoenix.proto.LinearModelSpec.NetworkAlignment:\x0eNET_ALIGN_HEAD\x12\x1c\n\rridge_penalty\x18\x02 \x01(\x02:\x05\x30.001\x12\x1d\n\x0fremove_outliers\x18\x03 \x01(\x08:\x04true\x12\x1d\n\x11trials_before_fit\x18\x04 \x01(\x05:\x02\x31\x30\"U\n\x10NetworkAlignment\x12\x19\n\x15NET_ALIGN_UNSPECIFIED\x10\x00\x12\x12\n\x0eNET_ALIGN_HEAD\x10\x01\x12\x12\n\x0eNET_ALIGN_BASE\x10\x02\"U\n\x12\x41rchitectureReplay\x12?\n\x06towers\x18\x01 \x03(\x0b\x32/.learning.adanets.phoenix.proto.TowerSuggestion\"\x82\x0f\n\x0bPhoenixSpec\x12\x18\n\rminimum_depth\x18\x01 \x01(\x05:\x01\x32\x12\x19\n\rmaximum_depth\x18\x02 \x01(\x05:\x02\x33\x30\x12K\n\x0bsearch_type\x18\x03 \x01(\x0e\x32\x36.learning.adanets.phoenix.proto.PhoenixSpec.SearchType\x12G\n\x0clinear_model\x18+ \x01(\x0b\x32/.learning.adanets.phoenix.proto.LinearModelSpecH\x00\x12\x1d\n\x12num_blocks_in_cell\x18( \x01(\x05:\x01\x34\x12\x38\n\x14reduction_block_type\x18) \x01(\t:\x1a\x44OWNSAMPLE_CONVOLUTION_3X3\x12\x1d\n\x0ereplicate_cell\x18* \x01(\x08:\x05\x66\x61lse\x12*\n\"increase_complexity_minimum_trials\x18\x04 \x03(\x05\x12*\n\x1fincrease_complexity_probability\x18 \x01(\x02:\x01\x31\x12\x1d\n\x12mutate_probability\x18% \x01(\x02:\x01\x30\x12 \n\x15\x63rossover_probability\x18& \x01(\x02:\x01\x30\x12*\n\x1frandom_architecture_probability\x18\' \x01(\x02:\x01\x30\x12\x14\n\tbeam_size\x18\x1f \x01(\x05:\x01\x31\x12M\n\x0cproblem_type\x18\x05 \x01(\x0e\x32\x37.learning.adanets.phoenix.proto.PhoenixSpec.ProblemType\x12\x15\n\rblocks_to_use\x18\x06 \x03(\t\x12I\n\x10user_suggestions\x18\x19 \x03(\x0b\x32/.learning.adanets.phoenix.proto.TowerSuggestion\x12\x42\n\x06replay\x18/ \x01(\x0b\x32\x32.learning.adanets.phoenix.proto.ArchitectureReplay\x12%\n\x1duse_parameter_scaled_training\x18\" \x01(\x08\x12%\n\x14lengths_feature_name\x18\x17 \x01(\t:\x07lengths\x12\x1b\n\x13weight_feature_name\x18\x1a \x01(\t\x12%\n\x1d\x61pply_dropouts_between_blocks\x18\x14 \x01(\x08\x12\x43\n\rlearning_spec\x18\x15 \x01(\x0b\x32,.learning.adanets.phoenix.proto.LearningSpec\x12U\n\rensemble_spec\x18\x16 \x01(\x0b\x32>.learning.adanets.phoenix.proto.ensembling_spec.EnsemblingSpec\x12\x62\n\x11\x64istillation_spec\x18- \x01(\x0b\x32G.learning.adanets.phoenix.meta.proto.distillation_spec.DistillationSpec\x12!\n\x19use_synchronous_optimizer\x18\x18 \x01(\x08\x12\x41\n\x0fmulti_task_spec\x18\x1b \x03(\x0b\x32(.learning.adanets.phoenix.proto.TaskSpec\x12\x19\n\x11primary_task_name\x18\x1c \x01(\t\x12\x1d\n\x0f\x63nn_data_format\x18\x1e \x01(\t:\x04NHWC\x12p\n\x16transfer_learning_spec\x18! \x01(\x0b\x32P.learning.adanets.phoenix.meta.proto.transfer_learning_spec.TransferLearningSpec\x12\x1a\n\x12use_auxiliary_head\x18# \x01(\x08\x12\"\n\x1a\x61uxiliary_head_loss_weight\x18$ \x01(\x02\x12\x1e\n\x0fis_input_shared\x18. \x01(\x08:\x05\x66\x61lse\x12\x16\n\x0btemperature\x18\x30 \x01(\x02:\x01\x31\"\xba\x01\n\nSearchType\x12\x17\n\x13UNKNOWN_SEARCH_TYPE\x10\x00\x12\x1f\n\x1b\x41\x44\x41PTIVE_COORDINATE_DESCENT\x10\x01\x12\x1d\n\x19NONADAPTIVE_RANDOM_SEARCH\x10\x02\x12\x14\n\x10HARMONICA_SEARCH\x10\x04\x12+\n\'CONSTRAINED_ADAPTIVE_COORDINATE_DESCENT\x10\x06\x12\x10\n\x0cLINEAR_MODEL\x10\x07\"l\n\x0bProblemType\x12\x18\n\x14UNKNOWN_PROBLEM_TYPE\x10\x00\x12\x07\n\x03\x43NN\x10\x01\x12\x07\n\x03\x44NN\x10\x02\x12\x17\n\x13RNN_ALL_ACTIVATIONS\x10\x03\x12\x18\n\x14RNN_LAST_ACTIVATIONS\x10\x04\x42\r\n\x0bsearch_specJ\x04\x08\x08\x10\tJ\x04\x08\x1d\x10\x1e'
,
dependencies=[model__search_dot_proto_dot_distillation__spec__pb2.DESCRIPTOR,model__search_dot_proto_dot_ensembling__spec__pb2.DESCRIPTOR,model__search_dot_proto_dot_hparam__pb2.DESCRIPTOR,model__search_dot_proto_dot_transfer__learning__spec__pb2.DESCRIPTOR,])
_LINEARMODELSPEC_NETWORKALIGNMENT = _descriptor.EnumDescriptor(
name='NetworkAlignment',
full_name='learning.adanets.phoenix.proto.LinearModelSpec.NetworkAlignment',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='NET_ALIGN_UNSPECIFIED', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='NET_ALIGN_HEAD', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='NET_ALIGN_BASE', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=1214,
serialized_end=1299,
)
_sym_db.RegisterEnumDescriptor(_LINEARMODELSPEC_NETWORKALIGNMENT)
_PHOENIXSPEC_SEARCHTYPE = _descriptor.EnumDescriptor(
name='SearchType',
full_name='learning.adanets.phoenix.proto.PhoenixSpec.SearchType',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='UNKNOWN_SEARCH_TYPE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='ADAPTIVE_COORDINATE_DESCENT', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='NONADAPTIVE_RANDOM_SEARCH', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='HARMONICA_SEARCH', index=3, number=4,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='CONSTRAINED_ADAPTIVE_COORDINATE_DESCENT', index=4, number=6,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='LINEAR_MODEL', index=5, number=7,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=2988,
serialized_end=3174,
)
_sym_db.RegisterEnumDescriptor(_PHOENIXSPEC_SEARCHTYPE)
_PHOENIXSPEC_PROBLEMTYPE = _descriptor.EnumDescriptor(
name='ProblemType',
full_name='learning.adanets.phoenix.proto.PhoenixSpec.ProblemType',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='UNKNOWN_PROBLEM_TYPE', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='CNN', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='DNN', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='RNN_ALL_ACTIVATIONS', index=3, number=3,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='RNN_LAST_ACTIVATIONS', index=4, number=4,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=3176,
serialized_end=3284,
)
_sym_db.RegisterEnumDescriptor(_PHOENIXSPEC_PROBLEMTYPE)
_LEARNINGSPEC = _descriptor.Descriptor(
name='LearningSpec',
full_name='learning.adanets.phoenix.proto.LearningSpec',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='apply_exponential_decay', full_name='learning.adanets.phoenix.proto.LearningSpec.apply_exponential_decay', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='min_decay_times', full_name='learning.adanets.phoenix.proto.LearningSpec.min_decay_times', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='max_decay_times', full_name='learning.adanets.phoenix.proto.LearningSpec.max_decay_times', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=5,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='min_learning_rate_decay_rate', full_name='learning.adanets.phoenix.proto.LearningSpec.min_learning_rate_decay_rate', index=3,
number=4, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=float(0.75),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='max_learning_rate_decay_rate', full_name='learning.adanets.phoenix.proto.LearningSpec.max_learning_rate_decay_rate', index=4,
number=5, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=float(0.95),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='apply_gradient_clipping', full_name='learning.adanets.phoenix.proto.LearningSpec.apply_gradient_clipping', index=5,
number=6, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='min_gradient_norm_when_clipping', full_name='learning.adanets.phoenix.proto.LearningSpec.min_gradient_norm_when_clipping', index=6,
number=7, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=2,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='max_gradient_norm_when_clipping', full_name='learning.adanets.phoenix.proto.LearningSpec.max_gradient_norm_when_clipping', index=7,
number=8, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=5,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='apply_l2_regularization', full_name='learning.adanets.phoenix.proto.LearningSpec.apply_l2_regularization', index=8,
number=9, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='min_l2_regularization', full_name='learning.adanets.phoenix.proto.LearningSpec.min_l2_regularization', index=9,
number=10, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='max_l2_regularization', full_name='learning.adanets.phoenix.proto.LearningSpec.max_l2_regularization', index=10,
number=11, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=float(0.05),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='lr_warmup_steps', full_name='learning.adanets.phoenix.proto.LearningSpec.lr_warmup_steps', index=11,
number=12, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='min_dropout', full_name='learning.adanets.phoenix.proto.LearningSpec.min_dropout', index=12,
number=13, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=float(0.1),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='max_dropout', full_name='learning.adanets.phoenix.proto.LearningSpec.max_dropout', index=13,
number=14, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=float(0.6),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=242,
serialized_end=759,
)
_TOWERSUGGESTION = _descriptor.Descriptor(
name='TowerSuggestion',
full_name='learning.adanets.phoenix.proto.TowerSuggestion',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='architecture', full_name='learning.adanets.phoenix.proto.TowerSuggestion.architecture', index=0,
number=1, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='hparams', full_name='learning.adanets.phoenix.proto.TowerSuggestion.hparams', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=761,
serialized_end=842,
)
_TASKSPEC = _descriptor.Descriptor(
name='TaskSpec',
full_name='learning.adanets.phoenix.proto.TaskSpec',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='label_name', full_name='learning.adanets.phoenix.proto.TaskSpec.label_name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='number_of_classes', full_name='learning.adanets.phoenix.proto.TaskSpec.number_of_classes', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=2,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='architecture', full_name='learning.adanets.phoenix.proto.TaskSpec.architecture', index=2,
number=3, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='weight_feature_name', full_name='learning.adanets.phoenix.proto.TaskSpec.weight_feature_name', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='weight_is_a_feature', full_name='learning.adanets.phoenix.proto.TaskSpec.weight_is_a_feature', index=4,
number=5, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=True,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=845,
serialized_end=991,
)
_LINEARMODELSPEC = _descriptor.Descriptor(
name='LinearModelSpec',
full_name='learning.adanets.phoenix.proto.LinearModelSpec',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='network_alignment', full_name='learning.adanets.phoenix.proto.LinearModelSpec.network_alignment', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='ridge_penalty', full_name='learning.adanets.phoenix.proto.LinearModelSpec.ridge_penalty', index=1,
number=2, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=float(0.001),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='remove_outliers', full_name='learning.adanets.phoenix.proto.LinearModelSpec.remove_outliers', index=2,
number=3, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=True,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='trials_before_fit', full_name='learning.adanets.phoenix.proto.LinearModelSpec.trials_before_fit', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=10,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
_LINEARMODELSPEC_NETWORKALIGNMENT,
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=994,
serialized_end=1299,
)
_ARCHITECTUREREPLAY = _descriptor.Descriptor(
name='ArchitectureReplay',
full_name='learning.adanets.phoenix.proto.ArchitectureReplay',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='towers', full_name='learning.adanets.phoenix.proto.ArchitectureReplay.towers', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=1301,
serialized_end=1386,
)
_PHOENIXSPEC = _descriptor.Descriptor(
name='PhoenixSpec',
full_name='learning.adanets.phoenix.proto.PhoenixSpec',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='minimum_depth', full_name='learning.adanets.phoenix.proto.PhoenixSpec.minimum_depth', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=2,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='maximum_depth', full_name='learning.adanets.phoenix.proto.PhoenixSpec.maximum_depth', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=30,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='search_type', full_name='learning.adanets.phoenix.proto.PhoenixSpec.search_type', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='linear_model', full_name='learning.adanets.phoenix.proto.PhoenixSpec.linear_model', index=3,
number=43, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='num_blocks_in_cell', full_name='learning.adanets.phoenix.proto.PhoenixSpec.num_blocks_in_cell', index=4,
number=40, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=4,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='reduction_block_type', full_name='learning.adanets.phoenix.proto.PhoenixSpec.reduction_block_type', index=5,
number=41, type=9, cpp_type=9, label=1,
has_default_value=True, default_value=b"DOWNSAMPLE_CONVOLUTION_3X3".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='replicate_cell', full_name='learning.adanets.phoenix.proto.PhoenixSpec.replicate_cell', index=6,
number=42, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='increase_complexity_minimum_trials', full_name='learning.adanets.phoenix.proto.PhoenixSpec.increase_complexity_minimum_trials', index=7,
number=4, type=5, cpp_type=1, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='increase_complexity_probability', full_name='learning.adanets.phoenix.proto.PhoenixSpec.increase_complexity_probability', index=8,
number=32, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=float(1),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='mutate_probability', full_name='learning.adanets.phoenix.proto.PhoenixSpec.mutate_probability', index=9,
number=37, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='crossover_probability', full_name='learning.adanets.phoenix.proto.PhoenixSpec.crossover_probability', index=10,
number=38, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='random_architecture_probability', full_name='learning.adanets.phoenix.proto.PhoenixSpec.random_architecture_probability', index=11,
number=39, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='beam_size', full_name='learning.adanets.phoenix.proto.PhoenixSpec.beam_size', index=12,
number=31, type=5, cpp_type=1, label=1,
has_default_value=True, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='problem_type', full_name='learning.adanets.phoenix.proto.PhoenixSpec.problem_type', index=13,
number=5, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='blocks_to_use', full_name='learning.adanets.phoenix.proto.PhoenixSpec.blocks_to_use', index=14,
number=6, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='user_suggestions', full_name='learning.adanets.phoenix.proto.PhoenixSpec.user_suggestions', index=15,
number=25, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='replay', full_name='learning.adanets.phoenix.proto.PhoenixSpec.replay', index=16,
number=47, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='use_parameter_scaled_training', full_name='learning.adanets.phoenix.proto.PhoenixSpec.use_parameter_scaled_training', index=17,
number=34, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='lengths_feature_name', full_name='learning.adanets.phoenix.proto.PhoenixSpec.lengths_feature_name', index=18,
number=23, type=9, cpp_type=9, label=1,
has_default_value=True, default_value=b"lengths".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='weight_feature_name', full_name='learning.adanets.phoenix.proto.PhoenixSpec.weight_feature_name', index=19,
number=26, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='apply_dropouts_between_blocks', full_name='learning.adanets.phoenix.proto.PhoenixSpec.apply_dropouts_between_blocks', index=20,
number=20, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='learning_spec', full_name='learning.adanets.phoenix.proto.PhoenixSpec.learning_spec', index=21,
number=21, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='ensemble_spec', full_name='learning.adanets.phoenix.proto.PhoenixSpec.ensemble_spec', index=22,
number=22, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='distillation_spec', full_name='learning.adanets.phoenix.proto.PhoenixSpec.distillation_spec', index=23,
number=45, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='use_synchronous_optimizer', full_name='learning.adanets.phoenix.proto.PhoenixSpec.use_synchronous_optimizer', index=24,
number=24, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='multi_task_spec', full_name='learning.adanets.phoenix.proto.PhoenixSpec.multi_task_spec', index=25,
number=27, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='primary_task_name', full_name='learning.adanets.phoenix.proto.PhoenixSpec.primary_task_name', index=26,
number=28, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='cnn_data_format', full_name='learning.adanets.phoenix.proto.PhoenixSpec.cnn_data_format', index=27,
number=30, type=9, cpp_type=9, label=1,
has_default_value=True, default_value=b"NHWC".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='transfer_learning_spec', full_name='learning.adanets.phoenix.proto.PhoenixSpec.transfer_learning_spec', index=28,
number=33, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='use_auxiliary_head', full_name='learning.adanets.phoenix.proto.PhoenixSpec.use_auxiliary_head', index=29,
number=35, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='auxiliary_head_loss_weight', full_name='learning.adanets.phoenix.proto.PhoenixSpec.auxiliary_head_loss_weight', index=30,
number=36, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='is_input_shared', full_name='learning.adanets.phoenix.proto.PhoenixSpec.is_input_shared', index=31,
number=46, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='temperature', full_name='learning.adanets.phoenix.proto.PhoenixSpec.temperature', index=32,
number=48, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=float(1),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
_PHOENIXSPEC_SEARCHTYPE,
_PHOENIXSPEC_PROBLEMTYPE,
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='search_spec', full_name='learning.adanets.phoenix.proto.PhoenixSpec.search_spec',
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
],
serialized_start=1389,
serialized_end=3311,
)
_TOWERSUGGESTION.fields_by_name['hparams'].message_type = model__search_dot_proto_dot_hparam__pb2._HPARAMDEF
_LINEARMODELSPEC.fields_by_name['network_alignment'].enum_type = _LINEARMODELSPEC_NETWORKALIGNMENT
_LINEARMODELSPEC_NETWORKALIGNMENT.containing_type = _LINEARMODELSPEC
_ARCHITECTUREREPLAY.fields_by_name['towers'].message_type = _TOWERSUGGESTION
_PHOENIXSPEC.fields_by_name['search_type'].enum_type = _PHOENIXSPEC_SEARCHTYPE
_PHOENIXSPEC.fields_by_name['linear_model'].message_type = _LINEARMODELSPEC
_PHOENIXSPEC.fields_by_name['problem_type'].enum_type = _PHOENIXSPEC_PROBLEMTYPE
_PHOENIXSPEC.fields_by_name['user_suggestions'].message_type = _TOWERSUGGESTION
_PHOENIXSPEC.fields_by_name['replay'].message_type = _ARCHITECTUREREPLAY
_PHOENIXSPEC.fields_by_name['learning_spec'].message_type = _LEARNINGSPEC
_PHOENIXSPEC.fields_by_name['ensemble_spec'].message_type = model__search_dot_proto_dot_ensembling__spec__pb2._ENSEMBLINGSPEC
_PHOENIXSPEC.fields_by_name['distillation_spec'].message_type = model__search_dot_proto_dot_distillation__spec__pb2._DISTILLATIONSPEC
_PHOENIXSPEC.fields_by_name['multi_task_spec'].message_type = _TASKSPEC
_PHOENIXSPEC.fields_by_name['transfer_learning_spec'].message_type = model__search_dot_proto_dot_transfer__learning__spec__pb2._TRANSFERLEARNINGSPEC
_PHOENIXSPEC_SEARCHTYPE.containing_type = _PHOENIXSPEC
_PHOENIXSPEC_PROBLEMTYPE.containing_type = _PHOENIXSPEC
_PHOENIXSPEC.oneofs_by_name['search_spec'].fields.append(
_PHOENIXSPEC.fields_by_name['linear_model'])
_PHOENIXSPEC.fields_by_name['linear_model'].containing_oneof = _PHOENIXSPEC.oneofs_by_name['search_spec']
DESCRIPTOR.message_types_by_name['LearningSpec'] = _LEARNINGSPEC
DESCRIPTOR.message_types_by_name['TowerSuggestion'] = _TOWERSUGGESTION
DESCRIPTOR.message_types_by_name['TaskSpec'] = _TASKSPEC
DESCRIPTOR.message_types_by_name['LinearModelSpec'] = _LINEARMODELSPEC
DESCRIPTOR.message_types_by_name['ArchitectureReplay'] = _ARCHITECTUREREPLAY
DESCRIPTOR.message_types_by_name['PhoenixSpec'] = _PHOENIXSPEC
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
LearningSpec = _reflection.GeneratedProtocolMessageType('LearningSpec', (_message.Message,), {
'DESCRIPTOR' : _LEARNINGSPEC,
'__module__' : 'model_search.proto.phoenix_spec_pb2'
# @@protoc_insertion_point(class_scope:learning.adanets.phoenix.proto.LearningSpec)
})
_sym_db.RegisterMessage(LearningSpec)
TowerSuggestion = _reflection.GeneratedProtocolMessageType('TowerSuggestion', (_message.Message,), {
'DESCRIPTOR' : _TOWERSUGGESTION,
'__module__' : 'model_search.proto.phoenix_spec_pb2'
# @@protoc_insertion_point(class_scope:learning.adanets.phoenix.proto.TowerSuggestion)
})
_sym_db.RegisterMessage(TowerSuggestion)
TaskSpec = _reflection.GeneratedProtocolMessageType('TaskSpec', (_message.Message,), {
'DESCRIPTOR' : _TASKSPEC,
'__module__' : 'model_search.proto.phoenix_spec_pb2'
# @@protoc_insertion_point(class_scope:learning.adanets.phoenix.proto.TaskSpec)
})
_sym_db.RegisterMessage(TaskSpec)
LinearModelSpec = _reflection.GeneratedProtocolMessageType('LinearModelSpec', (_message.Message,), {
'DESCRIPTOR' : _LINEARMODELSPEC,
'__module__' : 'model_search.proto.phoenix_spec_pb2'
# @@protoc_insertion_point(class_scope:learning.adanets.phoenix.proto.LinearModelSpec)
})
_sym_db.RegisterMessage(LinearModelSpec)
ArchitectureReplay = _reflection.GeneratedProtocolMessageType('ArchitectureReplay', (_message.Message,), {
'DESCRIPTOR' : _ARCHITECTUREREPLAY,
'__module__' : 'model_search.proto.phoenix_spec_pb2'
# @@protoc_insertion_point(class_scope:learning.adanets.phoenix.proto.ArchitectureReplay)
})
_sym_db.RegisterMessage(ArchitectureReplay)
PhoenixSpec = _reflection.GeneratedProtocolMessageType('PhoenixSpec', (_message.Message,), {
'DESCRIPTOR' : _PHOENIXSPEC,
'__module__' : 'model_search.proto.phoenix_spec_pb2'
# @@protoc_insertion_point(class_scope:learning.adanets.phoenix.proto.PhoenixSpec)
})
_sym_db.RegisterMessage(PhoenixSpec)
# @@protoc_insertion_point(module_scope)
| 56.315589
| 5,120
| 0.775212
| 5,806
| 44,433
| 5.584912
| 0.0732
| 0.04959
| 0.086721
| 0.071609
| 0.750293
| 0.718713
| 0.700056
| 0.640844
| 0.583606
| 0.563252
| 0
| 0.040443
| 0.111291
| 44,433
| 788
| 5,121
| 56.387056
| 0.780718
| 0.016407
| 0
| 0.645638
| 1
| 0.004027
| 0.243843
| 0.210195
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.010738
| 0
| 0.010738
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3e3672bc6dbb3106ccf2bd15c3259190b6937130
| 212
|
py
|
Python
|
vmraid/workflow/doctype/workflow_state/test_workflow_state.py
|
sowrisurya/vmraid
|
f833e00978019dad87af80b41279c0146c063ed5
|
[
"MIT"
] | null | null | null |
vmraid/workflow/doctype/workflow_state/test_workflow_state.py
|
sowrisurya/vmraid
|
f833e00978019dad87af80b41279c0146c063ed5
|
[
"MIT"
] | null | null | null |
vmraid/workflow/doctype/workflow_state/test_workflow_state.py
|
sowrisurya/vmraid
|
f833e00978019dad87af80b41279c0146c063ed5
|
[
"MIT"
] | null | null | null |
# Copyright (c) 2015, VMRaid Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import vmraid
test_records = vmraid.get_test_records('Workflow State')
| 30.285714
| 68
| 0.806604
| 29
| 212
| 5.62069
| 0.793103
| 0.134969
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021505
| 0.122642
| 212
| 7
| 69
| 30.285714
| 0.854839
| 0.448113
| 0
| 0
| 0
| 0
| 0.121739
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3e6f63b5ad4804bb7f904952482cd56de78cd62b
| 215
|
py
|
Python
|
backend/src/apiApp/department/serializers.py
|
mozillacampuscrce/unscript2k18-8
|
876cf388dc53b4b88cb0ae045d332845f480e4fc
|
[
"MIT"
] | null | null | null |
backend/src/apiApp/department/serializers.py
|
mozillacampuscrce/unscript2k18-8
|
876cf388dc53b4b88cb0ae045d332845f480e4fc
|
[
"MIT"
] | 15
|
2020-01-28T22:19:35.000Z
|
2022-01-13T00:43:16.000Z
|
backend/src/apiApp/department/serializers.py
|
mozillacampuscrce/unscript2k18-8
|
876cf388dc53b4b88cb0ae045d332845f480e4fc
|
[
"MIT"
] | null | null | null |
from rest_framework.serializers import ModelSerializer
from ..models import Department
class DepartmentSerializer(ModelSerializer):
class Meta:
model = Department
fields = ['dept_id', 'name']
| 21.5
| 54
| 0.730233
| 21
| 215
| 7.380952
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.195349
| 215
| 9
| 55
| 23.888889
| 0.895954
| 0
| 0
| 0
| 0
| 0
| 0.051163
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3e735dba7db10d3c2c39a2f0baff67ed5bc3d84c
| 237
|
py
|
Python
|
lmsapi/api_user/views.py
|
orkasolutions-develop/lms-api-new
|
c9e5a2d98874a4a7415002397048258526a94644
|
[
"MIT"
] | null | null | null |
lmsapi/api_user/views.py
|
orkasolutions-develop/lms-api-new
|
c9e5a2d98874a4a7415002397048258526a94644
|
[
"MIT"
] | null | null | null |
lmsapi/api_user/views.py
|
orkasolutions-develop/lms-api-new
|
c9e5a2d98874a4a7415002397048258526a94644
|
[
"MIT"
] | null | null | null |
from core.views import PrimaryViewSet
from .models import LmsUsers
from .serializers import UserSerializer
class UserViewSet(PrimaryViewSet):
queryset = LmsUsers.objects.all().order_by('name')
serializer_class = UserSerializer
| 26.333333
| 54
| 0.801688
| 26
| 237
| 7.230769
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126582
| 237
| 8
| 55
| 29.625
| 0.908213
| 0
| 0
| 0
| 0
| 0
| 0.016878
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
e419503230bffdd977310e8223beca361bae25a4
| 161
|
py
|
Python
|
0x08-python-more_classes/main/main_3.py
|
johncoleman83/bootcampschool-higher_level_programming
|
a83c3b7092cfe893c87e495f8d8eec9228c9b808
|
[
"MIT"
] | null | null | null |
0x08-python-more_classes/main/main_3.py
|
johncoleman83/bootcampschool-higher_level_programming
|
a83c3b7092cfe893c87e495f8d8eec9228c9b808
|
[
"MIT"
] | null | null | null |
0x08-python-more_classes/main/main_3.py
|
johncoleman83/bootcampschool-higher_level_programming
|
a83c3b7092cfe893c87e495f8d8eec9228c9b808
|
[
"MIT"
] | 1
|
2020-09-25T17:54:36.000Z
|
2020-09-25T17:54:36.000Z
|
#!/usr/bin/python3
Rectangle = __import__('1-rectangle').Rectangle
my_rectangle = Rectangle(4)
print("{} - {}".format(my_rectangle.width, my_rectangle.height))
| 26.833333
| 64
| 0.73913
| 20
| 161
| 5.6
| 0.6
| 0.294643
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020134
| 0.074534
| 161
| 5
| 65
| 32.2
| 0.731544
| 0.10559
| 0
| 0
| 0
| 0
| 0.125874
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e4303081c647ef1177c2f7702e2d9448dfd3867c
| 9,736
|
py
|
Python
|
value_iteration.py
|
pranavbhandari24/Value-Iteration
|
412dc657426ab25b737d3f09549995f14f021f39
|
[
"MIT"
] | null | null | null |
value_iteration.py
|
pranavbhandari24/Value-Iteration
|
412dc657426ab25b737d3f09549995f14f021f39
|
[
"MIT"
] | null | null | null |
value_iteration.py
|
pranavbhandari24/Value-Iteration
|
412dc657426ab25b737d3f09549995f14f021f39
|
[
"MIT"
] | null | null | null |
# Name : Pranav Bhandari
# Student ID: 1001551132
# Date : 12/06/2020
import sys
class Data:
def __init__(self, state_type, reward):
self.state_type = state_type
self.reward = reward
self.utility = 0
self.policy = ""
def __repr__(self):
return "state_type : % s, reward: % s, utility: % s, policy: % s\n" % (self.state_type, self.reward, self.utility, self.policy)
def __str__(self):
return "state_type : % s, reward: % s, utility: % s, policy: % s\n" % (self.state_type, self.reward, self.utility, self.policy)
def process_environment(environment_file, non_terminal_reward):
file = open(environment_file, "r")
data = []
for line in file:
intermediate = []
for state in line.rstrip().split(","):
if state == ".":
intermediate.append(Data("non-terminal", non_terminal_reward))
elif state == "1.0" or state == "-1.0":
intermediate.append(Data("terminal", float(state)))
else:
intermediate.append(Data("blocked", -sys.maxsize))
data.append(intermediate)
return data
def value_iteration(environment_file, non_terminal_reward, gamma, K):
data = process_environment(environment_file, non_terminal_reward)
U_dash = []
for i in range(len(data)):
intermediate = []
for j in range(len(data[0])):
intermediate.append(0)
U_dash.append(intermediate)
for n in range(K):
# U = copy of U'
for i in range(len(U_dash)):
for j in range(len(U_dash[0])):
data[i][j].utility = U_dash[i][j]
# For each state S
for i in range(len(data)):
for j in range(len(data[0])):
if data[i][j].state_type == "blocked":
continue
U_dash[i][j] = data[i][j].reward
if data[i][j].state_type == "terminal":
continue
max_val = -sys.maxsize
# Up
temp = 0
# 0.8 Case
if i-1 >=0 and data[i-1][j].state_type != "blocked":
temp += (0.8 * data[i-1][j].utility)
else:
temp += (0.8 * data[i][j].utility)
# 0.2 Case
if j-1 >=0 and data[i][j-1].state_type != "blocked":
temp += (0.1 * data[i][j-1].utility)
else:
temp += (0.1 * data[i][j].utility)
if j+1 <=len(data[0])-1 and data[i][j+1].state_type != "blocked":
temp += (0.1 * data[i][j+1].utility)
else:
temp += (0.1 * data[i][j].utility)
if temp > max_val:
max_val = temp
# Down
temp = 0
# 0.8 Case
if i+1 <=len(data)-1 and data[i+1][j].state_type != "blocked":
temp += (0.8 * data[i+1][j].utility)
else:
temp += (0.8 * data[i][j].utility)
# 0.2 Case
if j-1 >=0 and data[i][j-1].state_type != "blocked":
temp += (0.1 * data[i][j-1].utility)
else:
temp += (0.1 * data[i][j].utility)
if j+1 <=len(data[0])-1 and data[i][j+1].state_type != "blocked":
temp += (0.1 * data[i][j+1].utility)
else:
temp += (0.1 * data[i][j].utility)
if temp > max_val:
max_val = temp
# Left
temp = 0
# 0.8 Case
if j-1 >=0 and data[i][j-1].state_type != "blocked":
temp += (0.8 * data[i][j-1].utility)
else:
temp += (0.8 * data[i][j].utility)
# 0.2 Case
if i-1 >=0 and data[i-1][j].state_type != "blocked":
temp += (0.1 * data[i-1][j].utility)
else:
temp += (0.1 * data[i][j].utility)
if i+1 <=len(data)-1 and data[i+1][j].state_type != "blocked":
temp += (0.1 * data[i+1][j].utility)
else:
temp += (0.1 * data[i][j].utility)
if temp > max_val:
max_val = temp
# Right
temp = 0
# 0.8 Case
if j+1 <=len(data[0])-1 and data[i][j+1].state_type != "blocked":
temp += (0.8 * data[i][j+1].utility)
else:
temp += (0.8 * data[i][j].utility)
# 0.2 Case
if i-1 >=0 and data[i-1][j].state_type != "blocked":
temp += (0.1 * data[i-1][j].utility)
else:
temp += (0.1 * data[i][j].utility)
if i+1 <=len(data)-1 and data[i+1][j].state_type != "blocked":
temp += (0.1 * data[i+1][j].utility)
else:
temp += (0.1 * data[i][j].utility)
if temp > max_val:
max_val = temp
U_dash[i][j] += (gamma * max_val)
print("utilities:")
for i in range(len(data)):
for j in range(len(data[0])):
print("{:6.3f}".format(data[i][j].utility), end= " ")
print()
print()
print("policy:")
for i in range(len(data)):
for j in range(len(data[0])):
if data[i][j].state_type == "terminal":
data[i][j].policy = "o"
elif data[i][j].state_type == "blocked":
data[i][j].policy = "x"
else:
max_val = -sys.maxsize
max_policy = ""
# Up
temp = 0
# 0.8 Case
if i-1 >=0 and data[i-1][j].state_type != "blocked":
temp += (0.8 * data[i-1][j].utility)
else:
temp += (0.8 * data[i][j].utility)
# 0.2 Case
if j-1 >=0 and data[i][j-1].state_type != "blocked":
temp += (0.1 * data[i][j-1].utility)
else:
temp += (0.1 * data[i][j].utility)
if j+1 <=len(data[0])-1 and data[i][j+1].state_type != "blocked":
temp += (0.1 * data[i][j+1].utility)
else:
temp += (0.1 * data[i][j].utility)
if temp > max_val:
max_val = temp
max_policy = "^"
# Down
temp = 0
# 0.8 Case
if i+1 <=len(data)-1 and data[i+1][j].state_type != "blocked":
temp += (0.8 * data[i+1][j].utility)
else:
temp += (0.8 * data[i][j].utility)
# 0.2 Case
if j-1 >=0 and data[i][j-1].state_type != "blocked":
temp += (0.1 * data[i][j-1].utility)
else:
temp += (0.1 * data[i][j].utility)
if j+1 <=len(data[0])-1 and data[i][j+1].state_type != "blocked":
temp += (0.1 * data[i][j+1].utility)
else:
temp += (0.1 * data[i][j].utility)
if temp > max_val:
max_val = temp
max_policy = "v"
# Left
temp = 0
# 0.8 Case
if j-1 >=0 and data[i][j-1].state_type != "blocked":
temp += (0.8 * data[i][j-1].utility)
else:
temp += (0.8 * data[i][j].utility)
# 0.2 Case
if i-1 >=0 and data[i-1][j].state_type != "blocked":
temp += (0.1 * data[i-1][j].utility)
else:
temp += (0.1 * data[i][j].utility)
if i+1 <=len(data)-1 and data[i+1][j].state_type != "blocked":
temp += (0.1 * data[i+1][j].utility)
else:
temp += (0.1 * data[i][j].utility)
if temp > max_val:
max_val = temp
max_policy = "<"
# Right
temp = 0
# 0.8 Case
if j+1 <=len(data[0])-1 and data[i][j+1].state_type != "blocked":
temp += (0.8 * data[i][j+1].utility)
else:
temp += (0.8 * data[i][j].utility)
# 0.2 Case
if i-1 >=0 and data[i-1][j].state_type != "blocked":
temp += (0.1 * data[i-1][j].utility)
else:
temp += (0.1 * data[i][j].utility)
if i+1 <=len(data)-1 and data[i+1][j].state_type != "blocked":
temp += (0.1 * data[i+1][j].utility)
else:
temp += (0.1 * data[i][j].utility)
if temp > max_val:
max_val = temp
max_policy = ">"
data[i][j].policy = max_policy
print("{:6s}".format(data[i][j].policy), end=" ")
print()
if __name__ == "__main__":
value_iteration(sys.argv[1], float(sys.argv[2]), float(sys.argv[3]), int(sys.argv[4]))
| 38.330709
| 137
| 0.393488
| 1,211
| 9,736
| 3.078448
| 0.074319
| 0.11132
| 0.094957
| 0.085837
| 0.761266
| 0.742489
| 0.729882
| 0.689109
| 0.689109
| 0.689109
| 0
| 0.05163
| 0.45491
| 9,736
| 254
| 138
| 38.330709
| 0.650839
| 0.029478
| 0
| 0.748691
| 0
| 0.010471
| 0.042038
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.026178
| false
| 0
| 0.005236
| 0.010471
| 0.052356
| 0.036649
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e46d18a5987913b77925f6c949b4b5902d3817df
| 3,106
|
py
|
Python
|
google/firestore/admin/v1/firestore-admin-v1-py/google/cloud/firestore_admin/__init__.py
|
googleapis/googleapis-gen
|
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
|
[
"Apache-2.0"
] | 7
|
2021-02-21T10:39:41.000Z
|
2021-12-07T07:31:28.000Z
|
google/firestore/admin/v1/firestore-admin-v1-py/google/cloud/firestore_admin/__init__.py
|
googleapis/googleapis-gen
|
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
|
[
"Apache-2.0"
] | 6
|
2021-02-02T23:46:11.000Z
|
2021-11-15T01:46:02.000Z
|
google/firestore/admin/v1/firestore-admin-v1-py/google/cloud/firestore_admin/__init__.py
|
googleapis/googleapis-gen
|
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
|
[
"Apache-2.0"
] | 4
|
2021-01-28T23:25:45.000Z
|
2021-08-30T01:55:16.000Z
|
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.firestore_admin_v1.services.firestore_admin.client import FirestoreAdminClient
from google.cloud.firestore_admin_v1.services.firestore_admin.async_client import FirestoreAdminAsyncClient
from google.cloud.firestore_admin_v1.types.field import Field
from google.cloud.firestore_admin_v1.types.firestore_admin import CreateIndexRequest
from google.cloud.firestore_admin_v1.types.firestore_admin import DeleteIndexRequest
from google.cloud.firestore_admin_v1.types.firestore_admin import ExportDocumentsRequest
from google.cloud.firestore_admin_v1.types.firestore_admin import GetFieldRequest
from google.cloud.firestore_admin_v1.types.firestore_admin import GetIndexRequest
from google.cloud.firestore_admin_v1.types.firestore_admin import ImportDocumentsRequest
from google.cloud.firestore_admin_v1.types.firestore_admin import ListFieldsRequest
from google.cloud.firestore_admin_v1.types.firestore_admin import ListFieldsResponse
from google.cloud.firestore_admin_v1.types.firestore_admin import ListIndexesRequest
from google.cloud.firestore_admin_v1.types.firestore_admin import ListIndexesResponse
from google.cloud.firestore_admin_v1.types.firestore_admin import UpdateFieldRequest
from google.cloud.firestore_admin_v1.types.index import Index
from google.cloud.firestore_admin_v1.types.location import LocationMetadata
from google.cloud.firestore_admin_v1.types.operation import ExportDocumentsMetadata
from google.cloud.firestore_admin_v1.types.operation import ExportDocumentsResponse
from google.cloud.firestore_admin_v1.types.operation import FieldOperationMetadata
from google.cloud.firestore_admin_v1.types.operation import ImportDocumentsMetadata
from google.cloud.firestore_admin_v1.types.operation import IndexOperationMetadata
from google.cloud.firestore_admin_v1.types.operation import Progress
from google.cloud.firestore_admin_v1.types.operation import OperationState
__all__ = ('FirestoreAdminClient',
'FirestoreAdminAsyncClient',
'Field',
'CreateIndexRequest',
'DeleteIndexRequest',
'ExportDocumentsRequest',
'GetFieldRequest',
'GetIndexRequest',
'ImportDocumentsRequest',
'ListFieldsRequest',
'ListFieldsResponse',
'ListIndexesRequest',
'ListIndexesResponse',
'UpdateFieldRequest',
'Index',
'LocationMetadata',
'ExportDocumentsMetadata',
'ExportDocumentsResponse',
'FieldOperationMetadata',
'ImportDocumentsMetadata',
'IndexOperationMetadata',
'Progress',
'OperationState',
)
| 47.060606
| 107
| 0.830328
| 363
| 3,106
| 6.928375
| 0.280992
| 0.200398
| 0.137177
| 0.219483
| 0.471968
| 0.471968
| 0.471968
| 0.429026
| 0.429026
| 0.24493
| 0
| 0.011461
| 0.101095
| 3,106
| 65
| 108
| 47.784615
| 0.889327
| 0.183194
| 0
| 0
| 0
| 0
| 0.161047
| 0.072194
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.531915
| 0
| 0.531915
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
e473202dc87d9795967b58d1b864783e39084362
| 72
|
py
|
Python
|
stats.py
|
cruxicheiros/ggj-space-rhythm-relay
|
6e94ced9a11f84430ea6c2da80437705c325583f
|
[
"MIT"
] | null | null | null |
stats.py
|
cruxicheiros/ggj-space-rhythm-relay
|
6e94ced9a11f84430ea6c2da80437705c325583f
|
[
"MIT"
] | null | null | null |
stats.py
|
cruxicheiros/ggj-space-rhythm-relay
|
6e94ced9a11f84430ea6c2da80437705c325583f
|
[
"MIT"
] | null | null | null |
def median(array):
print(array)
return sum(array)/len(array)
| 18
| 33
| 0.638889
| 10
| 72
| 4.6
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 72
| 3
| 34
| 24
| 0.821429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
e4742e90e2cca52e11734470fc2b83a4fe242132
| 548
|
py
|
Python
|
keymaster/starter.py
|
shiroyuki/spymaster
|
1efee54427378394ab04d0e53247eb38c28bc97c
|
[
"Apache-2.0"
] | null | null | null |
keymaster/starter.py
|
shiroyuki/spymaster
|
1efee54427378394ab04d0e53247eb38c28bc97c
|
[
"Apache-2.0"
] | null | null | null |
keymaster/starter.py
|
shiroyuki/spymaster
|
1efee54427378394ab04d0e53247eb38c28bc97c
|
[
"Apache-2.0"
] | null | null | null |
from gallium.starter import main
def activate():
main(
console_name='keymaster' if __name__ == '__main__' else None,
config_content=dict(imports=[
'keymaster.client.cli.console',
'keymaster.client.cli.generate_password',
'keymaster.client.cli.import_lastpass',
'keymaster.client.cli.login',
'keymaster.server.cli.grpc_server_run',
'keymaster.server.cli.manage_user',
'keymaster.server.cli.setup',
]),
in_isolation=True,
)
| 30.444444
| 69
| 0.605839
| 56
| 548
| 5.642857
| 0.571429
| 0.189873
| 0.227848
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.275547
| 548
| 17
| 70
| 32.235294
| 0.79597
| 0
| 0
| 0
| 0
| 0
| 0.436131
| 0.405109
| 0
| 0
| 0
| 0
| 0
| 1
| 0.066667
| true
| 0.133333
| 0.2
| 0
| 0.266667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
e4a0715f62cdecd06032f8bcf7a880fad619f840
| 99
|
py
|
Python
|
pytorch_pfn_extras/distributed/__init__.py
|
belltailjp/pytorch-pfn-extras
|
8ce08d8e6bc67502be8e0fd5053a8c84e4df5e6a
|
[
"MIT"
] | 243
|
2020-05-12T01:15:46.000Z
|
2022-03-21T22:07:57.000Z
|
pytorch_pfn_extras/distributed/__init__.py
|
belltailjp/pytorch-pfn-extras
|
8ce08d8e6bc67502be8e0fd5053a8c84e4df5e6a
|
[
"MIT"
] | 495
|
2020-05-12T06:45:12.000Z
|
2022-03-31T07:14:02.000Z
|
pytorch_pfn_extras/distributed/__init__.py
|
belltailjp/pytorch-pfn-extras
|
8ce08d8e6bc67502be8e0fd5053a8c84e4df5e6a
|
[
"MIT"
] | 37
|
2020-05-12T02:16:07.000Z
|
2021-08-11T06:00:16.000Z
|
from pytorch_pfn_extras.distributed._dataset_util import create_distributed_subset_indices # NOQA
| 49.5
| 98
| 0.89899
| 13
| 99
| 6.307692
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.070707
| 99
| 1
| 99
| 99
| 0.891304
| 0.040404
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e4a83fd1d3d83e1eabd6e5e4ee8b75cf433fc9b0
| 3,705
|
py
|
Python
|
pyaurorax/cli/templates.py
|
fossabot/pyaurorax
|
cb3e72a90f3107302d4f9fd4b0478fe98616354d
|
[
"MIT"
] | null | null | null |
pyaurorax/cli/templates.py
|
fossabot/pyaurorax
|
cb3e72a90f3107302d4f9fd4b0478fe98616354d
|
[
"MIT"
] | 45
|
2021-11-07T22:02:23.000Z
|
2022-03-09T03:04:27.000Z
|
pyaurorax/cli/templates.py
|
fossabot/pyaurorax
|
cb3e72a90f3107302d4f9fd4b0478fe98616354d
|
[
"MIT"
] | 1
|
2022-01-16T17:28:14.000Z
|
2022-01-16T17:28:14.000Z
|
"""
This module contains the templates for different search
requests (conjunction, data products, ephemeris)
"""
CONJUNCTION_SEARCH_TEMPLATE = {
"start": "2020-01-01T00:00:00",
"end": "2020-01-01T23:59:59",
"ground": [
{
"programs": [
"string"
],
"platforms": [
"string"
],
"instrument_types": [
"string"
],
"ephemeris_metadata_filters": {
"logical_operator": "AND",
"expressions": [
{
"key": "string",
"operator": "=",
"values": [
"string"
]
}
]
}
}
],
"space": [
{
"programs": [
"string"
],
"platforms": [
"string"
],
"instrument_types": [
"string"
],
"hemisphere": [
"northern"
],
"ephemeris_metadata_filters": {
"logical_operator": "AND",
"expressions": [
{
"key": "string",
"operator": "=",
"values": [
"string"
]
}
]
}
}
],
"events": [
{
"programs": [
"string"
],
"platforms": [
"string"
],
"instrument_types": [
"string"
],
"ephemeris_metadata_filters": {
"logical_operator": "AND",
"expressions": [
{
"key": "string",
"operator": "=",
"values": [
"string"
]
}
]
}
}
],
"conjunction_types": [
"nbtrace"
],
"max_distances": {
"ground1-space1": 300,
"ground2-space1": 400,
"ground1-events1": 900,
"space1-space2": None
}
}
DATA_PRODUCTS_SEARCH_TEMPLATE = {
"start": "2020-01-01T00:00:00",
"end": "2020-01-01T23:59:59",
"data_sources": {
"programs": [
"string"
],
"platforms": [
"string"
],
"instrument_types": [
"string"
],
"data_product_metadata_filters": {
"logical_operator": "AND",
"expressions": [
{
"key": "string",
"operator": "=",
"values": [
"string"
]
}
]
}
},
"data_product_type_filters": [
"keogram"
]
}
EPHEMERIS_SEARCH_TEMPLATE = {
"start": "2020-01-01T00:00:00",
"end": "2020-01-01T23:59:59",
"data_sources": {
"programs": [
"string"
],
"platforms": [
"string"
],
"instrument_types": [
"string"
],
"ephemeris_metadata_filters": {
"logical_operator": "AND",
"expressions": [
{
"key": "string",
"operator": "=",
"values": [
"string"
]
}
]
}
},
}
| 23.449367
| 55
| 0.312821
| 186
| 3,705
| 6.043011
| 0.301075
| 0.032028
| 0.102313
| 0.129004
| 0.737544
| 0.737544
| 0.737544
| 0.693061
| 0.693061
| 0.693061
| 0
| 0.061925
| 0.559784
| 3,705
| 157
| 56
| 23.598726
| 0.627223
| 0.02807
| 0
| 0.621622
| 0
| 0
| 0.281102
| 0.043974
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e4f02dd00848c28fe6d2efae1d94380c79339662
| 1,946
|
bzl
|
Python
|
google/cloud/bigtable/bigtable_client_unit_tests.bzl
|
AVaksman/google-cloud-cpp
|
86ccde498987e240024f6e850f3b53eafff383b5
|
[
"Apache-2.0"
] | null | null | null |
google/cloud/bigtable/bigtable_client_unit_tests.bzl
|
AVaksman/google-cloud-cpp
|
86ccde498987e240024f6e850f3b53eafff383b5
|
[
"Apache-2.0"
] | null | null | null |
google/cloud/bigtable/bigtable_client_unit_tests.bzl
|
AVaksman/google-cloud-cpp
|
86ccde498987e240024f6e850f3b53eafff383b5
|
[
"Apache-2.0"
] | null | null | null |
# DO NOT EDIT -- GENERATED BY CMake -- Change the CMakeLists.txt file if needed
bigtable_client_unit_tests = [
"admin_client_test.cc",
"app_profile_config_test.cc",
"bigtable_version_test.cc",
"cell_test.cc",
"client_options_test.cc",
"cluster_config_test.cc",
"column_family_test.cc",
"completion_queue_test.cc",
"data_client_test.cc",
"filters_test.cc",
"force_sanitizer_failures_test.cc",
"grpc_error_test.cc",
"idempotent_mutation_policy_test.cc",
"instance_admin_client_test.cc",
"instance_admin_test.cc",
"instance_config_test.cc",
"instance_update_config_test.cc",
"internal/async_check_consistency_test.cc",
"internal/async_future_from_callback_test.cc",
"internal/async_longrunning_op_test.cc",
"internal/async_poll_op_test.cc",
"internal/async_retry_op_test.cc",
"internal/async_retry_unary_rpc_and_poll_test.cc",
"internal/bulk_mutator_test.cc",
"internal/table_async_check_and_mutate_row_test.cc",
"internal/instance_admin_test.cc",
"internal/grpc_error_delegate_test.cc",
"internal/prefix_range_end_test.cc",
"internal/table_admin_test.cc",
"internal/table_async_apply_test.cc",
"internal/table_async_bulk_apply_test.cc",
"internal/table_async_sample_row_keys_test.cc",
"internal/table_test.cc",
"mutations_test.cc",
"table_admin_test.cc",
"table_apply_test.cc",
"table_bulk_apply_test.cc",
"table_check_and_mutate_row_test.cc",
"table_config_test.cc",
"table_readrow_test.cc",
"table_readrows_test.cc",
"table_sample_row_keys_test.cc",
"table_test.cc",
"table_readmodifywriterow_test.cc",
"read_modify_write_rule_test.cc",
"row_reader_test.cc",
"row_test.cc",
"row_range_test.cc",
"row_set_test.cc",
"rpc_backoff_policy_test.cc",
"metadata_update_policy_test.cc",
"rpc_retry_policy_test.cc",
"polling_policy_test.cc",
]
| 34.140351
| 79
| 0.732271
| 277
| 1,946
| 4.635379
| 0.296029
| 0.247664
| 0.174455
| 0.088785
| 0.204829
| 0.121495
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14594
| 1,946
| 56
| 80
| 34.75
| 0.772563
| 0.039568
| 0
| 0
| 1
| 0
| 0.754687
| 0.629888
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
902a58545ba7f045b3262e4ffe081846ab05f8fd
| 119
|
py
|
Python
|
ex014.py
|
Brunochavesg/Guanabara
|
e74a080730b7cec5f337549ec1e41398ad6d01f9
|
[
"MIT"
] | null | null | null |
ex014.py
|
Brunochavesg/Guanabara
|
e74a080730b7cec5f337549ec1e41398ad6d01f9
|
[
"MIT"
] | null | null | null |
ex014.py
|
Brunochavesg/Guanabara
|
e74a080730b7cec5f337549ec1e41398ad6d01f9
|
[
"MIT"
] | null | null | null |
c = float(input('Informe a temperatura em °C: '))
f = 9*c/5+32
print (f'A temperatura de {c} °C corresponde a {f} °F!')
| 39.666667
| 56
| 0.630252
| 27
| 119
| 2.888889
| 0.555556
| 0.307692
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.040404
| 0.168067
| 119
| 3
| 56
| 39.666667
| 0.717172
| 0
| 0
| 0
| 0
| 0
| 0.616667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5f5e6e52bc12bf7429821f8df4855067ac3913e0
| 551
|
py
|
Python
|
python/anyascii/_data/_20b.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
python/anyascii/_data/_20b.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
python/anyascii/_data/_20b.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
b=' Bo Guan Bi Tranh Xing Zeon Cut Zhen Bo Bo Sa Mo Fu Mot Tao Bang Yi Biao Xi Jie Jin Qian Si Jing Chi Jing Tro Sui Zha Li Zhuo Bian Tun Bi Fei De Zhu Jeoi Ju Yi Ya Chi Gua Zhi Reng Aa You Bo Ji Pin Ying Yang Mang Ge Ji Long N Sa Chuan Ci Wu Ren Duc Jyu Ri Dai Ji Yi Ran Huo Gua Zhe Pi Za Ban Jie Hou Xian Hui Aa Cai Zha Dai Ge Pi Hin Pian Shi Liang Yue Hu Bian Reng Reng Waan Danh Zi Tuou Luk'
| 551
| 551
| 0.53176
| 100
| 551
| 2.93
| 0.79
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.462795
| 551
| 1
| 551
| 551
| 0.989865
| 0
| 0
| 0
| 0
| 1
| 0.990942
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5f6adfcfd809c66627fe936b83a7d53f9b3a2be6
| 936
|
py
|
Python
|
scraping codes/btis.py
|
shreyakupadhyay/prof-raj
|
d8a53858b1015acf0c8cdf2481cfcd9399a697ea
|
[
"MIT"
] | 2
|
2018-02-28T17:54:14.000Z
|
2018-02-28T18:15:18.000Z
|
scraping codes/btis.py
|
shreyakupadhyay/prof-raj
|
d8a53858b1015acf0c8cdf2481cfcd9399a697ea
|
[
"MIT"
] | 1
|
2017-04-06T13:31:27.000Z
|
2017-04-06T13:31:27.000Z
|
scraping codes/btis.py
|
shreyakupadhyay/BangIU
|
d8a53858b1015acf0c8cdf2481cfcd9399a697ea
|
[
"MIT"
] | null | null | null |
import requests
import json
base_url = 'http://www.btis.in/bcity_issues_transport.txt'
headers = {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/48.0.2564.82 Chrome/48.0.2564.82 Safari/537.36"}
html = requests.get(base_url,headers=headers)
htmltext = html.text
data = json.loads(htmltext)
length_data = len(data)
for i in range(0,length_data):
print data[i]['user']['name']
print data[i]['issue_no']
print data[i]['topic_id']
print data[i]['title']
print data[i]['status']
print data[i]['topic_name']
print data[i]['issue_type_name']
print data[i]['comments']
print data[i]['image_url']
print data[i]['agency_name']
print data[i]['created_at']
print data[i]['issue_type_id']
print data[i]['source']
print data[i]['desc']
print data[i]['id']
print data[i]['ward_name']
print data[i]['agency_id']
print length_data
| 33.428571
| 161
| 0.673077
| 153
| 936
| 3.986928
| 0.418301
| 0.25082
| 0.278689
| 0.114754
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0466
| 0.151709
| 936
| 27
| 162
| 34.666667
| 0.721662
| 0
| 0
| 0
| 0
| 0.037037
| 0.351496
| 0.022436
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.074074
| null | null | 0.666667
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
5f888f449ee262b46262ee65428d15473bbbf723
| 389
|
py
|
Python
|
djangoProject/webApp/serializers.py
|
ChenxuanZhao/wireless-fire-alarm-software-system
|
6800eda7c96e55fdca8fab5b3a0cb09f05df2416
|
[
"Apache-2.0"
] | null | null | null |
djangoProject/webApp/serializers.py
|
ChenxuanZhao/wireless-fire-alarm-software-system
|
6800eda7c96e55fdca8fab5b3a0cb09f05df2416
|
[
"Apache-2.0"
] | null | null | null |
djangoProject/webApp/serializers.py
|
ChenxuanZhao/wireless-fire-alarm-software-system
|
6800eda7c96e55fdca8fab5b3a0cb09f05df2416
|
[
"Apache-2.0"
] | null | null | null |
from rest_framework import serializers
from webApp import models
class UserSensorDataSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = models.UserSensorDataModel
fields = '__all__'
class UserSensorConfigSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = models.UserSensorConfigModel
fields = '__all__'
| 25.933333
| 73
| 0.763496
| 31
| 389
| 9.290323
| 0.548387
| 0.256944
| 0.291667
| 0.319444
| 0.395833
| 0.395833
| 0
| 0
| 0
| 0
| 0
| 0
| 0.18509
| 389
| 14
| 74
| 27.785714
| 0.908517
| 0
| 0
| 0.4
| 0
| 0
| 0.03599
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 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
| 0
| 1
| 0
|
0
| 4
|
5fae141279fdcd78e44f50440c425422c24401c9
| 93
|
py
|
Python
|
pagerduty/apps.py
|
faceit/response
|
7ed9114c0adc6542605666a13b0f77757f75c882
|
[
"MIT"
] | 1
|
2019-06-11T13:30:50.000Z
|
2019-06-11T13:30:50.000Z
|
pagerduty/apps.py
|
faceit/response
|
7ed9114c0adc6542605666a13b0f77757f75c882
|
[
"MIT"
] | 9
|
2020-03-24T18:14:57.000Z
|
2022-02-10T10:15:04.000Z
|
pagerduty/apps.py
|
joshedney/slack-incident-bot
|
186b34bbc8f10c66adf76d39af1b6cf2be45d249
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class PagerdutyConfig(AppConfig):
name = 'pagerduty'
| 15.5
| 33
| 0.763441
| 10
| 93
| 7.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16129
| 93
| 5
| 34
| 18.6
| 0.910256
| 0
| 0
| 0
| 0
| 0
| 0.096774
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5fb4fafc2f9a6155ffd94cf0c62b46316d6ec8aa
| 162
|
py
|
Python
|
src/decisionengine_modules/GCE/sources/GCEBillingInfoSourceProxy.py
|
hyunwoo18/decisionengine_modules
|
a67462628c2074e768d0825edee4ee5d570030e0
|
[
"BSD-3-Clause"
] | null | null | null |
src/decisionengine_modules/GCE/sources/GCEBillingInfoSourceProxy.py
|
hyunwoo18/decisionengine_modules
|
a67462628c2074e768d0825edee4ee5d570030e0
|
[
"BSD-3-Clause"
] | null | null | null |
src/decisionengine_modules/GCE/sources/GCEBillingInfoSourceProxy.py
|
hyunwoo18/decisionengine_modules
|
a67462628c2074e768d0825edee4ee5d570030e0
|
[
"BSD-3-Clause"
] | null | null | null |
from decisionengine.framework.modules import Source, SourceProxy
GCEBillingInfoSourceProxy = SourceProxy.SourceProxy
Source.describe(GCEBillingInfoSourceProxy)
| 27
| 64
| 0.882716
| 13
| 162
| 11
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.067901
| 162
| 5
| 65
| 32.4
| 0.94702
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5fd45b99e8a56565886c431dfd7dff3e520bf59f
| 474
|
py
|
Python
|
python/day04/print_square.py
|
houbin/recipes
|
2ca4008ae2409bfbc79fd6b664d492a616e745a8
|
[
"MIT"
] | null | null | null |
python/day04/print_square.py
|
houbin/recipes
|
2ca4008ae2409bfbc79fd6b664d492a616e745a8
|
[
"MIT"
] | null | null | null |
python/day04/print_square.py
|
houbin/recipes
|
2ca4008ae2409bfbc79fd6b664d492a616e745a8
|
[
"MIT"
] | null | null | null |
import math
for x in range(0, 6):
y = 0
while y <= x:
print('*', end='')
y += 1
print()
print()
for x in range(0, 6):
for y in range(0, 6):
if y < x:
print(' ', end = '')
elif y >= x:
print('*', end = '')
print()
print()
for x in range(0, 5):
for y in range(0, 10):
if abs(y - 4) <= x:
print('*', end = '')
else:
print(' ', end = '')
print()
| 14.8125
| 32
| 0.367089
| 66
| 474
| 2.636364
| 0.30303
| 0.201149
| 0.229885
| 0.189655
| 0.471264
| 0.333333
| 0.252874
| 0
| 0
| 0
| 0
| 0.05283
| 0.440928
| 474
| 31
| 33
| 15.290323
| 0.603774
| 0
| 0
| 0.521739
| 0
| 0
| 0.010616
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.043478
| 0
| 0.043478
| 0.434783
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
399d1fb18fe1f000fb3e2ebf8ad67404baf01897
| 215
|
py
|
Python
|
tests/unit/conftest.py
|
victor198511/signal-interpreter-server
|
8133f52e28f83f7b2d6cfe521ff24f4af19e08d7
|
[
"MIT"
] | null | null | null |
tests/unit/conftest.py
|
victor198511/signal-interpreter-server
|
8133f52e28f83f7b2d6cfe521ff24f4af19e08d7
|
[
"MIT"
] | null | null | null |
tests/unit/conftest.py
|
victor198511/signal-interpreter-server
|
8133f52e28f83f7b2d6cfe521ff24f4af19e08d7
|
[
"MIT"
] | null | null | null |
# conftest.py
import pytest
from signal_interpreter_server.parser_factory import ParserFactory
@pytest.fixture
def parser_factory_instance():
my_parser_factory = ParserFactory()
return my_parser_factory
| 17.916667
| 66
| 0.818605
| 26
| 215
| 6.423077
| 0.615385
| 0.311377
| 0.179641
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130233
| 215
| 11
| 67
| 19.545455
| 0.893048
| 0.051163
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
399db5fcfedfef8c1983f34476673ee179af2d6f
| 117
|
py
|
Python
|
django_walletpass/__init__.py
|
Develatio/django-passbook
|
38de7dd55709c8c090511cb9f7a2e59417ab2fb9
|
[
"MIT",
"BSD-3-Clause"
] | 7
|
2020-03-31T00:02:00.000Z
|
2021-07-11T19:10:49.000Z
|
django_walletpass/__init__.py
|
Develatio/django-passbook
|
38de7dd55709c8c090511cb9f7a2e59417ab2fb9
|
[
"MIT",
"BSD-3-Clause"
] | 4
|
2019-06-08T09:43:17.000Z
|
2020-11-16T23:06:43.000Z
|
django_walletpass/__init__.py
|
Develatio/django-passbook
|
38de7dd55709c8c090511cb9f7a2e59417ab2fb9
|
[
"MIT",
"BSD-3-Clause"
] | 6
|
2020-01-21T12:08:07.000Z
|
2022-03-31T17:40:31.000Z
|
# pylint: disable=invalid-name
VERSION = '1.0'
default_app_config = 'django_walletpass.apps.DjangoWalletpassConfig'
| 23.4
| 68
| 0.803419
| 14
| 117
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018692
| 0.08547
| 117
| 4
| 69
| 29.25
| 0.831776
| 0.239316
| 0
| 0
| 0
| 0
| 0.551724
| 0.517241
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.5
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
39ae64f6b79234804ecd48c2775b3b82fbc742de
| 4,878
|
py
|
Python
|
molo/profiles/migrations/0013_add_location_gender_education_level_fields.py
|
Ishma59/molo
|
4fd31df9266bc251e09e9339a132d3ccd4143c69
|
[
"BSD-2-Clause"
] | 25
|
2015-09-26T13:45:30.000Z
|
2018-09-13T14:12:20.000Z
|
molo/profiles/migrations/0013_add_location_gender_education_level_fields.py
|
Ishma59/molo
|
4fd31df9266bc251e09e9339a132d3ccd4143c69
|
[
"BSD-2-Clause"
] | 510
|
2015-05-29T09:30:44.000Z
|
2018-12-11T09:08:11.000Z
|
molo/profiles/migrations/0013_add_location_gender_education_level_fields.py
|
Ishma59/molo
|
4fd31df9266bc251e09e9339a132d3ccd4143c69
|
[
"BSD-2-Clause"
] | 5
|
2020-03-26T19:30:13.000Z
|
2020-09-04T16:35:59.000Z
|
# -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2017-03-28 07:49
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profiles', '0012_userprofilessettings_terms_and_conditions'),
]
operations = [
migrations.AddField(
model_name='userprofile',
name='education_level',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='userprofile',
name='gender',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='userprofile',
name='location',
field=models.CharField(blank=True, max_length=128, null=True),
),
migrations.AddField(
model_name='userprofilessettings',
name='activate_display_name',
field=models.BooleanField(default=True, verbose_name='Activate Display Name'),
),
migrations.AddField(
model_name='userprofilessettings',
name='activate_dob',
field=models.BooleanField(default=True, verbose_name='Activate Date Of Birth'),
),
migrations.AddField(
model_name='userprofilessettings',
name='activate_education_level',
field=models.BooleanField(default=False, verbose_name='Activate Education Level'),
),
migrations.AddField(
model_name='userprofilessettings',
name='activate_education_level_required',
field=models.BooleanField(default=False, verbose_name='Education Level Required'),
),
migrations.AddField(
model_name='userprofilessettings',
name='activate_gender',
field=models.BooleanField(default=False, verbose_name='Activate Gender'),
),
migrations.AddField(
model_name='userprofilessettings',
name='activate_location',
field=models.BooleanField(default=False, verbose_name='Activate Location'),
),
migrations.AddField(
model_name='userprofilessettings',
name='capture_display_name_on_reg',
field=models.BooleanField(default=False, help_text='If Display Name is activated, and Capture On Registration is not activated, The display name field will be captured on done page.', verbose_name='Capture On Registration'),
),
migrations.AddField(
model_name='userprofilessettings',
name='capture_dob_on_reg',
field=models.BooleanField(default=False, help_text='If Date Of Birth is activated, and Capture On Registration is not activated, The Date Of Birth field will be captured on done page.', verbose_name='Capture On Registration'),
),
migrations.AddField(
model_name='userprofilessettings',
name='capture_education_level_on_reg',
field=models.BooleanField(default=False, help_text='If Education Level is activated, and Capture On Registration is not activated, The Education Level field will be captured on done page.', verbose_name='Capture On Registration'),
),
migrations.AddField(
model_name='userprofilessettings',
name='capture_gender_on_reg',
field=models.BooleanField(default=False, help_text='If Gender is activated, and Capture On Registration is not activated, The Gender field will be captured on done page.', verbose_name='Capture On Registration'),
),
migrations.AddField(
model_name='userprofilessettings',
name='capture_location_on_reg',
field=models.BooleanField(default=False, help_text='If Location is activated, and Capture On Registration is not activated, The Location field will be captured on done page.', verbose_name='Capture On Registration'),
),
migrations.AddField(
model_name='userprofilessettings',
name='display_name_required',
field=models.BooleanField(default=False, verbose_name='Display Name Required'),
),
migrations.AddField(
model_name='userprofilessettings',
name='dob_required',
field=models.BooleanField(default=False, verbose_name='Date Of Birth Required'),
),
migrations.AddField(
model_name='userprofilessettings',
name='gender_required',
field=models.BooleanField(default=False, verbose_name='Gender Required'),
),
migrations.AddField(
model_name='userprofilessettings',
name='location_required',
field=models.BooleanField(default=False, verbose_name='Location Required'),
),
]
| 46.018868
| 242
| 0.649036
| 493
| 4,878
| 6.25355
| 0.15213
| 0.105092
| 0.134285
| 0.157639
| 0.821927
| 0.821927
| 0.808304
| 0.661693
| 0.487188
| 0.439831
| 0
| 0.00826
| 0.255433
| 4,878
| 105
| 243
| 46.457143
| 0.840584
| 0.01394
| 0
| 0.581633
| 1
| 0.05102
| 0.346994
| 0.051175
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.020408
| 0
| 0.05102
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
39b4cf191ce3581317fb9be5497bff70278a38c7
| 164
|
py
|
Python
|
dapiclient/MNDiscovery/masternode_list.py
|
egbinola/dapi-client-py
|
b73be6b6a5096c57accf69772ba4ff9f67e9aade
|
[
"MIT"
] | 1
|
2021-11-16T16:20:21.000Z
|
2021-11-16T16:20:21.000Z
|
dapiclient/MNDiscovery/masternode_list.py
|
mayoreee/dapi-client-py
|
b73be6b6a5096c57accf69772ba4ff9f67e9aade
|
[
"MIT"
] | null | null | null |
dapiclient/MNDiscovery/masternode_list.py
|
mayoreee/dapi-client-py
|
b73be6b6a5096c57accf69772ba4ff9f67e9aade
|
[
"MIT"
] | null | null | null |
# From dashcore-lib
class SimplifiedMNList:
pass
class SimplifiedMNListDiff:
pass
class MerkleBlock:
pass
class BlockHeader:
pass
| 11.714286
| 28
| 0.664634
| 15
| 164
| 7.266667
| 0.6
| 0.247706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.29878
| 164
| 13
| 29
| 12.615385
| 0.947826
| 0.103659
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
39c0b67b0774f53c03b53826de9fbbc82328d0b7
| 206
|
py
|
Python
|
python/testdbconnector.py
|
AungWinnHtut/POL
|
ee8bdf655073134df8b8529ab0ece20e118b19e1
|
[
"MIT"
] | 2
|
2016-02-10T10:22:13.000Z
|
2020-01-19T09:49:28.000Z
|
python/testdbconnector.py
|
AungWinnHtut/POL
|
ee8bdf655073134df8b8529ab0ece20e118b19e1
|
[
"MIT"
] | null | null | null |
python/testdbconnector.py
|
AungWinnHtut/POL
|
ee8bdf655073134df8b8529ab0ece20e118b19e1
|
[
"MIT"
] | 1
|
2020-01-19T09:22:29.000Z
|
2020-01-19T09:22:29.000Z
|
#!/usr/bin/python
import mysql.connector
cnx = mysql.connector.connect(user='root', password='',
host='127.0.0.1',
database='test')
cnx.close()
| 22.888889
| 55
| 0.495146
| 22
| 206
| 4.636364
| 0.818182
| 0.27451
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044776
| 0.349515
| 206
| 8
| 56
| 25.75
| 0.716418
| 0.07767
| 0
| 0
| 0
| 0
| 0.090426
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.2
| 0.2
| 0
| 0.2
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
39f518556591e6f3fad4f9dd528ec8a95f59c84e
| 11,014
|
py
|
Python
|
sdk/python/pulumi_sumologic/cse_insights_resolution.py
|
pulumi/pulumi-sumologic
|
962fa056ee4b96e61a200e7bf2308bfad723c3af
|
[
"ECL-2.0",
"Apache-2.0"
] | 1
|
2021-10-13T03:50:41.000Z
|
2021-10-13T03:50:41.000Z
|
sdk/python/pulumi_sumologic/cse_insights_resolution.py
|
pulumi/pulumi-sumologic
|
962fa056ee4b96e61a200e7bf2308bfad723c3af
|
[
"ECL-2.0",
"Apache-2.0"
] | 28
|
2021-05-21T11:00:45.000Z
|
2022-03-31T15:47:13.000Z
|
sdk/python/pulumi_sumologic/cse_insights_resolution.py
|
pulumi/pulumi-sumologic
|
962fa056ee4b96e61a200e7bf2308bfad723c3af
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
__all__ = ['CseInsightsResolutionArgs', 'CseInsightsResolution']
@pulumi.input_type
class CseInsightsResolutionArgs:
def __init__(__self__, *,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
parent: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a CseInsightsResolution resource.
:param pulumi.Input[str] description: The description of the insights resolution.
:param pulumi.Input[str] name: The name of the insights resolution.
:param pulumi.Input[str] parent: The name of the built-in parent insights resolution. Supported values: "Resolved", "False Positive", "No Action", "Duplicate"
"""
if description is not None:
pulumi.set(__self__, "description", description)
if name is not None:
pulumi.set(__self__, "name", name)
if parent is not None:
pulumi.set(__self__, "parent", parent)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
The description of the insights resolution.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the insights resolution.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def parent(self) -> Optional[pulumi.Input[str]]:
"""
The name of the built-in parent insights resolution. Supported values: "Resolved", "False Positive", "No Action", "Duplicate"
"""
return pulumi.get(self, "parent")
@parent.setter
def parent(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "parent", value)
@pulumi.input_type
class _CseInsightsResolutionState:
def __init__(__self__, *,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
parent: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering CseInsightsResolution resources.
:param pulumi.Input[str] description: The description of the insights resolution.
:param pulumi.Input[str] name: The name of the insights resolution.
:param pulumi.Input[str] parent: The name of the built-in parent insights resolution. Supported values: "Resolved", "False Positive", "No Action", "Duplicate"
"""
if description is not None:
pulumi.set(__self__, "description", description)
if name is not None:
pulumi.set(__self__, "name", name)
if parent is not None:
pulumi.set(__self__, "parent", parent)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
The description of the insights resolution.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the insights resolution.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def parent(self) -> Optional[pulumi.Input[str]]:
"""
The name of the built-in parent insights resolution. Supported values: "Resolved", "False Positive", "No Action", "Duplicate"
"""
return pulumi.get(self, "parent")
@parent.setter
def parent(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "parent", value)
class CseInsightsResolution(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
parent: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Provides a Sumologic CSE Insights Resolution. When an insight gets closed, a resolution indicates why it got closed.
## Example Usage
```python
import pulumi
import pulumi_sumologic as sumologic
insights_resolution = sumologic.CseInsightsResolution("insightsResolution",
description="New description",
parent="No Action")
```
## Import
Insights Resolution can be imported using the field id, e.g.hcl
```sh
$ pulumi import sumologic:index/cseInsightsResolution:CseInsightsResolution insights_resolution id
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] description: The description of the insights resolution.
:param pulumi.Input[str] name: The name of the insights resolution.
:param pulumi.Input[str] parent: The name of the built-in parent insights resolution. Supported values: "Resolved", "False Positive", "No Action", "Duplicate"
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: Optional[CseInsightsResolutionArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Provides a Sumologic CSE Insights Resolution. When an insight gets closed, a resolution indicates why it got closed.
## Example Usage
```python
import pulumi
import pulumi_sumologic as sumologic
insights_resolution = sumologic.CseInsightsResolution("insightsResolution",
description="New description",
parent="No Action")
```
## Import
Insights Resolution can be imported using the field id, e.g.hcl
```sh
$ pulumi import sumologic:index/cseInsightsResolution:CseInsightsResolution insights_resolution id
```
:param str resource_name: The name of the resource.
:param CseInsightsResolutionArgs 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(CseInsightsResolutionArgs, 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,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
parent: 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.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__ = CseInsightsResolutionArgs.__new__(CseInsightsResolutionArgs)
__props__.__dict__["description"] = description
__props__.__dict__["name"] = name
__props__.__dict__["parent"] = parent
super(CseInsightsResolution, __self__).__init__(
'sumologic:index/cseInsightsResolution:CseInsightsResolution',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
parent: Optional[pulumi.Input[str]] = None) -> 'CseInsightsResolution':
"""
Get an existing CseInsightsResolution 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.
:param pulumi.Input[str] description: The description of the insights resolution.
:param pulumi.Input[str] name: The name of the insights resolution.
:param pulumi.Input[str] parent: The name of the built-in parent insights resolution. Supported values: "Resolved", "False Positive", "No Action", "Duplicate"
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _CseInsightsResolutionState.__new__(_CseInsightsResolutionState)
__props__.__dict__["description"] = description
__props__.__dict__["name"] = name
__props__.__dict__["parent"] = parent
return CseInsightsResolution(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
"""
The description of the insights resolution.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
The name of the insights resolution.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter
def parent(self) -> pulumi.Output[Optional[str]]:
"""
The name of the built-in parent insights resolution. Supported values: "Resolved", "False Positive", "No Action", "Duplicate"
"""
return pulumi.get(self, "parent")
| 39.335714
| 166
| 0.638097
| 1,181
| 11,014
| 5.762066
| 0.132091
| 0.069508
| 0.08435
| 0.087289
| 0.740485
| 0.720059
| 0.699192
| 0.687583
| 0.680088
| 0.680088
| 0
| 0.000123
| 0.262484
| 11,014
| 279
| 167
| 39.476703
| 0.837622
| 0.355729
| 0
| 0.701389
| 1
| 0
| 0.073819
| 0.019706
| 0
| 0
| 0
| 0
| 0
| 1
| 0.152778
| false
| 0.006944
| 0.034722
| 0
| 0.277778
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f2dba9fc0bf3563a7e338d5ec0ca7f892fcec741
| 200
|
py
|
Python
|
users/models.py
|
creativechern/django-blog
|
fc1249601287268d290619e4a0267d2ad36987be
|
[
"MIT"
] | null | null | null |
users/models.py
|
creativechern/django-blog
|
fc1249601287268d290619e4a0267d2ad36987be
|
[
"MIT"
] | null | null | null |
users/models.py
|
creativechern/django-blog
|
fc1249601287268d290619e4a0267d2ad36987be
|
[
"MIT"
] | null | null | null |
from django.contrib.auth.models import AbstractUser
from django.db import models
# Create your models here.
class CustomUser(AbstractUser):
date_of_birth = models.DateField(blank=True, null=True)
| 33.333333
| 59
| 0.805
| 28
| 200
| 5.678571
| 0.714286
| 0.125786
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115
| 200
| 6
| 59
| 33.333333
| 0.898305
| 0.12
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f2eac0be0d44ab844b2b69b800ada0d1fa2c513b
| 39
|
py
|
Python
|
notebooks/solutions/visualize_01.py
|
cpaniaguam/pandas-head-to-tail
|
c809b6ae5834057c51006ecc908266e6d5d05b15
|
[
"CC-BY-4.0"
] | 88
|
2016-12-29T06:49:10.000Z
|
2022-03-19T20:37:27.000Z
|
notebooks/solutions/visualize_01.py
|
paritosh666/pandas-head-to-tail
|
891a72ea5a21f8e0c8f6a6d22c03a1de26a6f30b
|
[
"CC-BY-4.0"
] | 8
|
2018-06-17T21:47:27.000Z
|
2018-07-11T22:31:17.000Z
|
notebooks/solutions/visualize_01.py
|
paritosh666/pandas-head-to-tail
|
891a72ea5a21f8e0c8f6a6d22c03a1de26a6f30b
|
[
"CC-BY-4.0"
] | 76
|
2016-12-30T08:56:28.000Z
|
2022-02-27T08:05:26.000Z
|
sns.factorplot('age', 'class', data=t);
| 39
| 39
| 0.666667
| 6
| 39
| 4.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.051282
| 39
| 1
| 39
| 39
| 0.702703
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8403d0bef159b813a5d82f2b117c6f7b5c8fa053
| 259
|
py
|
Python
|
easy/reverse_left_words.py
|
SeulYoung/leetcode
|
a3d7c0d025b20f1bba3daddd7681e2a211b83d90
|
[
"BSD-3-Clause"
] | null | null | null |
easy/reverse_left_words.py
|
SeulYoung/leetcode
|
a3d7c0d025b20f1bba3daddd7681e2a211b83d90
|
[
"BSD-3-Clause"
] | null | null | null |
easy/reverse_left_words.py
|
SeulYoung/leetcode
|
a3d7c0d025b20f1bba3daddd7681e2a211b83d90
|
[
"BSD-3-Clause"
] | null | null | null |
def reverseLeftWords(s: str, n: int) -> str:
return s[n:] + s[:n]
def reverseLeftWords(s: str, n: int) -> str:
str_list = []
length = len(s)
for i in range(n, n + length):
str_list.append(s[i % length])
return ''.join(str_list)
| 21.583333
| 44
| 0.567568
| 41
| 259
| 3.512195
| 0.390244
| 0.145833
| 0.277778
| 0.319444
| 0.416667
| 0.416667
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0.258687
| 259
| 11
| 45
| 23.545455
| 0.75
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.125
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
84305ad7ab66b7fd4c062523fdc54cdb0834c664
| 197
|
py
|
Python
|
graphite_feeder/handler/event/appliance/sound/player/volume.py
|
majamassarini/automate-graphite-feeder
|
0f17f99bbdaab86e10e0b7d424d055ff44fc4ca0
|
[
"MIT"
] | null | null | null |
graphite_feeder/handler/event/appliance/sound/player/volume.py
|
majamassarini/automate-graphite-feeder
|
0f17f99bbdaab86e10e0b7d424d055ff44fc4ca0
|
[
"MIT"
] | null | null | null |
graphite_feeder/handler/event/appliance/sound/player/volume.py
|
majamassarini/automate-graphite-feeder
|
0f17f99bbdaab86e10e0b7d424d055ff44fc4ca0
|
[
"MIT"
] | null | null | null |
import home
from graphite_feeder.handler.event.appliance.int import Handler as Parent
class Handler(Parent):
KLASS = home.appliance.sound.player.event.volume.Event
TITLE = "Volume (%)"
| 19.7
| 73
| 0.751269
| 26
| 197
| 5.653846
| 0.653846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147208
| 197
| 9
| 74
| 21.888889
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0.050761
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
8457aaa1e65b6ebd297ba12d5fdb369bb48c93ac
| 690
|
py
|
Python
|
Misc/shmoofotlp.py
|
nxkennedy/misc-scripts
|
441211008c9141ab7cac0eac58496c285c67e699
|
[
"MIT"
] | null | null | null |
Misc/shmoofotlp.py
|
nxkennedy/misc-scripts
|
441211008c9141ab7cac0eac58496c285c67e699
|
[
"MIT"
] | null | null | null |
Misc/shmoofotlp.py
|
nxkennedy/misc-scripts
|
441211008c9141ab7cac0eac58496c285c67e699
|
[
"MIT"
] | null | null | null |
import datetime
import webbrowser
import sys
print "\n[+] Shmoocon Front of the Line Pass"
print "[+] Author: Nolan Kennedy (nxkennedy)"
if len(sys.argv) > 1:
print "\n[+] Description:\n\tThis script will open a new browser window at a predetermined \n\ttime to hopefully get a spot in the shmoocon ticket queue."
print "[+] Usage: Requires no args!\n\t'python shmoofotlp.py'\n"
exit(0)
print "\n[-] Waiting to jump in line for tickets at the strike of noon..."
while True:
if datetime.datetime(2017, 11, 1, 12) == datetime.datetime.now():
webbrowser.open_new("http://landing.shmoocon.org/")
print "[+] Quick! A browser window just opened! Go claim your tickets!"
| 40.588235
| 156
| 0.701449
| 108
| 690
| 4.472222
| 0.648148
| 0.037267
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019231
| 0.171014
| 690
| 17
| 157
| 40.588235
| 0.825175
| 0
| 0
| 0
| 0
| 0.071429
| 0.641481
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.071429
| 0.214286
| null | null | 0.428571
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
|
0
| 4
|
fff071aee02efc0d14ea358b60d8efbd8b47e69a
| 201
|
py
|
Python
|
wsgi.py
|
deodates-dev/UAV-PX4-Log-DataComets
|
78c163348574a5f45aee4dd6c4e704a2f8ec1736
|
[
"MIT"
] | 27
|
2019-08-12T20:01:53.000Z
|
2022-01-06T02:57:08.000Z
|
wsgi.py
|
deodates-dev/UAV-PX4-Log-DataComets
|
78c163348574a5f45aee4dd6c4e704a2f8ec1736
|
[
"MIT"
] | 6
|
2019-08-28T14:35:52.000Z
|
2020-03-23T16:45:21.000Z
|
wsgi.py
|
deodates-dev/UAV-PX4-Log-DataComets
|
78c163348574a5f45aee4dd6c4e704a2f8ec1736
|
[
"MIT"
] | 11
|
2019-08-12T22:42:07.000Z
|
2021-09-02T13:09:20.000Z
|
import sys
# add your project directory to the sys.path
project_home = u'.'
if project_home not in sys.path:
sys.path = [project_home] + sys.path
from DataComets import app as application
| 25.125
| 45
| 0.721393
| 32
| 201
| 4.4375
| 0.59375
| 0.197183
| 0.197183
| 0.253521
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208955
| 201
| 8
| 46
| 25.125
| 0.893082
| 0.208955
| 0
| 0
| 0
| 0
| 0.006623
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
fff6060a4babbef6eaa9ac1d584c5603240dc606
| 546
|
py
|
Python
|
pynacl/lib/__init__.py
|
cohortfsllc/cohort-cocl2-sandbox
|
0ac6669d1a459d65a52007b80d5cffa4ef330287
|
[
"BSD-3-Clause"
] | 2,151
|
2020-04-18T07:31:17.000Z
|
2022-03-31T08:39:18.000Z
|
pynacl/lib/__init__.py
|
cohortfsllc/cohort-cocl2-sandbox
|
0ac6669d1a459d65a52007b80d5cffa4ef330287
|
[
"BSD-3-Clause"
] | 395
|
2020-04-18T08:22:18.000Z
|
2021-12-08T13:04:49.000Z
|
pynacl/lib/__init__.py
|
cohortfsllc/cohort-cocl2-sandbox
|
0ac6669d1a459d65a52007b80d5cffa4ef330287
|
[
"BSD-3-Clause"
] | 338
|
2020-04-18T08:03:10.000Z
|
2022-03-29T12:33:22.000Z
|
#!/usr/bin/python
# Copyright (c) 2014 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Unfortunately python does not have a good way to deal with module name
# clashes. The easiest way to get around it is to use a layer of indirection.
# For example, if pynacl.platform needs to use the python root platform module,
# it should import lib instead and use lib.platform.
# List name clashed modules here in alphabetical order
import platform
| 42
| 79
| 0.772894
| 93
| 546
| 4.537634
| 0.72043
| 0.023697
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008929
| 0.179487
| 546
| 12
| 80
| 45.5
| 0.933036
| 0.934066
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
fff869ada235684054824b443d2ee3a07629f4db
| 135
|
py
|
Python
|
A/432A.py
|
johnggo/Codeforces-Solutions
|
4127ae6f72294b5781fb94c42b69cfef570aae42
|
[
"MIT"
] | 1
|
2020-08-25T19:59:11.000Z
|
2020-08-25T19:59:11.000Z
|
A/432A.py
|
johnggo/Codeforces-Solutions
|
4127ae6f72294b5781fb94c42b69cfef570aae42
|
[
"MIT"
] | null | null | null |
A/432A.py
|
johnggo/Codeforces-Solutions
|
4127ae6f72294b5781fb94c42b69cfef570aae42
|
[
"MIT"
] | null | null | null |
n, k = map(int, input().split())
y = sorted(map(int, input().split()))
sol = 0
for i in y:
if k <= (5-i):
sol += 1
print(sol//3)
| 16.875
| 37
| 0.518519
| 27
| 135
| 2.592593
| 0.666667
| 0.171429
| 0.314286
| 0.457143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038095
| 0.222222
| 135
| 7
| 38
| 19.285714
| 0.628571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.142857
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
081a5c4768dab7133a9b59a881669880d1c1e222
| 407
|
py
|
Python
|
Cursos/Alura/DesignPatternsPython1/Capitulo01/Exemplos/impostos_exemplo1.py
|
ramonvaleriano/python-
|
ada70918e945e8f2d3b59555e9ccc35cf0178dbd
|
[
"MIT"
] | null | null | null |
Cursos/Alura/DesignPatternsPython1/Capitulo01/Exemplos/impostos_exemplo1.py
|
ramonvaleriano/python-
|
ada70918e945e8f2d3b59555e9ccc35cf0178dbd
|
[
"MIT"
] | null | null | null |
Cursos/Alura/DesignPatternsPython1/Capitulo01/Exemplos/impostos_exemplo1.py
|
ramonvaleriano/python-
|
ada70918e945e8f2d3b59555e9ccc35cf0178dbd
|
[
"MIT"
] | null | null | null |
# Program: impostos_exemplo1.py
# Author: Ramon R. Valeriano
# Description: Todas as funções, metodos para se calculos os impostos
# Developed: 16/04/2021 - 21:13
# Updated: 16/04/2021 - 21:23 - Vamos deixar nossos orientado a objetos
class ISS:
def calcula(self, orcamento):
return orcamento.valor * 0.1
class ICMS:
def calcula(self, orcamento):
return orcamento.valor * 0.06
| 25.4375
| 73
| 0.700246
| 58
| 407
| 4.896552
| 0.741379
| 0.028169
| 0.056338
| 0.070423
| 0.309859
| 0.309859
| 0.309859
| 0.309859
| 0
| 0
| 0
| 0.092879
| 0.206388
| 407
| 15
| 74
| 27.133333
| 0.786378
| 0.555283
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
081d85807b21142dfe45fa14e08cd5800376eaac
| 790
|
py
|
Python
|
dsbattle_api_app/core/models/models.py
|
dertty/dsbattleapi
|
90615097fcf8c64a07e3fc510597bb8c7b4b5f6e
|
[
"MIT"
] | null | null | null |
dsbattle_api_app/core/models/models.py
|
dertty/dsbattleapi
|
90615097fcf8c64a07e3fc510597bb8c7b4b5f6e
|
[
"MIT"
] | null | null | null |
dsbattle_api_app/core/models/models.py
|
dertty/dsbattleapi
|
90615097fcf8c64a07e3fc510597bb8c7b4b5f6e
|
[
"MIT"
] | null | null | null |
from dsbattle_api_app.core.database import Base
from sqlalchemy import Column, Integer, Float, VARCHAR, DateTime
class Submit(Base):
__tablename__ = "dsbt_submits"
id = Column(Integer, primary_key=True, index=True)
bid = Column(Integer, nullable=False, index=True)
hid = Column(Integer, nullable=False, index=True)
submit_dt = Column(DateTime, nullable=False)
uid = Column(Integer, nullable=False, index=True)
precission = Column(Float, nullable=False, default=0)
private_score = Column(Float, nullable=False, default=0)
public_score = Column(Float, nullable=False, default=0)
recall = Column(Float, nullable=False, default=0)
comment = Column(VARCHAR(100), nullable=False, default=0)
f_measure = Column(Float, nullable=False, default=0)
| 39.5
| 64
| 0.731646
| 103
| 790
| 5.495146
| 0.398058
| 0.229682
| 0.212014
| 0.222615
| 0.485866
| 0.485866
| 0.130742
| 0
| 0
| 0
| 0
| 0.013493
| 0.155696
| 790
| 19
| 65
| 41.578947
| 0.835082
| 0
| 0
| 0
| 0
| 0
| 0.01519
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.133333
| 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
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
082d5958cfdde3a61d7ff7ffd362e27ee6d7f5db
| 137
|
py
|
Python
|
Survey_Form/Survey_Form/apps/survey_form/apps.py
|
py1-10-2017/rgero215_PY1-10-2017
|
f455b335ec9c8c850571f3a75dcd95759b4cfdad
|
[
"Unlicense"
] | 1
|
2018-05-10T21:29:45.000Z
|
2018-05-10T21:29:45.000Z
|
Survey_Form/Survey_Form/apps/survey_form/apps.py
|
py1-10-2017/rgero215_PY1-10-2017
|
f455b335ec9c8c850571f3a75dcd95759b4cfdad
|
[
"Unlicense"
] | null | null | null |
Survey_Form/Survey_Form/apps/survey_form/apps.py
|
py1-10-2017/rgero215_PY1-10-2017
|
f455b335ec9c8c850571f3a75dcd95759b4cfdad
|
[
"Unlicense"
] | null | null | null |
from __future__ import unicode_literals
from django.apps import AppConfig
class SurveyFormConfig(AppConfig):
name = 'survey_form'
| 17.125
| 39
| 0.80292
| 16
| 137
| 6.5
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145985
| 137
| 7
| 40
| 19.571429
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0.080292
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f2380a6ca0a81c031e5a6d5599c3a357d8138231
| 160
|
py
|
Python
|
Exercicios-Desafios python/Exercicios Resolvidos/ex005.py
|
ThiagoPereira232/python-curso-em-video-mundo01
|
9cecf3f91672ec5a1fa85ca5d018e158b0d31bae
|
[
"MIT"
] | null | null | null |
Exercicios-Desafios python/Exercicios Resolvidos/ex005.py
|
ThiagoPereira232/python-curso-em-video-mundo01
|
9cecf3f91672ec5a1fa85ca5d018e158b0d31bae
|
[
"MIT"
] | null | null | null |
Exercicios-Desafios python/Exercicios Resolvidos/ex005.py
|
ThiagoPereira232/python-curso-em-video-mundo01
|
9cecf3f91672ec5a1fa85ca5d018e158b0d31bae
|
[
"MIT"
] | null | null | null |
n = int(input('\033[Digite um número: \033[m'))
print('Analisando o valor \033[33m{}\033[m, seu antecessor é {} e o sucessor é {}'.format(n, (n - 1), (n + 1)))
| 53.333333
| 111
| 0.60625
| 30
| 160
| 3.233333
| 0.666667
| 0.082474
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118519
| 0.15625
| 160
| 2
| 112
| 80
| 0.6
| 0
| 0
| 0
| 0
| 0.5
| 0.64375
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
f239cdcac49b4c9f46789c77dd2d4888d1c70dbd
| 35
|
py
|
Python
|
tests/feito/fixtures/analyze_file.py
|
magrathealabs/feito
|
4179e40233ccf6e5a6c9892e528595690ce9ef43
|
[
"MIT"
] | 18
|
2018-02-11T16:22:36.000Z
|
2021-06-30T19:16:49.000Z
|
tests/feito/fixtures/analyze_file.py
|
magrathealabs/feito
|
4179e40233ccf6e5a6c9892e528595690ce9ef43
|
[
"MIT"
] | 15
|
2018-02-22T12:21:12.000Z
|
2018-03-11T18:09:47.000Z
|
tests/feito/fixtures/analyze_file.py
|
magrathealabs/feito
|
4179e40233ccf6e5a6c9892e528595690ce9ef43
|
[
"MIT"
] | null | null | null |
def hi():
return "bla bla"
| 11.666667
| 20
| 0.485714
| 5
| 35
| 3.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.371429
| 35
| 2
| 21
| 17.5
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f2436bee8efc1de7b59a2094bf34dd9b0cc72f8b
| 135
|
py
|
Python
|
api/app/models/__init__.py
|
logan-connolly/mychef
|
ce7d7dc58bb6169aef7d3d8b7b1f457295a736bd
|
[
"MIT"
] | 40
|
2020-09-15T16:39:35.000Z
|
2022-03-20T12:49:45.000Z
|
api/app/models/__init__.py
|
logan-connolly/mychef
|
ce7d7dc58bb6169aef7d3d8b7b1f457295a736bd
|
[
"MIT"
] | 34
|
2020-03-28T08:36:59.000Z
|
2022-03-30T06:07:17.000Z
|
api/app/models/__init__.py
|
logan-connolly/mychef
|
ce7d7dc58bb6169aef7d3d8b7b1f457295a736bd
|
[
"MIT"
] | 5
|
2021-09-29T22:15:04.000Z
|
2022-03-31T20:32:57.000Z
|
from .ingredient import Ingredient
from .recipe import Recipe
from .source import Source
__all__ = ["Ingredient", "Recipe", "Source"]
| 22.5
| 44
| 0.762963
| 16
| 135
| 6.1875
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 135
| 5
| 45
| 27
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0.162963
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f2463c06fa7aa5fd4020aa6b14088d5a051b2ffb
| 161
|
py
|
Python
|
ProfessionalChess/21.ProfessionalChess.py
|
Amirkhaksar/QueraQuestion
|
1042aef6a04cc798b0ed2847124ea1a45a007c47
|
[
"BSD-3-Clause"
] | null | null | null |
ProfessionalChess/21.ProfessionalChess.py
|
Amirkhaksar/QueraQuestion
|
1042aef6a04cc798b0ed2847124ea1a45a007c47
|
[
"BSD-3-Clause"
] | null | null | null |
ProfessionalChess/21.ProfessionalChess.py
|
Amirkhaksar/QueraQuestion
|
1042aef6a04cc798b0ed2847124ea1a45a007c47
|
[
"BSD-3-Clause"
] | null | null | null |
li = []
inp = input()
li = inp.split(' ' , 5)
print(1-int(li[0]),' ',1-int(li[1]),' ',2-int(li[2]),' ',2-int(li[3]),' ',2-int(li[4]),' ',8-int(li[5]), end = '')
| 32.2
| 114
| 0.440994
| 33
| 161
| 2.151515
| 0.424242
| 0.422535
| 0.253521
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092857
| 0.130435
| 161
| 4
| 115
| 40.25
| 0.414286
| 0
| 0
| 0
| 0
| 0
| 0.037267
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 0
| 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
| 4
|
f2b9a61789b059f7c8af1279730647b20dd1042d
| 532
|
py
|
Python
|
001132StepikITclassPy/Stepik001132ITclassPyсh02p01st08THEORY02_20200610.py
|
SafonovMikhail/python_000577
|
739f764e80f1ca354386f00b8e9db1df8c96531d
|
[
"Apache-2.0"
] | null | null | null |
001132StepikITclassPy/Stepik001132ITclassPyсh02p01st08THEORY02_20200610.py
|
SafonovMikhail/python_000577
|
739f764e80f1ca354386f00b8e9db1df8c96531d
|
[
"Apache-2.0"
] | null | null | null |
001132StepikITclassPy/Stepik001132ITclassPyсh02p01st08THEORY02_20200610.py
|
SafonovMikhail/python_000577
|
739f764e80f1ca354386f00b8e9db1df8c96531d
|
[
"Apache-2.0"
] | null | null | null |
'''
Stepik001132ITclassPyсh02p01st08THEORY02_20200610.py
'''
a, b, c = 'x', 'y', 'z'
print('{} {} {}'.format(a, b, c))
a, b, c = "xyz"
print('{} {} {}'.format(a, b, c))
a, b, c = 1, 2, 3
print('{} {} {}'.format(a, b, c))
a, b, *c, d, e = 1, 2, 3, 4, 5, 6, 7
print('{} {} {} {} {}'.format(a, b, c, d, e))
print(*c,sep='-')
*a, b, c, d, e = 1, 2, 3, 4, 5, 6, 7
print('{} {} {} {} {}'.format(a, b, c, d, e))
print(*a,sep='-')
a, b, c, d, *e = 1, 2, 3, 4, 5, 6, 7
print('{} {} {} {} {}'.format(a, b, c, d, e))
print(*e,sep='*')
#
| 20.461538
| 52
| 0.417293
| 100
| 532
| 2.21
| 0.22
| 0.108597
| 0.162896
| 0.352941
| 0.692308
| 0.692308
| 0.692308
| 0.692308
| 0.475113
| 0.475113
| 0
| 0.109785
| 0.212406
| 532
| 26
| 53
| 20.461538
| 0.417661
| 0.097744
| 0
| 0.4
| 0
| 0
| 0.158898
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.6
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
f2ba0a7136026aa7a31843c33342d4c251fa5f47
| 85
|
py
|
Python
|
data/studio21_generated/interview/1810/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/interview/1810/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/interview/1810/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
class Solution:
def getFolderNames(self, names: List[str]) -> List[str]:
| 28.333333
| 60
| 0.623529
| 10
| 85
| 5.3
| 0.8
| 0.264151
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.235294
| 85
| 3
| 61
| 28.333333
| 0.815385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f2c8c2d54ffabce1025af3b05532c95ed190de6a
| 125
|
py
|
Python
|
module.py
|
ingleashish/python-learning
|
fb08ce037a9fc1ba323190c1109d26ba8f656484
|
[
"MIT"
] | null | null | null |
module.py
|
ingleashish/python-learning
|
fb08ce037a9fc1ba323190c1109d26ba8f656484
|
[
"MIT"
] | null | null | null |
module.py
|
ingleashish/python-learning
|
fb08ce037a9fc1ba323190c1109d26ba8f656484
|
[
"MIT"
] | null | null | null |
def my_first_module_func():
print('you are using my first created module')
def console_log(message):
print(message)
| 20.833333
| 50
| 0.736
| 19
| 125
| 4.631579
| 0.684211
| 0.159091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168
| 125
| 5
| 51
| 25
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0.296
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
4b2ebdf16b89b290512bbf0d0638b25ff88590d2
| 113
|
py
|
Python
|
VENV/lib/python3.6/site-packages/pandas/core/groupby/__init__.py
|
workingyifei/display-pattern-generator
|
b27be84c6221fa93833f283109870737b05bfbf6
|
[
"MIT"
] | 69
|
2020-03-31T06:40:17.000Z
|
2022-02-25T11:48:18.000Z
|
venv/lib/python3.7/site-packages/pandas/core/groupby/__init__.py
|
John1001Song/Big-Data-Robo-Adviser
|
9444dce96954c546333d5aecc92a06c3bfd19aa5
|
[
"MIT"
] | 8
|
2019-12-04T23:44:11.000Z
|
2022-02-10T08:31:40.000Z
|
venv/lib/python3.7/site-packages/pandas/core/groupby/__init__.py
|
John1001Song/Big-Data-Robo-Adviser
|
9444dce96954c546333d5aecc92a06c3bfd19aa5
|
[
"MIT"
] | 28
|
2020-04-15T15:24:17.000Z
|
2021-12-26T04:05:02.000Z
|
# flake8: noqa
from pandas.core.groupby.groupby import (
Grouper, GroupBy, SeriesGroupBy, DataFrameGroupBy
)
| 22.6
| 53
| 0.769912
| 12
| 113
| 7.25
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010309
| 0.141593
| 113
| 4
| 54
| 28.25
| 0.886598
| 0.106195
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
4b3235d8d4c1be54b52d9e1e495e966fa8ad57f4
| 50
|
py
|
Python
|
user-ms/app/utils/config.py
|
s260895/ada22
|
4a5cc1668d593021fc272e1d47936c5b8b52e1e5
|
[
"MIT"
] | null | null | null |
user-ms/app/utils/config.py
|
s260895/ada22
|
4a5cc1668d593021fc272e1d47936c5b8b52e1e5
|
[
"MIT"
] | null | null | null |
user-ms/app/utils/config.py
|
s260895/ada22
|
4a5cc1668d593021fc272e1d47936c5b8b52e1e5
|
[
"MIT"
] | null | null | null |
DB_URL = "postgres://test:test@user-ms-pgdb/test"
| 25
| 49
| 0.72
| 9
| 50
| 3.888889
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06
| 50
| 1
| 50
| 50
| 0.744681
| 0
| 0
| 0
| 0
| 0
| 0.76
| 0.76
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4b6e36dec34fce4d035ba0bc2dfe70678a012a69
| 1,611
|
py
|
Python
|
setup.py
|
cprogrammer1994/vkjson
|
24951359fbd8b38a140aa7a7bbdae2805b19a8c7
|
[
"MIT"
] | 1
|
2020-02-25T15:31:57.000Z
|
2020-02-25T15:31:57.000Z
|
setup.py
|
vkjson/vkjson
|
24951359fbd8b38a140aa7a7bbdae2805b19a8c7
|
[
"MIT"
] | null | null | null |
setup.py
|
vkjson/vkjson
|
24951359fbd8b38a140aa7a7bbdae2805b19a8c7
|
[
"MIT"
] | null | null | null |
from setuptools import Extension, setup
ext = Extension(
name='vkjson',
sources=[
'./src/commands.cpp',
'./src/commands/create/create_instance.cpp',
'./src/commands/custom/export.cpp',
'./src/commands/custom/import.cpp',
'./src/parse.cpp',
'./src/run_scope.cpp',
'./src/vkjson.cpp',
],
depends=[
'.src/allocator.hpp',
'.src/cache_command.hpp',
'.src/cache_scope.hpp',
'.src/commands.hpp',
'.src/common.hpp',
'.src/parse.hpp',
'.src/run_scope.hpp',
'.src/symbols.hpp',
'.src/variable.hpp',
'./include/vulkan/vk_icd.h',
'./include/vulkan/vk_layer.h',
'./include/vulkan/vk_platform.h',
'./include/vulkan/vk_sdk_platform.h',
'./include/vulkan/vulkan_android.h',
'./include/vulkan/vulkan_core.h',
'./include/vulkan/vulkan_fuchsia.h',
'./include/vulkan/vulkan_ggp.h',
'./include/vulkan/vulkan_ios.h',
'./include/vulkan/vulkan_macos.h',
'./include/vulkan/vulkan_metal.h',
'./include/vulkan/vulkan_vi.h',
'./include/vulkan/vulkan_wayland.h',
'./include/vulkan/vulkan_win32.h',
'./include/vulkan/vulkan_xcb.h',
'./include/vulkan/vulkan_xlib_xrandr.h',
'./include/vulkan/vulkan_xlib.h',
'./include/vulkan/vulkan.h',
],
include_dirs=['include', 'src'],
extra_compile_args=['-fpermissive'],
libraries=['vulkan-1'],
)
setup(
name='vkjson',
version='0.1.0',
ext_modules=[ext],
py_modules=['_vkjson'],
)
| 29.833333
| 52
| 0.569212
| 185
| 1,611
| 4.794595
| 0.318919
| 0.263811
| 0.26832
| 0.315671
| 0.054115
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004874
| 0.235878
| 1,611
| 53
| 53
| 30.396226
| 0.715678
| 0
| 0
| 0.078431
| 0
| 0
| 0.57666
| 0.417132
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.039216
| 0
| 0.039216
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4b8fcb171c025168559236f60a54bae5a5c9fea1
| 647
|
py
|
Python
|
producer/config.py
|
svorcan/aws-prod-con
|
5adb89dc4e7f535624dcbcff833f8da1ab4e0930
|
[
"MIT"
] | null | null | null |
producer/config.py
|
svorcan/aws-prod-con
|
5adb89dc4e7f535624dcbcff833f8da1ab4e0930
|
[
"MIT"
] | 8
|
2021-02-02T22:07:43.000Z
|
2022-03-11T23:42:53.000Z
|
producer/config.py
|
stalker92/aws-prod-con
|
5adb89dc4e7f535624dcbcff833f8da1ab4e0930
|
[
"MIT"
] | null | null | null |
from common.config import get_env_variable_value, get_secret_value
class ProductionConfig:
"""Production application configuration - pulled from task environment."""
CLIENT_ID = get_env_variable_value('CLIENT_ID', is_mandatory=True)
QUEUE_URL = get_env_variable_value('CLIENT_SQS_URL', is_mandatory=True)
SFTP_HOST = get_env_variable_value('SFTP_HOST', is_mandatory=True)
SFTP_PORT = get_env_variable_value('SFTP_PORT', is_mandatory=True)
SFTP_USERNAME = get_secret_value('SFTP_USER', is_mandatory=True)
SFTP_PASSWORD = get_secret_value('SFTP_PASSWORD', is_mandatory=True)
TEMP_FILE_PATH = '/tmp/sftp_tmp.json'
| 43.133333
| 78
| 0.788253
| 92
| 647
| 5.076087
| 0.391304
| 0.141328
| 0.192719
| 0.203426
| 0.205567
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120556
| 647
| 14
| 79
| 46.214286
| 0.820738
| 0.1051
| 0
| 0
| 0
| 0
| 0.141361
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.111111
| 0.111111
| 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
| 0
| 0
| 1
| 0
|
0
| 4
|
4b9f07a8d6accfc551748b418500612d7ee4a7fe
| 114
|
py
|
Python
|
cococrawler/exceptions/__init__.py
|
wpkong/cococrawler
|
77fa5f77214749a8a9726a87b914ba4ab78b97f4
|
[
"MIT"
] | 1
|
2017-05-27T15:18:28.000Z
|
2017-05-27T15:18:28.000Z
|
cococrawler/exceptions/__init__.py
|
yjxkwp/cococrawler
|
77fa5f77214749a8a9726a87b914ba4ab78b97f4
|
[
"MIT"
] | null | null | null |
cococrawler/exceptions/__init__.py
|
yjxkwp/cococrawler
|
77fa5f77214749a8a9726a87b914ba4ab78b97f4
|
[
"MIT"
] | null | null | null |
# -*- coding:utf-8 -*-
class CocoException(Exception):
pass
class CoCoRuntimeError(RuntimeError):
pass
| 12.666667
| 37
| 0.684211
| 11
| 114
| 7.090909
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010753
| 0.184211
| 114
| 9
| 38
| 12.666667
| 0.827957
| 0.175439
| 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 | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
299391ba18e5c22e35d9562becaa450ae0565f84
| 158
|
py
|
Python
|
clustre/helpers/__init__.py
|
srakrnxKU/adversarial-project
|
b75b45d4e24461b804db5ab2b4b28217ed09908f
|
[
"MIT"
] | 3
|
2020-08-07T12:13:14.000Z
|
2020-12-11T02:26:17.000Z
|
clustre/helpers/__init__.py
|
srakrnxKU/adversarial-project
|
b75b45d4e24461b804db5ab2b4b28217ed09908f
|
[
"MIT"
] | 5
|
2021-04-30T21:07:02.000Z
|
2022-01-25T11:50:36.000Z
|
clustre/helpers/__init__.py
|
srakrnxKU/adversarial-project
|
b75b45d4e24461b804db5ab2b4b28217ed09908f
|
[
"MIT"
] | null | null | null |
from clustre.helpers._time import (
delta_time_string,
delta_tostr,
format_time,
get_time,
)
from clustre.helpers._weights import init_params
| 19.75
| 48
| 0.753165
| 21
| 158
| 5.285714
| 0.619048
| 0.198198
| 0.324324
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.183544
| 158
| 7
| 49
| 22.571429
| 0.860465
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.285714
| 0
| 0.285714
| 0
| 1
| 0
| 0
| null | 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
| 0
| 0
| 0
| 0
|
0
| 4
|
29b3e2246587b11ab0cfe07ce6b99cc54ea01060
| 190
|
py
|
Python
|
example/views.py
|
sebleier/django-limehouse
|
7f480255f149f1b983ed4922fde8f987f5931e51
|
[
"BSD-3-Clause"
] | 6
|
2015-03-10T14:18:26.000Z
|
2020-12-27T19:40:55.000Z
|
example/views.py
|
sebleier/django-limehouse
|
7f480255f149f1b983ed4922fde8f987f5931e51
|
[
"BSD-3-Clause"
] | null | null | null |
example/views.py
|
sebleier/django-limehouse
|
7f480255f149f1b983ed4922fde8f987f5931e51
|
[
"BSD-3-Clause"
] | null | null | null |
from django.shortcuts import render
from blog.models import Entry
def homepage(request):
entries = Entry.objects.all()
return render(request, 'homepage.html', {'entries': entries})
| 27.142857
| 65
| 0.742105
| 24
| 190
| 5.875
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142105
| 190
| 7
| 65
| 27.142857
| 0.865031
| 0
| 0
| 0
| 0
| 0
| 0.104712
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
29c3dcb6cf319082c75e8a2885ba2d1ebebb75e1
| 4,551
|
py
|
Python
|
tests/test_lists.py
|
peter-conalgo/redis-collections
|
e8369078a45e6ac8b56c46acd935117ea92e4bb1
|
[
"0BSD"
] | null | null | null |
tests/test_lists.py
|
peter-conalgo/redis-collections
|
e8369078a45e6ac8b56c46acd935117ea92e4bb1
|
[
"0BSD"
] | null | null | null |
tests/test_lists.py
|
peter-conalgo/redis-collections
|
e8369078a45e6ac8b56c46acd935117ea92e4bb1
|
[
"0BSD"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from .base import RedisTestCase
from redis_collections import List
class ListTest(RedisTestCase):
def create_list(self, *args, **kwargs):
kwargs['redis'] = self.redis
return List(*args, **kwargs)
def test_init(self):
l = self.create_list([1, 2, 3])
self.assertEqual(list(l), [1, 2, 3])
l = self.create_list('abc')
self.assertEqual(list(l), ['a', 'b', 'c'])
l = self.create_list()
self.assertEqual(list(l), [])
def test_in(self):
l = self.create_list([1, 2, 3])
self.assertTrue(2 in l)
self.assertFalse(42 in l)
self.assertFalse(2 not in l)
self.assertTrue(42 not in l)
def test_concat(self):
l1 = self.create_list([1, 2, 3])
l2 = self.create_list([1, 4, 5])
self.assertEqual(list(l1 + l2), [1, 2, 3, 1, 4, 5])
self.assertEqual(list(l1 * 2), [1, 2, 3, 1, 2, 3])
self.assertEqual(list(2 * l1), [1, 2, 3, 1, 2, 3])
self.assertEqual(list(l1 * 0), [])
self.assertEqual(list(l1 * -1), [])
def test_set_get_overflow(self):
l = self.create_list([1, 2, 3])
def get_overflow(l):
return l[42]
def set_overflow(l):
l[42] = 5
self.assertRaises(IndexError, get_overflow, l)
self.assertRaises(IndexError, set_overflow, l)
self.assertEqual(l.get(42), None)
self.assertEqual(l.get(1), 2)
def test_index_count(self):
l = self.create_list([1, 2, 3])
self.assertEqual(l[0], 1)
self.assertEqual(l[1], 2)
self.assertEqual(l[2], 3)
self.assertEqual(l[-1], 3)
self.assertEqual(l[-2], 2)
self.assertEqual(l[-3], 1)
self.assertRaises(IndexError, lambda: l[42])
self.assertRaises(IndexError, lambda: l[-42])
l = self.create_list([1, 2, 3, 2, 3])
self.assertEqual(l.index(2), 1)
self.assertEqual(l.index(2, 2), 3)
self.assertRaises(ValueError, l.index, 2, 2, 3)
self.assertEqual(l.count(2), 2)
def test_slice(self):
l = self.create_list([1, 2, 3])
self.assertEqual(list(l[0:1]), [1])
self.assertEqual(list(l[0:2]), [1, 2])
self.assertEqual(list(l[:]), [1, 2, 3])
self.assertEqual(list(l[0:-1]), [1, 2])
self.assertEqual(list(l[1:]), [2, 3])
self.assertEqual(list(l[1::1]), [2, 3])
self.assertEqual(list(l[1::2]), [2])
def test_len_min_max(self):
l = self.create_list([1, 2, 3])
self.assertEqual(len(l), 3)
self.assertEqual(min(l), 1)
self.assertEqual(max(l), 3)
def test_mutable(self):
l = self.create_list([1, 2, 3])
l[2] = 42
self.assertEqual(l[2], 42)
l[1:] = []
self.assertEqual(list(l), [1])
l.append(2013)
self.assertEqual(list(l), [1, 2013])
def test_del(self):
l = self.create_list([1, 2013])
del l[0]
self.assertEqual(list(l), [2013])
del l[1:]
self.assertEqual(list(l), [2013])
l.append(5)
self.assertEqual(list(l), [2013, 5])
l[1] = 8
self.assertEqual(list(l), [2013, 8])
del l[1:]
self.assertEqual(list(l), [2013])
def test_extend_insert(self):
l = self.create_list([2013])
l.extend([4, 5, 6, 7])
self.assertEqual(list(l), [2013, 4, 5, 6, 7])
l.insert(0, 3)
self.assertEqual(list(l), [3, 2013, 4, 5, 6, 7]) # insert does not replace
def test_pop_remove(self):
l = self.create_list([3, 4, 5, 6, 7])
self.assertEqual(l.pop(), 7)
self.assertEqual(list(l), [3, 4, 5, 6])
self.assertEqual(l.pop(0), 3)
self.assertEqual(list(l), [4, 5, 6])
l.extend([4, 5, 6])
l.remove(4)
self.assertEqual(list(l), [5, 6, 4, 5, 6])
def test_slice_trim(self):
l = self.create_list([5, 6, 4, 5, 6])
l[2:] = []
self.assertEqual(list(l), [5, 6])
def test_reverse(self):
l = self.create_list([1, 2, 3])
l.reverse()
self.assertEqual(list(l), [3, 2, 1])
def test_lset_issue(self):
for l in ( [1], self.create_list([1]) ):
l.insert(0, 5)
self.assertEqual(list(l), [5, 1])
l.insert(0, 6)
self.assertEqual(list(l), [6, 5, 1])
l.append(7)
self.assertEqual(list(l), [6, 5, 1, 7])
if __name__ == '__main__':
unittest.main()
| 30.543624
| 85
| 0.531532
| 678
| 4,551
| 3.486726
| 0.116519
| 0.310914
| 0.257191
| 0.228426
| 0.521997
| 0.370981
| 0.252115
| 0.204315
| 0.170051
| 0.107022
| 0
| 0.081891
| 0.288947
| 4,551
| 148
| 86
| 30.75
| 0.64864
| 0.014502
| 0
| 0.108333
| 0
| 0
| 0.004239
| 0
| 0
| 0
| 0
| 0
| 0.483333
| 1
| 0.141667
| false
| 0
| 0.025
| 0.008333
| 0.191667
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
29d5d7bd0c818b94476ac5a3652e5bb4231cba8a
| 184
|
py
|
Python
|
tests/test_basic.py
|
wpilibsuite/sphinxext-delta
|
1ce65493eb26db0e8d9575b7b3ddc1737963077a
|
[
"BSD-3-Clause"
] | 2
|
2022-01-24T09:49:16.000Z
|
2022-01-24T17:06:59.000Z
|
tests/test_basic.py
|
wpilibsuite/sphinxext-delta
|
1ce65493eb26db0e8d9575b7b3ddc1737963077a
|
[
"BSD-3-Clause"
] | 5
|
2021-04-01T04:11:09.000Z
|
2021-10-10T22:41:18.000Z
|
tests/test_basic.py
|
wpilibsuite/sphinxext-delta
|
1ce65493eb26db0e8d9575b7b3ddc1737963077a
|
[
"BSD-3-Clause"
] | 1
|
2021-04-01T04:12:33.000Z
|
2021-04-01T04:12:33.000Z
|
import pytest
from sphinx.application import Sphinx
from sphinx import version_info
@pytest.mark.sphinx("html", testroot="basic")
def test_simple_short(app: Sphinx):
assert True
| 20.444444
| 45
| 0.788043
| 26
| 184
| 5.461538
| 0.692308
| 0.140845
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 184
| 8
| 46
| 23
| 0.881988
| 0
| 0
| 0
| 0
| 0
| 0.048913
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 1
| 0.166667
| false
| 0
| 0.5
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
29dc4bd25d1b6644f45d7b87ac25125b8edbc06e
| 79
|
py
|
Python
|
django_migration_utils/__init__.py
|
mcldev/django-migration-utils
|
deccb0a6e1dfc3b4c5e786cfe5c45445894f8daa
|
[
"MIT"
] | null | null | null |
django_migration_utils/__init__.py
|
mcldev/django-migration-utils
|
deccb0a6e1dfc3b4c5e786cfe5c45445894f8daa
|
[
"MIT"
] | null | null | null |
django_migration_utils/__init__.py
|
mcldev/django-migration-utils
|
deccb0a6e1dfc3b4c5e786cfe5c45445894f8daa
|
[
"MIT"
] | null | null | null |
default_app_config = 'django_migration_utils.apps.DjangoMigrationUtilsConfig'
| 26.333333
| 77
| 0.886076
| 8
| 79
| 8.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.050633
| 79
| 2
| 78
| 39.5
| 0.88
| 0
| 0
| 0
| 0
| 0
| 0.692308
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
29ef49461cbd398d16fa9c3d88124e27061be0f6
| 241
|
py
|
Python
|
samples/Python-ResourceEstimation/mpmct_resources.py
|
msoeken/qram
|
a485109378488f4fb678eb99629976811c575c0d
|
[
"MIT"
] | 44
|
2020-06-07T22:33:16.000Z
|
2022-03-09T01:26:44.000Z
|
samples/Python-ResourceEstimation/mpmct_resources.py
|
msoeken/qram
|
a485109378488f4fb678eb99629976811c575c0d
|
[
"MIT"
] | 35
|
2020-05-16T18:38:01.000Z
|
2021-07-08T06:22:36.000Z
|
samples/Python-ResourceEstimation/mpmct_resources.py
|
msoeken/qram
|
a485109378488f4fb678eb99629976811c575c0d
|
[
"MIT"
] | 12
|
2020-06-21T11:33:17.000Z
|
2021-09-20T17:03:20.000Z
|
# Resources for an MPMCT with n controls
def mpmct_depth(n):
return 28*n - 60
def mpmct_t_c(n):
return 12*n - 20
def mpmct_t_d(n):
return 4*(n-2)
def mpmct_h_c(n):
return 4*n - 6
def mpmct_cnot_c(n):
return 24*n - 40
| 15.0625
| 40
| 0.634855
| 51
| 241
| 2.823529
| 0.470588
| 0.277778
| 0.166667
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088398
| 0.248963
| 241
| 15
| 41
| 16.066667
| 0.707182
| 0.157676
| 0
| 0
| 0
| 0
| 0
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
4b184a6848ba90e1b0933a3542b786ec193f4f85
| 95
|
py
|
Python
|
format4.py
|
andreroche/Test-Scripts
|
3d2b93900b8cd4e234fe909fc41ae0e4e2a43263
|
[
"Apache-2.0"
] | null | null | null |
format4.py
|
andreroche/Test-Scripts
|
3d2b93900b8cd4e234fe909fc41ae0e4e2a43263
|
[
"Apache-2.0"
] | null | null | null |
format4.py
|
andreroche/Test-Scripts
|
3d2b93900b8cd4e234fe909fc41ae0e4e2a43263
|
[
"Apache-2.0"
] | null | null | null |
for i in range (1,11):
print ('{:2d} {:2d} {:4d} {:5d}'.format(i, i**2, i**3, i**4))
| 31.666667
| 66
| 0.421053
| 19
| 95
| 2.105263
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138889
| 0.242105
| 95
| 3
| 67
| 31.666667
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0.244681
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
d9a1a2bd856f9308bc77955c61b9f6ad86f09d20
| 80
|
py
|
Python
|
main.py
|
kctzstyle/first-flask-tutorial
|
6dffe948e28aa4c2b254b6fcdb9af3deb0c6422d
|
[
"MIT"
] | null | null | null |
main.py
|
kctzstyle/first-flask-tutorial
|
6dffe948e28aa4c2b254b6fcdb9af3deb0c6422d
|
[
"MIT"
] | null | null | null |
main.py
|
kctzstyle/first-flask-tutorial
|
6dffe948e28aa4c2b254b6fcdb9af3deb0c6422d
|
[
"MIT"
] | null | null | null |
from app import Application
if __name__ == '__main__':
Application.run()
| 11.428571
| 27
| 0.7
| 9
| 80
| 5.333333
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 80
| 6
| 28
| 13.333333
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.101266
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d9bdb891a55249ea1240fce75e245e1b6fd9c9c2
| 274
|
py
|
Python
|
sample_register/sample_register/doctype/equipment_make/test_equipment_make.py
|
TRUFIL/sampreg
|
d14155954b3a22b0a727d61e55f3619ade448379
|
[
"MIT"
] | null | null | null |
sample_register/sample_register/doctype/equipment_make/test_equipment_make.py
|
TRUFIL/sampreg
|
d14155954b3a22b0a727d61e55f3619ade448379
|
[
"MIT"
] | null | null | null |
sample_register/sample_register/doctype/equipment_make/test_equipment_make.py
|
TRUFIL/sampreg
|
d14155954b3a22b0a727d61e55f3619ade448379
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# Copyright (c) 2015, indictrans and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
# test_records = frappe.get_test_records('Equipment Make')
class TestEquipmentMake(unittest.TestCase):
pass
| 21.076923
| 58
| 0.777372
| 34
| 274
| 6.029412
| 0.823529
| 0.107317
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020921
| 0.127737
| 274
| 12
| 59
| 22.833333
| 0.83682
| 0.518248
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.2
| 0.6
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
d9e3591059e9fb902020a6d7aa5ddc53398eb1c2
| 5,170
|
py
|
Python
|
problem11.py
|
tooringtest/project-euler
|
092e24c8e5e3ffad5fe5bf4933d11fcb64bc4a9b
|
[
"MIT"
] | null | null | null |
problem11.py
|
tooringtest/project-euler
|
092e24c8e5e3ffad5fe5bf4933d11fcb64bc4a9b
|
[
"MIT"
] | null | null | null |
problem11.py
|
tooringtest/project-euler
|
092e24c8e5e3ffad5fe5bf4933d11fcb64bc4a9b
|
[
"MIT"
] | null | null | null |
'''
In the 20x20 grid below, four numbers along a diagonal line have been
marked in red.
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50
32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70
67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21
24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72
21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95
78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92
16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57
86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58
19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40
04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66
88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69
04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36
20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16
20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48
The product of these numbers is 26 X 63 X 78 X 14 = 1788696.
What is the greatest product of four adjacent numbers in the same
direction (up, down, left, right, or diagonally) in the 20X20 grid?
'''
GRID = [
[8, 2, 22, 97, 38, 15, 0, 40, 0, 75, 4, 5, 7, 78, 52, 12, 50, 77, 91, 8,],
[49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, 43, 69, 48, 04, 56, 62, 0,],
[81, 49, 31, 73, 55, 79, 14, 29, 93, 71, 40, 67, 53, 88, 30, 03, 49, 13, 36, 65,],
[52, 70, 95, 23, 04, 60, 11, 42, 69, 24, 68, 56, 01, 32, 56, 71, 37, 02, 36, 91,],
[22, 31, 16, 71, 51, 67, 63, 89, 41, 92, 36, 54, 22, 40, 40, 28, 66, 33, 13, 80,],
[24, 47, 32, 60, 99, 03, 45, 02, 44, 75, 33, 53, 78, 36, 84, 20, 35, 17, 12, 50,],
[32, 98, 81, 28, 64, 23, 67, 10, 26, 38, 40, 67, 59, 54, 70, 66, 18, 38, 64, 70,],
[67, 26, 20, 68, 02, 62, 12, 20, 95, 63, 94, 39, 63, 8, 40, 91, 66, 49, 94, 21,],
[24, 55, 58, 5, 66, 73, 99, 26, 97, 17, 78, 78, 96, 83, 14, 88, 34, 89, 63, 72,],
[21, 36, 23, 9, 75, 00, 76, 44, 20, 45, 35, 14, 0, 61, 33, 97, 34, 31, 33, 95,],
[78, 17, 53, 28, 22, 75, 31, 67, 15, 94, 03, 80, 4, 62, 16, 14, 9, 53, 56, 92,],
[16, 39, 5, 42, 96, 35, 31, 47, 55, 58, 88, 24, 0, 17, 54, 24, 36, 29, 85, 57,],
[86, 56, 0, 48, 35, 71, 89, 07, 05, 44, 44, 37, 44, 60, 21, 58, 51, 54, 17, 58,],
[19, 80, 81, 68, 05, 94, 47, 69, 28, 73, 92, 13, 86, 52, 17, 77, 04, 89, 55, 40,],
[04, 52, 8, 83, 97, 35, 99, 16, 7, 97, 57, 32, 16, 26, 26, 79, 33, 27, 98, 66,],
[88, 36, 68, 87, 57, 62, 20, 72, 3, 46, 33, 67, 46, 55, 12, 32, 63, 93, 53, 69,],
[04, 42, 16, 73, 38, 25, 39, 11, 24, 94, 72, 18, 8, 46, 29, 32, 40, 62, 76, 36,],
[20, 69, 36, 41, 72, 30, 23, 88, 34, 62, 99, 69, 82, 67, 59, 85, 74, 04, 36, 16,],
[20, 73, 35, 29, 78, 31, 90, 01, 74, 31, 49, 71, 48, 86, 81, 16, 23, 57, 05, 54,],
[1, 70, 54, 71, 83, 51, 54, 69, 16, 92, 33, 48, 61, 43, 52, 1, 89, 19, 67, 48,]
]
def all_fours(l):
for i in xrange(0, len(l) - 4):
yield l[i:i + 4]
def all_lines(grid):
cols = len(grid[0])
rows = len(grid)
print("%s x %s" % (rows, cols))
al = []
# Rows
for r in xrange(rows):
al.append(grid[r])
al.append(list(reversed(grid[r])))
# Cols
for c in xrange(cols):
col = [grid[r][c] for r in xrange(rows)]
al.append(col)
al.append(list(reversed(col)))
# Diags
for r in xrange(rows):
for c in xrange(cols):
def generate_col_diag(dirn=True):
if dirn:
x = c
y = r
while x < cols and y < rows:
# print("(%d, %d)" % (x, y))
yield grid[y][x]
x += 1
y += 1
else:
x = c
y = r
while x >= 0 and y < rows:
# print("(%d, %d)" % (x, y))
yield grid[y][x]
x -= 1
y += 1
diag_left = [x for x in generate_col_diag()]
al.append(diag_left)
al.append(list(reversed(diag_left)))
diag_right = [x for x in generate_col_diag(False)]
al.append(diag_right)
al.append(list(reversed(diag_right)))
return al
def find_largest_fp(grid):
prods = [four[0] * four[1] * four[2] * four[3]
for line in all_lines(grid) for four in all_fours(line)]
print(prods)
largest_fp = 0
for fp in prods:
if fp > largest_fp:
largest_fp = fp
return largest_fp
if __name__ == '__main__':
'''
largest_fp = 0
for line in all_lines(GRID):
for four in all_fours(line):
fp = four[0] * four[1] * four[2] * four[3]
print(fp)
if fp > largest_fp:
largest_fp = fp
'''
fp = find_largest_fp(GRID)
print(fp)
| 41.36
| 82
| 0.520116
| 1,123
| 5,170
| 2.361532
| 0.160285
| 0.030543
| 0.0181
| 0.030166
| 0.714932
| 0.66365
| 0.647059
| 0.594268
| 0.567119
| 0.526395
| 0
| 0.47407
| 0.339845
| 5,170
| 124
| 83
| 41.693548
| 0.302959
| 0.013346
| 0
| 0.164384
| 0
| 0
| 0.004459
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.041096
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d9fe19d68691b6240dfba1074d7c344c6409d7df
| 24
|
py
|
Python
|
learn2learn/_version.py
|
Guitaricet/learn2learn
|
3c847047dbdb69f6a074f0274218018cb46746a6
|
[
"MIT"
] | null | null | null |
learn2learn/_version.py
|
Guitaricet/learn2learn
|
3c847047dbdb69f6a074f0274218018cb46746a6
|
[
"MIT"
] | null | null | null |
learn2learn/_version.py
|
Guitaricet/learn2learn
|
3c847047dbdb69f6a074f0274218018cb46746a6
|
[
"MIT"
] | null | null | null |
__version__ = '0.0.5.1'
| 12
| 23
| 0.625
| 5
| 24
| 2.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.190476
| 0.125
| 24
| 1
| 24
| 24
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0.291667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8a11aa90849140252b268e95617ad2f8a19fbde1
| 655
|
py
|
Python
|
plant/simple/Fluctuation.py
|
crazzle/PyPoSim
|
c114c379894d90ae844b0310aa513d315dc53568
|
[
"Unlicense"
] | 11
|
2016-02-26T08:34:49.000Z
|
2021-03-07T20:06:22.000Z
|
plant/simple/Fluctuation.py
|
crazzle/PyPoSim
|
c114c379894d90ae844b0310aa513d315dc53568
|
[
"Unlicense"
] | null | null | null |
plant/simple/Fluctuation.py
|
crazzle/PyPoSim
|
c114c379894d90ae844b0310aa513d315dc53568
|
[
"Unlicense"
] | 4
|
2018-02-12T15:44:17.000Z
|
2021-02-12T02:21:08.000Z
|
import random
class Fluctuation:
def __init__(self, percentage, baseline):
self.percentage = percentage
self.baseline = baseline
def __call__(self, value):
return self.apply(value)
def apply(self, value):
return value + self.generate(self.baseline)
def generate(self, baseline):
relative_value = self.get_relative_value(baseline)
corridor = (-relative_value, relative_value)
return random.randint(corridor[0], corridor[1])
def get_relative_value(self, baseline):
relative_value = float(baseline) / 100.0 * float(self.percentage)
return int(relative_value)
| 27.291667
| 73
| 0.676336
| 75
| 655
| 5.68
| 0.306667
| 0.213615
| 0.070423
| 0.117371
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011881
| 0.229008
| 655
| 23
| 74
| 28.478261
| 0.831683
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3125
| false
| 0
| 0.0625
| 0.125
| 0.6875
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
8a1549eb33d9cd189520971e071880c304cac4fe
| 89
|
py
|
Python
|
src/python_scripts/test.py
|
TCT-Fes/haunted-house2021
|
020a08b3a967606e54d7bd6ef41b9446713fac09
|
[
"Unlicense"
] | null | null | null |
src/python_scripts/test.py
|
TCT-Fes/haunted-house2021
|
020a08b3a967606e54d7bd6ef41b9446713fac09
|
[
"Unlicense"
] | null | null | null |
src/python_scripts/test.py
|
TCT-Fes/haunted-house2021
|
020a08b3a967606e54d7bd6ef41b9446713fac09
|
[
"Unlicense"
] | null | null | null |
import subprocess
subprocess.run("paplay --volume=65536 /home/pi/Kodo.wav", shell=True)
| 22.25
| 69
| 0.764045
| 13
| 89
| 5.230769
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060976
| 0.078652
| 89
| 3
| 70
| 29.666667
| 0.768293
| 0
| 0
| 0
| 0
| 0
| 0.443182
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
8a1a419e46c4cd15493999d3641d096f36cfa86b
| 61
|
py
|
Python
|
bcbiovm/gcp/__init__.py
|
cariaso/bcbio-nextgen-vm
|
b959b30f3269c31216770b6b28ff3bb43a2ae5fb
|
[
"MIT"
] | null | null | null |
bcbiovm/gcp/__init__.py
|
cariaso/bcbio-nextgen-vm
|
b959b30f3269c31216770b6b28ff3bb43a2ae5fb
|
[
"MIT"
] | null | null | null |
bcbiovm/gcp/__init__.py
|
cariaso/bcbio-nextgen-vm
|
b959b30f3269c31216770b6b28ff3bb43a2ae5fb
|
[
"MIT"
] | null | null | null |
"""Functionality to interact with Google Cloud Platform.
"""
| 20.333333
| 56
| 0.754098
| 7
| 61
| 6.571429
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131148
| 61
| 2
| 57
| 30.5
| 0.867925
| 0.868852
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8a29eb3a216e5c5d0f50f3486f307415d7326f84
| 1,305
|
py
|
Python
|
main.py
|
sunudika/siamik2.0
|
52461476bc90a7791812dc3ab8904954e6f5abaa
|
[
"MIT"
] | null | null | null |
main.py
|
sunudika/siamik2.0
|
52461476bc90a7791812dc3ab8904954e6f5abaa
|
[
"MIT"
] | null | null | null |
main.py
|
sunudika/siamik2.0
|
52461476bc90a7791812dc3ab8904954e6f5abaa
|
[
"MIT"
] | null | null | null |
from flask import Flask, render_template, url_for
app = Flask(__name__)
@app.route('/')
def index():
return render_template("index.html")
@app.route('/top_score')
def top_score():
return render_template("top_score.html")
@app.route('/login')
def login():
return render_template("login.html")
@app.route('/manual')
def manual():
return render_template("manual.html")
@app.route('/tracking_ijazah')
def tracking_ijazah():
return render_template("tracking_ijazah.html")
@app.route('/kelas_mkdu')
def kelas_mkdu():
return render_template("kelas_mkdu.html")
@app.route('/katalog_online')
def katalog_online():
return render_template("katalog_online.html")
@app.route('/pendaftaran_wisuda')
def pendaftaran_wisuda():
return render_template("pendaftaran_wisuda.html")
@app.route('/daftar_peserta_mata_kuliah')
def daftar_peserta_mata_kuliah():
return render_template("daftar_peserta_matkul.html")
@app.route('/daftar_peserta_mata_kuliah_mkdu')
def daftar_peserta_mata_kuliah_mkdu():
return render_template("daftar_peserta_matkul_mkdu.html")
@app.route('/kalender_akademik')
def kalender_akademik():
return render_template("kalender_akademik.html")
@app.route('/informasi_skripsi')
def informasi_skripsi():
return render_template("informasi_skripsi.html")
app.run(debug=True)
| 24.622642
| 59
| 0.77318
| 174
| 1,305
| 5.465517
| 0.218391
| 0.191378
| 0.252366
| 0.09674
| 0.218717
| 0.155626
| 0.073607
| 0
| 0
| 0
| 0
| 0
| 0.081992
| 1,305
| 53
| 60
| 24.622642
| 0.793823
| 0
| 0
| 0
| 0
| 0
| 0.308576
| 0.140123
| 0
| 0
| 0
| 0
| 0
| 1
| 0.307692
| false
| 0
| 0.025641
| 0.307692
| 0.641026
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
8a65516bcec82fe86c542c4600149a6acd4daf11
| 312
|
py
|
Python
|
lan/commands/it/model_tpl_mail_html.py
|
bbfpl/Lan
|
60f4a5c2562386b719689c63af0f66a4ebcfa795
|
[
"MIT"
] | null | null | null |
lan/commands/it/model_tpl_mail_html.py
|
bbfpl/Lan
|
60f4a5c2562386b719689c63af0f66a4ebcfa795
|
[
"MIT"
] | null | null | null |
lan/commands/it/model_tpl_mail_html.py
|
bbfpl/Lan
|
60f4a5c2562386b719689c63af0f66a4ebcfa795
|
[
"MIT"
] | null | null | null |
content = '''
<h1>{{title}}</h1>
<p>所有用例:{{all_case_sum}}</p>
<p>成功用例:{{success_case_sum}}</p>
<p>失败用例:{{errors_case_sum}}</p>
<p>跳过用例:{{skipped_case_sum}}</p>
<p><a href="{{report_path}}">报告</a></p>
'''
def get_maile_html_tpl():
return content
if __name__ == '__main__':
print(get_maile_html_tpl())
| 18.352941
| 39
| 0.625
| 51
| 312
| 3.372549
| 0.568627
| 0.162791
| 0.186047
| 0.209302
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007143
| 0.102564
| 312
| 16
| 40
| 19.5
| 0.607143
| 0
| 0
| 0
| 0
| 0
| 0.625
| 0.5
| 0
| 0
| 0
| 0
| 0
| 1
| 0.083333
| false
| 0
| 0
| 0.083333
| 0.166667
| 0.083333
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8a734d40c9657218e4b7c44424cfc10063456df8
| 32
|
py
|
Python
|
kepoin/__init__.py
|
realnoobs/django-kepoin
|
c2bfc023a01e0405853cfad1353ef733e50dfc91
|
[
"MIT"
] | null | null | null |
kepoin/__init__.py
|
realnoobs/django-kepoin
|
c2bfc023a01e0405853cfad1353ef733e50dfc91
|
[
"MIT"
] | null | null | null |
kepoin/__init__.py
|
realnoobs/django-kepoin
|
c2bfc023a01e0405853cfad1353ef733e50dfc91
|
[
"MIT"
] | 1
|
2021-09-12T14:09:41.000Z
|
2021-09-12T14:09:41.000Z
|
VERSION = (0, 0, 1, "alpha", 1)
| 16
| 31
| 0.5
| 6
| 32
| 2.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 0.21875
| 32
| 1
| 32
| 32
| 0.48
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8abade398dea2ffe5748ea8caf3ce0476218477b
| 194
|
py
|
Python
|
example/data/lib/const.py
|
samueldev45/GodityEngine
|
ccc3e04ec711e9a2c30f1ee59e9e32d646a3d557
|
[
"MIT"
] | 8
|
2021-01-25T19:23:27.000Z
|
2021-07-19T14:31:54.000Z
|
example/data/lib/const.py
|
samueldev45/GodityEngine
|
ccc3e04ec711e9a2c30f1ee59e9e32d646a3d557
|
[
"MIT"
] | null | null | null |
example/data/lib/const.py
|
samueldev45/GodityEngine
|
ccc3e04ec711e9a2c30f1ee59e9e32d646a3d557
|
[
"MIT"
] | 2
|
2021-01-25T19:26:15.000Z
|
2021-08-07T00:10:02.000Z
|
from godity.engine import getMonitorSize
MONITOR_SIZE = getMonitorSize()
PIXEL_SIZE = 5
SCREEN_WIDTH = int(MONITOR_SIZE[0] / PIXEL_SIZE)
SCREEN_HEIGHT = int(MONITOR_SIZE[1] / PIXEL_SIZE)
| 27.714286
| 49
| 0.773196
| 27
| 194
| 5.259259
| 0.555556
| 0.232394
| 0.197183
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017964
| 0.139175
| 194
| 7
| 50
| 27.714286
| 0.832335
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8ac040fcafb8fb41b604590e8e557b02775e7181
| 677
|
py
|
Python
|
knockknock/__init__.py
|
kinoute/knockknock
|
f9b6f9505b1d301d1b9fa51bd7b4afaebdd16997
|
[
"MIT"
] | null | null | null |
knockknock/__init__.py
|
kinoute/knockknock
|
f9b6f9505b1d301d1b9fa51bd7b4afaebdd16997
|
[
"MIT"
] | null | null | null |
knockknock/__init__.py
|
kinoute/knockknock
|
f9b6f9505b1d301d1b9fa51bd7b4afaebdd16997
|
[
"MIT"
] | null | null | null |
from knockknock.chime_sender import chime_sender
from knockknock.discord_sender import discord_sender
from knockknock.email_sender import email_sender
from knockknock.slack_sender import slack_sender
from knockknock.sms_sender import sms_sender
from knockknock.telegram_sender import telegram_sender
from knockknock.teams_sender import teams_sender
from knockknock.desktop_sender import desktop_sender
from knockknock.matrix_sender import matrix_sender
from knockknock.dingtalk_sender import dingtalk_sender
from knockknock.wechat_sender import wechat_sender
from knockknock.rocketchat_sender import rocketchat_sender
from knockknock.mattermost_sender import mattermost_sender
| 48.357143
| 58
| 0.903988
| 91
| 677
| 6.43956
| 0.186813
| 0.31058
| 0.409556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076809
| 677
| 13
| 59
| 52.076923
| 0.9376
| 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
| 0
| 0
|
0
| 4
|
8ad67c586201248f9e16a6058511afcfd5e9f0e0
| 1,420
|
py
|
Python
|
venv1/Lib/site-packages/tensorflow/python/keras/_impl/keras/engine/__init__.py
|
Soum-Soum/Tensorflow_Face_Finder
|
fec6c15d2df7012608511ad87f4b55731bf99478
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
venv1/Lib/site-packages/tensorflow/python/keras/_impl/keras/engine/__init__.py
|
Soum-Soum/Tensorflow_Face_Finder
|
fec6c15d2df7012608511ad87f4b55731bf99478
|
[
"Apache-2.0",
"MIT"
] | 1
|
2021-05-20T00:58:04.000Z
|
2021-05-20T00:58:04.000Z
|
venv1/Lib/site-packages/tensorflow/python/keras/_impl/keras/engine/__init__.py
|
Soum-Soum/Tensorflow_Face_Finder
|
fec6c15d2df7012608511ad87f4b55731bf99478
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""The Keras Engine: graph topology and training loop functionality.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.python.keras._impl.keras.engine.base_layer import InputSpec
from tensorflow.python.keras._impl.keras.engine.base_layer import Layer
from tensorflow.python.keras._impl.keras.engine.input_layer import Input
from tensorflow.python.keras._impl.keras.engine.input_layer import InputLayer
from tensorflow.python.keras._impl.keras.engine.network import get_source_inputs
from tensorflow.python.keras._impl.keras.engine.network import Network
from tensorflow.python.keras._impl.keras.engine.training import Model
| 50.714286
| 81
| 0.752817
| 193
| 1,420
| 5.398964
| 0.476684
| 0.084453
| 0.134357
| 0.167946
| 0.353167
| 0.353167
| 0.353167
| 0.314779
| 0.314779
| 0.213052
| 0
| 0.006467
| 0.128873
| 1,420
| 27
| 82
| 52.592593
| 0.835893
| 0.511972
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0.1
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
0a0c3a0d66973088495fd034cb65dce54b169d66
| 144
|
py
|
Python
|
administracion/apps.py
|
angiealejo/CoreM
|
211383f5fb40fe1f2364b2b80597de562507f687
|
[
"MIT"
] | 1
|
2018-03-23T03:58:09.000Z
|
2018-03-23T03:58:09.000Z
|
administracion/apps.py
|
angiealejo/CoreM
|
211383f5fb40fe1f2364b2b80597de562507f687
|
[
"MIT"
] | null | null | null |
administracion/apps.py
|
angiealejo/CoreM
|
211383f5fb40fe1f2364b2b80597de562507f687
|
[
"MIT"
] | null | null | null |
from __future__ import unicode_literals
from django.apps import AppConfig
class AdministracionConfig(AppConfig):
name = 'administracion'
| 18
| 39
| 0.8125
| 15
| 144
| 7.466667
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138889
| 144
| 7
| 40
| 20.571429
| 0.903226
| 0
| 0
| 0
| 0
| 0
| 0.097222
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
0a501c7c5965fd7bb7e03d134ecee3062499bb39
| 966
|
py
|
Python
|
skneuromsi/__init__.py
|
renatoparedes/scikit-neuromsi
|
d832f7119b49acf99b82cb6b23aad018d258bca8
|
[
"BSD-3-Clause"
] | 1
|
2021-09-19T14:07:12.000Z
|
2021-09-19T14:07:12.000Z
|
skneuromsi/__init__.py
|
renatoparedes/scikit-neuromsi
|
d832f7119b49acf99b82cb6b23aad018d258bca8
|
[
"BSD-3-Clause"
] | null | null | null |
skneuromsi/__init__.py
|
renatoparedes/scikit-neuromsi
|
d832f7119b49acf99b82cb6b23aad018d258bca8
|
[
"BSD-3-Clause"
] | 1
|
2021-12-10T19:58:19.000Z
|
2021-12-10T19:58:19.000Z
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the
# Scikit-neuromsi Project (https://github.com/renatoparedes/scikit-neuromsi).
# Copyright (c) 2021, Renato Paredes; Cabral, Juan
# License: BSD 3-Clause
# Full Text:
# https://github.com/renatoparedes/scikit-neuromsi/blob/main/LICENSE.txt
# =============================================================================
# DOCS
# =============================================================================
"""
Scikit-neuromsi.
Implementation of multisensory integration models in Python.
"""
# =============================================================================
# META
# =============================================================================
__version__ = "0.0.1"
# =============================================================================
# IMPORTS
# =============================================================================
from .core import * # noqa
| 30.1875
| 79
| 0.353002
| 65
| 966
| 5.184615
| 0.784615
| 0.166172
| 0.083086
| 0.160237
| 0.243323
| 0.243323
| 0
| 0
| 0
| 0
| 0
| 0.010239
| 0.090062
| 966
| 31
| 80
| 31.16129
| 0.373151
| 0.901656
| 0
| 0
| 0
| 0
| 0.071429
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6a4f4f8af8657b7f24d092b4c58dbe2985bcca64
| 153
|
py
|
Python
|
clutch/method/typing/session/accessor.py
|
wyleung/clutch
|
2564735245a97a4fc0a1bb923c2a515dc2ae61a1
|
[
"MIT"
] | null | null | null |
clutch/method/typing/session/accessor.py
|
wyleung/clutch
|
2564735245a97a4fc0a1bb923c2a515dc2ae61a1
|
[
"MIT"
] | null | null | null |
clutch/method/typing/session/accessor.py
|
wyleung/clutch
|
2564735245a97a4fc0a1bb923c2a515dc2ae61a1
|
[
"MIT"
] | null | null | null |
from clutch.method.typing.session.shared import SessionArguments
SessionAccessorArguments = SessionArguments
SessionAccessorResponse = SessionArguments
| 30.6
| 64
| 0.888889
| 12
| 153
| 11.333333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071895
| 153
| 4
| 65
| 38.25
| 0.957746
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 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
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6a5ae3b73eb6027977999e07ee4206a736dd11e8
| 331
|
py
|
Python
|
bot/plugins/trivia/content/__init__.py
|
best-coloc-ever/globibot
|
a4c4dd8bb3b71bff09bd2e1c4c5ce58ab1bad176
|
[
"MIT"
] | 14
|
2016-02-03T16:47:01.000Z
|
2019-12-09T14:24:25.000Z
|
bot/plugins/trivia/content/__init__.py
|
best-coloc-ever/globibot
|
a4c4dd8bb3b71bff09bd2e1c4c5ce58ab1bad176
|
[
"MIT"
] | 11
|
2016-08-19T22:00:25.000Z
|
2022-01-13T00:39:48.000Z
|
bot/plugins/trivia/content/__init__.py
|
best-coloc-ever/globibot
|
a4c4dd8bb3b71bff09bd2e1c4c5ce58ab1bad176
|
[
"MIT"
] | 6
|
2016-08-19T21:30:58.000Z
|
2019-09-27T05:24:08.000Z
|
from .animals import AnimalsTrivia
from .capitals import CapitalsTrivia
from .flags import FlagsTrivia
from .pokemons import PokemonsTrivia
from .traps import TrapsTrivia
from .us_states import USStatesTrivia
from .game_releases import GameReleasesTrivia
from .animes import AnimesTrivia
from .programming import ProgrammingTrivia
| 33.1
| 45
| 0.864048
| 38
| 331
| 7.473684
| 0.578947
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108761
| 331
| 9
| 46
| 36.777778
| 0.962712
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6a5d392dbc793f17e3c41da5bfd0b47a4fb9038c
| 9,607
|
py
|
Python
|
test/server/test_admin_mailbox.py
|
BoniLindsley/pymap
|
b3190d20799a6d342888e51bfc55cdfcbfe3ed26
|
[
"MIT"
] | 18
|
2015-06-04T21:09:37.000Z
|
2022-03-04T08:14:31.000Z
|
test/server/test_admin_mailbox.py
|
BoniLindsley/pymap
|
b3190d20799a6d342888e51bfc55cdfcbfe3ed26
|
[
"MIT"
] | 114
|
2018-10-17T23:11:00.000Z
|
2022-03-19T16:59:16.000Z
|
test/server/test_admin_mailbox.py
|
BoniLindsley/pymap
|
b3190d20799a6d342888e51bfc55cdfcbfe3ed26
|
[
"MIT"
] | 8
|
2015-02-03T19:30:52.000Z
|
2021-11-20T12:47:03.000Z
|
import pytest
from grpclib.testing import ChannelFor
from pymapadmin.grpc.admin_grpc import MailboxStub
from pymapadmin.grpc.admin_pb2 import AppendRequest, SUCCESS, FAILURE
from pymap.admin.handlers.mailbox import MailboxHandlers
from .base import TestBase
pytestmark = pytest.mark.asyncio
class TestMailboxHandlers(TestBase):
admin_token = 'MDAwZWxvY2F0aW9uIAowMDEwaWRlbnRpZmllciAKMDAxNWNpZCB0eXBl' \
'ID0gYWRtaW4KMDAyZnNpZ25hdHVyZSBTApt6-KNq85_1TeSmQyqTZjWPfHCYPY8EIG' \
'q6NMqv4go'
metadata = {'auth-token': admin_token}
@pytest.fixture
def overrides(self):
return {'admin_key': b'testadmintoken'}
async def test_append(self, backend, imap_server) -> None:
handlers = MailboxHandlers(backend)
data = b'From: user@example.com\n\ntest message!\n'
request = AppendRequest(user='testuser', mailbox='INBOX',
flags=['\\Flagged', '\\Seen'],
when=1234567890, data=data)
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert SUCCESS == response.result.code
assert 105 == response.uid
transport = self.new_transport(imap_server)
transport.push_login()
transport.push_select(b'INBOX')
transport.push_readline(
b'fetch1 UID FETCH * FULL\r\n')
transport.push_write(
b'* 5 FETCH (FLAGS (\\Flagged \\Recent \\Seen)'
b' INTERNALDATE "13-Feb-2009 23:31:30 +0000"'
b' RFC822.SIZE 38'
b' ENVELOPE (NIL NIL (("" NIL "user" "example.com"))'
b' (("" NIL "user" "example.com")) (("" NIL "user" "example.com"))'
b' NIL NIL NIL NIL NIL)'
b' BODY ("text" "plain" NIL NIL NIL "7BIT" 38 3)'
b' UID 105)\r\n'
b'fetch1 OK UID FETCH completed.\r\n')
transport.push_logout()
await self.run(transport)
async def test_append_user_not_found(self, backend) -> None:
handlers = MailboxHandlers(backend)
request = AppendRequest(user='baduser')
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert FAILURE == response.result.code
assert 'UserNotFound' == response.result.key
async def test_append_mailbox_not_found(self, backend) -> None:
handlers = MailboxHandlers(backend)
request = AppendRequest(user='testuser', mailbox='BAD')
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert FAILURE == response.result.code
assert 'BAD' == response.mailbox
assert 'MailboxNotFound' == response.result.key
async def test_append_filter_reject(self, backend) -> None:
handlers = MailboxHandlers(backend)
data = b'Subject: reject this\n\ntest message!\n'
request = AppendRequest(user='testuser', mailbox='INBOX',
flags=['\\Flagged', '\\Seen'],
when=1234567890, data=data)
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert FAILURE == response.result.code
assert 'AppendFailure' == response.result.key
async def test_append_filter_discard(self, backend) -> None:
handlers = MailboxHandlers(backend)
data = b'Subject: discard this\n\ntest message!\n'
request = AppendRequest(user='testuser', mailbox='INBOX',
flags=['\\Flagged', '\\Seen'],
when=1234567890, data=data)
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert SUCCESS == response.result.code
assert not response.mailbox
assert not response.uid
async def test_append_filter_address_is(self, backend) -> None:
handlers = MailboxHandlers(backend)
data = b'From: foo@example.com\n\ntest message!\n'
request = AppendRequest(user='testuser', mailbox='INBOX',
flags=['\\Flagged', '\\Seen'],
when=1234567890, data=data)
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert 'Test 1' == response.mailbox
async def test_append_filter_address_contains(self, backend) -> None:
handlers = MailboxHandlers(backend)
data = b'From: user@foo.com\n\ntest message!\n'
request = AppendRequest(user='testuser', mailbox='INBOX',
flags=['\\Flagged', '\\Seen'],
when=1234567890, data=data)
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert 'Test 2' == response.mailbox
async def test_append_filter_address_matches(self, backend) -> None:
handlers = MailboxHandlers(backend)
data = b'To: bigfoot@example.com\n\ntest message!\n'
request = AppendRequest(user='testuser', mailbox='INBOX',
flags=['\\Flagged', '\\Seen'],
when=1234567890, data=data)
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert 'Test 3' == response.mailbox
async def test_append_filter_envelope_is(self, backend) -> None:
handlers = MailboxHandlers(backend)
data = b'From: user@example.com\n\ntest message!\n'
request = AppendRequest(user='testuser', mailbox='INBOX',
sender='foo@example.com',
flags=['\\Flagged', '\\Seen'],
when=1234567890, data=data)
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert 'Test 4' == response.mailbox
async def test_append_filter_envelope_contains(self, backend) -> None:
handlers = MailboxHandlers(backend)
data = b'From: user@example.com\n\ntest message!\n'
request = AppendRequest(user='testuser', mailbox='INBOX',
sender='user@foo.com',
flags=['\\Flagged', '\\Seen'],
when=1234567890, data=data)
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert 'Test 5' == response.mailbox
async def test_append_filter_envelope_matches(self, backend) -> None:
handlers = MailboxHandlers(backend)
data = b'From: user@example.com\n\ntest message!\n'
request = AppendRequest(user='testuser', mailbox='INBOX',
recipient='bigfoot@example.com',
flags=['\\Flagged', '\\Seen'],
when=1234567890, data=data)
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert 'Test 6' == response.mailbox
async def test_append_filter_exists(self, backend) -> None:
handlers = MailboxHandlers(backend)
data = b'X-Foo: foo\nX-Bar: bar\n\ntest message!\n'
request = AppendRequest(user='testuser', mailbox='INBOX',
flags=['\\Flagged', '\\Seen'],
when=1234567890, data=data)
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert 'Test 7' == response.mailbox
async def test_append_filter_header(self, backend) -> None:
handlers = MailboxHandlers(backend)
data = b'X-Caffeine: C8H10N4O2\n\ntest message!\n'
request = AppendRequest(user='testuser', mailbox='INBOX',
flags=['\\Flagged', '\\Seen'],
when=1234567890, data=data)
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert 'Test 8' == response.mailbox
async def test_append_filter_size(self, backend) -> None:
handlers = MailboxHandlers(backend)
data = b'From: user@example.com\n\ntest message!\n'
data = data + b'x' * (1234 - len(data))
request = AppendRequest(user='testuser', mailbox='INBOX',
flags=['\\Flagged', '\\Seen'],
when=1234567890, data=data)
async with ChannelFor([handlers]) as channel:
stub = MailboxStub(channel)
response = await stub.Append(request, metadata=self.metadata)
assert 'Test 9' == response.mailbox
| 47.79602
| 79
| 0.596856
| 982
| 9,607
| 5.775967
| 0.148676
| 0.019746
| 0.029619
| 0.044429
| 0.785437
| 0.782793
| 0.769922
| 0.743124
| 0.687588
| 0.638223
| 0
| 0.027611
| 0.291246
| 9,607
| 200
| 80
| 48.035
| 0.805405
| 0
| 0
| 0.576271
| 0
| 0
| 0.156881
| 0.030398
| 0
| 0
| 0
| 0
| 0.118644
| 1
| 0.00565
| false
| 0
| 0.033898
| 0.00565
| 0.062147
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6a5eeb1ee62f1291340c41b7b54a5562385ec7a8
| 16,626
|
py
|
Python
|
vitrage/tests/unit/datasources/zabbix/test_zabbix_driver.py
|
charliebr30/vitrage
|
33e7d9a27a542c3ad4755a03dbbc8ff613caab32
|
[
"Apache-2.0"
] | null | null | null |
vitrage/tests/unit/datasources/zabbix/test_zabbix_driver.py
|
charliebr30/vitrage
|
33e7d9a27a542c3ad4755a03dbbc8ff613caab32
|
[
"Apache-2.0"
] | null | null | null |
vitrage/tests/unit/datasources/zabbix/test_zabbix_driver.py
|
charliebr30/vitrage
|
33e7d9a27a542c3ad4755a03dbbc8ff613caab32
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2016 - Nokia
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import copy
from oslo_config import cfg
from oslo_log import log as logging
from vitrage.common.constants import DatasourceProperties as DSProps
from vitrage.common.constants import EventAction
from vitrage.datasources.zabbix.properties import ZabbixProperties as ZProps
from vitrage.tests.mocks import utils
from vitrage.tests.unit.datasources.zabbix.mock_driver import MockZabbixDriver
from vitrage.tests.unit.datasources.zabbix.zabbix_base_test import \
ZabbixBaseTest
LOG = logging.getLogger(__name__)
# noinspection PyProtectedMember
class ZabbixDriverTest(ZabbixBaseTest):
OPTS = [
cfg.StrOpt('config_file',
help='Zabbix configuration file',
default=utils.get_resources_dir()
+ '/zabbix/zabbix_conf.yaml'),
]
# noinspection PyPep8Naming
@classmethod
def setUpClass(cls):
cls.conf = cfg.ConfigOpts()
cls.conf.register_opts(cls.OPTS, group='zabbix')
def test_get_all(self):
# Test Setup
zabbix_driver = MockZabbixDriver(self.conf)
alarm_data1 = self._extract_alarm_data(triggerid='1', status='1')
alarm_data2 = self._extract_alarm_data(triggerid='2', status='1',
value='1')
alarm_data3 = self._extract_alarm_data(triggerid='3', value='1')
alarm_data4 = self._extract_alarm_data(triggerid='4')
zabbix_driver.set_alarm_datas([alarm_data1,
alarm_data2,
alarm_data3,
alarm_data4])
# Test Action
alarms = zabbix_driver._get_all_alarms()
# Test assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(1, len(alarms))
self._assert_contains(alarm_data3, alarms)
def test_get_all_functionality(self):
# Step 1 - Services with status OK should not be returned
# Test setup scenario
zabbix_driver = MockZabbixDriver(self.conf)
alarm_data1 = self._extract_alarm_data()
alarm_data2 = self._extract_alarm_data(z_resource_name='compute-2')
alarm_data3 = self._extract_alarm_data(z_resource_name='compute-2',
triggerid='2')
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
# Test action
alarms = zabbix_driver._get_all_alarms()
# Test assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(0, len(alarms))
# Step 2 - one raised alarm
# Test setup
alarm_data1 = self._extract_alarm_data(value='1')
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
# Test action
alarms = zabbix_driver._get_all_alarms()
# Test assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(1, len(alarms))
self._assert_contains(alarm_data1, alarms)
# Step 3 - two raised alarms
# Test setup
alarm_data1 = self._extract_alarm_data(value='1', priority='4')
alarm_data2 = self._extract_alarm_data(z_resource_name='compute-2',
value='1')
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
expected_alarm1 = alarm_data1
expected_alarm2 = copy.copy(alarm_data2)
expected_alarm2[ZProps.RESOURCE_NAME] = 'host2'
# Test action
alarms = zabbix_driver._get_all_alarms()
# Test assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(2, len(alarms))
self._assert_contains(expected_alarm1, alarms)
self._assert_contains(expected_alarm2, alarms)
# Step 4 - Check inactive alarms. Get all function should return
# inactive alarm (alarm that teir status has changed to OK)
# Test setup
alarm_data1 = self._extract_alarm_data()
alarm_data2 = self._extract_alarm_data(z_resource_name='compute-2')
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
expected_alarm1 = alarm_data1
expected_alarm2 = copy.copy(alarm_data2)
expected_alarm2[ZProps.RESOURCE_NAME] = 'host2'
# Test action
alarms = zabbix_driver._get_all_alarms()
# Test assertions
# The alarms of alarm_data1/2 should be returned although their
# status is OK, because they were not OK earlier
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(2, len(alarms))
self._assert_contains(expected_alarm1, alarms)
self._assert_contains(expected_alarm2, alarms)
# Step 4 - get all when all alarms are inactivated and their status
# was not changed
# Test action
alarms = zabbix_driver._get_all_alarms()
# Test assertions
self.assertIsNotNone(alarms, 'alarms is None')
self.assertEqual(0, len(alarms))
def test_get_changes_functionality(self):
# Step 1 - get changes when all alarms are OK
# Test setup
zabbix_driver = MockZabbixDriver(self.conf)
alarm_data1 = self._extract_alarm_data(priority='2')
alarm_data2 = self._extract_alarm_data(z_resource_name='compute-2',
priority='2')
alarm_data3 = self._extract_alarm_data(z_resource_name='compute-2',
description='Uptime',
priority='3')
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
# Test action
alarms = zabbix_driver._get_changed_alarms()
# Test assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(0, len(alarms))
# Step 2 - get changes when alarm is raised
# Test setup
alarm_data1 = self._extract_alarm_data(priority='2', value='1')
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
# Test action
alarms = zabbix_driver._get_changed_alarms()
# Test assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(1, len(alarms))
self._assert_contains(alarm_data1, alarms)
# Step 3 - get changes when the priority of inactive alarm is changed
# Test setup
alarm_data2 = self._extract_alarm_data(z_resource_name='compute-2',
priority='3')
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
# Test action
alarms = zabbix_driver._get_changed_alarms()
# Test assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(0, len(alarms))
# Step 4 - get changes when:
# 1. alarm1 - priority of active alarm is changed (should be returned)
# 2. alarm2 - raised alarm (should be returned)
# 3. alarm3 - priority of inactive alarm is changed (should not
# be returned)
# Test setup
alarm_data1 = self._extract_alarm_data(priority='4', value='1')
alarm_data2 = self._extract_alarm_data(z_resource_name='compute-2',
priority='1', value='1')
alarm_data3 = self._extract_alarm_data(z_resource_name='compute-2',
triggerid='22222',
priority='1')
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
expected_alarm1 = alarm_data1
expected_alarm2 = copy.copy(alarm_data2)
expected_alarm2[ZProps.RESOURCE_NAME] = 'host2'
# Test action
alarms = zabbix_driver._get_changed_alarms()
# Test assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(2, len(alarms))
self._assert_contains(expected_alarm1, alarms)
self._assert_contains(expected_alarm2, alarms)
# Step 5 - get changes when all active alarms are changed to inactive
# Test setup
alarm_data1 = self._extract_alarm_data(priority='4')
alarm_data2 = self._extract_alarm_data(z_resource_name='compute-2',
priority='1')
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
expected_alarm1 = alarm_data1
expected_alarm2 = copy.copy(alarm_data2)
expected_alarm2[ZProps.RESOURCE_NAME] = 'host2'
# Test action
alarms = zabbix_driver._get_changed_alarms()
# Test assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(2, len(alarms))
self._assert_contains(expected_alarm1, alarms)
self._assert_contains(expected_alarm2, alarms)
# Step 6 - get changes when no change occurred
# Action
alarms = zabbix_driver._get_changed_alarms()
# Test assertions
self.assertIsNotNone(alarms, 'alarms is None')
self.assertEqual(0, len(alarms))
def test_get_changes_and_get_all(self):
# Step 1 - get changes
# Step setup
zabbix_driver = MockZabbixDriver(self.conf)
alarm_data1 = self._extract_alarm_data(priority='2', value='1')
alarm_data2 = self._extract_alarm_data(z_resource_name='compute-2',
priority='2')
alarm_data3 = self._extract_alarm_data(z_resource_name='compute-2',
triggerid='2')
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
# Step action
alarms = zabbix_driver._get_changed_alarms()
# Step assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(1, len(alarms))
self._assert_contains(alarm_data1, alarms)
# Step 2 - get changes when no change occurred (returns nothing)
# Step action
alarms = zabbix_driver._get_changed_alarms()
# Step assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(0, len(alarms))
# Step 3 - get all
# Step action
alarms = zabbix_driver._get_all_alarms()
# Step assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(1, len(alarms))
self._assert_contains(alarm_data1, alarms)
# Step 4 - get all for second time
# (when no change has occurred it returns the same)
# Step action
alarms = zabbix_driver._get_all_alarms()
# Step assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(1, len(alarms))
self._assert_contains(alarm_data1, alarms)
# Step 5 - calling get changes right after get all (returns nothing)
# Step setup
alarm_data1 = self._extract_alarm_data(priority='4', value='1')
alarm_data2 = self._extract_alarm_data(z_resource_name='compute-2',
priority='1',
value='1')
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
expected_alarm1 = alarm_data1
expected_alarm2 = copy.copy(alarm_data2)
expected_alarm2[ZProps.RESOURCE_NAME] = 'host2'
# Step action
get_all_alarms = zabbix_driver._get_all_alarms()
changed_alarms = zabbix_driver._get_changed_alarms()
# Step assertions
self.assertIsNotNone(get_all_alarms, 'No alarms returned')
self.assertEqual(2, len(get_all_alarms))
self._assert_contains(expected_alarm1, get_all_alarms)
self._assert_contains(expected_alarm2, get_all_alarms)
self.assertIsNotNone(changed_alarms, 'No alarms returned')
self.assertEqual(0, len(changed_alarms))
# Step 6 - get changes
# Step setup
alarm_data2 = self._extract_alarm_data(z_resource_name='compute-2',
priority='4',
value='1')
alarm_data3 = self._extract_alarm_data(z_resource_name='compute-2',
triggerid='2',
priority='4',
value='1')
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
expected_alarm1 = copy.copy(alarm_data2)
expected_alarm1[ZProps.RESOURCE_NAME] = 'host2'
expected_alarm2 = copy.copy(expected_alarm1)
expected_alarm2[ZProps.TRIGGER_ID] = '2'
# Step action
alarms = zabbix_driver._get_changed_alarms()
# Step assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(2, len(alarms))
self._assert_contains(expected_alarm1, alarms)
self._assert_contains(expected_alarm2, alarms)
def test_delete_alarm(self):
# Test setup
alarm_data1 = self._extract_alarm_data(value='1')
alarm_data2 = self._extract_alarm_data(z_resource_name='compute-2')
alarm_data3 = self._extract_alarm_data(z_resource_name='compute-2',
triggerid='2')
# Step 1 - delete inactive alarm
# Step setup
zabbix_driver = MockZabbixDriver(self.conf)
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2, alarm_data3])
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2])
# Step action
alarms = zabbix_driver._get_all_alarms()
# Step assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(1, len(alarms))
self._assert_contains(alarm_data1, alarms)
# Step 2 - delete active alarm
# Step setup
zabbix_driver.set_alarm_datas([alarm_data2])
# Step action
alarms = zabbix_driver._get_all_alarms()
# Step assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(1, len(alarms))
self._assert_contains(alarm_data1, alarms)
self.assertEqual(EventAction.DELETE_ENTITY,
alarms[0][DSProps.EVENT_TYPE])
# Step 3 - get changes after get all should not return deleted alarm
# Step action
alarms = zabbix_driver._get_changed_alarms()
# Step assertions
self.assertIsNotNone(alarms, 'alarms is None')
self.assertEqual(0, len(alarms))
# Step 4 -
# Step setup
zabbix_driver.set_alarm_datas([alarm_data1, alarm_data2])
zabbix_driver._get_all_alarms()
zabbix_driver.set_alarm_datas([alarm_data2])
# Step action
alarms = zabbix_driver._get_changed_alarms()
# Step assertions
self.assertIsNotNone(alarms, 'No alarms returned')
self.assertEqual(1, len(alarms))
self._assert_contains(alarm_data1, alarms)
self.assertEqual(EventAction.DELETE_ENTITY,
alarms[0][DSProps.EVENT_TYPE])
def _extract_alarm_data(self,
z_resource_name='compute-1',
description='cpu',
status='0',
value='0',
priority='1',
triggerid='0'):
return {ZProps.ZABBIX_RESOURCE_NAME: z_resource_name,
ZProps.DESCRIPTION: description,
ZProps.STATUS: status,
ZProps.VALUE: value,
ZProps.PRIORITY: priority,
ZProps.RESOURCE_NAME: z_resource_name,
ZProps.TRIGGER_ID: triggerid}
| 37.872437
| 78
| 0.623361
| 1,867
| 16,626
| 5.268881
| 0.110337
| 0.057335
| 0.053675
| 0.06506
| 0.77117
| 0.743824
| 0.706923
| 0.690454
| 0.679374
| 0.666565
| 0
| 0.023123
| 0.29508
| 16,626
| 438
| 79
| 37.958904
| 0.816212
| 0.164441
| 0
| 0.705128
| 0
| 0
| 0.052231
| 0.001741
| 0
| 0
| 0
| 0
| 0.294872
| 1
| 0.029915
| false
| 0
| 0.038462
| 0.004274
| 0.081197
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6a67b07e8fb886fa013fb2a67e5396e99b327470
| 43
|
py
|
Python
|
pyurl/__init__.py
|
ydcjeff/pyurl
|
d3b9e9945558803b46eedf1270f7ce35ccfbd4a3
|
[
"MIT"
] | 4
|
2020-07-06T14:59:37.000Z
|
2021-12-25T20:59:33.000Z
|
pyurl/__init__.py
|
ydcjeff/pyurl
|
d3b9e9945558803b46eedf1270f7ce35ccfbd4a3
|
[
"MIT"
] | 1
|
2022-02-04T12:44:33.000Z
|
2022-02-04T12:44:33.000Z
|
pyurl/__init__.py
|
ydcjeff/pyurl
|
d3b9e9945558803b46eedf1270f7ce35ccfbd4a3
|
[
"MIT"
] | 1
|
2020-07-09T12:09:32.000Z
|
2020-07-09T12:09:32.000Z
|
"""Package info."""
__version__ = "0.1.2"
| 10.75
| 21
| 0.581395
| 6
| 43
| 3.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081081
| 0.139535
| 43
| 3
| 22
| 14.333333
| 0.486486
| 0.302326
| 0
| 0
| 0
| 0
| 0.208333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6a78140e7adc96c8d4dc22ada8523d9a936bddf8
| 46
|
py
|
Python
|
eleven/__init__.py
|
dariongbc/eleven
|
53bd57d8fe3ce6cea5fddea278a4e30f9299ed0b
|
[
"BSD-2-Clause"
] | 12
|
2015-02-06T12:44:11.000Z
|
2021-11-03T10:06:36.000Z
|
eleven/__init__.py
|
dariongbc/eleven
|
53bd57d8fe3ce6cea5fddea278a4e30f9299ed0b
|
[
"BSD-2-Clause"
] | 4
|
2015-08-17T15:33:33.000Z
|
2018-11-28T14:17:21.000Z
|
eleven/__init__.py
|
dariongbc/eleven
|
53bd57d8fe3ce6cea5fddea278a4e30f9299ed0b
|
[
"BSD-2-Clause"
] | 14
|
2015-03-03T16:29:45.000Z
|
2021-12-23T22:51:52.000Z
|
from .eleven import *
__version__ = '0.1.1'
| 9.2
| 21
| 0.652174
| 7
| 46
| 3.714286
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081081
| 0.195652
| 46
| 4
| 22
| 11.5
| 0.621622
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6a9d690bae36761b2fb74bf6f6a8c3fa9a86832b
| 131
|
py
|
Python
|
NoteBooks/Curso de Python/Template.py
|
Alejandro-sin/Learning_Notebooks
|
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
|
[
"MIT"
] | 1
|
2021-02-26T13:12:22.000Z
|
2021-02-26T13:12:22.000Z
|
NoteBooks/Curso de Python/Template.py
|
Alejandro-sin/Learning_Notebooks
|
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
|
[
"MIT"
] | null | null | null |
NoteBooks/Curso de Python/Template.py
|
Alejandro-sin/Learning_Notebooks
|
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
|
[
"MIT"
] | null | null | null |
'''
Tipo: Concepto, Ejercicio, Pregunta...
Fuente: libro, curso, ...
Este chunk de código tiene como propósito...
'''
| 13.1
| 45
| 0.610687
| 14
| 131
| 5.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.229008
| 131
| 9
| 46
| 14.555556
| 0.792079
| 0.847328
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6aef7d2445d9a701c9f199c3f539fe14444427cc
| 7,597
|
py
|
Python
|
moves.py
|
aggarwalRuchir/rubiks_cube_solver
|
d9c1bbc0c54f60a1145875f651409be2a8e1e563
|
[
"MIT"
] | null | null | null |
moves.py
|
aggarwalRuchir/rubiks_cube_solver
|
d9c1bbc0c54f60a1145875f651409be2a8e1e563
|
[
"MIT"
] | null | null | null |
moves.py
|
aggarwalRuchir/rubiks_cube_solver
|
d9c1bbc0c54f60a1145875f651409be2a8e1e563
|
[
"MIT"
] | null | null | null |
import copy
def F(a):
x = copy.deepcopy(a)
# Face Rotation
a[3][6] = x[5][6]
a[3][7] = x[4][6]
a[3][8] = x[3][6]
a[4][6] = x[5][7]
a[4][8] = x[3][7]
a[5][6] = x[5][8]
a[5][7] = x[4][8]
a[5][8] = x[3][8]
#Side Rotation
a[2][6] = x[5][5]
a[2][7] = x[4][5]
a[2][8] = x[3][5]
a[3][9] = x[2][6]
a[4][9] = x[2][7]
a[5][9] = x[2][8]
a[6][6] = x[5][9]
a[6][7] = x[4][9]
a[6][8] = x[3][9]
a[5][5] = x[6][8]
a[4][5] = x[6][7]
a[3][5] = x[6][6]
def Fi(a):
x = copy.deepcopy(a)
# Face Rotation
a[3][6] = x[3][8]
a[3][7] = x[4][8]
a[3][8] = x[5][8]
a[4][6] = x[3][7]
a[4][8] = x[5][7]
a[5][6] = x[3][6]
a[5][7] = x[4][6]
a[5][8] = x[5][6]
# Side Rotation
a[5][5] = x[2][6]
a[4][5] = x[2][7]
a[3][5] = x[2][8]
a[2][6] = x[3][9]
a[2][7] = x[4][9]
a[2][8] = x[5][9]
a[5][9] = x[6][6]
a[4][9] = x[6][7]
a[3][9] = x[6][8]
a[6][8] = x[5][5]
a[6][7] = x[4][5]
a[6][6] = x[3][5]
def R(a):
x = copy.deepcopy(a)
# Side Rotation
a[3][0] = x[2][8]
a[4][0] = x[1][8]
a[5][0] = x[0][8]
a[8][8] = x[3][0]
a[7][8] = x[4][0]
a[6][8] = x[5][0]
a[3][8] = x[6][8]
a[4][8] = x[7][8]
a[5][8] = x[8][8]
a[0][8] = x[3][8]
a[1][8] = x[4][8]
a[2][8] = x[5][8]
# Face Rotation
a[3][11] = x[3][9]
a[4][11] = x[3][10]
a[5][11] = x[3][11]
a[3][10] = x[4][9]
a[5][10] = x[4][11]
a[3][9] = x[5][9]
a[4][9] = x[5][10]
a[5][9] = x[5][11]
def Ri(a):
x = copy.deepcopy(a)
# Face Rotation
a[3][9] = x[3][11]
a[3][10] = x[4][11]
a[3][11] = x[5][11]
a[4][9] = x[3][10]
a[4][11] = x[5][10]
a[5][9] = x[3][9]
a[5][10] = x[4][9]
a[5][11] = x[5][9]
# Side Rotation
a[2][8] = x[3][0]
a[1][8] = x[4][0]
a[0][8] = x[5][0]
a[3][0] = x[8][8]
a[4][0] = x[7][8]
a[5][0] = x[6][8]
a[6][8] = x[3][8]
a[7][8] = x[4][8]
a[8][8] = x[5][8]
a[3][8] = x[0][8]
a[4][8] = x[1][8]
a[5][8] = x[2][8]
def L(a):
x = copy.deepcopy(a)
# Face Rotation
a[3][3] = x[5][3]
a[3][4] = x[4][3]
a[3][5] = x[3][3]
a[4][3] = x[5][4]
a[4][5] = x[3][4]
a[5][3] = x[5][5]
a[5][4] = x[4][5]
a[5][5] = x[3][5]
# Side Rotation
a[0][6] = x[5][2]
a[1][6] = x[4][2]
a[2][6] = x[3][2]
a[3][6] = x[0][6]
a[4][6] = x[1][6]
a[5][6] = x[2][6]
a[8][6] = x[5][6]
a[7][6] = x[4][6]
a[6][6] = x[3][6]
a[3][2] = x[8][6]
a[4][2] = x[7][6]
a[5][2] = x[6][6]
def Li(a):
x = copy.deepcopy(a)
# Face Rotation
a[5][3] = x[3][3]
a[4][3] = x[3][4]
a[3][3] = x[3][5]
a[5][4] = x[4][3]
a[3][4] = x[4][5]
a[5][5] = x[5][3]
a[4][5] = x[5][4]
a[3][5] = x[5][5]
# Side Rotation
a[5][2] = x[0][6]
a[4][2] = x[1][6]
a[3][2] = x[2][6]
a[0][6] = x[3][6]
a[1][6] = x[4][6]
a[2][6] = x[5][6]
a[5][6] = x[8][6]
a[4][6] = x[7][6]
a[3][6] = x[6][6]
a[8][6] = x[3][2]
a[7][6] = x[4][2]
a[6][6] = x[5][2]
def U(a):
x = copy.deepcopy(a)
# Face Rotation
a[0][6] = x[2][6]
a[0][7] = x[1][6]
a[0][8] = x[0][6]
a[1][6] = x[2][7]
a[1][8] = x[0][7]
a[2][6] = x[2][8]
a[2][7] = x[1][8]
a[2][8] = x[0][8]
# Side Rotation
a[3][2] = x[3][5]
a[3][1] = x[3][4]
a[3][0] = x[3][3]
a[3][11] = x[3][2]
a[3][10] = x[3][1]
a[3][9] = x[3][0]
a[3][6] = x[3][9]
a[3][7] = x[3][10]
a[3][8] = x[3][11]
a[3][3] = x[3][6]
a[3][4] = x[3][7]
a[3][5] = x[3][8]
def Ui(a):
x = copy.deepcopy(a)
# Face Rotation
a[2][6] = x[0][6]
a[1][6] = x[0][7]
a[0][6] = x[0][8]
a[2][7] = x[1][6]
a[0][7] = x[1][8]
a[2][8] = x[2][6]
a[1][8] = x[2][7]
a[0][8] = x[2][8]
# Side Rotation
a[3][5] = x[3][2]
a[3][4] = x[3][1]
a[3][3] = x[3][0]
a[3][2] = x[3][11]
a[3][1] = x[3][10]
a[3][0] = x[3][9]
a[3][9] = x[3][6]
a[3][10] = x[3][7]
a[3][11] = x[3][8]
a[3][6] = x[3][3]
a[3][7] = x[3][4]
a[3][8] = x[3][5]
def D(a):
x = copy.deepcopy(a)
# Face Rotation
a[6][6] = x[8][6]
a[6][7] = x[7][6]
a[6][8] = x[6][6]
a[7][6] = x[8][7]
a[7][8] = x[6][7]
a[8][6] = x[8][8]
a[8][7] = x[7][8]
a[8][8] = x[6][8]
# Side Rotation
a[5][6] = x[5][3]
a[5][7] = x[5][4]
a[5][8] = x[5][5]
a[5][9] = x[5][6]
a[5][10] = x[5][7]
a[5][11] = x[5][8]
a[5][0] = x[5][9]
a[5][1] = x[5][10]
a[5][2] = x[5][11]
a[5][3] = x[5][0]
a[5][4] = x[5][1]
a[5][5] = x[5][2]
def Di(a):
x = copy.deepcopy(a)
# Face Rotation
a[8][6] = x[6][6]
a[7][6] = x[6][7]
a[6][6] = x[6][8]
a[8][7] = x[7][6]
a[6][7] = x[7][8]
a[8][8] = x[8][6]
a[7][8] = x[8][7]
a[6][8] = x[8][8]
# Side Rotation
a[5][3] = x[5][6]
a[5][4] = x[5][7]
a[5][5] = x[5][8]
a[5][6] = x[5][9]
a[5][7] = x[5][10]
a[5][8] = x[5][11]
a[5][9] = x[5][0]
a[5][10] = x[5][1]
a[5][11] = x[5][2]
a[5][0] = x[5][3]
a[5][1] = x[5][4]
a[5][2] = x[5][5]
def B(a):
x = copy.deepcopy(a)
# Face Rotation
a[3][0] = x[5][0]
a[3][1] = x[4][0]
a[3][2] = x[3][0]
a[4][0] = x[5][1]
a[4][2] = x[3][1]
a[5][0] = x[5][2]
a[5][1] = x[4][2]
a[5][2] = x[3][2]
# Side Rotation
a[0][8] = x[5][11]
a[0][7] = x[4][11]
a[0][6] = x[3][11]
a[3][3] = x[0][8]
a[4][3] = x[0][7]
a[5][3] = x[0][6]
a[8][8] = x[5][3]
a[8][7] = x[4][3]
a[8][6] = x[3][3]
a[3][11] = x[8][8]
a[4][11] = x[8][7]
a[5][11] = x[8][6]
def Bi(a):
x = copy.deepcopy(a)
#Face Rotation
a[5][0] = x[3][0]
a[4][0] = x[3][1]
a[3][0] = x[3][2]
a[5][1] = x[4][0]
a[3][1] = x[4][2]
a[5][2] = x[5][0]
a[4][2] = x[5][1]
a[3][2] = x[5][2]
# Side Rotation
a[5][11] = x[0][8]
a[4][11] = x[0][7]
a[3][11] = x[0][6]
a[0][8] = x[3][3]
a[0][7] = x[4][3]
a[0][6] = x[5][3]
a[5][3] = x[8][8]
a[4][3] = x[8][7]
a[3][3] = x[8][6]
a[8][8] = x[3][11]
a[8][7] = x[4][11]
a[8][6] = x[5][11]
def HR(a): #Middle row horizontally to the right
x = copy.deepcopy(a)
a[4][0] = x[4][9]
a[4][1] = x[4][10]
a[4][2] = x[4][11]
a[4][3] = x[4][0]
a[4][4] = x[4][1]
a[4][5] = x[4][2]
a[4][6] = x[4][3]
a[4][7] = x[4][4]
a[4][8] = x[4][5]
a[4][9] = x[4][6]
a[4][10] = x[4][7]
a[4][11] = x[4][8]
def HL(a): #Middle row horizontally to the left
x = copy.deepcopy(a)
a[4][9] = x[4][0]
a[4][10] = x[4][1]
a[4][11] = x[4][2]
a[4][0] = x[4][3]
a[4][1] = x[4][4]
a[4][2] = x[4][5]
a[4][3] = x[4][6]
a[4][4] = x[4][7]
a[4][5] = x[4][8]
a[4][6] = x[4][9]
a[4][7] = x[4][10]
a[4][8] = x[4][11]
def VU(a): #Middle row vertically up
x = copy.deepcopy(a)
a[0][7] = x[3][7]
a[1][7] = x[4][7]
a[2][7] = x[5][7]
a[3][7] = x[6][7]
a[4][7] = x[7][7]
a[5][7] = x[8][7]
a[6][7] = x[5][1]
a[7][7] = x[4][1]
a[8][7] = x[3][1]
a[5][1] = x[0][7]
a[4][1] = x[1][7]
a[3][1] = x[2][7]
def VD(a): #Middle row vertically down
x = copy.deepcopy(a)
a[3][7] = x[0][7]
a[4][7] = x[1][7]
a[5][7] = x[2][7]
a[6][7] = x[3][7]
a[7][7] = x[4][7]
a[8][7] = x[5][7]
a[5][1] = x[6][7]
a[4][1] = x[7][7]
a[3][1] = x[8][7]
a[0][7] = x[5][1]
a[1][7] = x[4][1]
a[2][7] = x[3][1]
| 20.986188
| 48
| 0.329209
| 1,910
| 7,597
| 1.309424
| 0.024607
| 0.054378
| 0.021591
| 0.089564
| 0.801279
| 0.301479
| 0.208317
| 0.161136
| 0.082767
| 0.02479
| 0
| 0.230843
| 0.311175
| 7,597
| 361
| 49
| 21.044321
| 0.247086
| 0.05976
| 0
| 0.049844
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.049844
| false
| 0
| 0.003115
| 0
| 0.05296
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 1
| 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
| 4
|
6af0574fa09928474299db895b2f82bce9d5e320
| 251
|
py
|
Python
|
fastapi/models.py
|
charsyam/geoip
|
d891a2744cffd759945a030c06f8b4ffa4407f53
|
[
"MIT"
] | 4
|
2021-03-27T00:43:28.000Z
|
2021-08-02T03:18:24.000Z
|
fastapi/models.py
|
charsyam/geoip
|
d891a2744cffd759945a030c06f8b4ffa4407f53
|
[
"MIT"
] | null | null | null |
fastapi/models.py
|
charsyam/geoip
|
d891a2744cffd759945a030c06f8b4ffa4407f53
|
[
"MIT"
] | null | null | null |
from pydantic import BaseModel
class BaseEntity(BaseModel):
pass
class CountryEntity(BaseEntity):
ip: str
country: str
self: str
ctype: str
class CityEntity(BaseEntity):
city: str
latitude: float
longitude: float
| 13.210526
| 32
| 0.685259
| 28
| 251
| 6.142857
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.250996
| 251
| 18
| 33
| 13.944444
| 0.914894
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.083333
| 0.083333
| 0
| 0.916667
| 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
| 0
| 1
| 0
|
0
| 4
|
0ab62d189415c752521b02a0392e113bf341357f
| 48
|
py
|
Python
|
src/PythonNetBanxSDK/RequestMethod.py
|
EDUlib/Paysafe
|
64b0fe40b56f2f86b2d7a4e5f5d437d37c460f81
|
[
"MIT"
] | null | null | null |
src/PythonNetBanxSDK/RequestMethod.py
|
EDUlib/Paysafe
|
64b0fe40b56f2f86b2d7a4e5f5d437d37c460f81
|
[
"MIT"
] | null | null | null |
src/PythonNetBanxSDK/RequestMethod.py
|
EDUlib/Paysafe
|
64b0fe40b56f2f86b2d7a4e5f5d437d37c460f81
|
[
"MIT"
] | null | null | null |
class RequestMethod:
GET = "GET"
POST = "POST"
| 16
| 20
| 0.666667
| 6
| 48
| 5.333333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 48
| 3
| 21
| 16
| 0.820513
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 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
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
0ab9aca00b971cda5bd3607e2d643f4ef39f4ef1
| 632
|
py
|
Python
|
uavcan_gui_tool/thirdparty/pyqtgraph/opengl/__init__.py
|
PonomarevDA/inno_uavcan_VTOL_interface
|
76bea66096f1eff72ccc8302b15b6844a66edb2d
|
[
"MIT"
] | null | null | null |
uavcan_gui_tool/thirdparty/pyqtgraph/opengl/__init__.py
|
PonomarevDA/inno_uavcan_VTOL_interface
|
76bea66096f1eff72ccc8302b15b6844a66edb2d
|
[
"MIT"
] | null | null | null |
uavcan_gui_tool/thirdparty/pyqtgraph/opengl/__init__.py
|
PonomarevDA/inno_uavcan_VTOL_interface
|
76bea66096f1eff72ccc8302b15b6844a66edb2d
|
[
"MIT"
] | null | null | null |
from . import shaders
from .GLViewWidget import GLViewWidget
from .MeshData import MeshData
from .items.GLAxisItem import *
from .items.GLBarGraphItem import *
from .items.GLBoxItem import *
from .items.GLGridItem import *
from .items.GLImageItem import *
from .items.GLLinePlotItem import *
from .items.GLMeshItem import *
from .items.GLScatterPlotItem import *
from .items.GLSurfacePlotItem import *
from .items.GLVolumeItem import *
## dynamic imports cause too many problems.
# from .. import importAll
# importAll('items', globals(), locals())
## for backward compatibility:
# MeshData.MeshData = MeshData ## breaks autodoc.
| 31.6
| 50
| 0.778481
| 72
| 632
| 6.833333
| 0.416667
| 0.182927
| 0.27439
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128165
| 632
| 19
| 51
| 33.263158
| 0.892922
| 0.28481
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0adad702108e54e3d6154e4743d26bb2701d703a
| 155
|
py
|
Python
|
python/frontend/cirrus/cirrus/__init__.py
|
rnithin1/cirrus
|
8d97f8037251b8c542afae2df93d88f9faf3b58e
|
[
"Apache-2.0"
] | 1
|
2018-10-10T19:08:35.000Z
|
2018-10-10T19:08:35.000Z
|
python/frontend/cirrus/cirrus/__init__.py
|
rnithin1/cirrus
|
8d97f8037251b8c542afae2df93d88f9faf3b58e
|
[
"Apache-2.0"
] | null | null | null |
python/frontend/cirrus/cirrus/__init__.py
|
rnithin1/cirrus
|
8d97f8037251b8c542afae2df93d88f9faf3b58e
|
[
"Apache-2.0"
] | null | null | null |
import graph
from .CostModel import CostModel
from .GridSearch import GridSearch
from .cf import CollaborativeFiltering
from .lr import LogisticRegression
| 25.833333
| 38
| 0.858065
| 18
| 155
| 7.388889
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116129
| 155
| 5
| 39
| 31
| 0.970803
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0adda1341337a0893f70a88b9f0423bf84b9eae0
| 42
|
py
|
Python
|
cpie/__init__.py
|
tdj-lomf/cpie
|
aba723e03de4b93a25c57dc1a7b704d1257d56a1
|
[
"MIT"
] | null | null | null |
cpie/__init__.py
|
tdj-lomf/cpie
|
aba723e03de4b93a25c57dc1a7b704d1257d56a1
|
[
"MIT"
] | 5
|
2020-03-02T09:48:57.000Z
|
2020-03-06T11:52:44.000Z
|
cpie/__init__.py
|
tdj-lomf/cpie
|
aba723e03de4b93a25c57dc1a7b704d1257d56a1
|
[
"MIT"
] | null | null | null |
from .cpie import CPie
__all__ = ["CPie"]
| 14
| 22
| 0.690476
| 6
| 42
| 4.166667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 42
| 3
| 23
| 14
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0.093023
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0af569686a9320c3390dcdd131038ce715ad45ee
| 599
|
py
|
Python
|
BasicExerciseAndKnowledge/w3cschool/n8_multiplication_formulas.py
|
Jonathan1214/learn-python
|
19d0299b30e953069f19402bff5c464c4d5580be
|
[
"MIT"
] | null | null | null |
BasicExerciseAndKnowledge/w3cschool/n8_multiplication_formulas.py
|
Jonathan1214/learn-python
|
19d0299b30e953069f19402bff5c464c4d5580be
|
[
"MIT"
] | null | null | null |
BasicExerciseAndKnowledge/w3cschool/n8_multiplication_formulas.py
|
Jonathan1214/learn-python
|
19d0299b30e953069f19402bff5c464c4d5580be
|
[
"MIT"
] | null | null | null |
#coding:utf-8
# 题目:输出9*9乘法口诀表。
for i in range(1,10):
for j in range(1,i+1):
if j == i:
print '%d * %d = %d\t' % (j, i, i*j)
else:
print '%d * %d = %d\t' % (j, i, i*j),
# for i, j in zip(range(1,10), range(1,i+1)) if j == i print '%d * %d = %d\t' % (j, i, i*j) else print '%d * %d = %d\t' % (j, i, i*j),
# [(lambda i, j: print "{}*{}={}{}" % (i, j, i * j, "\n" if i == j else "\t"), end="")(j, i) for i in range(1, 10) for j in range(1, i + 1)]
print"\t".join([str(a) +"*"+ str(b) +"="+ str(a * b) for a in range(1, 10) for b in range(1, a+1) if a==b])
| 42.785714
| 140
| 0.430718
| 131
| 599
| 1.969466
| 0.198473
| 0.069767
| 0.186047
| 0.124031
| 0.562016
| 0.511628
| 0.511628
| 0.511628
| 0.511628
| 0.511628
| 0
| 0.053241
| 0.278798
| 599
| 14
| 141
| 42.785714
| 0.543981
| 0.500835
| 0
| 0
| 0
| 0
| 0.108108
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.428571
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
7c1062a70147109d9a45afadc72edcea552b1ab2
| 292
|
py
|
Python
|
tweet.py
|
twwd/twitter-github-action
|
0e025af053e570e26a4ba402f0d77eb7172c78b0
|
[
"MIT"
] | 2
|
2021-05-28T12:15:51.000Z
|
2022-01-31T21:49:08.000Z
|
tweet.py
|
twwd/twitter-github-action
|
0e025af053e570e26a4ba402f0d77eb7172c78b0
|
[
"MIT"
] | null | null | null |
tweet.py
|
twwd/twitter-github-action
|
0e025af053e570e26a4ba402f0d77eb7172c78b0
|
[
"MIT"
] | null | null | null |
import os
import tweepy
auth = tweepy.OAuthHandler(os.environ['TWITTER_API_KEY'], os.environ['TWITTER_API_SECRET_KEY'])
auth.set_access_token(os.environ['TWITTER_ACCESS_TOKEN'], os.environ['TWITTER_ACCESS_TOKEN_SECRET'])
api = tweepy.API(auth)
api.update_status(os.environ['TWEET_BODY'])
| 26.545455
| 100
| 0.797945
| 44
| 292
| 4.977273
| 0.386364
| 0.205479
| 0.292237
| 0.173516
| 0.296804
| 0.296804
| 0.296804
| 0
| 0
| 0
| 0
| 0
| 0.061644
| 292
| 10
| 101
| 29.2
| 0.79927
| 0
| 0
| 0
| 0
| 0
| 0.321918
| 0.167808
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 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
| 1
| 0
| 0
| 0
|
0
| 4
|
7c10aac4c076834cfc8516e780f44088e81dde75
| 24
|
py
|
Python
|
pkg/record/__init__.py
|
GarrettHaley/ida-cfp
|
b1fdef053c71b4cb6508291990fc01d95ad4895e
|
[
"MIT"
] | null | null | null |
pkg/record/__init__.py
|
GarrettHaley/ida-cfp
|
b1fdef053c71b4cb6508291990fc01d95ad4895e
|
[
"MIT"
] | null | null | null |
pkg/record/__init__.py
|
GarrettHaley/ida-cfp
|
b1fdef053c71b4cb6508291990fc01d95ad4895e
|
[
"MIT"
] | 1
|
2020-05-14T20:04:31.000Z
|
2020-05-14T20:04:31.000Z
|
"""Module `record`."""
| 12
| 23
| 0.5
| 2
| 24
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 24
| 1
| 24
| 24
| 0.571429
| 0.666667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
7c16448008ceeeac880a0d02a37f6c67c9fd3108
| 198
|
py
|
Python
|
Doc String 2(Variavel).py
|
dimagela29/Python-POO
|
61904b232b50779f37ed48a46cc317fc709a744e
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
Doc String 2(Variavel).py
|
dimagela29/Python-POO
|
61904b232b50779f37ed48a46cc317fc709a744e
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
Doc String 2(Variavel).py
|
dimagela29/Python-POO
|
61904b232b50779f37ed48a46cc317fc709a744e
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
"""Descrição de varias llinhas"""
""" Esse módul é usado para descrever um codigo qu funções especificas
levando em conta a usabilidade do usuário.
"""
variavel = 'valor'
def funcao():
return 1
| 19.8
| 70
| 0.727273
| 28
| 198
| 5.142857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006135
| 0.176768
| 198
| 10
| 71
| 19.8
| 0.877301
| 0.136364
| 0
| 0
| 0
| 0
| 0.102041
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.