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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a22c18382b78c5dbd1b22c89f134088abcd72d8
| 12,012
|
py
|
Python
|
tests/test_distributed_cnot.py
|
rheaparekh/Distributed_Quantum_Phase_Estimation
|
3441a023fedd113b8b3e68e6c6c07f6642c0344a
|
[
"MIT"
] | 24
|
2021-01-27T14:21:53.000Z
|
2022-03-16T23:43:51.000Z
|
tests/test_distributed_cnot.py
|
rheaparekh/Distributed_Quantum_Phase_Estimation
|
3441a023fedd113b8b3e68e6c6c07f6642c0344a
|
[
"MIT"
] | 15
|
2021-02-28T17:58:52.000Z
|
2021-07-27T15:27:03.000Z
|
tests/test_distributed_cnot.py
|
rheaparekh/Distributed-Quantum-Phase-Estimation
|
3441a023fedd113b8b3e68e6c6c07f6642c0344a
|
[
"MIT"
] | 8
|
2021-01-27T10:23:12.000Z
|
2022-03-12T01:45:57.000Z
|
from interlinq.components import ControllerHost
from interlinq.components import Clock
from interlinq.components import ComputingHost
from interlinq.objects.circuit import Circuit
from interlinq.objects.layer import Layer
from interlinq.objects.qubit import Qubit
from interlinq.objects import Operation
from qunetsim.components.network import Network
from qunetsim.backends import EQSNBackend
import unittest
import time
class TestDistributedCnot(unittest.TestCase):
# Runs before all tests
@classmethod
def setUpClass(cls) -> None:
pass
# Runs after all tests
@classmethod
def tearDownClass(cls) -> None:
pass
def setUp(self):
network = Network.get_instance()
network.start(["host_1", "QPU_1", "QPU_2", "QPU_3"], EQSNBackend())
self.computing_host_1 = ComputingHost(
host_id="QPU_1",
controller_host_id="host_1",
total_qubits=2)
self.computing_host_2 = ComputingHost(
host_id="QPU_2",
controller_host_id="host_1",
total_qubits=2)
self.computing_host_3 = ComputingHost(
host_id="QPU_3",
controller_host_id="host_1",
total_qubits=2)
self.controller_host = ControllerHost(
host_id="host_1",
computing_host_ids=["QPU_1", "QPU_2", "QPU_3"])
self.computing_host_1.add_connections(['QPU_2', 'QPU_3'])
self.computing_host_1.start()
self.computing_host_2.add_connections(['QPU_1', 'QPU_3'])
self.computing_host_2.start()
self.computing_host_3.add_connections(['QPU_1', 'QPU_2'])
self.computing_host_3.start()
self.controller_host.start()
network.add_hosts([
self.controller_host,
self.computing_host_1,
self.computing_host_2,
self.computing_host_3])
self.network = network
self.clock = Clock.get_instance()
def tearDown(self):
self.network.stop(True)
@unittest.skip("")
def test_cnot_1(self):
q_map = {
'QPU_1': ['qubit_1'],
'QPU_2': ['qubit_2']}
# TODO: Maybe layer one is always like this
# Form layer 1
op_1 = Operation(
name="PREPARE_QUBITS",
qids=["qubit_1"],
computing_host_ids=["QPU_1"])
op_2 = Operation(
name="PREPARE_QUBITS",
qids=["qubit_2"],
computing_host_ids=["QPU_2"])
layer_1 = Layer([op_1, op_2])
# TODO: For operations, can the name and computing host ids be found from
# the gate name and qubit id? That would simplify the inputs
# We could have an OperationFactory object that takes the topology as input
# and then it can generate the operations using those two points
# Form layer 2
op_1 = Operation(
name="SINGLE",
qids=["qubit_1"],
gate=Operation.X,
computing_host_ids=["QPU_1"])
op_2 = Operation(
name="SINGLE",
qids=["qubit_2"],
gate=Operation.X,
computing_host_ids=["QPU_2"])
layer_2 = Layer([op_1, op_2])
# Form layer 3
op_1 = Operation(
name="TWO_QUBIT",
qids=["qubit_1", "qubit_2"],
gate=Operation.CNOT,
computing_host_ids=["QPU_1", "QPU_2"])
layer_3 = Layer([op_1])
# Form layer 4
op_1 = Operation(
name="MEASURE",
qids=["qubit_1"],
cids=["qubit_1"],
computing_host_ids=["QPU_1"])
op_2 = Operation(
name="MEASURE",
qids=["qubit_2"],
cids=["qubit_2"],
computing_host_ids=["QPU_2"])
layer_4 = Layer([op_1, op_2])
layers = [layer_1, layer_2, layer_3, layer_4]
circuit = Circuit(q_map, layers)
def controller_host_protocol(host):
host.generate_and_send_schedules(circuit)
host.receive_results()
def computing_host_protocol(host):
host.receive_schedule()
host.send_results()
for i in range(1):
self.controller_host.run_protocol(controller_host_protocol)
self.computing_host_1.run_protocol(computing_host_protocol)
self.computing_host_2.run_protocol(computing_host_protocol)
time.sleep(12)
self.assertEqual(self.clock._maximum_ticks, 13)
self.assertEqual(self.computing_host_1._bits['qubit_1'], 1)
self.assertEqual(self.computing_host_2._bits['qubit_2'], 0)
self.assertEqual(self.controller_host._results['QPU_1']['qubit_1'], 1)
self.assertEqual(self.controller_host._results['QPU_2']['qubit_2'], 0)
@unittest.skip("")
def test_cnot_2(self):
q_map = {
'QPU_1': ['qubit_1'],
'QPU_2': ['qubit_2']}
# Form layer 1
op_1 = Operation(
name="PREPARE_QUBITS",
qids=["qubit_1"],
computing_host_ids=["QPU_1"])
op_2 = Operation(
name="PREPARE_QUBITS",
qids=["qubit_2"],
computing_host_ids=["QPU_2"])
layer_1 = Layer([op_1, op_2])
# Form layer 2
op_1 = Operation(
name="SINGLE",
qids=["qubit_1"],
gate=Operation.X,
computing_host_ids=["QPU_1"])
layer_2 = Layer([op_1])
# Form layer 3
op_1 = Operation(
name="TWO_QUBIT",
qids=["qubit_1", "qubit_2"],
gate=Operation.CNOT,
computing_host_ids=["QPU_1", "QPU_2"])
layer_3 = Layer([op_1])
# Form layer 4
op_1 = Operation(
name="MEASURE",
qids=["qubit_1"],
cids=["qubit_1"],
computing_host_ids=["QPU_1"])
op_2 = Operation(
name="MEASURE",
qids=["qubit_2"],
cids=["qubit_2"],
computing_host_ids=["QPU_2"])
layer_4 = Layer([op_1, op_2])
layers = [layer_1, layer_2, layer_3, layer_4]
circuit = Circuit(q_map, layers)
def controller_host_protocol(host):
host.generate_and_send_schedules(circuit)
host.receive_results()
def computing_host_protocol(host):
host.receive_schedule()
host.send_results()
for i in range(1):
self.controller_host.run_protocol(controller_host_protocol)
self.computing_host_1.run_protocol(computing_host_protocol)
self.computing_host_2.run_protocol(computing_host_protocol)
time.sleep(12)
self.assertEqual(self.clock._maximum_ticks, 13)
self.assertEqual(self.computing_host_1._bits['qubit_1'], 1)
self.assertEqual(self.computing_host_2._bits['qubit_2'], 1)
self.assertEqual(self.controller_host._results['QPU_1']['qubit_1'], 1)
self.assertEqual(self.controller_host._results['QPU_2']['qubit_2'], 1)
@unittest.skip("")
def test_cnot_3(self):
q_map = {
'QPU_1': ['qubit_1'],
'QPU_2': ['qubit_2'],
'QPU_3': ['qubit_3']}
# Form layer 1
op_1 = Operation(
name="PREPARE_QUBITS",
qids=["qubit_1"],
computing_host_ids=["QPU_1"])
op_2 = Operation(
name="PREPARE_QUBITS",
qids=["qubit_2"],
computing_host_ids=["QPU_2"])
op_3 = Operation(
name="PREPARE_QUBITS",
qids=["qubit_3"],
computing_host_ids=["QPU_3"])
layer_1 = Layer([op_1, op_2, op_3])
# Form layer 2
op_1 = Operation(
name="SINGLE",
qids=["qubit_1"],
gate=Operation.X,
computing_host_ids=["QPU_1"])
layer_2 = Layer([op_1])
# Form layer 3
op_1 = Operation(
name="TWO_QUBIT",
qids=["qubit_1", "qubit_2"],
gate=Operation.CNOT,
computing_host_ids=["QPU_1", "QPU_2"])
layer_3 = Layer([op_1])
# Form layer 4
op_1 = Operation(
name="TWO_QUBIT",
qids=["qubit_2", "qubit_3"],
gate=Operation.CNOT,
computing_host_ids=["QPU_2", "QPU_3"])
layer_4 = Layer([op_1])
# Form layer 4
op_1 = Operation(
name="MEASURE",
qids=["qubit_1"],
cids=["qubit_1"],
computing_host_ids=["QPU_1"])
op_2 = Operation(
name="MEASURE",
qids=["qubit_2"],
cids=["qubit_2"],
computing_host_ids=["QPU_2"])
op_3 = Operation(
name="MEASURE",
qids=["qubit_3"],
cids=["qubit_3"],
computing_host_ids=["QPU_3"])
layer_5 = Layer([op_1, op_2, op_3])
layers = [layer_1, layer_2, layer_3, layer_4, layer_5]
circuit = Circuit(q_map, layers)
def controller_host_protocol(host):
host.generate_and_send_schedules(circuit)
host.receive_results()
def computing_host_protocol(host):
host.receive_schedule()
host.send_results()
for i in range(1):
self.controller_host.run_protocol(controller_host_protocol)
self.computing_host_1.run_protocol(computing_host_protocol)
self.computing_host_2.run_protocol(computing_host_protocol)
self.computing_host_3.run_protocol(computing_host_protocol)
time.sleep(18)
self.assertEqual(self.clock._maximum_ticks, 23)
self.assertEqual(self.computing_host_1._bits['qubit_1'], 1)
self.assertEqual(self.computing_host_2._bits['qubit_2'], 1)
self.assertEqual(self.computing_host_3._bits['qubit_3'], 1)
results = self.controller_host._results
self.assertEqual(results['QPU_1']['type'], 'measurement_result')
self.assertEqual(results['QPU_1']['val']['qubit_1'], 1)
self.assertEqual(results['QPU_2']['val']['qubit_2'], 1)
self.assertEqual(results['QPU_3']['val']['qubit_3'], 1)
def test_cnot_4(self):
"""
Test with a different input type
"""
q_map = {
'QPU_1': ['q_1'],
'QPU_2': ['q_2'],
'QPU_3': ['q_3']}
q_1 = Qubit(computing_host_id="QPU_1", q_id="q_1")
q_2 = Qubit(computing_host_id="QPU_2", q_id="q_2")
q_3 = Qubit(computing_host_id="QPU_3", q_id="q_3")
q_1.single(gate=Operation.X)
q_1.two_qubit(gate=Operation.CNOT, target_qubit=q_2)
q_2.two_qubit(gate=Operation.CNOT, target_qubit=q_3)
q_1.measure(bit_id=q_1.q_id)
q_2.measure(bit_id=q_2.q_id)
q_3.measure(bit_id=q_3.q_id)
circuit = Circuit(q_map, qubits=[q_1, q_2, q_3])
def controller_host_protocol(host):
host.generate_and_send_schedules(circuit)
host.receive_results()
def computing_host_protocol(host):
host.receive_schedule()
host.send_results()
for i in range(1):
self.controller_host.run_protocol(controller_host_protocol)
self.computing_host_1.run_protocol(computing_host_protocol)
self.computing_host_2.run_protocol(computing_host_protocol)
self.computing_host_3.run_protocol(computing_host_protocol)
time.sleep(20)
self.assertEqual(self.clock._maximum_ticks, 23)
self.assertEqual(self.computing_host_1._bits['q_1'], 1)
self.assertEqual(self.computing_host_2._bits['q_2'], 1)
self.assertEqual(self.computing_host_3._bits['q_3'], 1)
results = self.controller_host._results
self.assertEqual(results['QPU_1']['type'], 'measurement_result')
self.assertEqual(results['QPU_1']['val']['q_1'], 1)
self.assertEqual(results['QPU_2']['val']['q_2'], 1)
| 30.8
| 89
| 0.581086
| 1,503
| 12,012
| 4.299401
| 0.091816
| 0.146859
| 0.084184
| 0.067626
| 0.773754
| 0.725008
| 0.719437
| 0.699474
| 0.658155
| 0.630455
| 0
| 0.037147
| 0.298535
| 12,012
| 389
| 90
| 30.879177
| 0.729765
| 0.047702
| 0
| 0.701439
| 0
| 0
| 0.090558
| 0
| 0
| 0
| 0
| 0.002571
| 0.089928
| 1
| 0.057554
| false
| 0.007194
| 0.039568
| 0
| 0.100719
| 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
|
a7de90f10d67f75877133dbea7f46d8f9b8d0729
| 83
|
py
|
Python
|
backend/uaConsultants/noti/apps.py
|
connororr/realtime-chat
|
0ff31d01f6303af78a1d1ccfc53606e9c2fdcc64
|
[
"Apache-2.0"
] | 1
|
2020-04-11T07:30:00.000Z
|
2020-04-11T07:30:00.000Z
|
backend/uaConsultants/noti/apps.py
|
connororr/realtime-chat
|
0ff31d01f6303af78a1d1ccfc53606e9c2fdcc64
|
[
"Apache-2.0"
] | 8
|
2020-06-06T01:33:02.000Z
|
2022-02-10T12:59:23.000Z
|
backend/uaConsultants/noti/apps.py
|
connororr/realtime-chat
|
0ff31d01f6303af78a1d1ccfc53606e9c2fdcc64
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class NotiConfig(AppConfig):
name = 'noti'
| 13.833333
| 33
| 0.73494
| 10
| 83
| 6.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180723
| 83
| 5
| 34
| 16.6
| 0.897059
| 0
| 0
| 0
| 0
| 0
| 0.048193
| 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
|
c509bab443c1348d407203d37cdb24f52ae3e501
| 32
|
py
|
Python
|
QuickDemos/Classes.py
|
dannystiv/CMPT-120L-201-22S
|
f2fc5d71d6c75d8f369b1f7207b23d04af186e8c
|
[
"MIT"
] | null | null | null |
QuickDemos/Classes.py
|
dannystiv/CMPT-120L-201-22S
|
f2fc5d71d6c75d8f369b1f7207b23d04af186e8c
|
[
"MIT"
] | null | null | null |
QuickDemos/Classes.py
|
dannystiv/CMPT-120L-201-22S
|
f2fc5d71d6c75d8f369b1f7207b23d04af186e8c
|
[
"MIT"
] | 24
|
2022-02-03T01:37:44.000Z
|
2022-02-17T00:00:10.000Z
|
from Dog import Dog
fido = Dog()
| 16
| 19
| 0.71875
| 6
| 32
| 3.833333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 32
| 2
| 20
| 16
| 0.884615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c50db1e11d72cae41f92af81cabf4fa64443e44f
| 194
|
py
|
Python
|
visualizations/data.py
|
Rotas20/Web-Design-Challenge
|
61864306d6b5e3a3e90403e1246d7e75d8410188
|
[
"ADSL"
] | null | null | null |
visualizations/data.py
|
Rotas20/Web-Design-Challenge
|
61864306d6b5e3a3e90403e1246d7e75d8410188
|
[
"ADSL"
] | null | null | null |
visualizations/data.py
|
Rotas20/Web-Design-Challenge
|
61864306d6b5e3a3e90403e1246d7e75d8410188
|
[
"ADSL"
] | null | null | null |
import pandas as pd
#read in the datafile (as csv)
df = pd.read_csv('/Users/star/GitHub/HW/WebVisualizations/Web-Design-Challenge/Resources/cities.csv')
df.to_html('Data.html',index=False)
| 19.4
| 101
| 0.757732
| 32
| 194
| 4.53125
| 0.78125
| 0.082759
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097938
| 194
| 9
| 102
| 21.555556
| 0.828571
| 0.149485
| 0
| 0
| 0
| 0.333333
| 0.552147
| 0.496933
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 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
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c55db34bc19e7de63dbf06e2e4fcc89597c81200
| 30,778
|
py
|
Python
|
mi/dataset/parser/test/test_wfp_eng__stc_imodem.py
|
mcworden/mi-dataset-1
|
6964ffaf78d1bdd1ec7b6e9f5da4a07cbeaa07d7
|
[
"BSD-2-Clause"
] | null | null | null |
mi/dataset/parser/test/test_wfp_eng__stc_imodem.py
|
mcworden/mi-dataset-1
|
6964ffaf78d1bdd1ec7b6e9f5da4a07cbeaa07d7
|
[
"BSD-2-Clause"
] | null | null | null |
mi/dataset/parser/test/test_wfp_eng__stc_imodem.py
|
mcworden/mi-dataset-1
|
6964ffaf78d1bdd1ec7b6e9f5da4a07cbeaa07d7
|
[
"BSD-2-Clause"
] | null | null | null |
#!/usr/bin/env python
"""
@package mi.dataset.parser.test.test_wfp_eng__stc_imodem
@file marine-integrations/mi/dataset/parser/test/test_wfp_eng__stc_imodem.py
@author Emily Hahn
@brief Test code for a Wfp_eng__stc_imodem data parser
"""
import ntplib
import struct
from StringIO import StringIO
from nose.plugins.attrib import attr
from mi.core.log import get_logger
log = get_logger()
from mi.core.exceptions import SampleException
from mi.dataset.test.test_parser import ParserUnitTestCase
from mi.dataset.dataset_parser import DataSetDriverConfigKeys
from mi.dataset.driver.WFP_ENG.STC_IMODEM.driver import DataTypeKey
from mi.dataset.parser.WFP_E_file_common import StateKey
from mi.dataset.parser.wfp_eng__stc_imodem import WfpEngStcImodemParser
from mi.dataset.parser.wfp_eng__stc_imodem_particles import WfpEngStcImodemStartRecoveredDataParticle
from mi.dataset.parser.wfp_eng__stc_imodem_particles import WfpEngStcImodemStatusRecoveredDataParticle
from mi.dataset.parser.wfp_eng__stc_imodem_particles import WfpEngStcImodemEngineeringRecoveredDataParticle
from mi.dataset.parser.wfp_eng__stc_imodem_particles import WfpEngStcImodemStartTelemeteredDataParticle
from mi.dataset.parser.wfp_eng__stc_imodem_particles import WfpEngStcImodemStatusTelemeteredDataParticle
from mi.dataset.parser.wfp_eng__stc_imodem_particles import WfpEngStcImodemEngineeringTelemeteredDataParticle
import os
from mi.idk.config import Config
RESOURCE_PATH = os.path.join(Config().base_dir(), 'mi', 'dataset', 'driver', 'WFP_ENG', 'wfp', 'resource')
@attr('UNIT', group='mi')
class WfpEngStcImodemParserUnitTestCase(ParserUnitTestCase):
"""
Wfp_eng__stc_imodem Parser unit test suite
"""
TEST_DATA_SHORT = "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\x00R\x9d\xab\xa2R\x9d\xac\x19R\x9d\xac" \
"\x1d\x00\x00\x00\x00A:6\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x01\x03\x00h\x00NR\x9d\xac!C\t\xf2\xf7A9A!\x00\x00\x00" \
"\x00\x00\x00\x00\x00\x00\xf2\x00c\x00OR\x9d\xac&C\xbc\x9f\xa7A7'\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00^" \
"\x00OR\x9d\xac*C\xc5\xad\x08A6\xd5\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00n\x00O"
TEST_DATA = "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\x00R\x9d\xab\xa2R\x9d\xac\x19R\x9d\xac\x1d\x00" \
"\x00\x00\x00A:6\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x01\x03\x00h\x00NR\x9d\xac!C\t\xf2\xf7A9A!\x00\x00\x00\x00" \
"\x00\x00\x00\x00\x00\xf2\x00c\x00OR\x9d\xac&C\xbc\x9f\xa7A7'\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00^" \
"\x00OR\x9d\xac*C\xc5\xad\x08A6\xd5\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00n\x00OR\x9d\xac/C\xb8COA6\xde" \
"\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x00p\x00QR\x9d\xac3C\x98\xe5TA733\x00\x00\x00\x00\x00\x00\x00\x00" \
"\x00\xa4\x00u\x00OR\x9d\xac8C\x9566A7!-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x00o\x00OR\x9d\xac?C\xa1\xd7\xc3" \
"A6\xa6LB\x8bG\xae\x00\x00\x00\x00\x00\xb6\x00v\x00PR\x9d\xacECsS\xfeA7e\xfeB\x88\x00\x00\x00\x00\x00\x00\x00" \
"\x98\x00s\x00QR\x9d\xacKC\x89\x17\x8cA6\xe2\xecB\x84\x99\x9a\x00\x00\x00\x00\x00\xa4\x00\x81\x00PR\x9d\xacQC}\n" \
"\xbfA7\x00hB\x81G\xae\x00\x00\x00\x00\x00\xa2\x00|\x00NR\x9d\xacWCyW\xc7A6\x97\x8dB{\xe1H\x00\x00\x00\x00\x00\x9a" \
"\x00m\x00NR\x9d\xac]C\x8c!#A6\x9f\xbeBuQ\xec\x00\x00\x00\x00\x00\x97\x00s\x00QR\x9d\xaccC\x84!9A6h\nBn\x8f\\\x00" \
"\x00\x00\x00\x00\x9f\x00v\x00NR\x9d\xaciCE\xa5UA6a|Bh=q\x00\x00\x00\x00\x00\x97\x00l\x00PR\x9d\xacoC\xa5\xa5\xad" \
"A5\x94\xafBa\\)\x00\x00\x00\x00\x00\x9b\x00n\x00RR\x9d\xacuC\\\r\x08A6\x14{B[\n=\x00\x00\x00\x00\x00\x9a\x00s\x00" \
"OR\x9d\xac{C\xa3\x0b\xb8A5F\nBT33\x00\x00\x00\x00\x00\x98\x00q\x00NR\x9d\xac\x81CO\xc0+A5\xd7\xdcBM\xd7\n\x00\x00" \
"\x00\x00\x00\x97\x00n\x00PR\x9d\xac\x87Cxp\xd0A5#\xa3BGG\xae\x00\x00\x00\x00\x00\x9b\x00n\x00PR\x9d\xac\x8dC\x84" \
"\xdd\xd9A5X\x10B@\xae\x14\x00\x00\x00\x00\x00\xa5\x00v\x00OR\x9d\xac\x93C\xa0\x85\x01A4j\x7fB:\x14{\x00\x00\x00\x00" \
"\x00\x9c\x00t\x00QR\x9d\xac\x99Cq\xa4\xdbA5:\x92B3\xc2\x8f\x00\x00\x00\x00\x00\x9c\x00x\x00PR\x9d\xac\x9fCg\x07#A5" \
"\x18+B-\x00\x00\x00\x00\x00\x00\x00\x9e\x00m\x00QR\x9d\xac\xa5C\x9bw\x96A4FtB&z\xe1\x00\x00\x00\x00\x00\xd7\x00s" \
"\x00OR\x9d\xac\xabCmP5A4\x9dJB\x1f\xd7\n\x00\x00\x00\x00\x00\x99\x00s\x00PR\x9d\xac\xb1C\xad\x960A3\x8a\tB\x19" \
"(\xf6\x00\x00\x00\x00\x00\x95\x00n\x00OR\x9d\xac\xb7C\x0c\xce]A5\x0f\xfaB\x12\xe1H\x00\x00\x00\x00\x00\x9c\x00u" \
"\x00PR\x9d\xac\xbdC\xa1\xeb\x02A3Z\x85B\x0c=q\x00\x00\x00\x00\x00\x95\x00u\x00OR\x9d\xac\xc3C$\xafOA4\xa23B\x05" \
"\xe1H\x00\x00\x00\x00\x00\x99\x00r\x00PR\x9d\xac\xc9C\xae\xddeA3\x0f(A\xfe(\xf6\x00\x00\x00\x00\x00\x9a\x00o\x00O" \
"R\x9d\xac\xcfA\xfa\xb2:A5\x0b\x0fA\xf2\x8f\\\x00\x00\x00\x00\x00\xaf\x00m\x00P\xff\xff\xff\xff\x00\x00\x00\rR\x9d" \
"\xac\xd4R\x9d\xadQ"
# all flags set to zero
TEST_DATA_BAD_FLAGS = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00R\x9d\xab\xa2R\x9d\xac\x19R\x9d\xac\x1d" \
"\x00\x00\x00\x00A:6\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x01\x03\x00h\x00NR\x9d\xac!C\t\xf2\xf7A9A!\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\xf2\x00c\x00OR\x9d\xac&C\xbc\x9f\xa7A7'\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00^\x00OR\x9d\xac" \
"*C\xc5\xad\x08A6\xd5\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00n\x00O"
# took 5 bytes out of second engineering sample
TEST_DATA_BAD_ENG = "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\x00R\x9d\xab\xa2R\x9d\xac\x19R\x9d\xac\x1d" \
"\x00\x00\x00\x00A:6\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x01\x03\x00h\x00NR\x9d\xac!C\t!\x00\x00\x00\x00\x00" \
"\x00\x00\x00\x00\xf2\x00c\x00OR\x9d\xac&C\xbc\x9f\xa7A7'\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00^\x00OR\x9d\xac" \
"*C\xc5\xad\x08A6\xd5\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00n\x00O"
def state_callback(self, state, file_ingested):
""" Call back method to watch what comes in via the position callback """
self.file_ingested = file_ingested
self.state_callback_value = state
def pub_callback(self, pub):
""" Call back method to watch what comes in via the publish callback """
self.publish_callback_value = pub
def setUp(self):
ParserUnitTestCase.setUp(self)
self.config = {
DataTypeKey.WFP_ENG_STC_IMODEM_RECOVERED: {
DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.wfp_eng__stc_imodem_particles',
DataSetDriverConfigKeys.PARTICLE_CLASS: None,
DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
'status_data_particle_class': WfpEngStcImodemStatusRecoveredDataParticle,
'start_data_particle_class': WfpEngStcImodemStartRecoveredDataParticle,
'engineering_data_particle_class': WfpEngStcImodemEngineeringRecoveredDataParticle
}
},
DataTypeKey.WFP_ENG_STC_IMODEM_TELEMETERED: {
DataSetDriverConfigKeys.PARTICLE_MODULE: 'mi.dataset.parser.wfp_eng__stc_imodem_particles',
DataSetDriverConfigKeys.PARTICLE_CLASS: None,
DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: {
'status_data_particle_class': WfpEngStcImodemStatusTelemeteredDataParticle,
'start_data_particle_class': WfpEngStcImodemStartTelemeteredDataParticle,
'engineering_data_particle_class': WfpEngStcImodemEngineeringTelemeteredDataParticle
}
},
}
self.start_state = {StateKey.POSITION: 0}
# Define test data particles and their associated timestamps which will be
# compared with returned results
timestamp1_time = self.timestamp_to_ntp('R\x9d\xac\x19')
self.particle_a_start_time_recov = WfpEngStcImodemStartRecoveredDataParticle(
b'\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\x00R\x9d\xab\xa2R\x9d\xac\x19',
internal_timestamp=timestamp1_time)
self.particle_a_start_time_telem = WfpEngStcImodemStartTelemeteredDataParticle(
b'\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\x00R\x9d\xab\xa2R\x9d\xac\x19',
internal_timestamp=timestamp1_time)
timestamp1_eng = self.timestamp_to_ntp('R\x9d\xac\x1d')
self.particle_a_eng_recov = WfpEngStcImodemEngineeringRecoveredDataParticle(
b'R\x9d\xac\x1d\x00\x00\x00\x00A:6\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x01\x03\x00h\x00N',
internal_timestamp=timestamp1_eng)
self.particle_a_eng_telem = WfpEngStcImodemEngineeringTelemeteredDataParticle(
b'R\x9d\xac\x1d\x00\x00\x00\x00A:6\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x01\x03\x00h\x00N',
internal_timestamp=timestamp1_eng)
timestamp2_eng = self.timestamp_to_ntp('R\x9d\xac!')
self.particle_b_eng_recov = WfpEngStcImodemEngineeringRecoveredDataParticle(
b'R\x9d\xac!C\t\xf2\xf7A9A!\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf2\x00c\x00O',
internal_timestamp=timestamp2_eng)
self.particle_b_eng_telem = WfpEngStcImodemEngineeringTelemeteredDataParticle(
b'R\x9d\xac!C\t\xf2\xf7A9A!\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf2\x00c\x00O',
internal_timestamp=timestamp2_eng)
timestamp3_eng = self.timestamp_to_ntp('R\x9d\xac&')
self.particle_c_eng_recov = WfpEngStcImodemEngineeringRecoveredDataParticle(
b"R\x9d\xac&C\xbc\x9f\xa7A7'\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00^\x00O",
internal_timestamp=timestamp3_eng)
self.particle_c_eng_telem = WfpEngStcImodemEngineeringTelemeteredDataParticle(
b"R\x9d\xac&C\xbc\x9f\xa7A7'\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00^\x00O",
internal_timestamp=timestamp3_eng)
timestamp4_eng = self.timestamp_to_ntp('R\x9d\xac*')
self.particle_d_eng_recov = WfpEngStcImodemEngineeringRecoveredDataParticle(
b'R\x9d\xac*C\xc5\xad\x08A6\xd5\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00n\x00O',
internal_timestamp=timestamp4_eng)
self.particle_d_eng_telem = WfpEngStcImodemEngineeringTelemeteredDataParticle(
b'R\x9d\xac*C\xc5\xad\x08A6\xd5\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00n\x00O',
internal_timestamp=timestamp4_eng)
timestamp_last_eng = self.timestamp_to_ntp('R\x9d\xac\xcf')
self.particle_last_eng_recov = WfpEngStcImodemEngineeringRecoveredDataParticle(
b'R\x9d\xac\xcfA\xfa\xb2:A5\x0b\x0fA\xf2\x8f\\\x00\x00\x00\x00\x00\xaf\x00m\x00P',
internal_timestamp=timestamp_last_eng)
self.particle_last_eng_telem = WfpEngStcImodemEngineeringTelemeteredDataParticle(
b'R\x9d\xac\xcfA\xfa\xb2:A5\x0b\x0fA\xf2\x8f\\\x00\x00\x00\x00\x00\xaf\x00m\x00P',
internal_timestamp=timestamp_last_eng)
timestamp1_status = self.timestamp_to_ntp('R\x9d\xac\xd4')
self.particle_a_status_recov = WfpEngStcImodemStatusRecoveredDataParticle(
b'\xff\xff\xff\xff\x00\x00\x00\rR\x9d\xac\xd4R\x9d\xadQ',
internal_timestamp=timestamp1_status)
self.particle_a_status_telem = WfpEngStcImodemStatusTelemeteredDataParticle(
b'\xff\xff\xff\xff\x00\x00\x00\rR\x9d\xac\xd4R\x9d\xadQ',
internal_timestamp=timestamp1_status)
# uncomment the following to generate particles in yml format for driver testing results files
#self.particle_to_yml(self.particle_a_start_time_recov)
#self.particle_to_yml(self.particle_a_eng)
#self.particle_to_yml(self.particle_b_eng)
#self.particle_to_yml(self.particle_c_eng)
#self.particle_to_yml(self.particle_d_eng)
#self.particle_to_yml(self.particle_a_stat)
self.file_ingested = False
self.state_callback_value = None
self.publish_callback_value = None
def timestamp_to_ntp(self, hex_timestamp):
fields = struct.unpack('>I', hex_timestamp)
timestamp = int(fields[0])
return ntplib.system_to_ntp_time(timestamp)
def assert_result(self, result, position, particle, ingested):
self.assertEqual(result, [particle])
self.assertEqual(self.file_ingested, ingested)
self.assertEqual(self.parser._state[StateKey.POSITION], position)
self.assertEqual(self.state_callback_value[StateKey.POSITION], position)
self.assert_(isinstance(self.publish_callback_value, list))
self.assertEqual(self.publish_callback_value[0], particle)
def test_simple_recovered(self):
"""
Read test data and pull out data particles one at a time.
Assert that the results are those we expected.
"""
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_SHORT)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_RECOVERED), self.start_state, self.stream_handle,
self.state_callback, self.pub_callback)
# start with the start time record
result = self.parser.get_records(1)
self.assert_result(result, 24, self.particle_a_start_time_recov, False)
# next get engineering records
result = self.parser.get_records(1)
self.assert_result(result, 50, self.particle_a_eng_recov, False)
result = self.parser.get_records(1)
self.assert_result(result, 76, self.particle_b_eng_recov, False)
result = self.parser.get_records(1)
self.assert_result(result, 102, self.particle_c_eng_recov, False)
result = self.parser.get_records(1)
self.assert_result(result, 128, self.particle_d_eng_recov, True)
# no data left, dont move the position
result = self.parser.get_records(1)
self.assertEqual(result, [])
self.assertEqual(self.parser._state[StateKey.POSITION], 128)
self.assertEqual(self.state_callback_value[StateKey.POSITION], 128)
self.assert_(isinstance(self.publish_callback_value, list))
self.assertEqual(self.publish_callback_value[0], self.particle_d_eng_recov)
def test_simple_telemetered(self):
"""
Read test data and pull out data particles one at a time.
Assert that the results are those we expected.
"""
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_SHORT)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_TELEMETERED), self.start_state, self.stream_handle,
self.state_callback, self.pub_callback)
# start with the start time record
result = self.parser.get_records(1)
self.assert_result(result, 24, self.particle_a_start_time_telem, False)
# next get engineering records
result = self.parser.get_records(1)
self.assert_result(result, 50, self.particle_a_eng_telem, False)
result = self.parser.get_records(1)
self.assert_result(result, 76, self.particle_b_eng_telem, False)
result = self.parser.get_records(1)
self.assert_result(result, 102, self.particle_c_eng_telem, False)
result = self.parser.get_records(1)
self.assert_result(result, 128, self.particle_d_eng_telem, True)
# no data left, dont move the position
result = self.parser.get_records(1)
self.assertEqual(result, [])
self.assertEqual(self.parser._state[StateKey.POSITION], 128)
self.assertEqual(self.state_callback_value[StateKey.POSITION], 128)
self.assert_(isinstance(self.publish_callback_value, list))
self.assertEqual(self.publish_callback_value[0], self.particle_d_eng_telem)
def test_get_many_recovered(self):
"""
Read test data and pull out multiple data particles at one time.
Assert that the results are those we expected.
"""
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_SHORT)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_RECOVERED), self.start_state, self.stream_handle,
self.state_callback, self.pub_callback)
# start with the start time record
result = self.parser.get_records(1)
self.assert_result(result, 24, self.particle_a_start_time_recov, False)
result = self.parser.get_records(4)
self.assertEqual(result, [self.particle_a_eng_recov,
self.particle_b_eng_recov,
self.particle_c_eng_recov,
self.particle_d_eng_recov])
self.assertEqual(self.parser._state[StateKey.POSITION], 128)
self.assertEqual(self.state_callback_value[StateKey.POSITION], 128)
self.assertEqual(self.publish_callback_value[0], self.particle_a_eng_recov)
self.assertEqual(self.publish_callback_value[1], self.particle_b_eng_recov)
self.assertEqual(self.publish_callback_value[2], self.particle_c_eng_recov)
self.assertEqual(self.publish_callback_value[3], self.particle_d_eng_recov)
self.assertEqual(self.file_ingested, True)
def test_get_many_telemetered(self):
"""
Read test data and pull out multiple data particles at one time.
Assert that the results are those we expected.
"""
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_SHORT)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_TELEMETERED), self.start_state, self.stream_handle,
self.state_callback, self.pub_callback)
# start with the start time record
result = self.parser.get_records(1)
self.assert_result(result, 24, self.particle_a_start_time_telem, False)
result = self.parser.get_records(4)
self.assertEqual(result, [self.particle_a_eng_telem,
self.particle_b_eng_telem,
self.particle_c_eng_telem,
self.particle_d_eng_telem])
self.assertEqual(self.parser._state[StateKey.POSITION], 128)
self.assertEqual(self.state_callback_value[StateKey.POSITION], 128)
self.assertEqual(self.publish_callback_value[0], self.particle_a_eng_telem)
self.assertEqual(self.publish_callback_value[1], self.particle_b_eng_telem)
self.assertEqual(self.publish_callback_value[2], self.particle_c_eng_telem)
self.assertEqual(self.publish_callback_value[3], self.particle_d_eng_telem)
self.assertEqual(self.file_ingested, True)
def test_long_stream_recovered(self):
"""
Test a long stream of data
"""
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_RECOVERED), self.start_state, self.stream_handle,
self.state_callback, self.pub_callback)
# start with the start time record
result = self.parser.get_records(1)
self.assert_result(result, 24, self.particle_a_start_time_recov, False)
result = self.parser.get_records(32)
self.assertEqual(result[0], self.particle_a_eng_recov)
self.assertEqual(result[-1], self.particle_last_eng_recov)
self.assertEqual(self.parser._state[StateKey.POSITION], 856)
self.assertEqual(self.state_callback_value[StateKey.POSITION], 856)
self.assertEqual(self.publish_callback_value[-1], self.particle_last_eng_recov)
result = self.parser.get_records(1)
self.assert_result(result, 872, self.particle_a_status_recov, True)
def test_long_stream_telemetered(self):
"""
Test a long stream of data
"""
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_TELEMETERED), self.start_state, self.stream_handle,
self.state_callback, self.pub_callback)
# start with the start time record
result = self.parser.get_records(1)
self.assert_result(result, 24, self.particle_a_start_time_telem, False)
result = self.parser.get_records(32)
self.assertEqual(result[0], self.particle_a_eng_telem)
self.assertEqual(result[-1], self.particle_last_eng_telem)
self.assertEqual(self.parser._state[StateKey.POSITION], 856)
self.assertEqual(self.state_callback_value[StateKey.POSITION], 856)
self.assertEqual(self.publish_callback_value[-1], self.particle_last_eng_telem)
result = self.parser.get_records(1)
self.assert_result(result, 872, self.particle_a_status_telem, True)
def test_after_header_recovered(self):
"""
Test starting the parser in a state in the middle of processing
"""
new_state = {StateKey.POSITION: 24}
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_SHORT)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_RECOVERED), new_state, self.stream_handle,
self.state_callback, self.pub_callback)
# get engineering records
result = self.parser.get_records(1)
self.assert_result(result, 50, self.particle_a_eng_recov, False)
result = self.parser.get_records(1)
self.assert_result(result, 76, self.particle_b_eng_recov, False)
result = self.parser.get_records(1)
self.assert_result(result, 102, self.particle_c_eng_recov, False)
result = self.parser.get_records(1)
self.assert_result(result, 128, self.particle_d_eng_recov, True)
def test_after_header_telemetered(self):
"""
Test starting the parser in a state in the middle of processing
"""
new_state = {StateKey.POSITION: 24}
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_SHORT)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_TELEMETERED), new_state, self.stream_handle,
self.state_callback, self.pub_callback)
# get engineering records
result = self.parser.get_records(1)
self.assert_result(result, 50, self.particle_a_eng_telem, False)
result = self.parser.get_records(1)
self.assert_result(result, 76, self.particle_b_eng_telem, False)
result = self.parser.get_records(1)
self.assert_result(result, 102, self.particle_c_eng_telem, False)
result = self.parser.get_records(1)
self.assert_result(result, 128, self.particle_d_eng_telem, True)
def test_mid_state_start_recovered(self):
"""
Test starting the parser in a state in the middle of processing
"""
new_state = {StateKey.POSITION:76}
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_SHORT)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_RECOVERED), new_state, self.stream_handle,
self.state_callback, self.pub_callback)
result = self.parser.get_records(1)
self.assert_result(result, 102, self.particle_c_eng_recov, False)
result = self.parser.get_records(1)
self.assert_result(result, 128, self.particle_d_eng_recov, True)
def test_mid_state_start_telemetered(self):
"""
Test starting the parser in a state in the middle of processing
"""
new_state = {StateKey.POSITION:76}
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_SHORT)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_TELEMETERED), new_state, self.stream_handle,
self.state_callback, self.pub_callback)
result = self.parser.get_records(1)
self.assert_result(result, 102, self.particle_c_eng_telem, False)
result = self.parser.get_records(1)
self.assert_result(result, 128, self.particle_d_eng_telem, True)
def test_set_state_recovered(self):
"""
Test changing to a new state after initializing the parser and
reading data, as if new data has been found and the state has
changed
"""
new_state = {StateKey.POSITION: 76}
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_SHORT)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_RECOVERED), self.start_state, self.stream_handle,
self.state_callback, self.pub_callback)
# start with the start time record
result = self.parser.get_records(1)
self.assert_result(result, 24, self.particle_a_start_time_recov, False)
# set the new state, the essentially skips engineering a and b
self.parser.set_state(new_state)
result = self.parser.get_records(1)
self.assert_result(result, 102, self.particle_c_eng_recov, False)
result = self.parser.get_records(1)
self.assert_result(result, 128, self.particle_d_eng_recov, True)
def test_set_state_telemetered(self):
"""
Test changing to a new state after initializing the parser and
reading data, as if new data has been found and the state has
changed
"""
new_state = {StateKey.POSITION: 76}
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_SHORT)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_TELEMETERED), self.start_state, self.stream_handle,
self.state_callback, self.pub_callback)
# start with the start time record
result = self.parser.get_records(1)
self.assert_result(result, 24, self.particle_a_start_time_telem, False)
# set the new state, the essentially skips engineering a and b
self.parser.set_state(new_state)
result = self.parser.get_records(1)
self.assert_result(result, 102, self.particle_c_eng_telem, False)
result = self.parser.get_records(1)
self.assert_result(result, 128, self.particle_d_eng_telem, True)
def test_bad_flags_recovered(self):
"""
test that we don't parse any records when the flags are not what we expect
"""
with self.assertRaises(SampleException):
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_BAD_FLAGS)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_RECOVERED), self.start_state, self.stream_handle,
self.state_callback, self.pub_callback)
def test_bad_flags_telemetered(self):
"""
test that we don't parse any records when the flags are not what we expect
"""
with self.assertRaises(SampleException):
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_BAD_FLAGS)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_TELEMETERED), self.start_state, self.stream_handle,
self.state_callback, self.pub_callback)
def test_bad_data_recovered(self):
"""
Ensure that missing data causes us to miss records
TODO: This test should be improved if we come up with a more accurate regex for the data sample
"""
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_BAD_ENG)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_RECOVERED), self.start_state, self.stream_handle,
self.state_callback, self.pub_callback)
# start with the start time record
result = self.parser.get_records(1)
self.assert_result(result, 24, self.particle_a_start_time_recov, False)
# next get engineering records
result = self.parser.get_records(4)
if len(result) == 4:
self.fail("We got 4 records, the bad data should only make 3")
def test_bad_data_telemetered(self):
"""
Ensure that missing data causes us to miss records
TODO: This test should be improved if we come up with a more accurate regex for the data sample
"""
self.stream_handle = StringIO(WfpEngStcImodemParserUnitTestCase.TEST_DATA_BAD_ENG)
self.parser = WfpEngStcImodemParser(
self.config.get(DataTypeKey.WFP_ENG_STC_IMODEM_TELEMETERED), self.start_state, self.stream_handle,
self.state_callback, self.pub_callback)
# start with the start time record
result = self.parser.get_records(1)
self.assert_result(result, 24, self.particle_a_start_time_telem, False)
# next get engineering records
result = self.parser.get_records(4)
if len(result) == 4:
self.fail("We got 4 records, the bad data should only make 3")
def particle_to_yml(self, particles, filename, mode='w'):
"""
This is added as a testing helper, not actually as part of the parser tests. Since the same particles
will be used for the driver test it is helpful to write them to .yml in the same form they need in the
results.yml fids here.
"""
# open write append, if you want to start from scratch manually delete this fid
fid = open(os.path.join(RESOURCE_PATH, filename), mode)
fid.write('header:\n')
fid.write(" particle_object: 'MULTIPLE'\n")
fid.write(" particle_type: 'MULTIPLE'\n")
fid.write('data:\n')
for i in range(0, len(particles)):
particle_dict = particles[i].generate_dict()
fid.write(' - _index: %d\n' %(i+1))
fid.write(' particle_object: %s\n' % particles[i].__class__.__name__)
fid.write(' particle_type: %s\n' % particle_dict.get('stream_name'))
fid.write(' internal_timestamp: %f\n' % particle_dict.get('internal_timestamp'))
for val in particle_dict.get('values'):
if isinstance(val.get('value'), float):
fid.write(' %s: %16.16f\n' % (val.get('value_id'), val.get('value')))
else:
fid.write(' %s: %s\n' % (val.get('value_id'), val.get('value')))
fid.close()
| 53.341421
| 133
| 0.697414
| 4,228
| 30,778
| 4.875118
| 0.108562
| 0.11469
| 0.139724
| 0.143218
| 0.798467
| 0.781098
| 0.751989
| 0.719872
| 0.680671
| 0.671502
| 0
| 0.077215
| 0.194197
| 30,778
| 576
| 134
| 53.434028
| 0.753881
| 0.109819
| 0
| 0.556136
| 0
| 0.125326
| 0.206303
| 0.187416
| 0
| 0
| 0
| 0.003472
| 0.211488
| 1
| 0.057441
| false
| 0
| 0.049608
| 0
| 0.122715
| 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
|
3d6ab4165059a6135e0a45c2cc66ada497d9dbd3
| 204
|
py
|
Python
|
backend/api_v4/admin.py
|
AstroMatt/esa-subjective-time-perception
|
e23b09d1f13a8f51057178509beebd697789721f
|
[
"MIT"
] | 1
|
2017-02-25T10:32:01.000Z
|
2017-02-25T10:32:01.000Z
|
backend/api_v4/admin.py
|
AstroMatt/esa-subjective-time-perception
|
e23b09d1f13a8f51057178509beebd697789721f
|
[
"MIT"
] | 23
|
2017-10-02T13:59:20.000Z
|
2017-12-27T21:32:17.000Z
|
backend/api_v4/admin.py
|
AstroMatt/esa-time-perception
|
e23b09d1f13a8f51057178509beebd697789721f
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from backend.api_v4.models import Result
@admin.register(Result)
class ResultAdmin(admin.ModelAdmin):
change_list_template = 'admin/change_list_filter_sidebar.html'
| 25.5
| 66
| 0.823529
| 28
| 204
| 5.785714
| 0.714286
| 0.123457
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005435
| 0.098039
| 204
| 7
| 67
| 29.142857
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0.181373
| 0.181373
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3d819405f1a76ed51bf9fbd280327f3ba15c445e
| 26
|
py
|
Python
|
src/fs/opener/__init__.py
|
glenfant/fs.datalake
|
cb1bb11e3e048d7b8053af070bc7a6812c089207
|
[
"Unlicense"
] | 3
|
2019-08-05T06:27:53.000Z
|
2019-08-08T21:16:11.000Z
|
src/fs/opener/__init__.py
|
glenfant/fs.datalake
|
cb1bb11e3e048d7b8053af070bc7a6812c089207
|
[
"Unlicense"
] | 1
|
2021-03-22T16:41:27.000Z
|
2021-03-22T16:41:27.000Z
|
src/fs/opener/__init__.py
|
glenfant/fs.datalake
|
cb1bb11e3e048d7b8053af070bc7a6812c089207
|
[
"Unlicense"
] | null | null | null |
"""The Datalake opener"""
| 13
| 25
| 0.653846
| 3
| 26
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 26
| 1
| 26
| 26
| 0.73913
| 0.730769
| 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
|
3d858a47be4024986acca3c7b2c825575eaecf7f
| 150
|
py
|
Python
|
scripts/test/validate-user.py
|
Kuanysh80/sdg-data-kazstat
|
dbd52aedab9aeb7d4019c728dbf976fa3d438e99
|
[
"MIT"
] | null | null | null |
scripts/test/validate-user.py
|
Kuanysh80/sdg-data-kazstat
|
dbd52aedab9aeb7d4019c728dbf976fa3d438e99
|
[
"MIT"
] | null | null | null |
scripts/test/validate-user.py
|
Kuanysh80/sdg-data-kazstat
|
dbd52aedab9aeb7d4019c728dbf976fa3d438e99
|
[
"MIT"
] | null | null | null |
from gitgang.github import members_only
members_only(github_org='kazstat', github_repo='sdg-data-kazstat', gangfile='scripts/test/github-users.yml')
| 37.5
| 108
| 0.813333
| 22
| 150
| 5.363636
| 0.727273
| 0.186441
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.053333
| 150
| 3
| 109
| 50
| 0.830986
| 0
| 0
| 0
| 0
| 0
| 0.346667
| 0.193333
| 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
|
3d9e170c2da60ee20691d505477b0bcbcd3c3fd5
| 1,604
|
py
|
Python
|
result/migrations/tab/0102_auto_20200630_0955.py
|
Uqhs-1/uqhs
|
1c7199d8c23a9d9eb3f75b1e36633a145fd2cd40
|
[
"MIT"
] | 3
|
2020-06-16T20:03:31.000Z
|
2021-01-17T20:45:51.000Z
|
result/migrations/tab/0102_auto_20200630_0955.py
|
Uqhs-1/uqhs
|
1c7199d8c23a9d9eb3f75b1e36633a145fd2cd40
|
[
"MIT"
] | 8
|
2020-02-08T09:04:08.000Z
|
2021-06-09T18:31:03.000Z
|
result/migrations/tab/0102_auto_20200630_0955.py
|
Uqhs-1/uqhs
|
1c7199d8c23a9d9eb3f75b1e36633a145fd2cd40
|
[
"MIT"
] | null | null | null |
# Generated by Django 2.1.3 on 2020-06-30 07:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('result', '0101_auto_20200626_1450'),
]
operations = [
migrations.AddField(
model_name='btutor',
name='first_term',
field=models.CharField(blank=True, default='1st Term', max_length=30, null=True),
),
migrations.AddField(
model_name='btutor',
name='second_term',
field=models.CharField(blank=True, default='1st Term', max_length=30, null=True),
),
migrations.AddField(
model_name='btutor',
name='third_term',
field=models.CharField(blank=True, default='1st Term', max_length=30, null=True),
),
migrations.AlterField(
model_name='annual',
name='term',
field=models.CharField(blank=True, help_text='Select subject term', max_length=30, null=True),
),
migrations.AlterField(
model_name='btutor',
name='created',
field=models.DateTimeField(default='2020-06-30', max_length=200),
),
migrations.AlterField(
model_name='downloadformat',
name='created',
field=models.DateTimeField(default='2020-06-30', max_length=200),
),
migrations.AlterField(
model_name='student_info',
name='term',
field=models.CharField(blank=True, default='1st Term', max_length=30, null=True),
),
]
| 32.734694
| 106
| 0.57606
| 169
| 1,604
| 5.337278
| 0.325444
| 0.069845
| 0.083149
| 0.133038
| 0.752772
| 0.752772
| 0.711752
| 0.666297
| 0.666297
| 0.666297
| 0
| 0.059397
| 0.296758
| 1,604
| 48
| 107
| 33.416667
| 0.740248
| 0.028055
| 0
| 0.666667
| 1
| 0
| 0.134233
| 0.014772
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.02381
| 0
| 0.095238
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3dced762e0b66297fdacfde7976df83ea37c67d1
| 265
|
py
|
Python
|
hello.py
|
AnteMulari/PythonProgramming
|
c965ca80b68c3946497aaeda93e246d802d94aaf
|
[
"MIT"
] | null | null | null |
hello.py
|
AnteMulari/PythonProgramming
|
c965ca80b68c3946497aaeda93e246d802d94aaf
|
[
"MIT"
] | null | null | null |
hello.py
|
AnteMulari/PythonProgramming
|
c965ca80b68c3946497aaeda93e246d802d94aaf
|
[
"MIT"
] | null | null | null |
### Do something - what - print
### Data source? - what data is being printed?
### Output device? - where the data is being printed?
### I think these are rather good questions, it would be cool
### to specify these in the code
print("Hello, World!\nI'm Ante")
| 26.5
| 62
| 0.683019
| 42
| 265
| 4.309524
| 0.785714
| 0.066298
| 0.121547
| 0.198895
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.196226
| 265
| 9
| 63
| 29.444444
| 0.849765
| 0.784906
| 0
| 0
| 0
| 0
| 0.560976
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
3de7bad88828daabaadab0472acf744f93e68574
| 65
|
py
|
Python
|
11.app/repl_to_uart.py
|
junhuanchen/BPI-Bit-Python
|
c03ed50f47210288a14c05c66ace0686374110b3
|
[
"MIT"
] | 28
|
2019-06-01T12:23:09.000Z
|
2022-01-30T15:27:51.000Z
|
11.app/repl_to_uart.py
|
BPI-STEAM/micropython-samples
|
c03ed50f47210288a14c05c66ace0686374110b3
|
[
"MIT"
] | 2
|
2019-07-29T12:54:58.000Z
|
2021-11-27T08:44:57.000Z
|
11.app/repl_to_uart.py
|
BPI-STEAM/micropython-samples
|
c03ed50f47210288a14c05c66ace0686374110b3
|
[
"MIT"
] | 15
|
2019-09-13T12:22:39.000Z
|
2022-01-05T08:08:45.000Z
|
import sys
while True:
sys.stdout.write(sys.stdin.read(1))
| 10.833333
| 39
| 0.692308
| 11
| 65
| 4.090909
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018519
| 0.169231
| 65
| 5
| 40
| 13
| 0.814815
| 0
| 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
|
3de8f50f76521a2f43d50e220852310386bc8dcc
| 136
|
py
|
Python
|
chapter-13/exercise08.py
|
krastin/pp-cs3.0
|
502be9aac2d84215db176864e443c219e5e26591
|
[
"MIT"
] | null | null | null |
chapter-13/exercise08.py
|
krastin/pp-cs3.0
|
502be9aac2d84215db176864e443c219e5e26591
|
[
"MIT"
] | null | null | null |
chapter-13/exercise08.py
|
krastin/pp-cs3.0
|
502be9aac2d84215db176864e443c219e5e26591
|
[
"MIT"
] | null | null | null |
'''
After every iteration the compared list grows by one, hence the running time; however it does not affect the overall conclusion.
'''
| 45.333333
| 128
| 0.772059
| 21
| 136
| 5
| 0.904762
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161765
| 136
| 3
| 129
| 45.333333
| 0.921053
| 0.941176
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3debdd95ab1db4484bcf3d0780bbd136f8cd0234
| 51
|
py
|
Python
|
zhaquirks/waxman/__init__.py
|
Thalagyrt/zha-device-handlers
|
ccaedc7e526eb231b9e11d4ca3687c1e05043928
|
[
"Apache-2.0"
] | null | null | null |
zhaquirks/waxman/__init__.py
|
Thalagyrt/zha-device-handlers
|
ccaedc7e526eb231b9e11d4ca3687c1e05043928
|
[
"Apache-2.0"
] | null | null | null |
zhaquirks/waxman/__init__.py
|
Thalagyrt/zha-device-handlers
|
ccaedc7e526eb231b9e11d4ca3687c1e05043928
|
[
"Apache-2.0"
] | null | null | null |
"""Module for WAXMAN devices as remote sensors."""
| 25.5
| 50
| 0.72549
| 7
| 51
| 5.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 51
| 1
| 51
| 51
| 0.840909
| 0.862745
| 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
|
3df73bbb6dfec9b2a07af639e68d14b90b4f4c92
| 87
|
py
|
Python
|
code/pyFoamPackCase.py
|
sosohungry/pyfoam
|
b19e40a0ef1f41268930122226660414722178e6
|
[
"MIT"
] | null | null | null |
code/pyFoamPackCase.py
|
sosohungry/pyfoam
|
b19e40a0ef1f41268930122226660414722178e6
|
[
"MIT"
] | null | null | null |
code/pyFoamPackCase.py
|
sosohungry/pyfoam
|
b19e40a0ef1f41268930122226660414722178e6
|
[
"MIT"
] | null | null | null |
#! /usr/bin/env python
from PyFoam.Applications.PackCase import PackCase
PackCase()
| 14.5
| 49
| 0.770115
| 11
| 87
| 6.090909
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126437
| 87
| 5
| 50
| 17.4
| 0.881579
| 0.241379
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 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
|
9a74d7eabc4c88058db47c133c3409508a5e2340
| 194
|
py
|
Python
|
Face Reconstruction/Fast Few-shot Face alignment by Reconstruction/csl_common/utils/common.py
|
swapnilgarg7/Face-X
|
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
|
[
"MIT"
] | 175
|
2020-10-02T13:42:50.000Z
|
2022-03-30T15:57:12.000Z
|
Face Reconstruction/Fast Few-shot Face alignment by Reconstruction/csl_common/utils/common.py
|
swapnilgarg7/Face-X
|
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
|
[
"MIT"
] | 704
|
2020-09-30T10:44:13.000Z
|
2022-03-30T07:18:28.000Z
|
Face Reconstruction/Fast Few-shot Face alignment by Reconstruction/csl_common/utils/common.py
|
swapnilgarg7/Face-X
|
fab21bf667fa7387b8e73e5a1d72fcba4fba2818
|
[
"MIT"
] | 342
|
2020-10-02T14:04:49.000Z
|
2022-03-31T10:14:20.000Z
|
def init_random(seed=0):
import torch
import numpy
import random
torch.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
numpy.random.seed(seed)
random.seed(seed)
| 17.636364
| 36
| 0.690722
| 28
| 194
| 4.642857
| 0.392857
| 0.230769
| 0.215385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006579
| 0.216495
| 194
| 10
| 37
| 19.4
| 0.848684
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0
| 0.375
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
9a806d2ae88dad951d94faa17d8919f635c784d3
| 211
|
py
|
Python
|
tests/web_methods/throw_exception_async_coroutine.py
|
VNUELIVE/Toto
|
6940b4114fc6b680e0d40ae248b7d2599c954f81
|
[
"MIT"
] | null | null | null |
tests/web_methods/throw_exception_async_coroutine.py
|
VNUELIVE/Toto
|
6940b4114fc6b680e0d40ae248b7d2599c954f81
|
[
"MIT"
] | null | null | null |
tests/web_methods/throw_exception_async_coroutine.py
|
VNUELIVE/Toto
|
6940b4114fc6b680e0d40ae248b7d2599c954f81
|
[
"MIT"
] | null | null | null |
from toto.invocation import *
from time import sleep
from threading import Thread
from tornado.gen import coroutine, Return, Task
@coroutine
def invoke(handler, parameters):
raise Exception('Test Exception')
| 23.444444
| 47
| 0.800948
| 28
| 211
| 6.035714
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132701
| 211
| 8
| 48
| 26.375
| 0.923497
| 0
| 0
| 0
| 0
| 0
| 0.066351
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.571429
| 0
| 0.714286
| 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
|
9aba0c0e108d05d7cb152a4364df0b01179d1385
| 79
|
py
|
Python
|
notebooks/_solutions/case-argo-sea-floats14.py
|
jorisvandenbossche/DS-python-geospatial
|
893a12edc5c203a75815f6dcb5f1e18c577c8cd5
|
[
"BSD-3-Clause"
] | 58
|
2020-10-09T10:10:59.000Z
|
2022-03-07T14:58:07.000Z
|
notebooks/_solutions/13-xarray12.py
|
amitkb3/DS-python-geospatial
|
5f156ebff67e06d59b2a7ef446d1fed746ce0650
|
[
"BSD-3-Clause"
] | 24
|
2020-09-30T19:57:14.000Z
|
2021-10-05T07:21:09.000Z
|
notebooks/_solutions/13-xarray12.py
|
amitkb3/DS-python-geospatial
|
5f156ebff67e06d59b2a7ef446d1fed746ce0650
|
[
"BSD-3-Clause"
] | 19
|
2020-10-05T09:32:18.000Z
|
2022-03-20T00:09:14.000Z
|
subset_mean = argo.sel(date=slice('2012-10-01', '2012-12-01')).mean(dim="date")
| 79
| 79
| 0.683544
| 15
| 79
| 3.533333
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.210526
| 0.037975
| 79
| 1
| 79
| 79
| 0.486842
| 0
| 0
| 0
| 0
| 0
| 0.3
| 0
| 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
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9ad7bc82c75dad1c7147916208477e2c37cdd7d0
| 88
|
py
|
Python
|
src/kgextractiontoolbox/setup_nltk.py
|
torgbuiedunyenyo/KGExtractionToolbox
|
6a177048fa676e8d687edfdb9776c8e935a9898b
|
[
"MIT"
] | null | null | null |
src/kgextractiontoolbox/setup_nltk.py
|
torgbuiedunyenyo/KGExtractionToolbox
|
6a177048fa676e8d687edfdb9776c8e935a9898b
|
[
"MIT"
] | null | null | null |
src/kgextractiontoolbox/setup_nltk.py
|
torgbuiedunyenyo/KGExtractionToolbox
|
6a177048fa676e8d687edfdb9776c8e935a9898b
|
[
"MIT"
] | null | null | null |
import nltk
if __name__ == '__main__':
nltk.download('averaged_perceptron_tagger')
| 17.6
| 47
| 0.75
| 10
| 88
| 5.6
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 88
| 4
| 48
| 22
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0.386364
| 0.295455
| 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
|
b11919db8f28968892898d52b4c4f95a4e5ef422
| 639
|
py
|
Python
|
py/demo/demo/MyOutboundAdapter.py
|
ChipGore/pex-demo
|
8e38b0244490aae2691d4f84a9ab5e1e6f314fa4
|
[
"MIT"
] | null | null | null |
py/demo/demo/MyOutboundAdapter.py
|
ChipGore/pex-demo
|
8e38b0244490aae2691d4f84a9ab5e1e6f314fa4
|
[
"MIT"
] | null | null | null |
py/demo/demo/MyOutboundAdapter.py
|
ChipGore/pex-demo
|
8e38b0244490aae2691d4f84a9ab5e1e6f314fa4
|
[
"MIT"
] | null | null | null |
import iris.pex
class MyOutboundAdapter(iris.pex.OutboundAdapter):
def OnInit(self):
print("[Python] ...MyOutboundAdapter:OnInit() is called")
return
def OnTearDown(self):
print("[Python] ...MyOutboundAdapter:OnTeardown() is called")
return
def printString(self, string):
print("\n[Python] ...MyOutboundAdapter:printString(): " + string)
return "printed successfully"
def printThreeStrings(self, string1, string2, string3):
print("\n[Python] ...MyOutboundAdapter:printThreeStrings(): "+string1+", "+string2+", "+string3)
return "printed successfully"
| 33.631579
| 104
| 0.655712
| 58
| 639
| 7.224138
| 0.413793
| 0.21957
| 0.071599
| 0.152745
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011788
| 0.203443
| 639
| 19
| 105
| 33.631579
| 0.811395
| 0
| 0
| 0.285714
| 0
| 0
| 0.38125
| 0.215625
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.071429
| 0
| 0.714286
| 0.571429
| 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
| 0
| 1
| 1
|
0
| 4
|
b130b96296381e50dde41d27469471100d4ad9a4
| 60
|
py
|
Python
|
natasha/grammars/base.py
|
glibin/natasha
|
4f5c153f754759c189779f9879decd8d218356af
|
[
"MIT"
] | 1
|
2020-01-16T14:02:01.000Z
|
2020-01-16T14:02:01.000Z
|
natasha/grammars/base.py
|
glibin/natasha
|
4f5c153f754759c189779f9879decd8d218356af
|
[
"MIT"
] | null | null | null |
natasha/grammars/base.py
|
glibin/natasha
|
4f5c153f754759c189779f9879decd8d218356af
|
[
"MIT"
] | null | null | null |
from natasha.grammars import Token
TERM = (Token.Term, {})
| 15
| 34
| 0.716667
| 8
| 60
| 5.375
| 0.75
| 0.418605
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 60
| 3
| 35
| 20
| 0.843137
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b132e40e3784e29f405990a074051c11471fd3c5
| 39
|
py
|
Python
|
response_data/__init__.py
|
ddeno/pyapi-gitlab
|
f74b6fb5c13cecae9524997847e928905cc60acf
|
[
"Apache-2.0"
] | 100
|
2015-12-03T18:59:50.000Z
|
2022-03-04T20:25:56.000Z
|
response_data/__init__.py
|
ddeno/pyapi-gitlab
|
f74b6fb5c13cecae9524997847e928905cc60acf
|
[
"Apache-2.0"
] | 88
|
2015-12-02T08:59:35.000Z
|
2020-11-04T10:04:10.000Z
|
response_data/__init__.py
|
ddeno/pyapi-gitlab
|
f74b6fb5c13cecae9524997847e928905cc60acf
|
[
"Apache-2.0"
] | 51
|
2015-01-04T21:07:22.000Z
|
2015-11-30T13:43:18.000Z
|
not_found = {"message":"404 Not found"}
| 39
| 39
| 0.692308
| 6
| 39
| 4.333333
| 0.666667
| 0.615385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085714
| 0.102564
| 39
| 1
| 39
| 39
| 0.657143
| 0
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b153fe2bae1aeef75bd1b29a95ca1050732eb287
| 91
|
py
|
Python
|
blender/arm/lightmapper/properties/filtering.py
|
niacdoial/armory
|
3f9b633fbf772017c576a3f77695a6c28d9956e1
|
[
"Zlib"
] | 2,583
|
2016-07-27T08:25:47.000Z
|
2022-03-31T10:42:17.000Z
|
blender/arm/lightmapper/properties/filtering.py
|
niacdoial/armory
|
3f9b633fbf772017c576a3f77695a6c28d9956e1
|
[
"Zlib"
] | 2,122
|
2016-07-31T14:20:04.000Z
|
2022-03-31T20:44:14.000Z
|
blender/arm/lightmapper/properties/filtering.py
|
niacdoial/armory
|
3f9b633fbf772017c576a3f77695a6c28d9956e1
|
[
"Zlib"
] | 451
|
2016-08-12T05:52:58.000Z
|
2022-03-31T01:33:07.000Z
|
import bpy
from bpy.props import *
class TLM_FilteringProperties(bpy.types.PropertyGroup):
| 22.75
| 55
| 0.835165
| 12
| 91
| 6.25
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 91
| 4
| 55
| 22.75
| 0.903614
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.666667
| null | null | 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b169a7aa497ae4e22efff03acba7f1e52fb33c2f
| 100
|
py
|
Python
|
audio_separation/pretrain/datasets/__init__.py
|
SAGNIKMJR/move2hear-active-AV-separation
|
3c6887aeb94b2a07983469bfd517ca277bd4124a
|
[
"MIT"
] | 8
|
2021-10-05T08:03:32.000Z
|
2022-02-22T07:08:19.000Z
|
audio_separation/pretrain/datasets/__init__.py
|
SAGNIKMJR/move2hear-active-AV-separation
|
3c6887aeb94b2a07983469bfd517ca277bd4124a
|
[
"MIT"
] | 1
|
2021-12-02T00:21:48.000Z
|
2021-12-28T19:07:14.000Z
|
audio_separation/pretrain/datasets/__init__.py
|
SAGNIKMJR/move2hear-active-AV-separation
|
3c6887aeb94b2a07983469bfd517ca277bd4124a
|
[
"MIT"
] | null | null | null |
from audio_separation.pretrain.datasets.dataset import PassiveDataset
__all__ = ["PassiveDataset"]
| 25
| 69
| 0.84
| 10
| 100
| 7.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 100
| 3
| 70
| 33.333333
| 0.858696
| 0
| 0
| 0
| 0
| 0
| 0.14
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 1
| 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
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
b1ac6558fb3a9abc8864f2c26df94d7f2ff43d4c
| 14,649
|
py
|
Python
|
google-datacatalog-sisense-connector/tests/google/datacatalog_connectors/sisense/prepare/datacatalog_tag_template_factory_test.py
|
anugrah86/datacatalog-connectors-bi
|
58cc57e12632cbd1e237b3d6930e519333c51f4e
|
[
"Apache-2.0"
] | 27
|
2020-04-27T21:55:49.000Z
|
2022-02-18T22:09:13.000Z
|
google-datacatalog-sisense-connector/tests/google/datacatalog_connectors/sisense/prepare/datacatalog_tag_template_factory_test.py
|
anugrah86/datacatalog-connectors-bi
|
58cc57e12632cbd1e237b3d6930e519333c51f4e
|
[
"Apache-2.0"
] | 36
|
2020-05-01T15:26:14.000Z
|
2022-03-26T00:09:19.000Z
|
google-datacatalog-sisense-connector/tests/google/datacatalog_connectors/sisense/prepare/datacatalog_tag_template_factory_test.py
|
anugrah86/datacatalog-connectors-bi
|
58cc57e12632cbd1e237b3d6930e519333c51f4e
|
[
"Apache-2.0"
] | 18
|
2020-04-30T22:14:09.000Z
|
2022-01-13T10:28:03.000Z
|
#!/usr/bin/python
#
# Copyright 2021 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.
import unittest
from google.cloud import datacatalog
from google.datacatalog_connectors.sisense.prepare import \
datacatalog_tag_template_factory
class DataCatalogTagTemplateFactoryTest(unittest.TestCase):
__PREPARE_PACKAGE = 'google.datacatalog_connectors.sisense.prepare'
__FACTORY_MODULE = f'{__PREPARE_PACKAGE}.datacatalog_tag_template_factory'
__BOOL_TYPE = datacatalog.FieldType.PrimitiveType.BOOL
__DOUBLE_TYPE = datacatalog.FieldType.PrimitiveType.DOUBLE
__STRING_TYPE = datacatalog.FieldType.PrimitiveType.STRING
__TIMESTAMP_TYPE = datacatalog.FieldType.PrimitiveType.TIMESTAMP
def setUp(self):
self.__factory = datacatalog_tag_template_factory.\
DataCatalogTagTemplateFactory('test-project', 'test-location')
def test_constructor_should_set_instance_attributes(self):
attrs = self.__factory.__dict__
self.assertEqual('test-project',
attrs['_DataCatalogTagTemplateFactory__project_id'])
self.assertEqual('test-location',
attrs['_DataCatalogTagTemplateFactory__location_id'])
def test_make_tag_template_for_dashboard(self):
tag_template = self.__factory.make_tag_template_for_dashboard()
self.assertEqual(
'projects/test-project/locations/test-location/'
'tagTemplates/sisense_dashboard_metadata', tag_template.name)
self.assertEqual('Sisense Dashboard Metadata',
tag_template.display_name)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['id'].type.primitive_type)
self.assertEqual('Id', tag_template.fields['id'].display_name)
self.assertTrue(tag_template.fields['id'].is_required)
self.assertEqual(
self.__STRING_TYPE,
tag_template.fields['owner_username'].type.primitive_type)
self.assertEqual('Owner username',
tag_template.fields['owner_username'].display_name)
self.assertFalse(tag_template.fields['owner_username'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['owner_name'].type.primitive_type)
self.assertEqual('Owner name',
tag_template.fields['owner_name'].display_name)
self.assertFalse(tag_template.fields['owner_name'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['folder_id'].type.primitive_type)
self.assertEqual('Folder Id',
tag_template.fields['folder_id'].display_name)
self.assertFalse(tag_template.fields['folder_id'].is_required)
self.assertEqual(
self.__STRING_TYPE,
tag_template.fields['folder_name'].type.primitive_type)
self.assertEqual('Folder Name',
tag_template.fields['folder_name'].display_name)
self.assertFalse(tag_template.fields['folder_name'].is_required)
self.assertEqual(
self.__STRING_TYPE,
tag_template.fields['folder_entry'].type.primitive_type)
self.assertEqual('Data Catalog Entry for the Folder',
tag_template.fields['folder_entry'].display_name)
self.assertFalse(tag_template.fields['folder_entry'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['datasource'].type.primitive_type)
self.assertEqual('Data Source',
tag_template.fields['datasource'].display_name)
self.assertFalse(tag_template.fields['datasource'].is_required)
self.assertEqual(
self.__TIMESTAMP_TYPE,
tag_template.fields['last_publish'].type.primitive_type)
self.assertEqual('Time it was last published',
tag_template.fields['last_publish'].display_name)
self.assertFalse(tag_template.fields['last_publish'].is_required)
self.assertEqual(
self.__TIMESTAMP_TYPE,
tag_template.fields['last_opened'].type.primitive_type)
self.assertEqual('Time it was last opened',
tag_template.fields['last_opened'].display_name)
self.assertFalse(tag_template.fields['last_opened'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['server_url'].type.primitive_type)
self.assertEqual('Sisense Server Url',
tag_template.fields['server_url'].display_name)
self.assertTrue(tag_template.fields['server_url'].is_required)
def test_make_tag_template_for_folder(self):
tag_template = self.__factory.make_tag_template_for_folder()
self.assertEqual(
'projects/test-project/locations/test-location/'
'tagTemplates/sisense_folder_metadata', tag_template.name)
self.assertEqual('Sisense Folder Metadata', tag_template.display_name)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['id'].type.primitive_type)
self.assertEqual('Id', tag_template.fields['id'].display_name)
self.assertTrue(tag_template.fields['id'].is_required)
self.assertEqual(
self.__STRING_TYPE,
tag_template.fields['owner_username'].type.primitive_type)
self.assertEqual('Owner username',
tag_template.fields['owner_username'].display_name)
self.assertFalse(tag_template.fields['owner_username'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['owner_name'].type.primitive_type)
self.assertEqual('Owner name',
tag_template.fields['owner_name'].display_name)
self.assertFalse(tag_template.fields['owner_name'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['parent_id'].type.primitive_type)
self.assertEqual('Id of Parent',
tag_template.fields['parent_id'].display_name)
self.assertFalse(tag_template.fields['parent_id'].is_required)
self.assertEqual(
self.__STRING_TYPE,
tag_template.fields['parent_name'].type.primitive_type)
self.assertEqual('Parent Folder',
tag_template.fields['parent_name'].display_name)
self.assertFalse(tag_template.fields['parent_name'].is_required)
self.assertEqual(
self.__STRING_TYPE,
tag_template.fields['parent_folder_entry'].type.primitive_type)
self.assertEqual(
'Data Catalog Entry for the parent Folder',
tag_template.fields['parent_folder_entry'].display_name)
self.assertFalse(
tag_template.fields['parent_folder_entry'].is_required)
self.assertEqual(
self.__BOOL_TYPE,
tag_template.fields['has_children'].type.primitive_type)
self.assertEqual('Has children',
tag_template.fields['has_children'].display_name)
self.assertTrue(tag_template.fields['has_children'].is_required)
self.assertEqual(
self.__DOUBLE_TYPE,
tag_template.fields['child_count'].type.primitive_type)
self.assertEqual('Child count',
tag_template.fields['child_count'].display_name)
self.assertFalse(tag_template.fields['child_count'].is_required)
self.assertEqual(
self.__BOOL_TYPE,
tag_template.fields['has_dashboards'].type.primitive_type)
self.assertEqual('Has dashboards',
tag_template.fields['has_dashboards'].display_name)
self.assertTrue(tag_template.fields['has_dashboards'].is_required)
self.assertEqual(
self.__DOUBLE_TYPE,
tag_template.fields['dashboard_count'].type.primitive_type)
self.assertEqual('Dashboard count',
tag_template.fields['dashboard_count'].display_name)
self.assertFalse(tag_template.fields['dashboard_count'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['server_url'].type.primitive_type)
self.assertEqual('Sisense Server Url',
tag_template.fields['server_url'].display_name)
self.assertTrue(tag_template.fields['server_url'].is_required)
def test_make_tag_template_for_jaql(self):
tag_template = self.__factory.make_tag_template_for_jaql()
self.assertEqual(
'projects/test-project/locations/test-location/'
'tagTemplates/sisense_jaql_metadata', tag_template.name)
self.assertEqual('Sisense JAQL Metadata', tag_template.display_name)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['table'].type.primitive_type)
self.assertEqual('Table', tag_template.fields['table'].display_name)
self.assertFalse(tag_template.fields['table'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['column'].type.primitive_type)
self.assertEqual('Column', tag_template.fields['column'].display_name)
self.assertFalse(tag_template.fields['column'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['dimension'].type.primitive_type)
self.assertEqual('Dimension',
tag_template.fields['dimension'].display_name)
self.assertFalse(tag_template.fields['dimension'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['formula'].type.primitive_type)
self.assertEqual('Formula',
tag_template.fields['formula'].display_name)
self.assertFalse(tag_template.fields['formula'].is_required)
self.assertEqual(
self.__STRING_TYPE,
tag_template.fields['aggregation'].type.primitive_type)
self.assertEqual('Aggregation',
tag_template.fields['aggregation'].display_name)
self.assertFalse(tag_template.fields['aggregation'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['server_url'].type.primitive_type)
self.assertEqual('Sisense Server Url',
tag_template.fields['server_url'].display_name)
self.assertTrue(tag_template.fields['server_url'].is_required)
def test_make_tag_template_for_widget(self):
tag_template = self.__factory.make_tag_template_for_widget()
self.assertEqual(
'projects/test-project/locations/test-location/'
'tagTemplates/sisense_widget_metadata', tag_template.name)
self.assertEqual('Sisense Widget Metadata', tag_template.display_name)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['id'].type.primitive_type)
self.assertEqual('Id', tag_template.fields['id'].display_name)
self.assertTrue(tag_template.fields['id'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['type'].type.primitive_type)
self.assertEqual('Type', tag_template.fields['type'].display_name)
self.assertTrue(tag_template.fields['type'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['subtype'].type.primitive_type)
self.assertEqual('Subtype',
tag_template.fields['subtype'].display_name)
self.assertFalse(tag_template.fields['subtype'].is_required)
self.assertEqual(
self.__STRING_TYPE,
tag_template.fields['owner_username'].type.primitive_type)
self.assertEqual('Owner username',
tag_template.fields['owner_username'].display_name)
self.assertFalse(tag_template.fields['owner_username'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['owner_name'].type.primitive_type)
self.assertEqual('Owner name',
tag_template.fields['owner_name'].display_name)
self.assertFalse(tag_template.fields['owner_name'].is_required)
self.assertEqual(
self.__STRING_TYPE,
tag_template.fields['dashboard_id'].type.primitive_type)
self.assertEqual('Dashboard Id',
tag_template.fields['dashboard_id'].display_name)
self.assertTrue(tag_template.fields['dashboard_id'].is_required)
self.assertEqual(
self.__STRING_TYPE,
tag_template.fields['dashboard_title'].type.primitive_type)
self.assertEqual('Dashboard Title',
tag_template.fields['dashboard_title'].display_name)
self.assertTrue(tag_template.fields['dashboard_title'].is_required)
self.assertEqual(
self.__STRING_TYPE,
tag_template.fields['dashboard_entry'].type.primitive_type)
self.assertEqual('Data Catalog Entry for the Dashboard',
tag_template.fields['dashboard_entry'].display_name)
self.assertTrue(tag_template.fields['dashboard_entry'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['datasource'].type.primitive_type)
self.assertEqual('Data Source',
tag_template.fields['datasource'].display_name)
self.assertFalse(tag_template.fields['datasource'].is_required)
self.assertEqual(self.__STRING_TYPE,
tag_template.fields['server_url'].type.primitive_type)
self.assertEqual('Sisense Server Url',
tag_template.fields['server_url'].display_name)
self.assertTrue(tag_template.fields['server_url'].is_required)
| 46.211356
| 79
| 0.663595
| 1,563
| 14,649
| 5.879079
| 0.095969
| 0.160409
| 0.205354
| 0.086843
| 0.832299
| 0.743062
| 0.687561
| 0.63021
| 0.558929
| 0.518228
| 0
| 0.000715
| 0.236125
| 14,649
| 316
| 80
| 46.357595
| 0.820465
| 0.038569
| 0
| 0.493827
| 0
| 0
| 0.162201
| 0.036321
| 0
| 0
| 0
| 0
| 0.497942
| 1
| 0.024691
| false
| 0
| 0.012346
| 0
| 0.065844
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
491c585d5df0f4a82aafcd877a161c7d29ff0297
| 1,705
|
py
|
Python
|
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GL/EXT/light_texture.py
|
JE-Chen/je_old_repo
|
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
|
[
"MIT"
] | null | null | null |
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GL/EXT/light_texture.py
|
JE-Chen/je_old_repo
|
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
|
[
"MIT"
] | null | null | null |
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GL/EXT/light_texture.py
|
JE-Chen/je_old_repo
|
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
|
[
"MIT"
] | null | null | null |
'''OpenGL extension EXT.light_texture
This module customises the behaviour of the
OpenGL.raw.GL.EXT.light_texture to provide a more
Python-friendly API
Overview (from the spec)
This extension defines a general mechanism for substituting the
fragment color computed during texture environment processing in
place of other fragment attributes such as the fragment normal, or
as sources for some of the computations in the fragment processing
pipeline, for example as material or light parameters in the
fragment lighting computations.
Cf ----------------------+
| +-> to lighting parameters
v |
+------------+ +--------+ +-------------+
| | | | | |
| texel |------->| texenv |-----| texture |---> Cf' (to Light Environment
| generation | | | | application | or Fog)
| | | | | |
+------------+ +--------+ +-------------+
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/EXT/light_texture.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.EXT.light_texture import *
from OpenGL.raw.GL.EXT.light_texture import _EXTENSION_NAME
def glInitLightTextureEXT():
'''Return boolean indicating whether this extension is available'''
from OpenGL import extensions
return extensions.hasGLExtension( _EXTENSION_NAME )
### END AUTOGENERATED SECTION
| 38.75
| 84
| 0.592375
| 176
| 1,705
| 5.676136
| 0.5
| 0.06006
| 0.075075
| 0.042042
| 0.098098
| 0.098098
| 0.072072
| 0.072072
| 0
| 0
| 0
| 0
| 0.285631
| 1,705
| 44
| 85
| 38.75
| 0.820197
| 0.824633
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| true
| 0
| 0.777778
| 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
|
4935bd18708b8325113e651253b455a772b064a3
| 1,011
|
py
|
Python
|
psychotherapist.py
|
Ben-Baert/cmtherapists
|
d96f4dc59f8d076ada6070d4e0d5d9c3c8a445a5
|
[
"MIT"
] | null | null | null |
psychotherapist.py
|
Ben-Baert/cmtherapists
|
d96f4dc59f8d076ada6070d4e0d5d9c3c8a445a5
|
[
"MIT"
] | null | null | null |
psychotherapist.py
|
Ben-Baert/cmtherapists
|
d96f4dc59f8d076ada6070d4e0d5d9c3c8a445a5
|
[
"MIT"
] | null | null | null |
import sqlalchemy
engine = sqlalchemy.create_engine('sqlite:///:memory:', echo=True)
Base = sqlalchemy.declarative_base()
class Specialization(Base):
__tablename__ = "specialization"
id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
name = sqlalchemy.Column(sqlalchemy.String)
class Psychotherapist(Base):
__tablename__ = "psychotherapists"
id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
first_name = sqlalchemy.Column(sqlalchemy.String)
last_name = sqlalchemy.Column(sqlalchemy.String)
address = sqlalchemy.Column(sqlalchemy.String, nullable=True)
postal_code = sqlalchemy.Column(sqlalchemy.String, nullable=True)
town = sqlalchemy.Column(sqlalchemy.String, nullable=True)
fee_in_eur = sqlalchemy.Column(sqlalchemy.Integer, nullable=True)
specialization = sqlalchemy.Column(sqlalchemy.Integer,
sqlalchemy.ForeignKey('specialization.id'),
nullable=True)
| 38.884615
| 82
| 0.713155
| 99
| 1,011
| 7.111111
| 0.333333
| 0.227273
| 0.369318
| 0.272727
| 0.480114
| 0.326705
| 0.139205
| 0.139205
| 0
| 0
| 0
| 0
| 0.186944
| 1,011
| 26
| 83
| 38.884615
| 0.856448
| 0
| 0
| 0.105263
| 0
| 0
| 0.064229
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.052632
| 0
| 0.789474
| 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
|
49376b4ede0a0f704e1b06636acfbc3e14ccb628
| 207
|
py
|
Python
|
producers/__init__.py
|
gurleen/dtv-gfx-next
|
529c226a30c9b668a44e2a2470c3593287867caf
|
[
"MIT"
] | null | null | null |
producers/__init__.py
|
gurleen/dtv-gfx-next
|
529c226a30c9b668a44e2a2470c3593287867caf
|
[
"MIT"
] | null | null | null |
producers/__init__.py
|
gurleen/dtv-gfx-next
|
529c226a30c9b668a44e2a2470c3593287867caf
|
[
"MIT"
] | null | null | null |
from .config import read_from_config
from .file_watcher import watch_file
from .http_poller import poll_stats
from .serial import mock_allsport_cg, read_allsport_cg
from .decorator import collect_producers
| 29.571429
| 54
| 0.864734
| 32
| 207
| 5.25
| 0.5625
| 0.119048
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10628
| 207
| 6
| 55
| 34.5
| 0.908108
| 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
|
4964290dda445a765f183c446a8f8264dd1f70c9
| 212
|
py
|
Python
|
Students/Zephyr/Pattern 1.py
|
MikelShifrin/Python1
|
0096a327023a28e0c639042ae01268b07e61943e
|
[
"MIT"
] | 3
|
2019-07-02T13:46:23.000Z
|
2019-08-19T14:41:25.000Z
|
Students/Zephyr/Pattern 1.py
|
MikelShifrin/Python1
|
0096a327023a28e0c639042ae01268b07e61943e
|
[
"MIT"
] | null | null | null |
Students/Zephyr/Pattern 1.py
|
MikelShifrin/Python1
|
0096a327023a28e0c639042ae01268b07e61943e
|
[
"MIT"
] | null | null | null |
import turtle as t
t.setup(700,700)
t.hideturtle()
t.speed(20)
while True:
t.forward(200)
t.left(90)
t.forward(200)
t.left(90)
t.forward(200)
t.left(90)
t.forward(200)
t.left(5)
| 13.25
| 18
| 0.59434
| 39
| 212
| 3.230769
| 0.410256
| 0.253968
| 0.349206
| 0.380952
| 0.555556
| 0.555556
| 0.555556
| 0.555556
| 0.555556
| 0.555556
| 0
| 0.167702
| 0.240566
| 212
| 15
| 19
| 14.133333
| 0.614907
| 0
| 0
| 0.538462
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.076923
| 0
| 0.076923
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
498a3ea6bd2251c5b358c34547f4b5699d0a7f6b
| 2,307
|
py
|
Python
|
tests/test_backends.py
|
aaugustin/django-sesame
|
dba0895508b4febe15a84b24f1e9bbe531eed88b
|
[
"BSD-3-Clause"
] | 639
|
2015-01-26T10:54:08.000Z
|
2022-03-28T19:29:54.000Z
|
tests/test_backends.py
|
aaugustin/django-sesame
|
dba0895508b4febe15a84b24f1e9bbe531eed88b
|
[
"BSD-3-Clause"
] | 69
|
2015-08-27T13:57:47.000Z
|
2022-03-21T08:14:23.000Z
|
tests/test_backends.py
|
aaugustin/django-sesame
|
dba0895508b4febe15a84b24f1e9bbe531eed88b
|
[
"BSD-3-Clause"
] | 46
|
2015-06-01T18:41:31.000Z
|
2022-02-18T09:23:33.000Z
|
from django.test import TestCase, override_settings
from sesame.backends import ModelBackend
from sesame.tokens import create_token
from .mixins import CaptureLogMixin, CreateUserMixin
class TestModelBackend(CaptureLogMixin, CreateUserMixin, TestCase):
def test_token(self):
token = create_token(self.user)
user = ModelBackend().authenticate(request=None, sesame=token)
self.assertEqual(user, self.user)
self.assertLogsContain("Valid token for user john in default scope")
@override_settings(SESAME_MAX_AGE=300)
def test_token_with_max_age(self):
token = create_token(self.user)
user = ModelBackend().authenticate(request=None, sesame=token)
self.assertEqual(user, self.user)
self.assertLogsContain("Valid token for user john in default scope")
def test_no_token(self):
token = None
user = ModelBackend().authenticate(request=None, sesame=token)
self.assertIsNone(user)
self.assertNoLogs()
def test_emtpy_token(self):
token = ""
user = ModelBackend().authenticate(request=None, sesame=token)
self.assertIsNone(user)
self.assertLogsContain("Bad token")
def test_bad_token(self):
token = "~!@#$%^&*~!@#$%^&*~"
user = ModelBackend().authenticate(request=None, sesame=token)
self.assertIsNone(user)
self.assertLogsContain("Bad token")
def test_inactive_user(self):
self.user.is_active = False
self.user.save()
token = create_token(self.user)
user = ModelBackend().authenticate(request=None, sesame=token)
self.assertIsNone(user)
self.assertLogsContain("Unknown or inactive user")
def test_scoped_token(self):
token = create_token(self.user, scope="test")
user = ModelBackend().authenticate(request=None, sesame=token, scope="test")
self.assertEqual(user, self.user)
self.assertLogsContain("Valid token for user john in scope test")
@override_settings(SESAME_MAX_AGE=300)
def test_token_with_max_age_override(self):
token = create_token(self.user)
user = ModelBackend().authenticate(request=None, sesame=token, max_age=-300)
self.assertIsNone(user)
self.assertLogsContain("Expired token")
| 37.819672
| 84
| 0.68834
| 264
| 2,307
| 5.882576
| 0.189394
| 0.092724
| 0.144237
| 0.180296
| 0.730844
| 0.704443
| 0.704443
| 0.647778
| 0.647778
| 0.647778
| 0
| 0.004905
| 0.204595
| 2,307
| 60
| 85
| 38.45
| 0.841417
| 0
| 0
| 0.489796
| 0
| 0
| 0.08886
| 0
| 0
| 0
| 0
| 0
| 0.326531
| 1
| 0.163265
| false
| 0
| 0.081633
| 0
| 0.265306
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
49a2d887fa93918a5b469ddbc6efcd98283345e3
| 225
|
py
|
Python
|
encoding/models/__init__.py
|
pengbo7777/PyTorch-Encoding
|
d85ac987e7fccd98138ba399a5656faa9cefc149
|
[
"MIT"
] | null | null | null |
encoding/models/__init__.py
|
pengbo7777/PyTorch-Encoding
|
d85ac987e7fccd98138ba399a5656faa9cefc149
|
[
"MIT"
] | null | null | null |
encoding/models/__init__.py
|
pengbo7777/PyTorch-Encoding
|
d85ac987e7fccd98138ba399a5656faa9cefc149
|
[
"MIT"
] | null | null | null |
from .model_zoo import get_model
from .model_zoo import model_list
from .model_store import get_model_file, pretrained_model_list
from .texture_attention_net import *
from .sseg import get_segmentation_model, MultiEvalModule
| 37.5
| 62
| 0.866667
| 34
| 225
| 5.352941
| 0.441176
| 0.148352
| 0.131868
| 0.197802
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097778
| 225
| 5
| 63
| 45
| 0.896552
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b8f7cecb1dff0ee44272566a24cdbf10a15d32f4
| 378
|
py
|
Python
|
sheep-and-wolves/main.py
|
michalovsky/knowlegde-based-ai-mini-projects
|
8cfc00eb6b1c03d60bbd72e95a8ec1e50c294774
|
[
"MIT"
] | null | null | null |
sheep-and-wolves/main.py
|
michalovsky/knowlegde-based-ai-mini-projects
|
8cfc00eb6b1c03d60bbd72e95a8ec1e50c294774
|
[
"MIT"
] | null | null | null |
sheep-and-wolves/main.py
|
michalovsky/knowlegde-based-ai-mini-projects
|
8cfc00eb6b1c03d60bbd72e95a8ec1e50c294774
|
[
"MIT"
] | null | null | null |
from SemanticNetsAgent import SemanticNetsAgent
def test():
test_agent = SemanticNetsAgent()
print(test_agent.solve(1, 1))
print(test_agent.solve(2, 2))
print(test_agent.solve(3, 3))
print(test_agent.solve(5, 3))
print(test_agent.solve(6, 3))
print(test_agent.solve(7, 3))
print(test_agent.solve(5, 5))
if __name__ == "__main__":
test()
| 21
| 47
| 0.671958
| 55
| 378
| 4.327273
| 0.309091
| 0.302521
| 0.411765
| 0.558824
| 0.344538
| 0.176471
| 0
| 0
| 0
| 0
| 0
| 0.045307
| 0.18254
| 378
| 17
| 48
| 22.235294
| 0.724919
| 0
| 0
| 0
| 0
| 0
| 0.021164
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.083333
| false
| 0
| 0.083333
| 0
| 0.166667
| 0.583333
| 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
|
770e99775dcdc864a3d1959300473c9b7ef7bfe1
| 89
|
py
|
Python
|
gp/__init__.py
|
lengjia/NAS_NPU
|
600c05ed27c9b1ce63a5c1c4f1fc862d510cfcf0
|
[
"MIT"
] | 135
|
2018-06-09T18:37:42.000Z
|
2022-02-04T22:25:38.000Z
|
gp/__init__.py
|
lengjia/NAS_NPU
|
600c05ed27c9b1ce63a5c1c4f1fc862d510cfcf0
|
[
"MIT"
] | 8
|
2018-11-01T09:33:09.000Z
|
2020-06-09T03:19:07.000Z
|
gp/__init__.py
|
lengjia/NAS_NPU
|
600c05ed27c9b1ce63a5c1c4f1fc862d510cfcf0
|
[
"MIT"
] | 25
|
2018-06-22T07:33:51.000Z
|
2022-03-16T12:45:09.000Z
|
"""
A Harness for creating and using GPs for inference.
-- kandasamy@cs.cmu.edu
"""
| 14.833333
| 53
| 0.662921
| 13
| 89
| 4.538462
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.202247
| 89
| 5
| 54
| 17.8
| 0.830986
| 0.842697
| 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
|
7710ef7b7d6e1afee4ce6c75c7b59f3bc21c660d
| 344
|
py
|
Python
|
util/pip_package/open3d/__init__.py
|
dmontagu/Open3D
|
0667179c2d69f3e191104b6f70378b4dee6f406a
|
[
"MIT"
] | null | null | null |
util/pip_package/open3d/__init__.py
|
dmontagu/Open3D
|
0667179c2d69f3e191104b6f70378b4dee6f406a
|
[
"MIT"
] | 1
|
2021-01-21T13:43:32.000Z
|
2021-01-21T13:43:32.000Z
|
util/pip_package/open3d/__init__.py
|
Surfndez/Open3D
|
59c0645a169c589345a1b04753d5afdb5800b349
|
[
"MIT"
] | 1
|
2021-01-31T07:02:30.000Z
|
2021-01-31T07:02:30.000Z
|
# Open3D: www.open3d.org
# The MIT License (MIT)
# See license file or visit www.open3d.org for details
import importlib
import sys
if sys.platform == "linux" or sys.platform == "linux2":
from open3d.linux import *
elif sys.platform == "darwin":
from open3d.macos import *
elif sys.platform == "win32":
from open3d.win32 import *
| 24.571429
| 55
| 0.703488
| 50
| 344
| 4.84
| 0.48
| 0.181818
| 0.099174
| 0.173554
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.039146
| 0.18314
| 344
| 13
| 56
| 26.461538
| 0.822064
| 0.281977
| 0
| 0
| 0
| 0
| 0.090535
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.625
| 0
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
7725a2855a852f864bce17ee1bf24383b1f3b7b7
| 113
|
py
|
Python
|
website_monitor/stats.py
|
mamachanko/website-monitor
|
cfa8a4514d59f2ae54c55cf8e44177d4dc8b9b06
|
[
"MIT"
] | null | null | null |
website_monitor/stats.py
|
mamachanko/website-monitor
|
cfa8a4514d59f2ae54c55cf8e44177d4dc8b9b06
|
[
"MIT"
] | 57
|
2021-01-11T07:46:51.000Z
|
2022-03-31T02:06:39.000Z
|
website_monitor/stats.py
|
mamachanko/website-monitor
|
cfa8a4514d59f2ae54c55cf8e44177d4dc8b9b06
|
[
"MIT"
] | null | null | null |
from collections import namedtuple
Stats = namedtuple("Stats", ["url", "probes", "p50_ms", "p95_ms", "p99_ms"])
| 28.25
| 76
| 0.690265
| 15
| 113
| 5
| 0.733333
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06
| 0.115044
| 113
| 3
| 77
| 37.666667
| 0.69
| 0
| 0
| 0
| 0
| 0
| 0.283186
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
91f6c2984a0f75be8f2310b801b1dd8798c37364
| 78
|
py
|
Python
|
app/routes/v0/__init__.py
|
Bandemic/private-api
|
97e2c0b5cbe209f7b05086859ed0477b667b3cdd
|
[
"MIT"
] | 2
|
2020-04-02T11:44:56.000Z
|
2020-04-19T10:08:25.000Z
|
app/routes/v0/__init__.py
|
Bandemic/private-api
|
97e2c0b5cbe209f7b05086859ed0477b667b3cdd
|
[
"MIT"
] | 3
|
2020-03-30T20:10:23.000Z
|
2020-03-30T20:49:21.000Z
|
app/routes/v0/__init__.py
|
ito-org/upload-api
|
97e2c0b5cbe209f7b05086859ed0477b667b3cdd
|
[
"MIT"
] | 2
|
2020-04-17T11:58:00.000Z
|
2020-04-19T10:08:35.000Z
|
__all__ = ["cases", "contacts"]
from .cases import *
from .contacts import *
| 15.6
| 31
| 0.679487
| 9
| 78
| 5.444444
| 0.555556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 78
| 4
| 32
| 19.5
| 0.753846
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 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
|
62202fd9beb3e9bb3bc9faf3cbde0b609ac8f368
| 293
|
py
|
Python
|
scryb/frontend/__init__.py
|
Ppjet6/scryb
|
5f1d65dd664c13a5922f77fb69e72e659686fb44
|
[
"MIT"
] | null | null | null |
scryb/frontend/__init__.py
|
Ppjet6/scryb
|
5f1d65dd664c13a5922f77fb69e72e659686fb44
|
[
"MIT"
] | null | null | null |
scryb/frontend/__init__.py
|
Ppjet6/scryb
|
5f1d65dd664c13a5922f77fb69e72e659686fb44
|
[
"MIT"
] | null | null | null |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
"""
Scryb frontend
~~~~~~~~~~~~~~
:license: MIT license. See LICENSE file.
"""
from .. import factory
def create_app(settings_override=None):
return factory.create_app(__name__, __path__, settings_override)
| 17.235294
| 68
| 0.641638
| 36
| 293
| 4.888889
| 0.75
| 0.045455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012448
| 0.177474
| 293
| 16
| 69
| 18.3125
| 0.717842
| 0.447099
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 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
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
62302bacc66a3c262af2408c9692de8a111c5217
| 1,544
|
py
|
Python
|
ecstremity/registries/entity_registry.py
|
ddmills/ECStremity
|
afe36ea596c9fe75f8c44576459d5dd2422ec579
|
[
"MIT"
] | null | null | null |
ecstremity/registries/entity_registry.py
|
ddmills/ECStremity
|
afe36ea596c9fe75f8c44576459d5dd2422ec579
|
[
"MIT"
] | null | null | null |
ecstremity/registries/entity_registry.py
|
ddmills/ECStremity
|
afe36ea596c9fe75f8c44576459d5dd2422ec579
|
[
"MIT"
] | null | null | null |
from __future__ import annotations
from typing import Dict, Optional, ValuesView
from ecstremity.entity import Entity
from .registry import Registry
class EntityRegistry(Registry):
@property
def get_all(self) -> ValuesView[Entity]:
return self.values()
def create(self, uid: Optional[str] = None) -> Entity:
"""Create a new Entity and register it with the EntityRegistry."""
entity = Entity(self.ecs, uid)
self.register(entity)
return entity
def create_or_get_by_id(self, uid: str) -> Entity:
"""Look up an Entity by UID. If the Entity does not exist, it will be
created.
"""
entity = self.get(uid)
if entity:
return entity
return self.create(uid)
def destroy(self, uid: str) -> None:
"""Trigger an entity to self-destruct (including all attached
Components).
"""
self[uid].destroy()
def on_entity_destroyed(self, entity: Entity) -> None:
"""Callback for entity self-destruct."""
print(f"Destroying {entity}")
self.ecs.queries.on_entity_destroyed(entity)
del self[entity.uid]
def register(self, entity: Entity) -> Entity:
"""Register an Entity with the EntityRegistry."""
self[entity.uid] = entity
return entity
def serialize(self, entities):
"""TODO"""
pass
def deserialize(self, data):
"""TODO"""
pass
def deserialize_entity(self, data):
"""TODO"""
pass
| 27.087719
| 77
| 0.610104
| 182
| 1,544
| 5.098901
| 0.368132
| 0.064655
| 0.05819
| 0.045259
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.282383
| 1,544
| 56
| 78
| 27.571429
| 0.837545
| 0.195596
| 0
| 0.1875
| 0
| 0
| 0.016281
| 0
| 0
| 0
| 0
| 0.017857
| 0
| 1
| 0.28125
| false
| 0.09375
| 0.125
| 0.03125
| 0.59375
| 0.03125
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
6241b3c5cf662d5962da6efc4f9431e967999fea
| 56
|
py
|
Python
|
src/backend/marsha/core/tests/__init__.py
|
marin-leonard/marsha
|
b5d6bf98fda27acd3a08577b82dd98bcd39bfd8d
|
[
"MIT"
] | 64
|
2018-04-26T23:46:14.000Z
|
2022-03-26T21:32:23.000Z
|
src/backend/marsha/core/tests/__init__.py
|
marin-leonard/marsha
|
b5d6bf98fda27acd3a08577b82dd98bcd39bfd8d
|
[
"MIT"
] | 533
|
2018-04-17T10:17:24.000Z
|
2022-03-31T13:07:49.000Z
|
src/backend/marsha/core/tests/__init__.py
|
marin-leonard/marsha
|
b5d6bf98fda27acd3a08577b82dd98bcd39bfd8d
|
[
"MIT"
] | 16
|
2018-09-21T12:52:34.000Z
|
2021-11-29T16:44:51.000Z
|
"""Tests for the ``core`` app of the Marsha project."""
| 28
| 55
| 0.642857
| 9
| 56
| 4
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.160714
| 56
| 1
| 56
| 56
| 0.765957
| 0.875
| 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
|
6244f81b667014a329519fddd71fa1af8078e1f2
| 20,248
|
py
|
Python
|
hp3d/rpc/human_pose_detection_service_pb2.py
|
MohamedKari/hp3d
|
1b47ff4ba3e5bbe09ca91b2bcca0fe0525330c7b
|
[
"Apache-2.0"
] | null | null | null |
hp3d/rpc/human_pose_detection_service_pb2.py
|
MohamedKari/hp3d
|
1b47ff4ba3e5bbe09ca91b2bcca0fe0525330c7b
|
[
"Apache-2.0"
] | 3
|
2021-06-08T22:16:28.000Z
|
2022-01-13T03:14:04.000Z
|
hp3d/rpc/human_pose_detection_service_pb2.py
|
MohamedKari/hp3d
|
1b47ff4ba3e5bbe09ca91b2bcca0fe0525330c7b
|
[
"Apache-2.0"
] | 1
|
2021-10-19T03:15:18.000Z
|
2021-10-19T03:15:18.000Z
|
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: hp3d/rpc/human_pose_detection_service.proto
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()
DESCRIPTOR = _descriptor.FileDescriptor(
name='hp3d/rpc/human_pose_detection_service.proto',
package='com.porsche.realtery.humanpose',
syntax='proto3',
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n+hp3d/rpc/human_pose_detection_service.proto\x12\x1e\x63om.porsche.realtery.humanpose\"*\n\x14StartSessionResponse\x12\x12\n\nsession_id\x18\x01 \x01(\x05\"z\n\rDetectRequest\x12\x12\n\nsession_id\x18\x01 \x01(\x05\x12\x10\n\x08\x66rame_id\x18\x02 \x01(\x05\x12\x14\n\x0c\x66ocal_length\x18\x03 \x01(\x02\x12\r\n\x05\x66rame\x18\x04 \x01(\x0c\x12\x1e\n\x16request_visualizations\x18\x05 \x01(\x08\"\x9f\x01\n\x0e\x44\x65tectResponse\x12\x12\n\nsession_id\x18\x01 \x01(\x05\x12\x10\n\x08\x66rame_id\x18\x02 \x01(\x05\x12\x33\n\x05poses\x18\x03 \x03(\x0b\x32$.com.porsche.realtery.humanpose.Pose\x12\x18\n\x10visualization_2d\x18\x04 \x01(\x0c\x12\x18\n\x10visualization_3d\x18\x05 \x01(\x0c\"\x8c\x01\n\x08Keypoint\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07visible\x18\x02 \x01(\x08\x12\x0b\n\x03p_x\x18\x03 \x01(\x05\x12\x0b\n\x03p_y\x18\x04 \x01(\x05\x12\x0f\n\x07p_score\x18\x05 \x01(\x02\x12\x0b\n\x03\x63_x\x18\x06 \x01(\x05\x12\x0b\n\x03\x63_y\x18\x07 \x01(\x05\x12\x0b\n\x03\x63_z\x18\x08 \x01(\x05\x12\x0f\n\x07\x63_score\x18\t \x01(\x02\"X\n\x04Pose\x12\x13\n\x0btracking_id\x18\x01 \x01(\x05\x12;\n\tkeypoints\x18\x02 \x03(\x0b\x32(.com.porsche.realtery.humanpose.Keypoint\"(\n\x12StopSessionRequest\x12\x12\n\nsession_id\x18\x01 \x01(\x05\"\x07\n\x05\x45mpty2\xb2\x03\n\x12HumanPoseDetection\x12V\n\x04Ping\x12%.com.porsche.realtery.humanpose.Empty\x1a%.com.porsche.realtery.humanpose.Empty\"\x00\x12m\n\x0cStartSession\x12%.com.porsche.realtery.humanpose.Empty\x1a\x34.com.porsche.realtery.humanpose.StartSessionResponse\"\x00\x12i\n\x06\x44\x65tect\x12-.com.porsche.realtery.humanpose.DetectRequest\x1a..com.porsche.realtery.humanpose.DetectResponse\"\x00\x12j\n\x0bStopSession\x12\x32.com.porsche.realtery.humanpose.StopSessionRequest\x1a%.com.porsche.realtery.humanpose.Empty\"\x00\x62\x06proto3'
)
_STARTSESSIONRESPONSE = _descriptor.Descriptor(
name='StartSessionResponse',
full_name='com.porsche.realtery.humanpose.StartSessionResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='session_id', full_name='com.porsche.realtery.humanpose.StartSessionResponse.session_id', index=0,
number=1, type=5, cpp_type=1, 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=79,
serialized_end=121,
)
_DETECTREQUEST = _descriptor.Descriptor(
name='DetectRequest',
full_name='com.porsche.realtery.humanpose.DetectRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='session_id', full_name='com.porsche.realtery.humanpose.DetectRequest.session_id', index=0,
number=1, type=5, cpp_type=1, 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='frame_id', full_name='com.porsche.realtery.humanpose.DetectRequest.frame_id', index=1,
number=2, type=5, cpp_type=1, 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='focal_length', full_name='com.porsche.realtery.humanpose.DetectRequest.focal_length', index=2,
number=3, 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='frame', full_name='com.porsche.realtery.humanpose.DetectRequest.frame', index=3,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
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='request_visualizations', full_name='com.porsche.realtery.humanpose.DetectRequest.request_visualizations', index=4,
number=5, 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=123,
serialized_end=245,
)
_DETECTRESPONSE = _descriptor.Descriptor(
name='DetectResponse',
full_name='com.porsche.realtery.humanpose.DetectResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='session_id', full_name='com.porsche.realtery.humanpose.DetectResponse.session_id', index=0,
number=1, type=5, cpp_type=1, 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='frame_id', full_name='com.porsche.realtery.humanpose.DetectResponse.frame_id', index=1,
number=2, type=5, cpp_type=1, 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='poses', full_name='com.porsche.realtery.humanpose.DetectResponse.poses', index=2,
number=3, 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='visualization_2d', full_name='com.porsche.realtery.humanpose.DetectResponse.visualization_2d', index=3,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
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='visualization_3d', full_name='com.porsche.realtery.humanpose.DetectResponse.visualization_3d', index=4,
number=5, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=b"",
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='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=248,
serialized_end=407,
)
_KEYPOINT = _descriptor.Descriptor(
name='Keypoint',
full_name='com.porsche.realtery.humanpose.Keypoint',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='com.porsche.realtery.humanpose.Keypoint.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='visible', full_name='com.porsche.realtery.humanpose.Keypoint.visible', index=1,
number=2, 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='p_x', full_name='com.porsche.realtery.humanpose.Keypoint.p_x', index=2,
number=3, type=5, cpp_type=1, 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='p_y', full_name='com.porsche.realtery.humanpose.Keypoint.p_y', index=3,
number=4, type=5, cpp_type=1, 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='p_score', full_name='com.porsche.realtery.humanpose.Keypoint.p_score', index=4,
number=5, 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='c_x', full_name='com.porsche.realtery.humanpose.Keypoint.c_x', index=5,
number=6, type=5, cpp_type=1, 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='c_y', full_name='com.porsche.realtery.humanpose.Keypoint.c_y', index=6,
number=7, type=5, cpp_type=1, 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='c_z', full_name='com.porsche.realtery.humanpose.Keypoint.c_z', index=7,
number=8, type=5, cpp_type=1, 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='c_score', full_name='com.porsche.realtery.humanpose.Keypoint.c_score', index=8,
number=9, 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=410,
serialized_end=550,
)
_POSE = _descriptor.Descriptor(
name='Pose',
full_name='com.porsche.realtery.humanpose.Pose',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='tracking_id', full_name='com.porsche.realtery.humanpose.Pose.tracking_id', index=0,
number=1, type=5, cpp_type=1, 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='keypoints', full_name='com.porsche.realtery.humanpose.Pose.keypoints', index=1,
number=2, 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='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=552,
serialized_end=640,
)
_STOPSESSIONREQUEST = _descriptor.Descriptor(
name='StopSessionRequest',
full_name='com.porsche.realtery.humanpose.StopSessionRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='session_id', full_name='com.porsche.realtery.humanpose.StopSessionRequest.session_id', index=0,
number=1, type=5, cpp_type=1, 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=642,
serialized_end=682,
)
_EMPTY = _descriptor.Descriptor(
name='Empty',
full_name='com.porsche.realtery.humanpose.Empty',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=684,
serialized_end=691,
)
_DETECTRESPONSE.fields_by_name['poses'].message_type = _POSE
_POSE.fields_by_name['keypoints'].message_type = _KEYPOINT
DESCRIPTOR.message_types_by_name['StartSessionResponse'] = _STARTSESSIONRESPONSE
DESCRIPTOR.message_types_by_name['DetectRequest'] = _DETECTREQUEST
DESCRIPTOR.message_types_by_name['DetectResponse'] = _DETECTRESPONSE
DESCRIPTOR.message_types_by_name['Keypoint'] = _KEYPOINT
DESCRIPTOR.message_types_by_name['Pose'] = _POSE
DESCRIPTOR.message_types_by_name['StopSessionRequest'] = _STOPSESSIONREQUEST
DESCRIPTOR.message_types_by_name['Empty'] = _EMPTY
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
StartSessionResponse = _reflection.GeneratedProtocolMessageType('StartSessionResponse', (_message.Message,), {
'DESCRIPTOR' : _STARTSESSIONRESPONSE,
'__module__' : 'hp3d.rpc.human_pose_detection_service_pb2'
# @@protoc_insertion_point(class_scope:com.porsche.realtery.humanpose.StartSessionResponse)
})
_sym_db.RegisterMessage(StartSessionResponse)
DetectRequest = _reflection.GeneratedProtocolMessageType('DetectRequest', (_message.Message,), {
'DESCRIPTOR' : _DETECTREQUEST,
'__module__' : 'hp3d.rpc.human_pose_detection_service_pb2'
# @@protoc_insertion_point(class_scope:com.porsche.realtery.humanpose.DetectRequest)
})
_sym_db.RegisterMessage(DetectRequest)
DetectResponse = _reflection.GeneratedProtocolMessageType('DetectResponse', (_message.Message,), {
'DESCRIPTOR' : _DETECTRESPONSE,
'__module__' : 'hp3d.rpc.human_pose_detection_service_pb2'
# @@protoc_insertion_point(class_scope:com.porsche.realtery.humanpose.DetectResponse)
})
_sym_db.RegisterMessage(DetectResponse)
Keypoint = _reflection.GeneratedProtocolMessageType('Keypoint', (_message.Message,), {
'DESCRIPTOR' : _KEYPOINT,
'__module__' : 'hp3d.rpc.human_pose_detection_service_pb2'
# @@protoc_insertion_point(class_scope:com.porsche.realtery.humanpose.Keypoint)
})
_sym_db.RegisterMessage(Keypoint)
Pose = _reflection.GeneratedProtocolMessageType('Pose', (_message.Message,), {
'DESCRIPTOR' : _POSE,
'__module__' : 'hp3d.rpc.human_pose_detection_service_pb2'
# @@protoc_insertion_point(class_scope:com.porsche.realtery.humanpose.Pose)
})
_sym_db.RegisterMessage(Pose)
StopSessionRequest = _reflection.GeneratedProtocolMessageType('StopSessionRequest', (_message.Message,), {
'DESCRIPTOR' : _STOPSESSIONREQUEST,
'__module__' : 'hp3d.rpc.human_pose_detection_service_pb2'
# @@protoc_insertion_point(class_scope:com.porsche.realtery.humanpose.StopSessionRequest)
})
_sym_db.RegisterMessage(StopSessionRequest)
Empty = _reflection.GeneratedProtocolMessageType('Empty', (_message.Message,), {
'DESCRIPTOR' : _EMPTY,
'__module__' : 'hp3d.rpc.human_pose_detection_service_pb2'
# @@protoc_insertion_point(class_scope:com.porsche.realtery.humanpose.Empty)
})
_sym_db.RegisterMessage(Empty)
_HUMANPOSEDETECTION = _descriptor.ServiceDescriptor(
name='HumanPoseDetection',
full_name='com.porsche.realtery.humanpose.HumanPoseDetection',
file=DESCRIPTOR,
index=0,
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_start=694,
serialized_end=1128,
methods=[
_descriptor.MethodDescriptor(
name='Ping',
full_name='com.porsche.realtery.humanpose.HumanPoseDetection.Ping',
index=0,
containing_service=None,
input_type=_EMPTY,
output_type=_EMPTY,
serialized_options=None,
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='StartSession',
full_name='com.porsche.realtery.humanpose.HumanPoseDetection.StartSession',
index=1,
containing_service=None,
input_type=_EMPTY,
output_type=_STARTSESSIONRESPONSE,
serialized_options=None,
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='Detect',
full_name='com.porsche.realtery.humanpose.HumanPoseDetection.Detect',
index=2,
containing_service=None,
input_type=_DETECTREQUEST,
output_type=_DETECTRESPONSE,
serialized_options=None,
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='StopSession',
full_name='com.porsche.realtery.humanpose.HumanPoseDetection.StopSession',
index=3,
containing_service=None,
input_type=_STOPSESSIONREQUEST,
output_type=_EMPTY,
serialized_options=None,
create_key=_descriptor._internal_create_key,
),
])
_sym_db.RegisterServiceDescriptor(_HUMANPOSEDETECTION)
DESCRIPTOR.services_by_name['HumanPoseDetection'] = _HUMANPOSEDETECTION
# @@protoc_insertion_point(module_scope)
| 42.095634
| 1,835
| 0.762298
| 2,540
| 20,248
| 5.757874
| 0.085039
| 0.041573
| 0.072752
| 0.097846
| 0.772239
| 0.724581
| 0.716103
| 0.629197
| 0.585915
| 0.581949
| 0
| 0.034276
| 0.116752
| 20,248
| 480
| 1,836
| 42.183333
| 0.783494
| 0.038275
| 0
| 0.665127
| 1
| 0.002309
| 0.239054
| 0.202312
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.009238
| 0
| 0.009238
| 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
|
6253cd6c8dd11aedc625fd9047a6f0ff3af98085
| 83
|
py
|
Python
|
Scripting/first_script.py
|
vaibhavg12/python
|
ef2a974f2625b6ba28490d9515ac3974b2da740e
|
[
"MIT"
] | null | null | null |
Scripting/first_script.py
|
vaibhavg12/python
|
ef2a974f2625b6ba28490d9515ac3974b2da740e
|
[
"MIT"
] | null | null | null |
Scripting/first_script.py
|
vaibhavg12/python
|
ef2a974f2625b6ba28490d9515ac3974b2da740e
|
[
"MIT"
] | null | null | null |
print('Congratulations on running this script!!')
msg = 'hello world'
print(msg)
| 16.6
| 49
| 0.722892
| 11
| 83
| 5.454545
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144578
| 83
| 4
| 50
| 20.75
| 0.84507
| 0
| 0
| 0
| 0
| 0
| 0.614458
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
625dcecaaee8c6d250e2f67595f1d104a16ba80e
| 6,034
|
py
|
Python
|
lc0931_minimum_falling_path_sum.py
|
bowen0701/python-algorithms-data-structures
|
e625f59a9fc59e4728825078d4434a7968a724e5
|
[
"BSD-2-Clause"
] | 8
|
2019-03-18T06:37:24.000Z
|
2022-01-30T07:50:58.000Z
|
lc0931_minimum_falling_path_sum.py
|
bowen0701/python-algorithms-data-structures
|
e625f59a9fc59e4728825078d4434a7968a724e5
|
[
"BSD-2-Clause"
] | null | null | null |
lc0931_minimum_falling_path_sum.py
|
bowen0701/python-algorithms-data-structures
|
e625f59a9fc59e4728825078d4434a7968a724e5
|
[
"BSD-2-Clause"
] | null | null | null |
"""Leetcode 931. Minimum Falling Path Sum
Medium
URL: https://leetcode.com/problems/minimum-falling-path-sum/
Given a square array of integers A, we want the minimum sum of a falling
path through A.
A falling path starts at any element in the first row, and chooses one
element from each row. The next row's choice must be in a column that is
different from the previous row's column by at most one.
Example 1:
Input: [[1,2,3],[4,5,6],[7,8,9]]
Output: 12
Explanation:
The possible falling paths are:
[1,4,7], [1,4,8], [1,5,7], [1,5,8], [1,5,9]
[2,4,7], [2,4,8], [2,5,7], [2,5,8], [2,5,9], [2,6,8], [2,6,9]
[3,5,7], [3,5,8], [3,5,9], [3,6,8], [3,6,9]
The falling path with the smallest sum is [1,4,7], so the answer is 12.
"""
class SolutionRecur(object):
def _fallingPathSumRecur(self, A, r, c):
# If at the 1st row, return its value.
if r == 0:
return A[r][c]
n = len(A)
min_sum = (A[r][c]
+ min(self._fallingPathSumRecur(A, r - 1, max(0, c - 1)),
self._fallingPathSumRecur(A, r - 1, c),
self._fallingPathSumRecur(A, r - 1, min(n - 1, c + 1))))
return min_sum
def minFallingPathSum(self, A):
"""
:type A: List[List[int]]
:rtype: int
Time complexity: O(n*3^n), where n is the number of rows of A.
Space complexity: O(n^2).
"""
# Apply top-down recursion starting from the last row.
# Edge case.
if not A or not A[0]:
return 0
n = len(A)
# Iterate through the last row to update min sum.
min_sum = float('inf')
for c in range(n):
min_sum = min(min_sum, self._fallingPathSumRecur(A, n - 1, c))
return min_sum
class SolutionMemo(object):
def _fallingPathSumRecur(self, A, r, c, T):
# Base case: if at the 1st row, return its value.
if r == 0:
return A[r][c]
# Check memo table.
if T[r][c]:
return T[r][c]
n = len(A)
T[r][c] = (A[r][c]
+ min(self._fallingPathSumRecur(A, r - 1, max(0, c - 1), T),
self._fallingPathSumRecur(A, r - 1, c, T),
self._fallingPathSumRecur(A, r - 1, min(n - 1, c + 1), T)))
return T[r][c]
def minFallingPathSum(self, A):
"""
:type A: List[List[int]]
:rtype: int
Time complexity: O(n^2), where n is the number of rows of A.
Space complexity: O(n^2).
"""
# Apply top-down recursion with memoization, starting from the last row.
# Edge case.
if not A or not A[0]:
return 0
n = len(A)
# Use a table T for memorizing the intermediate results.
T = [[0] * n for _ in range(n)]
# Iterate through the last row to update min sum.
min_sum = float('inf')
for c in range(n):
min_sum = min(min_sum, self._fallingPathSumRecur(A, n - 1, c, T))
return min_sum
class SolutionDP(object):
def minFallingPathSum(self, A):
"""
:type A: List[List[int]]
:rtype: int
Time complexity: O(n^2), where n is the number of rows of A.
Space complexity: O(n^2).
"""
# Apply bottom-up DP, starting from the 1st row.
# Edge case.
if not A or not A[0]:
return 0
n = len(A)
# Use a table T for memorizing the intermediate results.
T = [[float('inf')] * n for _ in range(n)]
# Initialize the 1st row.
for j in range(n):
T[0][j] = A[0][j]
for i in range(1, n):
for j in range(n):
T[i][j] = (A[i][j]
+ min(T[i - 1][max(0, j - 1)],
T[i - 1][j],
T[i - 1][min(n - 1, j + 1)]))
return min(T[-1])
class SolutionDPOptim(object):
def minFallingPathSum(self, A):
"""
:type A: List[List[int]]
:rtype: int
Time complexity: O(n^2), where n is the number of rows of A.
Space complexity: O(1).
"""
# Apply bottom-up DP, starting from the 1st row.
# Edge case.
if not A or not A[0]:
return 0
n = len(A)
for i in range(1, n):
for j in range(n):
A[i][j] += min(A[i - 1][max(0, j - 1)],
A[i - 1][j],
A[i - 1][min(n - 1, j + 1)])
return min(A[-1])
def main():
import time
# Output: 12
A = [[1,2,3],
[4,5,6],
[7,8,9]]
start_time = time.time()
print 'Recur: {}'.format(SolutionRecur().minFallingPathSum(A))
print 'Time: {}'.format(time.time() - start_time)
start_time = time.time()
print 'Memo: {}'.format(SolutionMemo().minFallingPathSum(A))
print 'Time: {}'.format(time.time() - start_time)
start_time = time.time()
print 'DP: {}'.format(SolutionDP().minFallingPathSum(A))
print 'Time: {}'.format(time.time() - start_time)
start_time = time.time()
print 'DP optim: {}'.format(SolutionDPOptim().minFallingPathSum(A))
print 'Time: {}'.format(time.time() - start_time)
# Output: -66
A = [[-80,-13,22],
[ 83, 94,-5],
[ 73,-48,61]]
start_time = time.time()
print 'Recur: {}'.format(SolutionRecur().minFallingPathSum(A))
print 'Time: {}'.format(time.time() - start_time)
start_time = time.time()
print 'Memo: {}'.format(SolutionMemo().minFallingPathSum(A))
print 'Time: {}'.format(time.time() - start_time)
start_time = time.time()
print 'DP: {}'.format(SolutionDP().minFallingPathSum(A))
print 'Time: {}'.format(time.time() - start_time)
start_time = time.time()
print 'DP optim: {}'.format(SolutionDPOptim().minFallingPathSum(A))
print 'Time: {}'.format(time.time() - start_time)
if __name__ == '__main__':
main()
| 29.434146
| 84
| 0.52171
| 885
| 6,034
| 3.505085
| 0.168362
| 0.061896
| 0.058672
| 0.043843
| 0.748227
| 0.736622
| 0.708897
| 0.686331
| 0.686331
| 0.668923
| 0
| 0.039665
| 0.327312
| 6,034
| 204
| 85
| 29.578431
| 0.724563
| 0.102254
| 0
| 0.606061
| 0
| 0
| 0.03794
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.010101
| null | null | 0.161616
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
655bf49751873506f0891c8cd22f369ee9b3c19c
| 21
|
py
|
Python
|
tests/__init__.py
|
drnextgis/tilebench
|
b9d9732565bfbc02c992c1ba388d1bf376a52606
|
[
"MIT"
] | 14
|
2020-05-23T02:43:17.000Z
|
2022-02-28T20:21:52.000Z
|
tests/__init__.py
|
drnextgis/tilebench
|
b9d9732565bfbc02c992c1ba388d1bf376a52606
|
[
"MIT"
] | 12
|
2020-05-22T19:47:53.000Z
|
2021-12-13T09:41:43.000Z
|
tests/__init__.py
|
drnextgis/tilebench
|
b9d9732565bfbc02c992c1ba388d1bf376a52606
|
[
"MIT"
] | 1
|
2021-03-05T16:40:58.000Z
|
2021-03-05T16:40:58.000Z
|
"""tilebench test"""
| 10.5
| 20
| 0.619048
| 2
| 21
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 21
| 1
| 21
| 21
| 0.684211
| 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
|
6579c8287a907d0e76f6830d8f884af823b34be3
| 802
|
py
|
Python
|
utils/model_analysis.py
|
vdutell/taec_torch
|
5934fd3b6c6704167038b15512c9c9a07c34a479
|
[
"Apache-2.0"
] | null | null | null |
utils/model_analysis.py
|
vdutell/taec_torch
|
5934fd3b6c6704167038b15512c9c9a07c34a479
|
[
"Apache-2.0"
] | null | null | null |
utils/model_analysis.py
|
vdutell/taec_torch
|
5934fd3b6c6704167038b15512c9c9a07c34a479
|
[
"Apache-2.0"
] | null | null | null |
import torch
import numpy as np
# def get_movies_recons(model, dloader, num_movies=10):
# was_training = model.training
# model.eval()
# movies_so_far = 0
# movies = []
# recons = []
# device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# with torch.no_grad():
# for inputs in next(iter(dloader)):
# inputs_mod = model.format_data_torch(inputs)
# outputs_mod = model.decode(model.encode(inputs_mod))
# outputs = outputs_mod.cpu().numpy()
# #outputs = model.format_data_numpy(outputs_mod)
# movies.append(inputs.cpu().numpy())
# recons.append(outputs)
# movies = np.asarray(movies).squeeze()
# recons = np.asarray(recons).squeeze()
# return(movies, recons)
| 32.08
| 75
| 0.609726
| 96
| 802
| 4.916667
| 0.458333
| 0.076271
| 0.063559
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005017
| 0.254364
| 802
| 24
| 76
| 33.416667
| 0.784281
| 0.902743
| 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
|
659555177adede6ff971a674101d3bb9e3f44a19
| 1,308
|
py
|
Python
|
lingorm/drivers/query_abstract.py
|
xiaolingzi/python-orm-lingorm
|
4b614bac1d6427010d7b355e1f67b0bbff52edbc
|
[
"MIT"
] | 2
|
2020-10-12T02:42:41.000Z
|
2020-11-29T07:41:40.000Z
|
lingorm/drivers/query_abstract.py
|
xiaolingzi/lingorm-python
|
4b614bac1d6427010d7b355e1f67b0bbff52edbc
|
[
"MIT"
] | null | null | null |
lingorm/drivers/query_abstract.py
|
xiaolingzi/lingorm-python
|
4b614bac1d6427010d7b355e1f67b0bbff52edbc
|
[
"MIT"
] | null | null | null |
from abc import ABCMeta, abstractmethod
class QueryAbstract:
@abstractmethod
def first(self, cls, where, order_by=None):
pass
@abstractmethod
def find(self, cls, where, order_by=None, top=0):
pass
@abstractmethod
def find_page(self, cls, page_index, page_size, where, order_by=None):
pass
@abstractmethod
def find_count(self, cls, where):
pass
@abstractmethod
def find_top(self, cls, limit, where, order_by=None):
pass
@abstractmethod
def insert(self, entity):
pass
@abstractmethod
def batch_insert(self, entity_list, none_ignore=False):
pass
@abstractmethod
def update(self, entity, none_ignore=False):
pass
@abstractmethod
def batch_update(self, entity_list, none_ignore=False):
pass
@abstractmethod
def update_by(self, cls, set_dict, where):
pass
@abstractmethod
def delete(self, entity):
pass
@abstractmethod
def delete_by(self, cls, where):
pass
@abstractmethod
def query_builder(self):
pass
@abstractmethod
def native_query(self):
pass
@abstractmethod
def create_where(self):
pass
@abstractmethod
def create_order_by(self):
pass
| 19.235294
| 74
| 0.633028
| 150
| 1,308
| 5.36
| 0.253333
| 0.338308
| 0.391791
| 0.079602
| 0.605721
| 0.451493
| 0.287313
| 0.241294
| 0.139303
| 0.139303
| 0
| 0.001072
| 0.286697
| 1,308
| 67
| 75
| 19.522388
| 0.860665
| 0
| 0
| 0.64
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.32
| false
| 0.32
| 0.02
| 0
| 0.36
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
65a92e69c47bf9a6663f135852951709f298a939
| 177
|
py
|
Python
|
eval/posetrack21/setup.py
|
anDoer/PoseTrack21
|
25c8412feca57319404a0c48565f9a264d648bd1
|
[
"MIT"
] | null | null | null |
eval/posetrack21/setup.py
|
anDoer/PoseTrack21
|
25c8412feca57319404a0c48565f9a264d648bd1
|
[
"MIT"
] | null | null | null |
eval/posetrack21/setup.py
|
anDoer/PoseTrack21
|
25c8412feca57319404a0c48565f9a264d648bd1
|
[
"MIT"
] | null | null | null |
from setuptools import setup, find_packages
setup(
name='posetrack21',
version='0.1',
packages=find_packages(include=['evaluation_kit', 'evaluation_kit.*'])
)
| 22.125
| 75
| 0.694915
| 20
| 177
| 5.95
| 0.7
| 0.201681
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027027
| 0.163842
| 177
| 7
| 76
| 25.285714
| 0.777027
| 0
| 0
| 0
| 0
| 0
| 0.248588
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.166667
| 0
| 0.166667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
65cee161b55c14a3857a58fec272747e79bbea54
| 160
|
py
|
Python
|
ucondb/__init__.py
|
ivmfnal/ucondb
|
447b131a157597c84cb1bccec4e871db3d5c9323
|
[
"BSD-3-Clause"
] | null | null | null |
ucondb/__init__.py
|
ivmfnal/ucondb
|
447b131a157597c84cb1bccec4e871db3d5c9323
|
[
"BSD-3-Clause"
] | null | null | null |
ucondb/__init__.py
|
ivmfnal/ucondb
|
447b131a157597c84cb1bccec4e871db3d5c9323
|
[
"BSD-3-Clause"
] | null | null | null |
from .UConDB import UConDB
from .signature import Signature
from .webapi import UConDBClient, WebClientError
from .version import Version
__version__ = Version
| 26.666667
| 48
| 0.8375
| 19
| 160
| 6.842105
| 0.421053
| 0.215385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 160
| 6
| 49
| 26.666667
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
65e0734b594050364ccc2da9c1d8097d0403cbf6
| 733
|
py
|
Python
|
src/recording_script_generator/core/utterances/transformation/__init__.py
|
stefantaubert/recording-script-generator
|
01cdcd4b85ed7f245f4bb8535d870c04472746c9
|
[
"MIT"
] | null | null | null |
src/recording_script_generator/core/utterances/transformation/__init__.py
|
stefantaubert/recording-script-generator
|
01cdcd4b85ed7f245f4bb8535d870c04472746c9
|
[
"MIT"
] | null | null | null |
src/recording_script_generator/core/utterances/transformation/__init__.py
|
stefantaubert/recording-script-generator
|
01cdcd4b85ed7f245f4bb8535d870c04472746c9
|
[
"MIT"
] | null | null | null |
from recording_script_generator.core.utterances.transformation.arpa_to_ipa import \
map_utterances_from_arpa_to_ipa_inplace
from recording_script_generator.core.utterances.transformation.change_ipa import \
change_utterances_ipa_inplace
from recording_script_generator.core.utterances.transformation.change_text import \
change_utterances_text_inplace
from recording_script_generator.core.utterances.transformation.convert_to_symbols import \
convert_to_symbols_inplace
from recording_script_generator.core.utterances.transformation.eng_to_arpa import \
convert_utterances_from_eng_to_arpa_inplace
from recording_script_generator.core.utterances.transformation.normalize import \
normalize_utterances_inplace
| 56.384615
| 90
| 0.885402
| 91
| 733
| 6.659341
| 0.208791
| 0.128713
| 0.188119
| 0.277228
| 0.641914
| 0.641914
| 0.641914
| 0.549505
| 0.237624
| 0.237624
| 0
| 0
| 0.07367
| 733
| 12
| 91
| 61.083333
| 0.892489
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
029cf1a0025df052e26fe7fa4e3756c8d6d9df35
| 4,139
|
py
|
Python
|
dro.py
|
RuntianZ/doro
|
b8b1317b4c1e7b6efb70f380881fc747db4dd3da
|
[
"MIT"
] | 18
|
2021-06-02T12:32:12.000Z
|
2022-02-16T05:10:33.000Z
|
dro.py
|
RuntianZ/doro
|
b8b1317b4c1e7b6efb70f380881fc747db4dd3da
|
[
"MIT"
] | null | null | null |
dro.py
|
RuntianZ/doro
|
b8b1317b4c1e7b6efb70f380881fc747db4dd3da
|
[
"MIT"
] | 3
|
2021-06-17T14:53:54.000Z
|
2022-01-22T15:47:21.000Z
|
"""DRO and DORO Training Algorithms
Reference:
[1] Hashimoto et al., Fairness Without Demographics in Repeated
Loss Minimization, ICML 2018.
"""
import math
import scipy.optimize as sopt
import torch
import torch.nn
from torch import optim
from torch.nn.modules.module import Module
from torch.utils.data import DataLoader
import torch.nn.functional as F
def erm(model: Module, loader: DataLoader, optimizer: optim.Optimizer,
criterion, device: str):
"""Empirical Risk Minimization (ERM)"""
model.train()
for _, (inputs, targets) in enumerate(loader):
inputs, targets = inputs.to(device), targets.to(device)
outputs = model(inputs)
loss = criterion(outputs, targets).mean()
optimizer.zero_grad()
loss.backward()
optimizer.step()
def cvar(model: Module, loader: DataLoader, optimizer: optim.Optimizer,
criterion, device: str, alpha: float):
"""Original CVaR"""
model.train()
for _, (inputs, targets) in enumerate(loader):
inputs, targets = inputs.to(device), targets.to(device)
batch_size = len(inputs)
outputs = model(inputs)
loss = criterion(outputs, targets)
n = int(alpha * batch_size)
rk = torch.argsort(loss, descending=True)
loss = loss[rk[:n]].mean()
optimizer.zero_grad()
loss.backward()
optimizer.step()
def cvar_doro(model: Module, loader: DataLoader, optimizer: optim.Optimizer,
criterion, device: str, alpha: float, eps: float):
"""CVaR DORO"""
model.train()
gamma = eps + alpha * (1 - eps)
for _, (inputs, targets) in enumerate(loader):
inputs, targets = inputs.to(device), targets.to(device)
batch_size = len(inputs)
outputs = model(inputs)
loss = criterion(outputs, targets)
n1 = int(gamma * batch_size)
n2 = int(eps * batch_size)
rk = torch.argsort(loss, descending=True)
loss = loss[rk[n2:n1]].sum() / alpha / (batch_size - n2)
optimizer.zero_grad()
loss.backward()
optimizer.step()
def chisq(model: Module, loader: DataLoader, optimizer: optim.Optimizer,
criterion, device: str, alpha: float):
"""Chi^2-DRO"""
model.train()
max_l = 10.
C = math.sqrt(1 + (1 / alpha - 1) ** 2)
for _, (inputs, targets) in enumerate(loader):
inputs, targets = inputs.to(device), targets.to(device)
outputs = model(inputs)
loss = criterion(outputs, targets)
foo = lambda eta: C * math.sqrt((F.relu(loss - eta) ** 2).mean().item()) + eta
opt_eta = sopt.brent(foo, brack=(0, max_l))
loss = C * torch.sqrt((F.relu(loss - opt_eta) ** 2).mean()) + opt_eta
optimizer.zero_grad()
loss.backward()
optimizer.step()
def chisq_doro(model: Module, loader: DataLoader, optimizer: optim.Optimizer,
criterion, device: str, alpha: float, eps: float):
"""Chi^2-DORO"""
model.train()
max_l = 10.
C = math.sqrt(1 + (1 / alpha - 1) ** 2)
for _, (inputs, targets) in enumerate(loader):
inputs, targets = inputs.to(device), targets.to(device)
batch_size = len(inputs)
outputs = model(inputs)
loss = criterion(outputs, targets)
n = int(eps * batch_size)
rk = torch.argsort(loss, descending=True)
l0 = loss[rk[n:]]
foo = lambda eta: C * math.sqrt((F.relu(l0 - eta) ** 2).mean().item()) + eta
opt_eta = sopt.brent(foo, brack=(0, max_l))
loss = C * torch.sqrt((F.relu(l0 - opt_eta) ** 2).mean()) + opt_eta
optimizer.zero_grad()
loss.backward()
optimizer.step()
def train(alg: str, model: Module, loader: DataLoader,
optimizer: optim.Optimizer, criterion, device: str,
alpha: float, eps: float):
"""Train one epoch using the specified algorithm"""
if alg == 'erm':
erm(model, loader, optimizer, criterion, device)
elif alg == 'cvar':
cvar(model, loader, optimizer, criterion, device, alpha)
elif alg == 'cvar_doro':
cvar_doro(model, loader, optimizer, criterion, device, alpha, eps)
elif alg == 'chisq':
chisq(model, loader, optimizer, criterion, device, alpha)
elif alg == 'chisq_doro':
chisq_doro(model, loader, optimizer, criterion, device, alpha, eps)
else:
raise NotImplementedError
| 32.085271
| 82
| 0.654989
| 544
| 4,139
| 4.920956
| 0.194853
| 0.073963
| 0.098618
| 0.060516
| 0.775495
| 0.762421
| 0.762421
| 0.762421
| 0.672768
| 0.652223
| 0
| 0.010294
| 0.201981
| 4,139
| 129
| 83
| 32.085271
| 0.800182
| 0.064992
| 0
| 0.56701
| 0
| 0
| 0.008086
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.061856
| false
| 0
| 0.082474
| 0
| 0.14433
| 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
|
02f9767d28c050bed19d937d22c20be327932f1b
| 772
|
py
|
Python
|
Studies/Study01/InstallPipAndPackages.py
|
yazici/Pamux.MachineLearning
|
25816a9868eff90f849c2ec373e77f567e4a3f5e
|
[
"MIT"
] | null | null | null |
Studies/Study01/InstallPipAndPackages.py
|
yazici/Pamux.MachineLearning
|
25816a9868eff90f849c2ec373e77f567e4a3f5e
|
[
"MIT"
] | null | null | null |
Studies/Study01/InstallPipAndPackages.py
|
yazici/Pamux.MachineLearning
|
25816a9868eff90f849c2ec373e77f567e4a3f5e
|
[
"MIT"
] | null | null | null |
# https://pip.pypa.io/en/stable/installing/
# https://bootstrap.pypa.io/get-pip.py
# Admin Powershell: . "C:\Program Files\Python36\python.exe" get-pip.py
#
# pip install -U matplotlib
# VIsual Studio Python Envs: Packages: Easier to install (installed numpy and matplotlib) uses pip
# https://github.com/Microsoft/PTVS/
# https://www.visualstudio.com/vs/python/
import os
import matplotlib
# os.getcwd()
# os.chdir('C:\src\Pamux\Pamux.MachineLearning\Studies\Study01')
# dir(os)
# __file__ constant
# execfile(path)
# execfile('C:\src\Pamux\Pamux.MachineLearning\Studies\Study01\get-pip.py')
# python3 exec(open('C:\src\Pamux\Pamux.MachineLearning\Studies\Study01\get-pip.py').read())
# os.path.dirname(path)
# os.path.realpath(path)
# pip install matplotlib
| 28.592593
| 98
| 0.738342
| 111
| 772
| 5.099099
| 0.522523
| 0.042403
| 0.056537
| 0.074205
| 0.256184
| 0.256184
| 0.256184
| 0.180212
| 0.180212
| 0.180212
| 0
| 0.012931
| 0.098446
| 772
| 26
| 99
| 29.692308
| 0.800287
| 0.90544
| 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
|
f31d974bd920f8deb37d1da87092c3f213254436
| 1,242
|
py
|
Python
|
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES1/EXT/multisampled_render_to_texture.py
|
JE-Chen/je_old_repo
|
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
|
[
"MIT"
] | null | null | null |
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES1/EXT/multisampled_render_to_texture.py
|
JE-Chen/je_old_repo
|
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
|
[
"MIT"
] | null | null | null |
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES1/EXT/multisampled_render_to_texture.py
|
JE-Chen/je_old_repo
|
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
|
[
"MIT"
] | null | null | null |
'''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GLES1 import _types as _cs
# End users want this...
from OpenGL.raw.GLES1._types import *
from OpenGL.raw.GLES1 import _errors
from OpenGL.constant import Constant as _C
import ctypes
_EXTENSION_NAME = 'GLES1_EXT_multisampled_render_to_texture'
def _f( function ):
return _p.createFunction( function,_p.PLATFORM.GLES1,'GLES1_EXT_multisampled_render_to_texture',error_checker=_errors._error_checker)
GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT=_C('GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT',0x8D6C)
GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT=_C('GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT',0x8D56)
GL_MAX_SAMPLES_EXT=_C('GL_MAX_SAMPLES_EXT',0x8D57)
GL_RENDERBUFFER_SAMPLES_EXT=_C('GL_RENDERBUFFER_SAMPLES_EXT',0x8CAB)
@_f
@_p.types(None,_cs.GLenum,_cs.GLenum,_cs.GLenum,_cs.GLuint,_cs.GLint,_cs.GLsizei)
def glFramebufferTexture2DMultisampleEXT(target,attachment,textarget,texture,level,samples):pass
@_f
@_p.types(None,_cs.GLenum,_cs.GLsizei,_cs.GLenum,_cs.GLsizei,_cs.GLsizei)
def glRenderbufferStorageMultisampleEXT(target,samples,internalformat,width,height):pass
| 51.75
| 138
| 0.832528
| 174
| 1,242
| 5.511494
| 0.402299
| 0.062565
| 0.052138
| 0.056309
| 0.398332
| 0.200209
| 0.043796
| 0
| 0
| 0
| 0
| 0.017452
| 0.077295
| 1,242
| 23
| 139
| 54
| 0.819372
| 0.080515
| 0
| 0.105263
| 1
| 0
| 0.189748
| 0.173561
| 0
| 0
| 0.021583
| 0
| 0
| 1
| 0.157895
| false
| 0.105263
| 0.315789
| 0.052632
| 0.526316
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
f31e8012ff9b1b5d04cab76330bda26b1d5e8408
| 313
|
py
|
Python
|
Darlington/phase1/python Basic 2/day 26 solution/qtn9.py
|
CodedLadiesInnovateTech/-python-challenge-solutions
|
430cd3eb84a2905a286819eef384ee484d8eb9e7
|
[
"MIT"
] | 6
|
2020-05-23T19:53:25.000Z
|
2021-05-08T20:21:30.000Z
|
Darlington/phase1/python Basic 2/day 26 solution/qtn9.py
|
CodedLadiesInnovateTech/-python-challenge-solutions
|
430cd3eb84a2905a286819eef384ee484d8eb9e7
|
[
"MIT"
] | 8
|
2020-05-14T18:53:12.000Z
|
2020-07-03T00:06:20.000Z
|
Darlington/phase1/python Basic 2/day 26 solution/qtn9.py
|
CodedLadiesInnovateTech/-python-challenge-solutions
|
430cd3eb84a2905a286819eef384ee484d8eb9e7
|
[
"MIT"
] | 39
|
2020-05-10T20:55:02.000Z
|
2020-09-12T17:40:59.000Z
|
#program to find the position of the second occurrence of a given string in another given string.
def find_string(txt, str1):
return txt.find(str1, txt.find(str1)+1)
print(find_string("The quick brown fox jumps over the lazy dog", "the"))
print(find_string("the quick brown fox jumps over the lazy dog", "the"))
| 52.166667
| 97
| 0.757188
| 56
| 313
| 4.178571
| 0.464286
| 0.128205
| 0.094017
| 0.153846
| 0.452991
| 0.452991
| 0.452991
| 0.452991
| 0.452991
| 0.452991
| 0
| 0.01487
| 0.140575
| 313
| 6
| 98
| 52.166667
| 0.855019
| 0.306709
| 0
| 0
| 0
| 0
| 0.423963
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 0.5
| 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
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
|
0
| 4
|
b84170686e2d634c421d67761b005df9cb68c252
| 4,263
|
py
|
Python
|
DailyProgrammer/DP20170518B.py
|
DayGitH/Python-Challenges
|
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
|
[
"MIT"
] | 2
|
2020-12-23T18:59:22.000Z
|
2021-04-14T13:16:09.000Z
|
DailyProgrammer/DP20170518B.py
|
DayGitH/Python-Challenges
|
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
|
[
"MIT"
] | null | null | null |
DailyProgrammer/DP20170518B.py
|
DayGitH/Python-Challenges
|
bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf
|
[
"MIT"
] | null | null | null |
"""
[2017-05-18] Challenge #315 [Intermediate] Game of life that has a twist
https://www.reddit.com/r/dailyprogrammer/comments/6bumxo/20170518_challenge_315_intermediate_game_of_life/
So for the first part of the description I am borrowing /u/Elite6809 challenge of a while ago
[link](https://www.reddit.com/r/dailyprogrammer/comments/271xyp/622014_challenge_165_easy_ascii_game_of_life/)
This challenge is based on a game (the mathematical variety - not quite as fun!) called [Conway's Game of
Life](http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life). This is called a cellular automaton. This means it is
based on a 'playing field' of sorts, made up of lots of little cells or spaces. For Conway's game of life, the grid is
square - but other shapes like hexagonal ones could potentially exist too. Each cell can have a value - in this case,
on or off - and for each 'iteration' or loop of the game, the value of each cell will change depending on the other
cells around it. This might sound confusing at first, but looks easier when you break it down a bit.
* A cell's "neighbours" are the 8 cells around it.
* If a cell is 'off' but exactly 3 of its neighbours are on, that cell will also turn on - like reproduction.
* If a cell is 'on' but less than two of its neighbours are on, it will die out - like underpopulation.
* If a cell is 'on' but more than three of its neighbours are on, it will die out - like overcrowding.
Fairly simple, right? This might sound boring, but it can generate fairly complex patterns - [this one, for
example](http://upload.wikimedia.org/wikipedia/commons/e/e5/Gospers_glider_gun.gif), is called the Gosper Glider Gun
and is designed in such a way that it generates little patterns that fly away from it. There are other examples of such
patterns, like ones which grow indefinitely.
We are going to extend this by giving it some additional rules:
There are two parties on the grid, say red and blue.
When a cell only has neighbours that are of his own color, nothing changes and it will folow the rules as explained
before.
When a cell has neighbours that are not of his own 1 of two things can happen:
- The total amount of cells in his neighbourhood of his color (including himself) is greater then the amount of
cells not in his color in his neighbourhood
-> apply normal rules, meaning that you have to count in the cells of other colors as alive cells
- If the amout of the other colors is greater then amount of that cell's own color then it just changes color.
Last if a cell is 'off' and has 3 neighbour cells that are alive it will be the color that is the most represented.
Your challenge is, given a width and heigth to create a grid and a number of turns to simulate this variant
# Formal Inputs and Outputs
## Input Description
You will be given three numbers **W** and **H** and **N**. These will present the width and heigth of the grid. With
this you can create a grid where on the grid, a period or full-stop `.` will represent 'off', and a hash sign `#`/`*`
will represent 'on' (for each color).
These states you can generate at random.
The grid that you are using must 'wrap around'. That means, if something goes off the bottom of the playing field, then
it will wrap around to the top, like this: http://upload.wikimedia.org/wikipedia/en/d/d1/Long_gun.gif See how those
cells act like the top and bottom, and the left and right of the field are joined up? In other words, the neighbours of
a cell can look like this - where the lines coming out are the neighbours:
#-...- ...... ../|\.
|\.../ ...... ......
...... |/...\ ......
...... #-...- ......
...... |\.../ ..\|/.
|/...\ ...... ..-#-.
## Output Description
Using that starting state, simulate **N** iterations of Conway's Game of Life. Print the final state in the same format
as above - `.` is off and `#` is on.
# Sample Inputs & Output
## Sample Input
10 10 7
# Challenge
## Challenge Input
32 17 17
50 50 21
## note
For the initial state I would give it a 45% procent chance of being alive with dividing the red and blue ones to be
50/50
Also look what happens if you change up these numbers
"""
def main():
pass
if __name__ == "__main__":
main()
| 56.84
| 119
| 0.727187
| 738
| 4,263
| 4.163957
| 0.388889
| 0.013017
| 0.022779
| 0.011715
| 0.132444
| 0.081354
| 0.050114
| 0.02343
| 0.02343
| 0.02343
| 0
| 0.02029
| 0.190711
| 4,263
| 74
| 120
| 57.608108
| 0.870435
| 0.98311
| 0
| 0
| 0
| 0
| 0.125
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0.25
| 0
| 0
| 0.25
| 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
| 1
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
b87911a66d0c0137763c5c4d66525862e1df9c15
| 46
|
py
|
Python
|
scale/queue/__init__.py
|
kaydoh/scale
|
1b6a3b879ffe83e10d3b9d9074835a4c3bf476ee
|
[
"Apache-2.0"
] | 121
|
2015-11-18T18:15:33.000Z
|
2022-03-10T01:55:00.000Z
|
scale/queue/__init__.py
|
kaydoh/scale
|
1b6a3b879ffe83e10d3b9d9074835a4c3bf476ee
|
[
"Apache-2.0"
] | 1,415
|
2015-12-23T23:36:04.000Z
|
2022-01-07T14:10:09.000Z
|
scale/queue/__init__.py
|
kaydoh/scale
|
1b6a3b879ffe83e10d3b9d9074835a4c3bf476ee
|
[
"Apache-2.0"
] | 66
|
2015-12-03T20:38:56.000Z
|
2020-07-27T15:28:11.000Z
|
default_app_config = 'queue.apps.QueueConfig'
| 23
| 45
| 0.826087
| 6
| 46
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065217
| 46
| 1
| 46
| 46
| 0.837209
| 0
| 0
| 0
| 0
| 0
| 0.478261
| 0.478261
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b890efb2073545a8d7c1071ac9bb7b66de9a5a99
| 110
|
py
|
Python
|
src/learning_validator/apps.py
|
gsi-luis/djangolearning
|
4cf1e016cfe2910c907a669e518f5233ae04fb12
|
[
"MIT"
] | 1
|
2020-07-05T18:33:33.000Z
|
2020-07-05T18:33:33.000Z
|
src/learning_validator/apps.py
|
gsi-luis/djangolearning
|
4cf1e016cfe2910c907a669e518f5233ae04fb12
|
[
"MIT"
] | 2
|
2021-03-30T13:49:58.000Z
|
2021-06-10T19:43:27.000Z
|
src/learning_validator/apps.py
|
gsi-luis/djangolearning
|
4cf1e016cfe2910c907a669e518f5233ae04fb12
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class LearningValidatorConfig(AppConfig):
name = 'learning_validator'
| 18.333333
| 41
| 0.8
| 11
| 110
| 7.909091
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 110
| 5
| 42
| 22
| 0.915789
| 0
| 0
| 0
| 0
| 0
| 0.163636
| 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
|
b89e4eb5196ac174264c174678f757e5b6951710
| 507
|
py
|
Python
|
util/__init__.py
|
miranmanesh/ConditionalDETR
|
b3ab2ea01208a1c7f4a1668a9c7682d13e59bc45
|
[
"Apache-2.0"
] | 186
|
2021-08-16T02:53:25.000Z
|
2022-03-31T14:27:30.000Z
|
util/__init__.py
|
encounter1997/DE-CondDETR
|
c7d24c221125daa6322adc9915af77701240f063
|
[
"Apache-2.0"
] | 18
|
2021-08-24T07:01:18.000Z
|
2022-03-29T12:53:10.000Z
|
util/__init__.py
|
encounter1997/DE-CondDETR
|
c7d24c221125daa6322adc9915af77701240f063
|
[
"Apache-2.0"
] | 19
|
2021-08-16T06:45:55.000Z
|
2022-03-20T12:53:57.000Z
|
# ------------------------------------------------------------------------
# Conditional DETR
# Copyright (c) 2021 Microsoft. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 [see LICENSE for details]
# ------------------------------------------------------------------------
# Copied from DETR (https://github.com/facebookresearch/detr)
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
# ------------------------------------------------------------------------
| 50.7
| 74
| 0.424063
| 39
| 507
| 5.512821
| 0.794872
| 0.12093
| 0.130233
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013015
| 0.09073
| 507
| 9
| 75
| 56.333333
| 0.453362
| 0.964497
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b23b44af54ce7ac89dc4c6f8d93295dfaf33a7fd
| 25,348
|
py
|
Python
|
tests/test_disclaimer.py
|
dploeger/disclaimr
|
4975536f4ca5f473d5e67bb9f79017b1b0629f56
|
[
"MIT"
] | 5
|
2015-08-20T17:05:30.000Z
|
2019-03-27T21:12:57.000Z
|
tests/test_disclaimer.py
|
dploeger/disclaimr
|
4975536f4ca5f473d5e67bb9f79017b1b0629f56
|
[
"MIT"
] | 3
|
2015-10-14T13:51:59.000Z
|
2015-11-03T15:25:34.000Z
|
tests/test_disclaimer.py
|
dploeger/disclaimr
|
4975536f4ca5f473d5e67bb9f79017b1b0629f56
|
[
"MIT"
] | null | null | null |
""" Disclaimer testing """
import email
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from django.test import TestCase
from disclaimr import milter_helper
from disclaimrwebadmin import models, constants
from disclaimr.configuration_helper import build_configuration
from disclaimr.milter_helper import MilterHelper
class DisclaimerTestCase(TestCase):
""" Build up different disclaimer scenarios and check if they react right.
"""
def setUp(self):
""" A basic setup with a simple disclaimer, no directory servers,
a basic rule and a basic action
"""
self.test_text = "Testmail"
self.test_address = "test@company.com"
self.disclaimer = models.Disclaimer()
self.disclaimer.name = "Test"
self.disclaimer.text = "Test-Disclaimer"
self.disclaimer.save()
self.rule = models.Rule()
self.rule.save()
self.action = models.Action()
self.action.action = constants.ACTION_ACTION_ADD
self.action.disclaimer = self.disclaimer
self.action.rule = self.rule
self.action.position = 0
self.action.save()
requirement = models.Requirement()
requirement.rule = self.rule
requirement.action = constants.REQ_ACTION_ACCEPT
requirement.save()
def tool_get_helper(self):
""" Return a configured milter helper
:return: A Milter helper
"""
configuration = build_configuration()
helper = MilterHelper(configuration)
# The requirement should basically be enabled
self.assertTrue(
helper.enabled,
"Helper wasn't enabled after initialization."
)
return helper
def tool_add_bodies(self, helper, mail):
if mail.is_multipart():
for payload in mail.get_payload():
self.tool_add_bodies(helper, payload)
else:
helper.body(mail.as_string(), {})
def tool_run_real_test(self, header=None, make_mail=True):
""" Runs the test using the milter helper and returns the
action dictionary of eob
:return: the action dictionary of eob()
"""
helper = self.tool_get_helper()
helper.connect("", "", "1.1.1.1", "", {})
helper.mail_from(self.test_address, {})
helper.rcpt(self.test_address, {})
if header is not None:
for key in header.iterkeys():
helper.header(key, header[key], {})
helper.eoh({})
else:
# Add at least one header for proper mail processing
helper.header("From", "nobody", {})
helper.eoh({})
if make_mail:
self.test_mail = MIMEText(self.test_text, "plain", "UTF-8")
helper.body(self.test_mail.as_string(), {})
return helper.eob({})
def tool_make_returned_mail(self, returned):
headers = []
for key in self.test_mail.keys():
# Skip deleted headers
if "delete_header" in returned and key in returned["delete_header"]:
continue
value = self.test_mail[key]
# Change headers
if "change_header" in returned and key in returned["change_header"]:
value = returned["change_header"][key]
headers.append("%s: %s" % (key, value))
if "add_header" in returned:
for key in returned["add_header"]:
headers.append("%s: %s" % (key, returned["add_header"][key]))
return email.message_from_string(
"%s\n\n%s" % (
"\n".join(headers),
returned["repl_body"]
)
)
def test_basic_add(self):
""" The disclaimer will simply be added to the testmail.
Check the returned body
"""
returned = self.tool_run_real_test()
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
"%s\n%s" % (self.test_text, self.disclaimer.text),
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
)
)
def test_disabled_action(self):
""" If we disable the only action, we should get an empty action
dictionary back
"""
self.action.enabled = False
self.action.save()
returned = self.tool_run_real_test()
self.assertIsNone(
returned,
"We got an action dictionary back! %s" % returned
)
def test_disabled_secondaction(self):
""" If we add an disabled action to a working set, it should just
work fine.
"""
action2 = models.Action()
action2.rule = self.rule
action2.position = 0
action2.enabled = False
action2.disclaimer = self.disclaimer
action2.save()
self.action.position = 1
self.action.save()
returned = self.tool_run_real_test()
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
"%s\n%s" % (self.test_text, self.disclaimer.text),
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
)
)
def test_basic_replace(self):
""" Set the action to replace the disclaimer and not add it. Check the
returned body
"""
self.test_text = "Testmail #DISCLAIMER#"
self.action.action = constants.ACTION_ACTION_REPLACETAG
self.action.action_parameters = "#DISCLAIMER#"
self.action.save()
returned = self.tool_run_real_test()
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
"Testmail %s" % self.disclaimer.text,
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1]
)
)
def test_replacements_add(self):
""" Test the replacement feature of sender, recipient and header
replacement [add mode]
"""
self.disclaimer.text = "{sender}|{recipient}|{header[\"Test\"]}"
self.disclaimer.text_use_template = True
self.disclaimer.save()
returned = self.tool_run_real_test({"Test": "Test"})
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
"%s\n%s|%s|Test" % (
self.test_text,
self.test_address,
self.test_address
),
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
)
)
def test_replacements_replace(self):
""" Test the replacement feature of sender, recipient and header
replacement [add mode]
"""
self.test_text = "Testmail #DISCLAIMER#"
self.action.action = constants.ACTION_ACTION_REPLACETAG
self.action.action_parameters = "#DISCLAIMER#"
self.action.save()
self.disclaimer.text = "{sender}|{recipient}|{header[\"Test\"]}"
self.disclaimer.text_use_template = True
self.disclaimer.save()
returned = self.tool_run_real_test({"Test": "Test"})
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
"Testmail %s|%s|Test" % (
self.test_address,
self.test_address
),
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
)
)
def test_multiple_headers(self):
""" Test a mail with multiple headers
"""
returned = self.tool_run_real_test(header={
"X-TEST1": "TEST",
"X-TEST2": "TEST"
})
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
"%s\n%s" % (self.test_text, self.disclaimer.text),
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
)
)
def test_multipart(self):
""" Test a multipart mail
"""
test_text = "TestPlain"
test_html = "<p>TestHTML</p>"
text_part = MIMEText(test_text, "plain", "UTF-8")
html_part = MIMEText(test_html, "html", "UTF-8")
self.test_mail = MIMEMultipart("alternative")
self.test_mail.attach(text_part)
self.test_mail.attach(html_part)
returned = self.tool_run_real_test(make_mail=False)
returned_mail = self.tool_make_returned_mail(returned)
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[0]
)[1],
"%s\n%s" % (test_text, self.disclaimer.text),
"Text-Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[0]
)[1],
)
)
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[1]
)[1],
"<html><body>\n%s\n<p>%s</p>\n</body></html>\n" % (
test_html,
self.disclaimer.text
),
"HTML-Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[1]
)[1],
)
)
def test_html(self):
""" Test a HTML mail with an HTML disclaimer
"""
test_html = "<p>TestHTML</p>"
self.test_mail = MIMEText(test_html, "html", "UTF-8")
returned = self.tool_run_real_test(make_mail=False)
returned_mail = self.tool_make_returned_mail(returned)
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail
)[1],
"<html><body>\n%s\n<p>%s</p>\n</body></html>\n" % (
test_html,
self.disclaimer.text
),
"HTML-Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail
)[1]
)
)
def test_unresolvable_tag(self):
""" Test an unresolvable tag with template_fail=True inside a
disclaimer, assuming that the mail isn't modified.
"""
self.disclaimer.text = "{FAIL}"
self.disclaimer.template_fail = True
self.disclaimer.save()
returned = self.tool_run_real_test()
returned_mail = self.tool_make_returned_mail(returned)
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
self.test_mail
)[1],
milter_helper.MilterHelper.decode_mail(
returned_mail
)[1],
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail
)[1],
)
)
def test_unresolvable_tag_nofail(self):
""" Test an unresolvable tag with template_fail=False inside a
disclaimer, assuming that the mail is modified and the
unresolvable tag is removed.
"""
self.disclaimer.text = "{FAIL}"
self.disclaimer.template_fail = False
self.disclaimer.save()
returned = self.tool_run_real_test()
returned_mail = self.tool_make_returned_mail(returned)
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail
)[1],
"%s\n" % self.test_text,
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail
)[1],
)
)
def test_unresolvable_subtag(self):
""" Test an unresolvable subtag with template_fail=True
inside a disclaimer assuming it will return an unmodified mail
"""
self.disclaimer.text = "{FAIL[\"FAIL\"]}"
self.disclaimer.template_fail = True
self.disclaimer.save()
returned = self.tool_run_real_test()
returned_mail = self.tool_make_returned_mail(returned)
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
self.test_mail
)[1],
milter_helper.MilterHelper.decode_mail(
returned_mail
)[1],
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail
)[1],
)
)
def test_quoted_printable(self):
""" Use a "quoted printable"-encoded mail as a test mail
"""
self.test_mail = MIMEText(self.test_text, "plain", "iso-8859-1")
returned = self.tool_run_real_test(make_mail=False)
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
"%s\n%s" % (self.test_text, self.disclaimer.text),
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
)
)
def test_html_disclaimer(self):
""" Test a HTML (not "use text") disclaimer
"""
self.disclaimer.html_use_text = False
self.disclaimer.html = "<b>TEST-DISCLAIMER</b>"
self.disclaimer.save()
self.test_mail = MIMEText("<p>%s</p>" % self.test_text, "html")
returned = self.tool_run_real_test(make_mail=False)
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
"<html><body>\n<p>%s</p>\n%s\n</body></html>\n" % (
self.test_text,
self.disclaimer.html
),
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
)
)
def test_multiple_rules(self):
""" Add multiple rules assuming that only the first rule will be
carried out.
"""
rule2 = models.Rule()
rule2.position = 1
rule2.save()
action2 = models.Action()
action2.action = constants.ACTION_ACTION_ADD
action2.disclaimer = self.disclaimer
action2.rule = rule2
action2.position = 0
action2.save()
requirement2 = models.Requirement()
requirement2.rule = rule2
requirement2.action = constants.REQ_ACTION_ACCEPT
requirement2.save()
returned = self.tool_run_real_test()
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
"%s\n%s" % (self.test_text, self.disclaimer.text),
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
)
)
def test_multiple_rules_continue(self):
""" Use the continue flag for multiple rules assuming that all rules
will be carried out.
"""
rule2 = models.Rule()
rule2.position = 1
rule2.save()
self.rule.continue_rules = True
self.rule.save()
disclaimer2 = models.Disclaimer()
disclaimer2.name = "Test2"
disclaimer2.text = "Test-Disclaimer2"
disclaimer2.save()
action2 = models.Action()
action2.action = constants.ACTION_ACTION_ADD
action2.disclaimer = disclaimer2
action2.rule = rule2
action2.position = 0
action2.save()
requirement2 = models.Requirement()
requirement2.rule = rule2
requirement2.action = constants.REQ_ACTION_ACCEPT
requirement2.save()
returned = self.tool_run_real_test()
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
"%s\n%s\nTest-Disclaimer2" % (self.test_text, self.disclaimer.text),
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
self.tool_make_returned_mail(returned)
)[1],
)
)
def test_disclaimer_add_part(self):
""" Test an action, that adds a mime part with the disclaimer
"""
self.action.action = constants.ACTION_ACTION_ADDPART
self.action.save()
returned = self.tool_run_real_test()
returned_mail = self.tool_make_returned_mail(returned)
# The first part shouldn't have been modified, but added as an
# rfc-822 attachment
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[0].get_payload()[0]
)[1],
self.test_text,
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[0]
)[1],
)
)
# The second part should be our disclaimer
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[1]
)[1],
self.disclaimer.text,
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[1]
)[1],
)
)
def test_disclaimer_add_part_html(self):
""" Test an action, that adds a mime part with a HTML disclaimer
based on the text disclaimer
"""
self.action.action = constants.ACTION_ACTION_ADDPART
self.action.save()
test_html = "<p>TestHTML</p>"
self.test_mail = MIMEText(test_html, "html", "UTF-8")
returned = self.tool_run_real_test(make_mail=False)
returned_mail = self.tool_make_returned_mail(returned)
# The first part shouldn't have been modified, but added as an
# rfc-822 attachment
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[0].get_payload()[0]
)[1],
test_html,
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[0]
)[1],
)
)
# The second part should be our disclaimer
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[1]
)[1],
self.disclaimer.text,
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[1]
)[1],
)
)
def test_disclaimer_add_part_html_disclaimer(self):
""" Test an action, that adds a mime part with a pure HTML disclaimer
"""
self.action.action = constants.ACTION_ACTION_ADDPART
self.action.save()
test_html = "<p>TestHTML</p>"
self.test_mail = MIMEText(test_html, "html", "UTF-8")
self.disclaimer.html_use_text = False
self.disclaimer.html = "<b>TEST-DISCLAIMER</b>"
self.disclaimer.save()
returned = self.tool_run_real_test(make_mail=False)
returned_mail = self.tool_make_returned_mail(returned)
# The first part shouldn't have been modified, but added as an
# rfc-822 attachment
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[0].get_payload()[0]
)[1],
test_html,
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[0]
)[1],
)
)
# The second part should be our disclaimer
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[1]
)[1],
self.disclaimer.html,
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[1]
)[1],
)
)
def test_disclaimer_add_part_fallback(self):
""" Test an action, that adds a mime part with the disclaimer,
but uses a not-supported original mime-part (not text/plain or
/html). This should give a text-disclaimer back.
"""
self.action.action = constants.ACTION_ACTION_ADDPART
self.action.save()
self.disclaimer.html_use_text = False
self.disclaimer.html = "<b>TEST-DISCLAIMER</b>"
self.disclaimer.save()
self.test_mail = MIMEApplication("TEST")
returned = self.tool_run_real_test(make_mail=False)
returned_mail = self.tool_make_returned_mail(returned)
# The first part shouldn't have been modified, but added as an
# rfc-822 attachment
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[0].get_payload()[0]
)[1],
"TEST",
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[0]
)[1],
)
)
# The second part should be the text-part of the disclaimer
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[1]
)[1],
self.disclaimer.text,
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[1]
)[1],
)
)
def test_disclaimer_add_part_fallback_html(self):
""" Test an action, that adds a mime part with the disclaimer,
but uses a not-supported original mime-part (not text/plain or
/html). Use the html fallback to generate a html-disclaimer.
"""
self.action.action = constants.ACTION_ACTION_ADDPART
self.action.save()
self.disclaimer.html_use_text = False
self.disclaimer.html = "<b>TEST-DISCLAIMER</b>"
self.disclaimer.use_html_fallback = True
self.disclaimer.save()
self.test_mail = MIMEApplication("TEST")
returned = self.tool_run_real_test(make_mail=False)
returned_mail = self.tool_make_returned_mail(returned)
# The first part shouldn't have been modified, but added as an
# rfc-822 attachment
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[0].get_payload()[0]
)[1],
"TEST",
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[0]
)[1],
)
)
# The second part should be the text-part of the disclaimer
self.assertEqual(
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[1]
)[1],
self.disclaimer.html,
"Body was unexpectedly modified to %s" % (
milter_helper.MilterHelper.decode_mail(
returned_mail.get_payload()[1]
)[1],
)
)
| 28.936073
| 80
| 0.562766
| 2,692
| 25,348
| 5.099554
| 0.08321
| 0.063811
| 0.094406
| 0.118007
| 0.749927
| 0.728948
| 0.723048
| 0.712922
| 0.696751
| 0.690778
| 0
| 0.009941
| 0.34121
| 25,348
| 875
| 81
| 28.969143
| 0.812144
| 0.11709
| 0
| 0.669104
| 0
| 0.005484
| 0.08869
| 0.014057
| 0
| 0
| 0
| 0
| 0.051188
| 1
| 0.047532
| false
| 0
| 0.016453
| 0
| 0.071298
| 0.001828
| 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
|
b24647a9e91f0232ed276d08d0fc40ac4c49374a
| 2,268
|
py
|
Python
|
benchmarks/compas/facet_plots.py
|
vsahil/influence-duplicate
|
ae5bc77be6dcb7d69054a520733c373d833552da
|
[
"MIT"
] | null | null | null |
benchmarks/compas/facet_plots.py
|
vsahil/influence-duplicate
|
ae5bc77be6dcb7d69054a520733c373d833552da
|
[
"MIT"
] | null | null | null |
benchmarks/compas/facet_plots.py
|
vsahil/influence-duplicate
|
ae5bc77be6dcb7d69054a520733c373d833552da
|
[
"MIT"
] | 1
|
2021-11-03T06:53:18.000Z
|
2021-11-03T06:53:18.000Z
|
from plotnine import *
# from plotnine import ggplot, geom_point, geom_line, aes, stat_smooth, facet_wrap
# from plotnine.data import mtcars
# from plotnine import positions
# from plotnine import xlab, ylab, ggtitle, geom_boxplot, geom_path, geom_ribbon, geom_arrow
import pandas as pd
# df1 = pd.read_csv("compas_results_first80.csv")
# df2 = pd.read_csv("compas_results_second80.csv")
# df3 = pd.read_csv("compas_results_last80.csv")
# df = pd.concat([df1, df2, df3])
# df1 = pd.read_csv("compas_two_year_results_first120.csv")
# df2 = pd.read_csv("compas_two_year_results_last120.csv")
# df = pd.concat([df1, df2])
# # import ipdb; ipdb.set_trace()
# x = (ggplot(aes(x='Percentage-removal', y='Discm_percent', color='perm'), data=df) +\
# geom_point(size=1.5) +\
# # stat_smooth(colour='blue', span=0.2) +\
# # stat_summary() +\
# xlim(0, 5) +\
# facet_wrap(['H1Units','H2Units','batch'], nrow=3, ncol=4, scales = 'fixed', labeller='label_both', shrink=False) + \
# xlab("Biased Points Removed (percentage of training points)") + \
# ylab("Percentage Discrimination remaining") + \
# ggtitle("Facet plot for remaining discrimination for each setting (Compas recidivism)") +\
# theme(axis_text_x = element_text(size=6), dpi=151) +\
# theme_seaborn()
# )
# x.save("decrease-discm_compas_two_year_upto5.png", height=12, width=12)
df1 = pd.read_csv("compas_two_year_results_pointsremoved_first120.csv")
df2 = pd.read_csv("compas_two_year_results_pointsremoved_last120.csv")
df = pd.concat([df1, df2])
x = (ggplot(aes(x='Percentage-removal', y='Discm_percent', color='perm'), data=df) +\
geom_point(size=1.5) +\
# stat_smooth(colour='blue', span=0.2) +\
# stat_summary() +\
# xlim(0, 5) +\
facet_wrap(['H1Units','H2Units','batch'], nrow=3, ncol=4, scales = 'fixed', labeller='label_both', shrink=False) + \
xlab("Biased Points Removed (percentage of training points)") + \
ylab("Percentage Discrimination remaining") + \
ggtitle("Facet plot for remaining discrimination for each setting (Compas recidivism)") +\
theme(axis_text_x = element_text(size=6), dpi=151) +\
theme_seaborn()
)
x.save("decrease-discm_compas_two_year_pointsremoved_upto6.png", height=12, width=12)
| 41.236364
| 122
| 0.69709
| 319
| 2,268
| 4.739812
| 0.329154
| 0.027778
| 0.041667
| 0.069444
| 0.80291
| 0.743386
| 0.716931
| 0.68254
| 0.623016
| 0.623016
| 0
| 0.036045
| 0.143739
| 2,268
| 54
| 123
| 42
| 0.742533
| 0.595238
| 0
| 0
| 0
| 0
| 0.437642
| 0.173469
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.133333
| 0
| 0.133333
| 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
|
b252aab7678543824a7ed7d636988775ebf1ffbc
| 205
|
py
|
Python
|
backend/TipEx/serializers.py
|
Kelvin19891223/TipEx
|
470e92b721339beae121d4a5967382744d9e33da
|
[
"MIT"
] | null | null | null |
backend/TipEx/serializers.py
|
Kelvin19891223/TipEx
|
470e92b721339beae121d4a5967382744d9e33da
|
[
"MIT"
] | null | null | null |
backend/TipEx/serializers.py
|
Kelvin19891223/TipEx
|
470e92b721339beae121d4a5967382744d9e33da
|
[
"MIT"
] | null | null | null |
from rest_framework import serializers
from .models import SubscribeModel
class SubscribeSerializer(serializers.ModelSerializer):
class Meta:
model = SubscribeModel
fields = '__all__'
| 25.625
| 55
| 0.760976
| 19
| 205
| 7.947368
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.190244
| 205
| 7
| 56
| 29.285714
| 0.909639
| 0
| 0
| 0
| 0
| 0
| 0.034146
| 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
|
b254c55d3020948711dea35b1cdfbc015f5c4499
| 14
|
py
|
Python
|
utils/__init__.py
|
wwyf/pyml
|
53ba894187a29823e7461aaae1d4cb35ecfd4386
|
[
"MIT"
] | null | null | null |
utils/__init__.py
|
wwyf/pyml
|
53ba894187a29823e7461aaae1d4cb35ecfd4386
|
[
"MIT"
] | null | null | null |
utils/__init__.py
|
wwyf/pyml
|
53ba894187a29823e7461aaae1d4cb35ecfd4386
|
[
"MIT"
] | null | null | null |
def shuffle()
| 7
| 13
| 0.714286
| 2
| 14
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 14
| 2
| 13
| 7
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b2593a77757fa0f0862ae25ba1ecc6b4a38f4078
| 130
|
py
|
Python
|
DesignPatterns/FactoryPattern/ClassicalFactory/factories/abstract_factory.py
|
Py-Himanshu-Patel/Learn-Python
|
47a50a934cabcce3b1cbdd4c88141a51f21d3a05
|
[
"MIT"
] | null | null | null |
DesignPatterns/FactoryPattern/ClassicalFactory/factories/abstract_factory.py
|
Py-Himanshu-Patel/Learn-Python
|
47a50a934cabcce3b1cbdd4c88141a51f21d3a05
|
[
"MIT"
] | null | null | null |
DesignPatterns/FactoryPattern/ClassicalFactory/factories/abstract_factory.py
|
Py-Himanshu-Patel/Learn-Python
|
47a50a934cabcce3b1cbdd4c88141a51f21d3a05
|
[
"MIT"
] | null | null | null |
from abc import ABC, abstractmethod
class AbsFactory(ABC):
@abstractmethod
def create_auto(self):
pass
| 14.444444
| 36
| 0.646154
| 14
| 130
| 5.928571
| 0.785714
| 0.409639
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.292308
| 130
| 8
| 37
| 16.25
| 0.902174
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 0.2
| 0
| 0.6
| 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
|
b293add72224a9f69bef6717681a365ec8fe43b1
| 137
|
py
|
Python
|
RA_project/code_python/visualisation_df.py
|
erialc-cal/NLP-FOMC
|
2a8ad113a87e79f5d7beefa6cfd4653f445c92d5
|
[
"MIT"
] | null | null | null |
RA_project/code_python/visualisation_df.py
|
erialc-cal/NLP-FOMC
|
2a8ad113a87e79f5d7beefa6cfd4653f445c92d5
|
[
"MIT"
] | null | null | null |
RA_project/code_python/visualisation_df.py
|
erialc-cal/NLP-FOMC
|
2a8ad113a87e79f5d7beefa6cfd4653f445c92d5
|
[
"MIT"
] | null | null | null |
import pandas as pd
df = pd.read_csv('/Users/etiennelenaour/Desktop/Stage/csv_files/final_df_v1.csv')
print(df.iloc[80272:80292,2:7])
| 22.833333
| 81
| 0.766423
| 25
| 137
| 4.04
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103175
| 0.080292
| 137
| 6
| 82
| 22.833333
| 0.698413
| 0
| 0
| 0
| 0
| 0
| 0.442029
| 0.442029
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a2820048e9ddbc53f6049699ee9e98088e31bfb4
| 77
|
py
|
Python
|
django_log_entry_audit/__init__.py
|
dukic-dev/django-log-entry-audit
|
bd1031fd7ec2daa09e36aa902ca645cc1072184e
|
[
"MIT"
] | null | null | null |
django_log_entry_audit/__init__.py
|
dukic-dev/django-log-entry-audit
|
bd1031fd7ec2daa09e36aa902ca645cc1072184e
|
[
"MIT"
] | null | null | null |
django_log_entry_audit/__init__.py
|
dukic-dev/django-log-entry-audit
|
bd1031fd7ec2daa09e36aa902ca645cc1072184e
|
[
"MIT"
] | null | null | null |
default_app_config = "django_log_entry_audit.apps.DjangoLogEntryAuditConfig"
| 38.5
| 76
| 0.896104
| 9
| 77
| 7.111111
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038961
| 77
| 1
| 77
| 77
| 0.864865
| 0
| 0
| 0
| 0
| 0
| 0.688312
| 0.688312
| 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
|
a2929d9a86b3231541455437a1e290061b53e848
| 116
|
py
|
Python
|
secse/report/__init__.py
|
autodataming/SECSE
|
01ee9a9ceac48fb2d5bdda07f8f77aed976e6798
|
[
"Apache-2.0"
] | 37
|
2021-12-06T03:14:43.000Z
|
2022-02-25T10:31:01.000Z
|
secse/report/__init__.py
|
biocheming/SECSE
|
86d050211b5d67dd93598e3e808fe7a81cbb9a73
|
[
"Apache-2.0"
] | 2
|
2021-12-16T12:22:54.000Z
|
2022-02-27T09:26:20.000Z
|
secse/report/__init__.py
|
biocheming/SECSE
|
86d050211b5d67dd93598e3e808fe7a81cbb9a73
|
[
"Apache-2.0"
] | 7
|
2021-12-07T16:11:54.000Z
|
2022-03-01T07:56:13.000Z
|
#!/usr/bin/env python
# -*- coding:utf-8 _*-
"""
@author: Lu Chong
@file: __init__.py
@time: 2021/8/17/11:38
"""
| 14.5
| 23
| 0.586207
| 19
| 116
| 3.315789
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 0.155172
| 116
| 7
| 24
| 16.571429
| 0.520408
| 0.887931
| 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
|
a2d980445dd36dec9c97054332b75c94bc41313c
| 139
|
py
|
Python
|
python/dijkstra_algorithm/maps/maps_exception.py
|
jeffersonvivanco/Algorithms
|
8e730c907bf3551d6cb6109cb0cbfed8da881fdc
|
[
"MIT"
] | null | null | null |
python/dijkstra_algorithm/maps/maps_exception.py
|
jeffersonvivanco/Algorithms
|
8e730c907bf3551d6cb6109cb0cbfed8da881fdc
|
[
"MIT"
] | null | null | null |
python/dijkstra_algorithm/maps/maps_exception.py
|
jeffersonvivanco/Algorithms
|
8e730c907bf3551d6cb6109cb0cbfed8da881fdc
|
[
"MIT"
] | null | null | null |
class MapsException(Exception):
def __init__(self, *args: object, **kwargs: object) -> None:
super().__init__(*args, **kwargs)
| 34.75
| 64
| 0.654676
| 15
| 139
| 5.533333
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172662
| 139
| 4
| 65
| 34.75
| 0.721739
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
a2f227b32d81b299b28512532e7b4099b058f3bf
| 90
|
py
|
Python
|
tests/data/upload_data_tests/nested_dir/file4.py
|
LastRemote/sagemaker-python-sdk
|
fddf29d9e4383cd3f939253eef47ee79a464dd37
|
[
"Apache-2.0"
] | 1,690
|
2017-11-29T20:13:37.000Z
|
2022-03-31T12:58:11.000Z
|
tests/data/upload_data_tests/nested_dir/file4.py
|
LastRemote/sagemaker-python-sdk
|
fddf29d9e4383cd3f939253eef47ee79a464dd37
|
[
"Apache-2.0"
] | 2,762
|
2017-12-04T05:18:03.000Z
|
2022-03-31T23:40:11.000Z
|
tests/data/upload_data_tests/nested_dir/file4.py
|
LastRemote/sagemaker-python-sdk
|
fddf29d9e4383cd3f939253eef47ee79a464dd37
|
[
"Apache-2.0"
] | 961
|
2017-11-30T16:44:03.000Z
|
2022-03-30T23:12:09.000Z
|
"""
This is a file used in the upload_data tests in the test_session.py unit tests
"""
| 22.5
| 79
| 0.711111
| 17
| 90
| 3.647059
| 0.823529
| 0.16129
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.211111
| 90
| 3
| 80
| 30
| 0.873239
| 0.866667
| 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
|
a2f8402e67ceb325892e1493375802b7aea8802e
| 160
|
py
|
Python
|
src/shell/config.py
|
aspinwall-ui/aspinwall
|
96ea477695d62e3a3b1b91bfcb3cb2d92bb98eb5
|
[
"MIT"
] | 1
|
2022-03-08T07:00:42.000Z
|
2022-03-08T07:00:42.000Z
|
src/shell/config.py
|
aspinwall-ui/aspinwall
|
96ea477695d62e3a3b1b91bfcb3cb2d92bb98eb5
|
[
"MIT"
] | 1
|
2022-01-09T11:22:17.000Z
|
2022-03-08T05:33:41.000Z
|
src/shell/config.py
|
aspinwall-ui/aspinwall
|
96ea477695d62e3a3b1b91bfcb3cb2d92bb98eb5
|
[
"MIT"
] | null | null | null |
# coding: utf-8
"""
Handles configuration for the Aspinwall shell
"""
from gi.repository import Gio
config = Gio.Settings.new('org.dithernet.aspinwall.shell')
| 20
| 58
| 0.75625
| 22
| 160
| 5.5
| 0.863636
| 0.231405
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007092
| 0.11875
| 160
| 7
| 59
| 22.857143
| 0.851064
| 0.375
| 0
| 0
| 0
| 0
| 0.315217
| 0.315217
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0c0ccc88d4d32543940bc78b00858d669ca710ad
| 1,227
|
py
|
Python
|
pdip/integrator/connection/types/inmemory/base/in_memory_connector.py
|
ahmetcagriakca/pdip
|
c4c16d5666a740154cabdc6762cd44d98b7bdde8
|
[
"MIT"
] | 2
|
2021-12-09T21:07:46.000Z
|
2021-12-11T22:18:01.000Z
|
pdip/integrator/connection/types/inmemory/base/in_memory_connector.py
|
PythonDataIntegrator/pdip
|
c4c16d5666a740154cabdc6762cd44d98b7bdde8
|
[
"MIT"
] | null | null | null |
pdip/integrator/connection/types/inmemory/base/in_memory_connector.py
|
PythonDataIntegrator/pdip
|
c4c16d5666a740154cabdc6762cd44d98b7bdde8
|
[
"MIT"
] | 3
|
2021-11-15T00:47:00.000Z
|
2021-12-17T11:35:45.000Z
|
from abc import abstractmethod
from ......dependency import IScoped
class InMemoryConnector(IScoped):
@abstractmethod
def connect(self):
pass
@abstractmethod
def disconnect(self):
pass
@abstractmethod
def get_connection(self):
pass
@abstractmethod
def execute_many(self, query, data):
pass
@abstractmethod
def get_target_query_indexer(self):
pass
@abstractmethod
def get_truncate_query(self, schema, table):
count_query = f'TRUNCATE TABLE {schema}.{table}'
return count_query
@abstractmethod
def get_table_count_query(self, query):
count_query = f"SELECT COUNT(*) as COUNT FROM ({query}) as count_table"
return count_query
@abstractmethod
def get_table_select_query(self, selected_rows, schema, table):
return f'SELECT {selected_rows} FROM {schema}.{table}'
@abstractmethod
def get_table_data_query(self, query):
return f"SELECT * FROM ({query}) base_query"
@abstractmethod
def get_table_data_with_paging_query(self, query, start, end):
return f"SELECT * FROM ({query}) ordered_query order by null limit {end - start} offset {start}"
| 25.040816
| 106
| 0.672372
| 145
| 1,227
| 5.482759
| 0.289655
| 0.213836
| 0.176101
| 0.125786
| 0.320755
| 0.115723
| 0.115723
| 0.115723
| 0
| 0
| 0
| 0
| 0.240424
| 1,227
| 48
| 107
| 25.5625
| 0.853004
| 0
| 0
| 0.485714
| 0
| 0
| 0.206362
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.142857
| 0.057143
| 0.085714
| 0.514286
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
0c101e49fc122864cfa7992fdc5fbc6af44ec31a
| 344
|
py
|
Python
|
keyring/__init__.py
|
yarikoptic/keyring
|
1e25fde80b5e45cc25fe3efdf4edded27706578b
|
[
"MIT"
] | 1
|
2019-04-02T20:16:22.000Z
|
2019-04-02T20:16:22.000Z
|
keyring/__init__.py
|
yarikoptic/keyring
|
1e25fde80b5e45cc25fe3efdf4edded27706578b
|
[
"MIT"
] | null | null | null |
keyring/__init__.py
|
yarikoptic/keyring
|
1e25fde80b5e45cc25fe3efdf4edded27706578b
|
[
"MIT"
] | null | null | null |
from __future__ import absolute_import
from .core import (set_keyring, get_keyring, set_password, get_password,
delete_password)
from .getpassbackend import get_password as get_pass_get_password
__all__ = (
'set_keyring', 'get_keyring', 'set_password', 'get_password',
'delete_password', 'get_pass_get_password',
)
| 31.272727
| 72
| 0.75
| 43
| 344
| 5.395349
| 0.325581
| 0.237069
| 0.112069
| 0.172414
| 0.482759
| 0.482759
| 0.482759
| 0.482759
| 0.482759
| 0.482759
| 0
| 0
| 0.165698
| 344
| 10
| 73
| 34.4
| 0.808362
| 0
| 0
| 0
| 0
| 0
| 0.238372
| 0.061047
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.625
| 0.375
| 0
| 0.375
| 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
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
0c3c6dcd7da37cad255130e1216eaa54ecf06c50
| 238
|
py
|
Python
|
core/helpers/api/shodan.py
|
N7SALab/HEV
|
d449a2ba4eeb07127b97befd0a58d37279ed8a36
|
[
"Apache-2.0"
] | null | null | null |
core/helpers/api/shodan.py
|
N7SALab/HEV
|
d449a2ba4eeb07127b97befd0a58d37279ed8a36
|
[
"Apache-2.0"
] | 1
|
2021-06-02T01:10:50.000Z
|
2021-06-02T01:10:50.000Z
|
core/helpers/api/shodan.py
|
N7SALab/HEV
|
d449a2ba4eeb07127b97befd0a58d37279ed8a36
|
[
"Apache-2.0"
] | null | null | null |
class Shodan:
"""Get any Shodan information
"""
def __init__(self):
# TODO: move key to config
self.api_key = 'yKIZ2L54cQxIfnebD4V2qgPp0QQsJLpK'
# TODO: add shodan api
def request(self):
pass
| 19.833333
| 57
| 0.609244
| 26
| 238
| 5.384615
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.036145
| 0.302521
| 238
| 11
| 58
| 21.636364
| 0.807229
| 0.327731
| 0
| 0
| 0
| 0
| 0.20915
| 0.20915
| 0
| 0
| 0
| 0.090909
| 0
| 1
| 0.4
| false
| 0.2
| 0
| 0
| 0.6
| 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
| 1
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
a772ae90c5d1a2528065a160ef235937b0ce5cf1
| 307
|
py
|
Python
|
frappe-bench/apps/erpnext/erpnext/patches/v8_0/update_customer_pos_id.py
|
Semicheche/foa_frappe_docker
|
a186b65d5e807dd4caf049e8aeb3620a799c1225
|
[
"MIT"
] | 1
|
2021-04-29T14:55:29.000Z
|
2021-04-29T14:55:29.000Z
|
frappe-bench/apps/erpnext/erpnext/patches/v8_0/update_customer_pos_id.py
|
Semicheche/foa_frappe_docker
|
a186b65d5e807dd4caf049e8aeb3620a799c1225
|
[
"MIT"
] | null | null | null |
frappe-bench/apps/erpnext/erpnext/patches/v8_0/update_customer_pos_id.py
|
Semicheche/foa_frappe_docker
|
a186b65d5e807dd4caf049e8aeb3620a799c1225
|
[
"MIT"
] | 1
|
2021-04-29T14:39:01.000Z
|
2021-04-29T14:39:01.000Z
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doctype("Customer")
frappe.db.sql(""" update `tabCustomer` set customer_pos_id = name """)
| 34.111111
| 71
| 0.76873
| 42
| 307
| 5.428571
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018727
| 0.130293
| 307
| 9
| 72
| 34.111111
| 0.835206
| 0.407166
| 0
| 0
| 0
| 0
| 0.316667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.4
| 0
| 0.6
| 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
|
a783e1df5d90b57c89d82f3497b8d30885466483
| 108
|
py
|
Python
|
src/pkgcore/repository/__init__.py
|
mgorny/pkgcore
|
ab4a718aa1626f4edeb385383f5595a1e262b0dc
|
[
"BSD-3-Clause"
] | 1
|
2021-07-05T13:10:18.000Z
|
2021-07-05T13:10:18.000Z
|
pkgcore/repository/__init__.py
|
vapier/pkgcore
|
35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f
|
[
"BSD-3-Clause"
] | 8
|
2015-03-24T14:21:44.000Z
|
2015-03-24T14:21:44.000Z
|
pkgcore/repository/__init__.py
|
vapier/pkgcore
|
35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f
|
[
"BSD-3-Clause"
] | null | null | null |
# Copyright: 2005-2008 Brian Harring <ferringb@gmail.com>
# License: GPL2/BSD
"""
repository subsystem
"""
| 15.428571
| 57
| 0.722222
| 13
| 108
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095745
| 0.12963
| 108
| 6
| 58
| 18
| 0.734043
| 0.87963
| 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
|
a78a9165ab1f5c2ae1b613ab47d7feb1bd445b84
| 216
|
py
|
Python
|
tests/profile_import.py
|
noah-ziethen/py-pde
|
b88e86439290c31284a4ac665a8e9ff34d08b494
|
[
"MIT"
] | null | null | null |
tests/profile_import.py
|
noah-ziethen/py-pde
|
b88e86439290c31284a4ac665a8e9ff34d08b494
|
[
"MIT"
] | null | null | null |
tests/profile_import.py
|
noah-ziethen/py-pde
|
b88e86439290c31284a4ac665a8e9ff34d08b494
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
import sys
sys.path.append('..')
from pyinstrument import Profiler
profiler = Profiler()
profiler.start()
import pde
profiler.stop()
print(profiler.output_text(unicode=True, color=True))
| 13.5
| 53
| 0.75
| 29
| 216
| 5.551724
| 0.689655
| 0.298137
| 0.298137
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005208
| 0.111111
| 216
| 15
| 54
| 14.4
| 0.833333
| 0.097222
| 0
| 0
| 0
| 0
| 0.010309
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.375
| 0
| 0.375
| 0.125
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a78e373dc9ffa08ad0bc8088b27b08a8f0388b3c
| 138
|
py
|
Python
|
scrape.py
|
andrewyang96/PokemonSpriteScraper
|
a528ad226179e18202aeb167d525b52c83cb4a46
|
[
"MIT"
] | null | null | null |
scrape.py
|
andrewyang96/PokemonSpriteScraper
|
a528ad226179e18202aeb167d525b52c83cb4a46
|
[
"MIT"
] | null | null | null |
scrape.py
|
andrewyang96/PokemonSpriteScraper
|
a528ad226179e18202aeb167d525b52c83cb4a46
|
[
"MIT"
] | null | null | null |
# The main script
from downloadsprites import downloadSprites
from compresssprites import compressMain
downloadSprites()
compressMain()
| 17.25
| 43
| 0.847826
| 13
| 138
| 9
| 0.615385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115942
| 138
| 7
| 44
| 19.714286
| 0.959016
| 0.108696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 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
|
a7c7fc514c706bbbe317c32448aacf906c240ab2
| 234
|
py
|
Python
|
Mundo 1/Desafio/034.py
|
LeonardoJosedaSilveira/Curso-de-python
|
e5b7920ce75a3c7af9b8250e18cabaa173e2478b
|
[
"MIT"
] | null | null | null |
Mundo 1/Desafio/034.py
|
LeonardoJosedaSilveira/Curso-de-python
|
e5b7920ce75a3c7af9b8250e18cabaa173e2478b
|
[
"MIT"
] | null | null | null |
Mundo 1/Desafio/034.py
|
LeonardoJosedaSilveira/Curso-de-python
|
e5b7920ce75a3c7af9b8250e18cabaa173e2478b
|
[
"MIT"
] | null | null | null |
sal = float(input('Qual o seu salario? '))
if sal > 1250.00:
print('Com o aumento seu salario sera R${:.2f}'.format(sal + (sal / 100) * 10))
else:
print('Com o aumento seu salario sera R${:.2f}'.format(sal + (sal / 100) * 15))
| 46.8
| 83
| 0.611111
| 40
| 234
| 3.575
| 0.525
| 0.20979
| 0.125874
| 0.223776
| 0.671329
| 0.671329
| 0.671329
| 0.671329
| 0.671329
| 0.671329
| 0
| 0.095238
| 0.192308
| 234
| 5
| 84
| 46.8
| 0.661376
| 0
| 0
| 0
| 0
| 0
| 0.417021
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.4
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 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
|
38f82cfcf4153f13ebfeaadb4deea3f339e0d3d0
| 145
|
py
|
Python
|
example/predict.py
|
RaspiAIContest2019/AIContest
|
047cac122377d502a7cf99c5d1a441c4332388b0
|
[
"Apache-2.0"
] | null | null | null |
example/predict.py
|
RaspiAIContest2019/AIContest
|
047cac122377d502a7cf99c5d1a441c4332388b0
|
[
"Apache-2.0"
] | null | null | null |
example/predict.py
|
RaspiAIContest2019/AIContest
|
047cac122377d502a7cf99c5d1a441c4332388b0
|
[
"Apache-2.0"
] | null | null | null |
from display import display
if __name__ == "__main__":
##一連の推論処理
##推論が終了し、結果を得られたらdisplayメソッドを呼び出し、結果を表示してください
display(name,prob)
| 16.111111
| 49
| 0.724138
| 14
| 145
| 6.928571
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.17931
| 145
| 9
| 50
| 16.111111
| 0.815126
| 0.344828
| 0
| 0
| 0
| 0
| 0.086957
| 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
|
38f87cd64108f15a0001a160ea30a941db12e235
| 214
|
py
|
Python
|
skmine/itemsets/__init__.py
|
remiadon/scikit-mine
|
769d7d5ea0dda5d4adea33236733f4ce1ea0c815
|
[
"BSD-3-Clause"
] | null | null | null |
skmine/itemsets/__init__.py
|
remiadon/scikit-mine
|
769d7d5ea0dda5d4adea33236733f4ce1ea0c815
|
[
"BSD-3-Clause"
] | null | null | null |
skmine/itemsets/__init__.py
|
remiadon/scikit-mine
|
769d7d5ea0dda5d4adea33236733f4ce1ea0c815
|
[
"BSD-3-Clause"
] | null | null | null |
"""
The :mod:`skming.itemset` module includes methods which consider
itemsets for their singular properties, such as the minimum support threshold,
or the closeness.
"""
from .lcm import LCM
from .slim import SLIM
| 26.75
| 78
| 0.780374
| 31
| 214
| 5.387097
| 0.806452
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14486
| 214
| 7
| 79
| 30.571429
| 0.912568
| 0.752336
| 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
|
ac06042d2d4dcad0b2836b08f0db6bf1185f1a7e
| 791
|
py
|
Python
|
AtC_Beg_Con_021-030/ABC022/D.py
|
yosho-18/AtCoder
|
50f6d5c92a01792552c31ac912ce1cd557b06fb0
|
[
"MIT"
] | null | null | null |
AtC_Beg_Con_021-030/ABC022/D.py
|
yosho-18/AtCoder
|
50f6d5c92a01792552c31ac912ce1cd557b06fb0
|
[
"MIT"
] | null | null | null |
AtC_Beg_Con_021-030/ABC022/D.py
|
yosho-18/AtCoder
|
50f6d5c92a01792552c31ac912ce1cd557b06fb0
|
[
"MIT"
] | null | null | null |
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools, random
#from collections import deque
#from heapq import heappush, heappop
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
INF = float("INF")
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
| 43.944444
| 110
| 0.620733
| 136
| 791
| 3.602941
| 0.389706
| 0.032653
| 0.195918
| 0.032653
| 0.253061
| 0.155102
| 0.155102
| 0.155102
| 0
| 0
| 0
| 0.0625
| 0.150442
| 791
| 18
| 111
| 43.944444
| 0.666667
| 0.08091
| 0
| 0
| 0
| 0
| 0.004132
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0.0625
| 0.5
| 0.5625
| 0.0625
| 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
|
ac137adb5cebc14c230a1e2c3703cbb8c2ec8c68
| 104
|
py
|
Python
|
web_expense_tracker/expense_tracker/apps.py
|
Sophiat-O/web_expense_tracker
|
c72ad35ff665be30727af3c7572dc2078b3d8119
|
[
"MIT"
] | null | null | null |
web_expense_tracker/expense_tracker/apps.py
|
Sophiat-O/web_expense_tracker
|
c72ad35ff665be30727af3c7572dc2078b3d8119
|
[
"MIT"
] | null | null | null |
web_expense_tracker/expense_tracker/apps.py
|
Sophiat-O/web_expense_tracker
|
c72ad35ff665be30727af3c7572dc2078b3d8119
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class ExpenseTrackerConfig(AppConfig):
name = 'expense_tracker'
| 17.333333
| 38
| 0.788462
| 11
| 104
| 7.363636
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144231
| 104
| 5
| 39
| 20.8
| 0.910112
| 0
| 0
| 0
| 0
| 0
| 0.144231
| 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
|
ac172e411cf38ae819f5a344bc53414a76e448be
| 64
|
py
|
Python
|
app/core/config/__init__.py
|
natanascimento/school-controll-data-process
|
ac65553c51a7c8aca1c786aaa396b9f3e275a1af
|
[
"MIT"
] | null | null | null |
app/core/config/__init__.py
|
natanascimento/school-controll-data-process
|
ac65553c51a7c8aca1c786aaa396b9f3e275a1af
|
[
"MIT"
] | null | null | null |
app/core/config/__init__.py
|
natanascimento/school-controll-data-process
|
ac65553c51a7c8aca1c786aaa396b9f3e275a1af
|
[
"MIT"
] | null | null | null |
from core.config.settings import Settings
settings = Settings()
| 21.333333
| 41
| 0.8125
| 8
| 64
| 6.5
| 0.625
| 0.615385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109375
| 64
| 3
| 42
| 21.333333
| 0.912281
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ac288e3b5bc728fb9a6048b37c78720eb4d18fe8
| 490
|
py
|
Python
|
tests/test_quote.py
|
ruthjomo/Personal-blog
|
861562750f6bcc68451f9f5e71732643ecc86a88
|
[
"Unlicense"
] | null | null | null |
tests/test_quote.py
|
ruthjomo/Personal-blog
|
861562750f6bcc68451f9f5e71732643ecc86a88
|
[
"Unlicense"
] | null | null | null |
tests/test_quote.py
|
ruthjomo/Personal-blog
|
861562750f6bcc68451f9f5e71732643ecc86a88
|
[
"Unlicense"
] | null | null | null |
import unittest
from app.models import Quote
class TestQuote(unittest.TestCase):
def setUp(self):
"""
Set up method that will run before every Test
"""
self.random_quote = Quote("Ruth Jomo", "A great mind")
def test_instance(self):
self.assertTrue(isinstance(self.random_quote, Quote))
def test_init(self):
self.assertEqual(self.random_quote.author, "Ruth Jomo")
self.assertEqual(self.random_quote.quote,"A great mind")
| 30.625
| 64
| 0.669388
| 64
| 490
| 5.03125
| 0.515625
| 0.124224
| 0.186335
| 0.186335
| 0.186335
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.22449
| 490
| 16
| 64
| 30.625
| 0.847368
| 0.091837
| 0
| 0
| 0
| 0
| 0.099526
| 0
| 0
| 0
| 0
| 0
| 0.3
| 1
| 0.3
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
ac3575dd5f2c5ff9d2bc438f3da3bc8f203bb40b
| 735
|
py
|
Python
|
wofry/propagator/propagators2D/__init__.py
|
PaNOSC-ViNYL/wofry
|
779b5a738ee7738e959a58aafe01e7e49b03894a
|
[
"MIT"
] | null | null | null |
wofry/propagator/propagators2D/__init__.py
|
PaNOSC-ViNYL/wofry
|
779b5a738ee7738e959a58aafe01e7e49b03894a
|
[
"MIT"
] | null | null | null |
wofry/propagator/propagators2D/__init__.py
|
PaNOSC-ViNYL/wofry
|
779b5a738ee7738e959a58aafe01e7e49b03894a
|
[
"MIT"
] | null | null | null |
from wofry.propagator.propagators2D.fraunhofer import Fraunhofer2D
from wofry.propagator.propagators2D.fresnel import Fresnel2D
from wofry.propagator.propagators2D.fresnel_convolution import FresnelConvolution2D
from wofry.propagator.propagators2D.integral import Integral2D
from wofry.propagator.propagators2D.fresnel_zoom_xy import FresnelZoomXY2D
from wofry.propagator.propagator import PropagationManager
def initialize_default_propagator_2D():
propagator = PropagationManager.Instance()
propagator.add_propagator(Fraunhofer2D())
propagator.add_propagator(Fresnel2D())
propagator.add_propagator(FresnelConvolution2D())
propagator.add_propagator(Integral2D())
propagator.add_propagator(FresnelZoomXY2D())
| 43.235294
| 83
| 0.85034
| 72
| 735
| 8.527778
| 0.319444
| 0.087948
| 0.185668
| 0.260586
| 0.190554
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023739
| 0.082993
| 735
| 16
| 84
| 45.9375
| 0.88724
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.076923
| false
| 0
| 0.461538
| 0
| 0.538462
| 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
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ac52cd3e7e84a5ff1e83d0b731a2377b99c0c386
| 777
|
py
|
Python
|
Week2/Item.py
|
EricCharnesky/CIS2001-Winter2022
|
9c74433ade96e4c7bf9029543285f1ded1fe91e5
|
[
"MIT"
] | 3
|
2022-01-20T21:55:17.000Z
|
2022-02-02T23:10:45.000Z
|
Week2/Item.py
|
EricCharnesky/CIS2001-Winter2022
|
9c74433ade96e4c7bf9029543285f1ded1fe91e5
|
[
"MIT"
] | null | null | null |
Week2/Item.py
|
EricCharnesky/CIS2001-Winter2022
|
9c74433ade96e4c7bf9029543285f1ded1fe91e5
|
[
"MIT"
] | 2
|
2022-02-06T02:59:32.000Z
|
2022-02-23T02:34:13.000Z
|
class Item:
def __init__(self, name, price, quantity):
self._name = name
self.set_price(price)
self.set_quantity(quantity)
def get_name(self):
return self._name
def get_price(self):
return self._price
def get_quantity(self):
return self._quantity
def set_price(self, price):
if price > 0:
self._price = price
# todo - defensive checks
def set_quantity(self, quantity):
if quantity >= 0:
self._quantity = quantity
# todo - defensive checks
def buy(self, quantity_to_buy):
if quantity_to_buy <= self._quantity:
self._quantity -= quantity_to_buy
return quantity_to_buy * self._price
return 0
| 23.545455
| 48
| 0.589447
| 93
| 777
| 4.623656
| 0.193548
| 0.167442
| 0.12093
| 0.102326
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00578
| 0.332046
| 777
| 32
| 49
| 24.28125
| 0.822736
| 0.060489
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03125
| 0
| 1
| 0.318182
| false
| 0
| 0
| 0.136364
| 0.590909
| 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
|
ac5ef5db03ad27efc364301dec062a17c8c3a47e
| 6,376
|
py
|
Python
|
tests/test_algorithms/test_power_method.py
|
DenisOgr/lexrank
|
bce6997200a2b16f260b4a78564dab927d189d70
|
[
"MIT"
] | null | null | null |
tests/test_algorithms/test_power_method.py
|
DenisOgr/lexrank
|
bce6997200a2b16f260b4a78564dab927d189d70
|
[
"MIT"
] | null | null | null |
tests/test_algorithms/test_power_method.py
|
DenisOgr/lexrank
|
bce6997200a2b16f260b4a78564dab927d189d70
|
[
"MIT"
] | null | null | null |
import math
import numpy as np
from scipy.linalg import block_diag
from lexrank.algorithms.power_method import (
connected_nodes, stationary_distribution,
)
def test_connected_nodes():
t_matrix = np.array([[1]])
result = connected_nodes(t_matrix)
expected_result = [np.array([0])]
assert all(
np.array_equal(gr_res, gr_exp)
for gr_res, gr_exp in zip(result, expected_result)
)
t_matrix = np.array([[1, 0], [0, 1]])
result = connected_nodes(t_matrix)
expected_result = [np.array([0]), np.array([1])]
assert all(
np.array_equal(gr_res, gr_exp)
for gr_res, gr_exp in zip(result, expected_result)
)
t_matrix = np.array([[1, 0], [1, 0]])
result = connected_nodes(t_matrix)
expected_result = [np.array([0, 1])]
assert all(
np.array_equal(gr_res, gr_exp)
for gr_res, gr_exp in zip(result, expected_result)
)
t_matrix = np.array([[1]])
result = connected_nodes(t_matrix)
expected_result = [np.array([0])]
assert all(
np.array_equal(gr_res, gr_exp)
for gr_res, gr_exp in zip(result, expected_result)
)
t_matrix = np.array([[.6, .1, .3], [.1, .7, .2], [.2, .2, .6]])
result = connected_nodes(t_matrix)
expected_result = [np.array([0, 1, 2])]
assert all(
np.array_equal(gr_res, gr_exp)
for gr_res, gr_exp in zip(result, expected_result)
)
t_matrix = np.array([[.5, 0, .5], [0, 1, 0], [.5, 0, .5]])
result = connected_nodes(t_matrix)
expected_result = [np.array([0, 2]), np.array([1])]
assert all(
np.array_equal(gr_res, gr_exp)
for gr_res, gr_exp in zip(result, expected_result)
)
mat_1 = np.array([[.5, 0, .5], [0, 1, 0], [.5, 0, .5]])
mat_2 = np.array([[1]])
mat_3 = np.array([[0, 1], [1, 0]])
mat_4 = np.array([[.6, .1, .3], [.1, .7, .2], [.2, .2, .6]])
t_matrix = block_diag(mat_1, mat_2, mat_3, mat_4)
result = connected_nodes(t_matrix)
expected_result = [
np.array([0, 2]),
np.array([1]),
np.array([3]),
np.array([4, 5]),
np.array([6, 7, 8]),
]
assert all(
np.array_equal(gr_res, gr_exp)
for gr_res, gr_exp in zip(result, expected_result)
)
def test_stationary_distribution():
transition_matrices = []
t_matrix = np.array([[1.]])
assert np.array_equal(stationary_distribution(t_matrix), [1.])
transition_matrices.append(t_matrix)
t_matrix = np.array([
[.6, .1, .3],
[.1, .7, .2],
[.2, .2, .6],
])
expected_result = [.2759, .3448, .3793]
actual_result_1 = stationary_distribution(t_matrix, increase_power=True)
actual_result_2 = stationary_distribution(t_matrix, increase_power=False)
assert np.array_equal(np.round(actual_result_1, 4), expected_result)
assert np.array_equal(np.round(actual_result_2, 4), expected_result)
transition_matrices.append(t_matrix)
t_matrix = np.zeros([5, 5])
t_matrix[np.ix_([0, 3], [2, 4])] = .5
t_matrix[np.ix_([2], [0, 1, 3, 4])] = .25
t_matrix[1, 2], t_matrix[4, 4] = 1, 1
expected_result = [0, 0, 0, 0, 1]
actual_result_1 = stationary_distribution(t_matrix, increase_power=True)
actual_result_2 = stationary_distribution(t_matrix, increase_power=False)
assert np.allclose(actual_result_1, expected_result)
assert np.allclose(actual_result_2, expected_result)
transition_matrices.append(t_matrix)
t_matrix = np.zeros([4, 4])
t_matrix[0, 1] = 1
t_matrix[1, 1], t_matrix[1, 2] = 1 / 3, 2 / 3
t_matrix[2, 3] = 1
t_matrix[3, 0], t_matrix[3, 3] = 3 / 5, 2 / 5
expected_result = [6 / 31, 9 / 31, 6 / 31, 10 / 31]
actual_result_1 = stationary_distribution(t_matrix, increase_power=True)
actual_result_2 = stationary_distribution(t_matrix, increase_power=False)
assert np.allclose(actual_result_1, expected_result)
assert np.allclose(actual_result_2, expected_result)
transition_matrices.append(t_matrix)
t_matrix = np.zeros([7, 7])
t_matrix[0, 0], t_matrix[0, 1] = .5, .5
t_matrix[1, 0], t_matrix[1, 1], t_matrix[1, 2] = .5, .4, .1
t_matrix[2, 1], t_matrix[2, 2] = .6, .4
t_matrix[3, 2], t_matrix[3, 3] = .2, .4
t_matrix[3, 4], t_matrix[3, 5] = .2, .2
t_matrix[4, 3], t_matrix[4, 6] = .7, .3
t_matrix[5, 6] = 1.
t_matrix[6, 5], t_matrix[6, 6] = .95, .05
expected_result = [0.2465, 0.2465, 0.0411, 0., 0., 0.2269, 0.2389]
actual_result_1 = stationary_distribution(t_matrix, increase_power=True)
actual_result_2 = stationary_distribution(t_matrix, increase_power=False)
assert np.array_equal(np.round(actual_result_1, 4), expected_result)
assert np.array_equal(np.round(actual_result_2, 4), expected_result)
transition_matrices.append(t_matrix)
t_matrix = np.array([[1 / 2, 0, 1 / 2], [0, 1, 0], [1 / 2, 0, 1 / 2]])
expected_result = [1 / 3] * 3
actual_result_1 = stationary_distribution(t_matrix, increase_power=True)
actual_result_2 = stationary_distribution(t_matrix, increase_power=False)
assert np.allclose(actual_result_1, expected_result)
assert np.allclose(actual_result_2, expected_result)
transition_matrices.append(t_matrix)
# crash test
repeat_num = 20
big_t_mat = block_diag(*transition_matrices * repeat_num)
distribution_1 = stationary_distribution(big_t_mat, increase_power=True)
distribution_2 = stationary_distribution(big_t_mat, increase_power=False)
assert math.isclose(sum(distribution_1), 1)
assert math.isclose(sum(distribution_2), 1)
assert np.allclose(distribution_1, distribution_2)
data = np.split(np.array(distribution_1), repeat_num)
test_row = data[0]
for row in data[1:]:
assert np.array_equal(row, test_row)
sample_num = 1000
big_t_mat = np.random.random([sample_num] * 2)
big_t_mat /= big_t_mat.sum(axis=1, keepdims=True)
distribution_1 = stationary_distribution(big_t_mat, increase_power=True)
distribution_2 = stationary_distribution(big_t_mat, increase_power=False)
distribution_3 = stationary_distribution(big_t_mat, normalized=False)
assert math.isclose(sum(distribution_1), 1)
assert math.isclose(sum(distribution_2), 1)
assert math.isclose(sum(distribution_3), sample_num)
assert np.allclose(distribution_1, distribution_2)
| 33.557895
| 77
| 0.655897
| 997
| 6,376
| 3.914744
| 0.084253
| 0.11299
| 0.032283
| 0.03587
| 0.76249
| 0.731745
| 0.725083
| 0.705099
| 0.695875
| 0.686651
| 0
| 0.061493
| 0.201694
| 6,376
| 189
| 78
| 33.73545
| 0.705305
| 0.001568
| 0
| 0.465753
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178082
| 1
| 0.013699
| false
| 0
| 0.027397
| 0
| 0.041096
| 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
|
ac64ceb4a1a0aaf0ba47707dec7d33e7b8b148a4
| 90
|
py
|
Python
|
foodster/recipes/apps.py
|
Keril-png/foodgram-project
|
9541609c74ea55eda09aae2395997395d42bb495
|
[
"MIT"
] | 1
|
2021-07-06T09:50:14.000Z
|
2021-07-06T09:50:14.000Z
|
foodster/recipes/apps.py
|
Keril-png/foodgram-project
|
9541609c74ea55eda09aae2395997395d42bb495
|
[
"MIT"
] | null | null | null |
foodster/recipes/apps.py
|
Keril-png/foodgram-project
|
9541609c74ea55eda09aae2395997395d42bb495
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class RecepiesConfig(AppConfig):
name = 'recipes'
| 15
| 33
| 0.755556
| 10
| 90
| 6.8
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 90
| 5
| 34
| 18
| 0.906667
| 0
| 0
| 0
| 0
| 0
| 0.077778
| 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
|
ac6ffc08efc785dd7bfa55e14d0ee8854467a3ec
| 2,521
|
py
|
Python
|
organice/constants.py
|
bittner/django-organice
|
7621e4cf2361db84b42d77e5e72e341559eb9906
|
[
"Apache-2.0"
] | 34
|
2015-04-22T12:47:32.000Z
|
2022-03-18T02:16:17.000Z
|
organice/constants.py
|
TebelloX/django-organice
|
7621e4cf2361db84b42d77e5e72e341559eb9906
|
[
"Apache-2.0"
] | 13
|
2015-07-24T05:25:56.000Z
|
2020-09-02T17:38:35.000Z
|
organice/constants.py
|
TebelloX/django-organice
|
7621e4cf2361db84b42d77e5e72e341559eb9906
|
[
"Apache-2.0"
] | 14
|
2015-05-01T20:42:49.000Z
|
2022-03-25T01:12:34.000Z
|
"""
Constants for django Organice.
"""
ORGANICE_DJANGO_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
]
ORGANICE_CMS_APPS = [
'cms',
'mptt',
'menus',
'sekizai',
'treebeard',
'easy_thumbnails',
'djangocms_admin_style',
# 'djangocms_file',
'djangocms_maps',
'djangocms_inherit',
'djangocms_link',
'djangocms_picture',
# 'djangocms_teaser',
'djangocms_text_ckeditor',
# 'media_tree',
# 'media_tree.contrib.cms_plugins.media_tree_image',
# 'media_tree.contrib.cms_plugins.media_tree_gallery',
# 'media_tree.contrib.cms_plugins.media_tree_slideshow',
# 'media_tree.contrib.cms_plugins.media_tree_listing',
# 'form_designer.contrib.cms_plugins.form_designer_form',
]
ORGANICE_BLOG_APPS = [
'cmsplugin_zinnia',
'django_comments',
'tagging',
'zinnia',
]
ORGANICE_NEWSLETTER_APPS = [
# 'emencia.django.newsletter',
'tinymce',
]
ORGANICE_UTIL_APPS = [
'analytical',
'simple_links',
'todo',
]
ORGANICE_AUTH_APPS = [
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.amazon',
# 'allauth.socialaccount.providers.angellist',
'allauth.socialaccount.providers.bitbucket',
'allauth.socialaccount.providers.bitly',
'allauth.socialaccount.providers.dropbox_oauth2',
'allauth.socialaccount.providers.facebook',
# 'allauth.socialaccount.providers.flickr',
# 'allauth.socialaccount.providers.feedly',
'allauth.socialaccount.providers.github',
'allauth.socialaccount.providers.gitlab',
'allauth.socialaccount.providers.google',
'allauth.socialaccount.providers.instagram',
'allauth.socialaccount.providers.linkedin_oauth2',
# 'allauth.socialaccount.providers.openid',
'allauth.socialaccount.providers.pinterest',
'allauth.socialaccount.providers.slack',
'allauth.socialaccount.providers.soundcloud',
'allauth.socialaccount.providers.stackexchange',
# 'allauth.socialaccount.providers.tumblr',
# 'allauth.socialaccount.providers.twitch',
'allauth.socialaccount.providers.twitter',
'allauth.socialaccount.providers.vimeo',
# 'allauth.socialaccount.providers.vk',
# 'allauth.socialaccount.providers.weibo',
'allauth.socialaccount.providers.windowslive',
'allauth.socialaccount.providers.xing',
]
| 29.313953
| 61
| 0.712416
| 235
| 2,521
| 7.434043
| 0.353191
| 0.309101
| 0.431597
| 0.043503
| 0.080137
| 0.080137
| 0.080137
| 0
| 0
| 0
| 0
| 0.000933
| 0.149544
| 2,521
| 85
| 62
| 29.658824
| 0.813899
| 0.283221
| 0
| 0
| 0
| 0
| 0.645541
| 0.498037
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ac836d52f1884ad6c56e8a56cdfcec5695e26b02
| 134
|
py
|
Python
|
pwd/test_getpwnam.py
|
Carglglz/micropython-lib
|
07102c56aa1087b97ee313cedc1d89fd20452e11
|
[
"PSF-2.0"
] | 126
|
2019-07-19T14:42:41.000Z
|
2022-03-21T22:22:19.000Z
|
pwd/test_getpwnam.py
|
Carglglz/micropython-lib
|
07102c56aa1087b97ee313cedc1d89fd20452e11
|
[
"PSF-2.0"
] | 38
|
2019-08-28T01:46:31.000Z
|
2022-03-17T05:46:51.000Z
|
pwd/test_getpwnam.py
|
Carglglz/micropython-lib
|
07102c56aa1087b97ee313cedc1d89fd20452e11
|
[
"PSF-2.0"
] | 55
|
2019-08-02T09:32:33.000Z
|
2021-12-22T11:25:51.000Z
|
import pwd
import os
user = os.getenv('USER')
passwd = pwd.getpwnam(user)
assert passwd
assert isinstance(passwd, pwd.struct_passwd)
| 16.75
| 44
| 0.776119
| 20
| 134
| 5.15
| 0.5
| 0.174757
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119403
| 134
| 7
| 45
| 19.142857
| 0.872881
| 0
| 0
| 0
| 0
| 0
| 0.029851
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0
| false
| 0.5
| 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
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
3bd11a9d62aa512711c77b5158dc5a4ce2228947
| 30,974
|
py
|
Python
|
src/prodstats/db/migrations/versions/20200426_0445df8a3cbd.py
|
la-mar/prodstats
|
4ff5a6e0b0d6152af2d7e1f3844ede2d33ad4824
|
[
"MIT"
] | null | null | null |
src/prodstats/db/migrations/versions/20200426_0445df8a3cbd.py
|
la-mar/prodstats
|
4ff5a6e0b0d6152af2d7e1f3844ede2d33ad4824
|
[
"MIT"
] | null | null | null |
src/prodstats/db/migrations/versions/20200426_0445df8a3cbd.py
|
la-mar/prodstats
|
4ff5a6e0b0d6152af2d7e1f3844ede2d33ad4824
|
[
"MIT"
] | 1
|
2021-01-05T18:58:08.000Z
|
2021-01-05T18:58:08.000Z
|
"""creating base tables
Revision ID: 0445df8a3cbd
Revises: 244869cf6945
Create Date: 2020-04-26 19:46:17.382457+00:00
"""
import geoalchemy2
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "0445df8a3cbd"
down_revision = "244869cf6945"
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"areas",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("area", sa.String(length=25), nullable=False),
sa.Column("h_last_run_at", sa.DateTime(timezone=True), nullable=True),
sa.Column("v_last_run_at", sa.DateTime(timezone=True), nullable=True),
sa.Column(
"providers",
postgresql.JSONB(astext_type=sa.Text()),
server_default="[]",
nullable=False,
),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("id", name=op.f("pk_areas")),
sa.UniqueConstraint("area"),
sa.UniqueConstraint("area", name=op.f("uq_areas_area")),
)
op.create_table(
"depths",
sa.Column("api14", sa.String(length=14), nullable=False),
sa.Column("name", sa.String(length=50), nullable=False),
sa.Column("value", sa.Integer(), nullable=True),
sa.Column("property_name", sa.String(length=50), nullable=True),
sa.Column("aggregate_type", sa.String(length=25), nullable=True),
sa.Column("grid_id", sa.Integer(), nullable=True),
sa.Column("formation", sa.String(length=50), nullable=True),
sa.Column("into_formation_feet", sa.Integer(), nullable=True),
sa.Column("into_formation_percent", sa.Float(), nullable=True),
sa.Column("above_next_formation_feet", sa.Integer(), nullable=True),
sa.Column("above_next_formation_percent", sa.Float(), nullable=True),
sa.Column("overlap_feet", sa.Integer(), nullable=True),
sa.Column("overlap_percent", sa.Float(), nullable=True),
sa.Column("in_target", sa.Boolean(), nullable=True),
sa.Column("assignment_method", sa.String(), nullable=True),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("api14", "name", name=op.f("pk_depths")),
)
op.create_index(op.f("ix_depths_api14"), "depths", ["api14"], unique=False)
op.create_index(op.f("ix_depths_formation"), "depths", ["formation"], unique=False)
op.create_index(op.f("ix_depths_grid_id"), "depths", ["grid_id"], unique=False)
op.create_index(op.f("ix_depths_name"), "depths", ["name"], unique=False)
op.create_index(
op.f("ix_depths_property_name"), "depths", ["property_name"], unique=False
)
op.create_table(
"frac_parameters",
sa.Column("api14", sa.String(length=14), nullable=False),
sa.Column("fluid_bbl", sa.Integer(), nullable=True),
sa.Column("proppant_lb", sa.Integer(), nullable=True),
sa.Column("fluid_bbl_ft", sa.Integer(), nullable=True),
sa.Column("proppant_lb_ft", sa.Integer(), nullable=True),
sa.Column("lateral_length", sa.Integer(), nullable=True),
sa.Column("lateral_length_type", sa.String(length=25), nullable=True),
sa.Column("gen", sa.Integer(), nullable=True),
sa.Column("gen_name", sa.String(length=10), nullable=True),
sa.Column("provider", sa.String(), nullable=True),
sa.Column("provider_last_update_at", sa.DateTime(timezone=True), nullable=True),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("api14", name=op.f("pk_frac_parameters")),
)
op.create_index(
op.f("ix_frac_parameters_api14"), "frac_parameters", ["api14"], unique=False
)
op.create_table(
"ip_tests",
sa.Column("api14", sa.String(length=14), nullable=False),
sa.Column("test_number", sa.Integer(), nullable=False),
sa.Column("test_date", sa.Date(), nullable=True),
sa.Column("type_code", sa.String(length=10), nullable=True),
sa.Column("test_method", sa.String(), nullable=True),
sa.Column("completion", sa.Integer(), nullable=True),
sa.Column("oil", sa.Integer(), nullable=True),
sa.Column("oil_per10k", sa.Integer(), nullable=True),
sa.Column("oil_uom", sa.String(length=10), nullable=True),
sa.Column("gas", sa.Integer(), nullable=True),
sa.Column("gas_per10k", sa.Integer(), nullable=True),
sa.Column("gas_uom", sa.String(length=10), nullable=True),
sa.Column("water", sa.Integer(), nullable=True),
sa.Column("water_per10k", sa.Integer(), nullable=True),
sa.Column("water_uom", sa.String(length=10), nullable=True),
sa.Column("choke", sa.String(length=25), nullable=True),
sa.Column("depth_top", sa.Integer(), nullable=True),
sa.Column("depth_top_uom", sa.String(length=10), nullable=True),
sa.Column("depth_base", sa.Integer(), nullable=True),
sa.Column("depth_base_uom", sa.String(length=10), nullable=True),
sa.Column("sulfur", sa.Boolean(), nullable=True),
sa.Column("oil_gravity", sa.Float(), nullable=True),
sa.Column("oil_gravity_uom", sa.String(length=10), nullable=True),
sa.Column("gor", sa.Integer(), nullable=True),
sa.Column("gor_uom", sa.String(length=10), nullable=True),
sa.Column("perf_upper", sa.Integer(), nullable=True),
sa.Column("perf_upper_uom", sa.String(length=10), nullable=True),
sa.Column("perf_lower", sa.Integer(), nullable=True),
sa.Column("perf_lower_uom", sa.String(length=10), nullable=True),
sa.Column("perfll", sa.Integer(), nullable=True),
sa.Column("perfll_uom", sa.String(length=10), nullable=True),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("api14", "test_number", name=op.f("pk_ip_tests")),
)
op.create_index(op.f("ix_ip_tests_api14"), "ip_tests", ["api14"], unique=False)
op.create_table(
"prodstats",
sa.Column("api10", sa.String(length=10), nullable=False),
sa.Column("name", sa.String(length=50), nullable=False),
sa.Column("value", sa.Numeric(precision=19, scale=2), nullable=True),
sa.Column("property_name", sa.String(length=50), nullable=True),
sa.Column("aggregate_type", sa.String(length=25), nullable=True),
sa.Column("is_peak_norm", sa.Boolean(), nullable=True),
sa.Column("is_ll_norm", sa.Boolean(), nullable=True),
sa.Column("ll_norm_value", sa.Integer(), nullable=True),
sa.Column("includes_zeroes", sa.Boolean(), nullable=True),
sa.Column("start_date", sa.Date(), nullable=True),
sa.Column("end_date", sa.Date(), nullable=True),
sa.Column("start_month", sa.Integer(), nullable=True),
sa.Column("end_month", sa.Integer(), nullable=True),
sa.Column(
"comments",
postgresql.JSONB(astext_type=sa.Text()),
server_default="{}",
nullable=False,
),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("api10", "name", name=op.f("pk_prodstats")),
)
op.create_index(
"ix_prodstat_api10_prop_agg",
"prodstats",
["api10", "property_name", "aggregate_type"],
unique=False,
)
op.create_table(
"production_header",
sa.Column("api10", sa.String(length=10), nullable=False),
sa.Column("primary_api14", sa.String(length=14), nullable=True),
sa.Column("entity12", sa.String(length=12), nullable=False),
sa.Column("status", sa.String(), nullable=True),
sa.Column("first_prod_date", sa.Date(), nullable=True),
sa.Column("last_prod_date", sa.Date(), nullable=True),
sa.Column("prod_months", sa.Integer(), nullable=True),
sa.Column("prod_days", sa.Integer(), nullable=True),
sa.Column("peak_norm_months", sa.Integer(), nullable=True),
sa.Column("peak_norm_days", sa.Integer(), nullable=True),
sa.Column("peak30_oil", sa.Integer(), nullable=True),
sa.Column("peak30_gas", sa.Integer(), nullable=True),
sa.Column("peak30_date", sa.Date(), nullable=True),
sa.Column("peak30_month", sa.Integer(), nullable=True),
sa.Column("perfll", sa.Integer(), nullable=True),
sa.Column("perf_upper", sa.Integer(), nullable=True),
sa.Column("perf_lower", sa.Integer(), nullable=True),
sa.Column("oil_pdp_last3mo_per30kbbl", sa.Integer(), nullable=True),
sa.Column("boe_pdp_last3mo_per30kbbl", sa.Integer(), nullable=True),
sa.Column("products", sa.String(), nullable=True),
sa.Column("provider", sa.String(), nullable=True),
sa.Column("provider_last_update_at", sa.DateTime(timezone=True), nullable=True),
sa.Column("related_well_count", sa.Integer(), nullable=True),
sa.Column(
"related_wells",
postgresql.JSONB(astext_type=sa.Text()),
server_default="[]",
nullable=False,
),
sa.Column(
"comments",
postgresql.JSONB(astext_type=sa.Text()),
server_default="{}",
nullable=False,
),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("api10", name=op.f("pk_production_header")),
)
op.create_index(
op.f("ix_production_header_primary_api14"),
"production_header",
["primary_api14"],
unique=False,
)
op.create_table(
"production_monthly",
sa.Column("api10", sa.String(length=10), nullable=False),
sa.Column("prod_date", sa.Date(), nullable=False),
sa.Column("prod_month", sa.Integer(), nullable=True),
sa.Column("days_in_month", sa.Integer(), nullable=True),
sa.Column("prod_days", sa.Integer(), nullable=True),
sa.Column("peak_norm_month", sa.Integer(), nullable=True),
sa.Column("peak_norm_days", sa.Integer(), nullable=True),
sa.Column("oil", sa.Integer(), nullable=True),
sa.Column("gas", sa.Integer(), nullable=True),
sa.Column("water", sa.Integer(), nullable=True),
sa.Column("boe", sa.Integer(), nullable=True),
sa.Column("water_cut", sa.Numeric(precision=19, scale=2), nullable=True),
sa.Column("oil_percent", sa.Numeric(precision=19, scale=2), nullable=True),
sa.Column("gor", sa.Integer(), nullable=True),
sa.Column("oil_per1k", sa.Integer(), nullable=True),
sa.Column("gas_per1k", sa.Integer(), nullable=True),
sa.Column("water_per1k", sa.Integer(), nullable=True),
sa.Column("boe_per1k", sa.Integer(), nullable=True),
sa.Column("gas_per3k", sa.Integer(), nullable=True),
sa.Column("oil_per3k", sa.Integer(), nullable=True),
sa.Column("water_per3k", sa.Integer(), nullable=True),
sa.Column("boe_per3k", sa.Integer(), nullable=True),
sa.Column("gas_per5k", sa.Integer(), nullable=True),
sa.Column("oil_per5k", sa.Integer(), nullable=True),
sa.Column("water_per5k", sa.Integer(), nullable=True),
sa.Column("boe_per5k", sa.Integer(), nullable=True),
sa.Column("gas_per7500", sa.Integer(), nullable=True),
sa.Column("oil_per7500", sa.Integer(), nullable=True),
sa.Column("water_per7500", sa.Integer(), nullable=True),
sa.Column("boe_per7500", sa.Integer(), nullable=True),
sa.Column("gas_per10k", sa.Integer(), nullable=True),
sa.Column("oil_per10k", sa.Integer(), nullable=True),
sa.Column("water_per10k", sa.Integer(), nullable=True),
sa.Column("boe_per10k", sa.Integer(), nullable=True),
sa.Column("oil_avg_daily", sa.Integer(), nullable=True),
sa.Column("gas_avg_daily", sa.Numeric(precision=19, scale=2), nullable=True),
sa.Column("water_avg_daily", sa.Numeric(precision=19, scale=2), nullable=True),
sa.Column("boe_avg_daily", sa.Numeric(precision=19, scale=2), nullable=True),
sa.Column(
"comments",
postgresql.JSONB(astext_type=sa.Text()),
server_default="{}",
nullable=False,
),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint(
"api10", "prod_date", name=op.f("pk_production_monthly")
),
)
op.create_table(
"runtime_stats",
sa.Column("id", sa.BigInteger(), nullable=False),
sa.Column("hole_direction", sa.String(length=25), nullable=True),
sa.Column("data_type", sa.String(length=25), nullable=True),
sa.Column("operation", sa.String(length=50), nullable=True),
sa.Column("name", sa.String(length=50), nullable=True),
sa.Column("time", sa.Numeric(precision=19, scale=2), nullable=True),
sa.Column("count", sa.Integer(), nullable=True),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("id", name=op.f("pk_runtime_stats")),
)
op.create_table(
"survey_points",
sa.Column("api14", sa.String(length=14), nullable=False),
sa.Column("md", sa.Integer(), nullable=False),
sa.Column("tvd", sa.Integer(), nullable=True),
sa.Column("dip", sa.Float(), nullable=True),
sa.Column("sequence", sa.Integer(), nullable=True),
sa.Column("theta", sa.Float(), nullable=True),
sa.Column("is_in_lateral", sa.Boolean(), nullable=False),
sa.Column("is_heel_point", sa.Boolean(), nullable=False),
sa.Column("is_mid_point", sa.Boolean(), nullable=False),
sa.Column("is_toe_point", sa.Boolean(), nullable=False),
sa.Column("is_soft_corner", sa.Boolean(), nullable=False),
sa.Column("is_hard_corner", sa.Boolean(), nullable=False),
sa.Column("is_kop", sa.Boolean(), nullable=False),
sa.Column(
"geom",
geoalchemy2.types.Geometry(
geometry_type="POINT", srid=4326, spatial_index=False
),
nullable=True,
),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("api14", "md", name=op.f("pk_survey_points")),
)
op.create_index(
"ix_heel_partial",
"survey_points",
["api14", "is_heel_point"],
unique=False,
postgresql_where=sa.text("is_heel_point"),
)
op.create_index(
"ix_lateral_partial",
"survey_points",
["api14", "is_in_lateral"],
unique=False,
postgresql_where=sa.text("is_in_lateral"),
)
op.create_index(
"ix_mid_partial",
"survey_points",
["api14", "is_mid_point"],
unique=False,
postgresql_where=sa.text("is_mid_point"),
)
op.create_index(
"ix_survey_point_geom",
"survey_points",
["geom"],
unique=False,
postgresql_using="gist",
)
op.create_index(
op.f("ix_survey_points_api14"), "survey_points", ["api14"], unique=False
)
op.create_index(
"ix_toe_partial",
"survey_points",
["api14", "is_toe_point"],
unique=False,
postgresql_where=sa.text("is_toe_point"),
)
op.create_table(
"surveys",
sa.Column("api14", sa.String(length=14), nullable=False),
sa.Column("survey_type", sa.String(length=50), nullable=True),
sa.Column("survey_method", sa.String(length=50), nullable=True),
sa.Column("survey_date", sa.Date(), nullable=True),
sa.Column("survey_top", sa.Integer(), nullable=True),
sa.Column("survey_top_uom", sa.String(length=10), nullable=True),
sa.Column("survey_base", sa.Integer(), nullable=True),
sa.Column("survey_base_uom", sa.String(length=10), nullable=True),
sa.Column(
"wellbore",
geoalchemy2.types.Geometry(
geometry_type="LINESTRING", srid=4326, spatial_index=False
),
nullable=True,
),
sa.Column(
"lateral_only",
geoalchemy2.types.Geometry(
geometry_type="LINESTRING", srid=4326, spatial_index=False
),
nullable=True,
),
sa.Column(
"stick",
geoalchemy2.types.Geometry(
geometry_type="LINESTRING", srid=4326, spatial_index=False
),
nullable=True,
),
sa.Column(
"bent_stick",
geoalchemy2.types.Geometry(
geometry_type="LINESTRING", srid=4326, spatial_index=False
),
nullable=True,
),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("api14", name=op.f("pk_surveys")),
)
op.create_index(
"ix_survey_bent_stick",
"surveys",
["bent_stick"],
unique=False,
postgresql_using="gist",
)
op.create_index(
"ix_survey_lateral_only",
"surveys",
["lateral_only"],
unique=False,
postgresql_using="gist",
)
op.create_index(
"ix_survey_stick", "surveys", ["stick"], unique=False, postgresql_using="gist"
)
op.create_index(
"ix_survey_wellbore",
"surveys",
["wellbore"],
unique=False,
postgresql_using="gist",
)
op.create_index(op.f("ix_surveys_api14"), "surveys", ["api14"], unique=False)
op.create_table(
"well_links",
sa.Column("api14", sa.String(length=14), nullable=False),
sa.Column("name", sa.String(length=50), nullable=False),
sa.Column("value", sa.String(), nullable=True),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("api14", "name", name=op.f("pk_well_links")),
)
op.create_index(op.f("ix_well_links_api14"), "well_links", ["api14"], unique=False)
op.create_index(op.f("ix_well_links_name"), "well_links", ["name"], unique=False)
op.create_table(
"well_locations",
sa.Column("api14", sa.String(length=14), nullable=False),
sa.Column("name", sa.String(length=50), nullable=False),
sa.Column("block", sa.String(length=50), nullable=True),
sa.Column("section", sa.String(length=50), nullable=True),
sa.Column("abstract", sa.String(length=50), nullable=True),
sa.Column("survey", sa.String(length=50), nullable=True),
sa.Column("metes_bounds", sa.String(length=50), nullable=True),
sa.Column("lon", sa.Float(), nullable=True),
sa.Column("lat", sa.Float(), nullable=True),
sa.Column(
"geom",
geoalchemy2.types.Geometry(
geometry_type="POINT", srid=4326, spatial_index=False
),
nullable=True,
),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("api14", "name", name=op.f("pk_well_locations")),
)
op.create_index(
"ix_well_location_geom",
"well_locations",
["geom"],
unique=False,
postgresql_using="gist",
)
op.create_index(
op.f("ix_well_locations_api14"), "well_locations", ["api14"], unique=False
)
op.create_index(
op.f("ix_well_locations_name"), "well_locations", ["name"], unique=False
)
op.create_table(
"wells",
sa.Column("api14", sa.String(length=14), nullable=False),
sa.Column("api10", sa.String(length=10), nullable=True),
sa.Column("well_name", sa.String(), nullable=True),
sa.Column("hole_direction", sa.String(length=1), nullable=True),
sa.Column("status", sa.String(length=50), nullable=True),
sa.Column("is_producing", sa.Boolean(), nullable=True),
sa.Column("operator", sa.String(), nullable=True),
sa.Column("operator_alias", sa.String(), nullable=True),
sa.Column("hist_operator", sa.String(), nullable=True),
sa.Column("hist_operator_alias", sa.String(), nullable=True),
sa.Column("tvd", sa.Integer(), nullable=True),
sa.Column("md", sa.Integer(), nullable=True),
sa.Column("perfll", sa.Integer(), nullable=True),
sa.Column("lateral_length", sa.Integer(), nullable=True),
sa.Column("ground_elev", sa.Integer(), nullable=True),
sa.Column("kb_elev", sa.Integer(), nullable=True),
sa.Column("comp_date", sa.Date(), nullable=True),
sa.Column("spud_date", sa.Date(), nullable=True),
sa.Column("permit_date", sa.Date(), nullable=True),
sa.Column("permit_number", sa.String(), nullable=True),
sa.Column("permit_status", sa.String(), nullable=True),
sa.Column("rig_release_date", sa.Date(), nullable=True),
sa.Column("last_activity_date", sa.Date(), nullable=True),
sa.Column("basin", sa.String(length=50), nullable=True),
sa.Column("sub_basin", sa.String(length=50), nullable=True),
sa.Column("state", sa.String(length=50), nullable=True),
sa.Column("state_code", sa.String(length=10), nullable=True),
sa.Column("county", sa.String(length=50), nullable=True),
sa.Column("county_code", sa.String(length=10), nullable=True),
sa.Column("provider_status", sa.String(length=50), nullable=True),
sa.Column("provider", sa.String(), nullable=True),
sa.Column("provider_last_update_at", sa.DateTime(timezone=True), nullable=True),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("api14", name=op.f("pk_wells")),
)
op.create_index(
"ix_well_basin_holedir_isprod",
"wells",
["basin", "hole_direction", "is_producing"],
unique=False,
)
op.create_index("ix_well_basin_status", "wells", ["basin", "status"], unique=False)
op.create_index(op.f("ix_wells_api10"), "wells", ["api10"], unique=False)
op.create_index(op.f("ix_wells_api14"), "wells", ["api14"], unique=False)
op.create_index(op.f("ix_wells_basin"), "wells", ["basin"], unique=False)
op.create_index(op.f("ix_wells_county"), "wells", ["county"], unique=False)
op.create_index(
op.f("ix_wells_hist_operator"), "wells", ["hist_operator"], unique=False
)
op.create_index(
op.f("ix_wells_hist_operator_alias"),
"wells",
["hist_operator_alias"],
unique=False,
)
op.create_index(
op.f("ix_wells_is_producing"), "wells", ["is_producing"], unique=False
)
op.create_index(op.f("ix_wells_operator"), "wells", ["operator"], unique=False)
op.create_index(
op.f("ix_wells_operator_alias"), "wells", ["operator_alias"], unique=False
)
op.create_index(op.f("ix_wells_sub_basin"), "wells", ["sub_basin"], unique=False)
op.create_table(
"wellstats",
sa.Column("api14", sa.String(length=14), nullable=False),
sa.Column("name", sa.String(length=50), nullable=False),
sa.Column("type", sa.String(length=25), nullable=False),
sa.Column("numeric_value", sa.Numeric(precision=19, scale=2), nullable=True),
sa.Column("string_value", sa.Numeric(precision=19, scale=2), nullable=True),
sa.Column("date_value", sa.Numeric(precision=19, scale=2), nullable=True),
sa.Column(
"comments",
postgresql.JSONB(astext_type=sa.Text()),
server_default="{}",
nullable=False,
),
sa.Column(
"created_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
server_default=sa.text("now()"),
nullable=True,
),
sa.PrimaryKeyConstraint("api14", "name", name=op.f("pk_wellstats")),
)
op.create_index(op.f("ix_wellstats_api14"), "wellstats", ["api14"], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f("ix_wellstats_api14"), table_name="wellstats")
op.drop_table("wellstats")
op.drop_index(op.f("ix_wells_sub_basin"), table_name="wells")
op.drop_index(op.f("ix_wells_operator_alias"), table_name="wells")
op.drop_index(op.f("ix_wells_operator"), table_name="wells")
op.drop_index(op.f("ix_wells_is_producing"), table_name="wells")
op.drop_index(op.f("ix_wells_hist_operator_alias"), table_name="wells")
op.drop_index(op.f("ix_wells_hist_operator"), table_name="wells")
op.drop_index(op.f("ix_wells_county"), table_name="wells")
op.drop_index(op.f("ix_wells_basin"), table_name="wells")
op.drop_index(op.f("ix_wells_api14"), table_name="wells")
op.drop_index(op.f("ix_wells_api10"), table_name="wells")
op.drop_index("ix_well_basin_status", table_name="wells")
op.drop_index("ix_well_basin_holedir_isprod", table_name="wells")
op.drop_table("wells")
op.drop_index(op.f("ix_well_locations_name"), table_name="well_locations")
op.drop_index(op.f("ix_well_locations_api14"), table_name="well_locations")
op.drop_index("ix_well_location_geom", table_name="well_locations")
op.drop_table("well_locations")
op.drop_index(op.f("ix_well_links_name"), table_name="well_links")
op.drop_index(op.f("ix_well_links_api14"), table_name="well_links")
op.drop_table("well_links")
op.drop_index(op.f("ix_surveys_api14"), table_name="surveys")
op.drop_index("ix_survey_wellbore", table_name="surveys")
op.drop_index("ix_survey_stick", table_name="surveys")
op.drop_index("ix_survey_lateral_only", table_name="surveys")
op.drop_index("ix_survey_bent_stick", table_name="surveys")
op.drop_table("surveys")
op.drop_index("ix_toe_partial", table_name="survey_points")
op.drop_index(op.f("ix_survey_points_api14"), table_name="survey_points")
op.drop_index("ix_survey_point_geom", table_name="survey_points")
op.drop_index("ix_mid_partial", table_name="survey_points")
op.drop_index("ix_lateral_partial", table_name="survey_points")
op.drop_index("ix_heel_partial", table_name="survey_points")
op.drop_table("survey_points")
op.drop_table("runtime_stats")
op.drop_table("production_monthly")
op.drop_index(
op.f("ix_production_header_primary_api14"), table_name="production_header"
)
op.drop_table("production_header")
op.drop_index("ix_prodstat_api10_prop_agg", table_name="prodstats")
op.drop_table("prodstats")
op.drop_index(op.f("ix_ip_tests_api14"), table_name="ip_tests")
op.drop_table("ip_tests")
op.drop_index(op.f("ix_frac_parameters_api14"), table_name="frac_parameters")
op.drop_table("frac_parameters")
op.drop_index(op.f("ix_depths_property_name"), table_name="depths")
op.drop_index(op.f("ix_depths_name"), table_name="depths")
op.drop_index(op.f("ix_depths_grid_id"), table_name="depths")
op.drop_index(op.f("ix_depths_formation"), table_name="depths")
op.drop_index(op.f("ix_depths_api14"), table_name="depths")
op.drop_table("depths")
op.drop_table("areas")
# ### end Alembic commands ###
| 42.372093
| 88
| 0.602279
| 3,787
| 30,974
| 4.730658
| 0.067336
| 0.112978
| 0.168016
| 0.224393
| 0.880882
| 0.84566
| 0.775663
| 0.654535
| 0.542562
| 0.464527
| 0
| 0.018138
| 0.231032
| 30,974
| 730
| 89
| 42.430137
| 0.734025
| 0.009944
| 0
| 0.521739
| 0
| 0
| 0.192856
| 0.029155
| 0
| 0
| 0
| 0
| 0
| 1
| 0.002805
| false
| 0
| 0.00561
| 0
| 0.008415
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3bd9dc8bc8acdc371e6627e0eab1866a1aa65b9d
| 85
|
py
|
Python
|
backend/cncWeb/plot/apps.py
|
wandss/cncWeb
|
0187225bad780ff8672cd0931642b7e471f87101
|
[
"MIT"
] | null | null | null |
backend/cncWeb/plot/apps.py
|
wandss/cncWeb
|
0187225bad780ff8672cd0931642b7e471f87101
|
[
"MIT"
] | null | null | null |
backend/cncWeb/plot/apps.py
|
wandss/cncWeb
|
0187225bad780ff8672cd0931642b7e471f87101
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class GcodeConfig(AppConfig):
name = 'gcode'
| 14.166667
| 33
| 0.741176
| 10
| 85
| 6.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 85
| 5
| 34
| 17
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3be413399e1d21f499ebe272e5d50526897b0a5f
| 58
|
py
|
Python
|
conplex/__main__.py
|
mdlockyer/ConPlex
|
bb335bd74815926c5639e83b59c7beb83bf28847
|
[
"MIT"
] | null | null | null |
conplex/__main__.py
|
mdlockyer/ConPlex
|
bb335bd74815926c5639e83b59c7beb83bf28847
|
[
"MIT"
] | null | null | null |
conplex/__main__.py
|
mdlockyer/ConPlex
|
bb335bd74815926c5639e83b59c7beb83bf28847
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from .conplex import main
main()
| 11.6
| 25
| 0.603448
| 8
| 58
| 4.375
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021277
| 0.189655
| 58
| 4
| 26
| 14.5
| 0.723404
| 0.362069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 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
|
3beab9a097ab481e236f0c81804da017b8b6d824
| 30,649
|
py
|
Python
|
src/qrc_resources.py
|
shuhari/DevToolbox
|
bef5b4f26fa1d06b1bf9e03776ea4c307f2aab84
|
[
"Apache-2.0"
] | null | null | null |
src/qrc_resources.py
|
shuhari/DevToolbox
|
bef5b4f26fa1d06b1bf9e03776ea4c307f2aab84
|
[
"Apache-2.0"
] | null | null | null |
src/qrc_resources.py
|
shuhari/DevToolbox
|
bef5b4f26fa1d06b1bf9e03776ea4c307f2aab84
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.11.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x02\x1a\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x01\xcc\x49\x44\x41\x54\x38\x8d\x63\
\x60\x18\x68\xc0\x88\x4b\x42\xc5\x33\x97\x3d\xcc\x56\x6b\x95\x18\
\xeb\x73\xb9\xd9\xa7\xae\x9b\x5f\x5d\xbd\xfa\x17\x36\x75\x4c\xb8\
\x0c\xf0\x32\x56\xa9\xcd\xf5\x97\xf6\x0b\xd3\x7d\x6c\x90\x60\xa4\
\x39\x07\x97\x3a\xac\x06\x38\x04\x66\xe8\xb8\xdb\xea\xc4\x4a\x7c\
\xdf\xc5\x20\x29\xc0\xc0\x60\x20\xfd\x39\xdc\x2d\x30\x43\x87\x68\
\x03\xcc\x8c\xf4\x6b\x9d\x15\x9f\xca\x9d\xbc\xf9\x95\xe1\xda\x53\
\x06\x06\x6b\x85\x0f\x6c\x1e\x16\xc2\xf3\xb1\xa9\x65\x46\x17\x08\
\x4c\xae\xf1\x48\x0f\xb5\xac\x92\xfd\xbe\x91\xdd\xaf\xef\x1f\xc3\
\x8d\xe7\x8c\x0c\xe1\x16\x0c\x0c\x6c\x4c\x7f\x24\xd8\xe5\x1c\xaf\
\x9c\x3a\x7e\xf4\x3a\x4e\x17\x28\x38\x24\x70\x98\xea\xa9\x56\x98\
\xf2\x9f\xe6\x65\x64\xf8\xc7\xc0\xc3\xc1\xc0\xc0\xcb\x09\x91\x33\
\x96\xfb\xce\xa4\x25\xcd\x34\x51\x3b\x34\x94\x0d\xa7\x01\xae\xc6\
\x9a\x49\xe1\x8e\xb2\x36\x0c\x1f\xaf\x30\x30\x30\x30\x30\xf0\x72\
\x30\x32\xf0\xb2\x23\xe4\x5d\x54\x5e\xcb\x44\xe8\x69\x56\x61\x35\
\x40\xdf\x29\x4e\xda\xd6\x42\x27\x43\xe9\xdf\x2e\xb8\xb7\x78\x91\
\x5c\xc0\xc0\xc0\xc0\xa0\x22\xf6\x8f\x41\x4b\xfc\x7b\x91\xb5\x5f\
\x84\x14\x86\x01\xce\xb6\x66\x25\x9e\xda\xbf\x75\x19\x7e\xbc\x84\
\x6b\x10\xe4\x61\x60\x10\xe4\xfe\x8f\x12\x46\xb6\x8a\x6f\x78\x43\
\x6c\xd4\xa7\xc2\xf8\xcc\x0c\x0c\x0c\x0c\x4e\xe1\x05\x46\x89\x21\
\x0e\x6d\x3a\x8c\x1b\x79\x19\xfe\xff\x81\x2b\x66\x67\x61\x60\xd0\
\x93\x63\x64\x10\xe3\x43\x18\xc0\xcd\xce\xc0\xf0\xe3\xf7\x7f\x95\
\x1f\x7c\x16\x3b\xae\x5e\x38\xf9\x8c\x89\x81\x81\x81\xc1\xcc\x40\
\xa3\xd0\x46\xe9\xb3\x24\xc3\xdf\xef\x28\xb6\x89\xf3\x33\x30\x08\
\x70\xa1\xba\x80\x81\x81\x81\xc1\x5c\xfe\x13\x8b\xa5\x36\x7f\x1f\
\x03\x03\x03\x03\x0b\xc4\x1f\xac\x7b\xb7\x5e\x60\xd3\xff\xf7\xdb\
\x8f\x07\x45\x25\x23\x03\x03\xc3\x57\x28\x46\x02\x6c\xac\xcc\xbf\
\xfe\xb2\x3d\x5f\x01\x53\xc2\xc0\xc0\xc0\xc0\x60\xe8\x95\x2c\xcf\
\xf4\xeb\x37\xa6\x75\x58\xc0\x3f\x36\x56\xc6\xf3\xdb\xe6\x3e\x24\
\x46\x2d\x41\x00\x00\x3a\x3b\x73\x88\xbb\xa7\x8c\x25\x00\x00\x00\
\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x02\x2c\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x01\xce\x49\x44\x41\x54\x38\x8d\xa5\
\x93\xcd\x4b\x54\x51\x18\xc6\x9f\x73\xee\x75\xe6\x8e\xa9\xd3\xc8\
\x68\x0c\x24\x7d\x0c\xe5\x8c\x64\x88\x93\x14\xcd\xb2\x5a\xd4\xa6\
\xa0\xbf\xc0\x45\x20\xb5\x68\x91\x82\xd4\x34\x2a\xd2\xc2\x85\x20\
\x84\x82\xba\x72\xe9\x22\x22\x21\x68\x11\xd2\xb2\x45\x18\x25\x34\
\x33\x15\xd1\x4e\x94\xd1\x24\x67\xc6\xb9\xf7\x7c\xbc\x2e\x4a\x9d\
\x7b\xbd\x0c\x44\xef\xf2\xbc\xcf\xf3\x7b\x9f\xf3\x05\xfc\x67\x31\
\xbf\xc5\xbe\xb9\x42\x8f\x56\xfc\x0e\x63\x38\x0f\x02\x81\xd1\x57\
\xa5\x8c\x97\x1f\x1f\xc4\x3f\xd7\x05\xa4\x66\xf3\x51\x2d\x69\xc1\
\x30\xcc\x5b\x7e\x60\x2d\xf5\x52\x20\x28\xfa\xdf\xdf\xbb\xb0\x75\
\x04\x90\x9a\xcd\x47\x49\x61\x85\x73\xa3\xa3\x5e\x64\x52\xfa\xa7\
\xc3\xac\xde\xd5\xfb\xa7\x7e\x01\x00\x3f\x6c\xd0\x0b\xaf\xf9\xc9\
\xd5\x66\x0c\x5f\x69\x72\x47\x36\xf8\x69\x93\x76\x16\x5d\x09\x2e\
\xcf\xe7\x52\x4a\x99\x1f\xbc\xd3\xe2\x81\x1d\x10\x63\xf8\x61\x37\
\x79\x5b\xd0\x90\x17\x57\x06\x92\xab\x1c\x00\xaa\xbb\x62\xd0\x2b\
\x38\x13\x36\x71\x32\x16\x45\xb0\x39\xe2\xbf\x15\x47\x3c\x02\x00\
\x13\x00\xb8\x66\xbd\x5e\x41\x0b\xab\xe0\xf6\xd9\x56\xac\x97\x35\
\x72\x45\xe1\x43\xc0\xa5\x03\x00\x31\x65\x79\xfb\x9f\xb6\x03\x28\
\x96\x25\x48\x93\x7f\x02\xe8\x10\xb0\x7f\x88\x5a\x6d\xfa\xaa\xea\
\x95\x52\xc5\x03\x80\x14\xf6\xeb\x7f\xf5\x8b\x6a\x79\xe9\x10\x20\
\xcb\x53\xa2\x52\x52\xb5\x82\x4c\x3a\x8c\xae\x13\x21\x74\xc7\x8e\
\x21\x93\x0e\xbb\xcc\x4e\xa5\x24\x4c\x5b\x4d\x03\x35\x0f\x29\x39\
\xfe\xee\x71\x28\xd2\xf6\x8c\x9b\x01\x00\x80\xbd\xbd\xe1\x32\x05\
\x8f\xb7\x03\x00\xb4\x74\x50\xdd\x5a\x1b\xfc\x92\xbd\x3e\xe9\x02\
\x80\x88\x25\xc6\x97\x67\xac\x96\xd6\x01\xd3\x3a\x7a\xef\x00\x20\
\x77\x4b\xa8\xfe\xde\x7c\x9e\xcf\x5e\x7b\x08\xc6\xc8\x0d\xf8\x5b\
\x9d\x63\x6f\xee\x72\x23\x38\xd1\x60\x35\xc6\xb9\xd1\xf0\x87\x2d\
\x05\xa4\x5d\xfa\xa6\x95\x33\x94\x1b\xb9\xf9\xaa\x56\xef\xfb\x1b\
\x41\xc4\x12\xa3\x6f\xcf\x11\xd7\x9d\x4c\x13\x31\x83\x17\x72\x4f\
\x6f\x7c\xdf\x9f\x5a\x5b\x7b\x91\x62\xac\xc5\xcc\xfa\xe1\xfe\x00\
\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x06\x39\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x40\x00\x00\x00\x40\x08\x06\x00\x00\x00\xaa\x69\x71\xde\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x05\xeb\x49\x44\x41\x54\x78\x9c\xed\
\x9b\x5d\x6c\x54\x45\x18\x86\x9f\xef\xec\x76\xa1\x14\x51\xfa\x67\
\x80\xd6\x56\x4b\x0b\x22\x85\x04\x6b\x2c\xc6\xca\x4a\x1a\x28\x91\
\x82\x8a\x8d\x31\x62\x88\xc6\x68\x82\xde\xeb\x85\x7a\x61\xa2\x51\
\xd1\xc4\x1b\x35\xd1\x18\x24\xa2\x5e\x50\x49\xb4\x1a\xdb\x8a\xa2\
\x02\x5a\x5a\xf5\x42\x45\xa5\x3f\xb2\x6d\x69\x14\x22\xfd\x59\xca\
\x56\xb6\xec\x7e\x5e\xec\x9e\xd2\xd2\x56\xda\x9e\x39\xbb\xd8\xf2\
\x5c\x9d\x99\xdd\x79\xe7\xfb\xde\x9c\x33\x33\x67\x76\x56\x18\xc6\
\xba\xca\xaa\x6b\x2d\xa2\x4f\xa2\x52\xae\x90\x03\xf8\x98\x1e\x84\
\x05\x8e\x23\xba\x2f\x8a\xf5\x42\x7d\xcd\x9e\x63\xf6\x07\x62\x5f\
\x54\x54\xde\xb3\x5d\x95\x97\x80\xb4\xa4\x84\x98\x38\xfa\x45\x78\
\xa2\xb6\xa6\xfa\x75\x88\x1b\x10\x4f\xfe\x35\xfb\x1b\xb3\xe7\xcc\
\x21\x3d\x23\x13\xaf\x27\x25\x59\x41\x1a\xe5\x5c\x64\x90\xee\x53\
\x7f\xf3\x4f\x28\x34\x54\xa7\x2a\xdb\xeb\x3f\xdd\xf3\x86\xac\xab\
\xac\xba\x56\x54\x7f\x06\xd2\x3c\xde\x14\x6e\x2a\xbd\x95\xc2\xa5\
\x37\x24\x2f\x5a\x17\x69\xf9\xfd\x08\x4d\x0d\x07\x89\x9c\x1b\x04\
\xe8\x17\xaf\xb7\xd8\x53\xb8\xe4\xfa\x17\x41\x56\x03\xdc\x7c\xcb\
\x9a\x69\x9b\x3c\x40\x46\x66\x36\xb3\x66\xa7\xd2\xd5\x11\x00\xf0\
\x89\x46\xe6\x58\xa8\x94\x43\xec\xb6\x9f\xce\xc9\xdb\x14\x2d\xbd\
\x81\xd4\xd4\xd4\x58\x41\xa5\xdc\x1b\x1f\xed\x49\xcf\xc8\x1c\xf5\
\xe5\x7e\xf5\xd1\xad\xa9\x09\x0d\xd0\x34\x73\x65\x90\x74\x09\x8d\
\xa8\x9b\x9f\x99\xc5\x40\x67\x07\x0a\x39\x5e\xe2\x53\xdd\x85\x03\
\x5e\xbf\xfa\xf8\x78\x70\x09\x7a\x7e\xa2\xf8\xdf\xb2\x39\xe5\x77\
\xe6\x4a\x78\xa8\x3c\x2c\x57\x9f\x35\x5e\xa3\x6e\x4d\x9d\x16\xc9\
\x03\xff\x79\x17\x8f\x6b\x80\x29\xb4\xfd\x7b\xf4\xdb\x5d\x70\xfa\
\xe4\xc4\x1b\x05\x4f\xa0\x07\xdf\x46\x03\xdf\xbb\x17\x58\x1c\xaf\
\x9b\xe2\xda\x72\x00\x6d\xd8\x0d\xaa\x00\xc8\x2d\xdb\x26\xd6\xee\
\xa7\x4f\xd0\x3f\x0e\xc3\xb1\x46\x18\x1c\x40\x0a\xcb\x5c\x8b\xd1\
\xb5\x3b\x60\x44\xf2\x22\xb0\x68\x12\x33\x4c\xce\xca\x58\x1b\x55\
\xb4\x61\x37\xda\x72\xc0\xad\x30\xdd\x31\xe0\xc2\xe4\xa5\x74\x2b\
\x92\x57\x32\xe1\xf6\x92\x5f\x82\x94\x6e\x4d\x88\x09\xc6\x1f\x81\
\x31\x93\x9f\xc2\x2d\x6c\xb7\xb1\xb5\xb4\x61\xf7\x88\x7a\x53\x18\
\x35\xc0\x54\xf2\x36\x89\x30\xc1\x98\x01\xa6\x93\xb7\x71\xdb\x04\
\x23\x06\xb8\x95\xbc\x8d\x9b\x26\x38\x1f\x04\x5b\x0f\xb9\x9a\xbc\
\x8d\x14\x96\x8d\x1a\x18\x69\x3d\xe4\x58\xd7\xb1\x01\xd1\xc6\x0f\
\xce\xcf\xf3\x2b\x36\xba\x3a\x67\x4b\x61\x19\xb2\x62\x63\xac\xa0\
\x1a\xeb\xdb\x21\x8e\x0d\x90\x45\x2b\x86\xae\xb5\xf9\x1b\x08\x4e\
\x62\xc5\x37\x59\x82\x27\xd1\x96\x6f\xc6\xec\x7b\xaa\x38\x37\xa0\
\xec\x21\xc8\x5d\x19\x2b\x0c\xf4\x11\xad\xdb\xe1\x8e\x09\xc1\x13\
\x44\xeb\x77\x40\xa8\x2f\x56\xce\x5d\x19\xeb\xdb\x21\xce\xc7\x00\
\xcb\x8b\xb5\xe6\xd1\x91\x26\xd4\x1b\x36\x21\x78\x82\x68\xfd\xcb\
\x23\x92\xb7\xd6\x3c\x0a\x96\xf3\x31\xdc\xcc\x4a\xf0\x42\x13\x42\
\xb6\x09\x27\x9c\x6b\xbb\x98\x3c\x98\x5c\x0a\x8f\x69\xc2\xcb\xce\
\x4c\xe8\xfb\x2b\xf6\x48\xb9\x94\x3c\x98\x7e\x17\x18\xcb\x84\xba\
\x29\xde\x09\x7d\x7f\xc5\x0c\x1c\x08\xc6\xca\x2e\x24\x0f\x6e\xbc\
\x0c\x8d\x1a\x13\x82\x44\xeb\x76\xa0\x93\x31\x21\x78\x32\x21\xc9\
\x83\x5b\xaf\xc3\x63\x98\xc0\x91\xba\x09\x37\xd7\x5f\x3e\x4b\x48\
\xf2\xe0\xe6\x8e\x50\xdc\x04\xc9\x2f\x41\x7c\x73\xce\x9b\x31\x11\
\x16\x15\x83\xd7\x87\xe4\x95\xb8\x9a\x3c\xb8\xbc\x23\x84\xe5\x45\
\x6e\x7b\x64\xd2\xcd\x24\x6f\x15\x92\xb7\xca\x85\x80\x46\xe3\xfa\
\x9e\xe0\xa5\xce\x8c\x34\x40\xac\xa1\xdd\x6e\x9d\x91\x06\xe4\x5f\
\x57\x88\xc7\xe3\x39\x87\xea\xae\x19\x69\xc0\x35\xf9\x05\xdc\xff\
\xe0\xf6\x8f\xea\x3e\xfd\xf0\xc1\x19\x69\xc0\x70\x2e\x1b\x90\xec\
\x00\x92\xcd\xb8\xeb\x80\xf0\xc0\x19\xa2\xf5\xcf\xc3\xa9\x40\x02\
\xc3\x71\x87\xaf\xc7\xac\x95\x2d\xeb\xef\xd8\xb2\x73\xc8\x80\xd9\
\x29\x9e\xee\xe2\xa2\x9c\x66\xbb\x7c\xfa\x87\x9f\xb3\x38\x15\x28\
\x48\x40\x7c\x49\x42\x41\x64\xdb\x90\x01\xf3\xe7\xcf\x4b\xcf\xcf\
\xc9\x2e\xb5\xcb\xb9\x0b\xfc\xa4\x59\x61\x5a\xdb\x8e\x8d\xdd\xfe\
\x7f\x4c\x4b\x6b\x1b\xdd\xdd\x3d\x00\x32\xee\x23\xe0\xf1\x78\xd8\
\x5c\xb9\x21\x71\x51\x25\x90\x57\x5e\x7d\x9d\xc3\x8d\xb1\x5f\x9e\
\x67\xfc\x20\x78\xd9\x80\x64\x07\x90\x6c\x2e\x1b\x00\xf4\x03\xf4\
\xf6\xf6\x26\x39\x94\xc4\xd1\xd3\xd3\x63\x5f\x9e\xb6\x80\xa3\x00\
\xc7\x02\x1d\x84\x42\x03\x49\x0b\x2a\x51\x84\x42\x03\x04\xda\x3b\
\xed\x62\xb3\xa5\x22\xd5\x00\xe1\x70\x98\x9d\xbb\xde\x4b\x5e\x64\
\x09\x62\xe7\xae\xf7\x08\x87\xe3\x47\xe6\x94\x3d\x9e\xa2\x82\xbc\
\x26\x15\xdf\xdd\x08\x59\xed\x1d\x9d\x34\xb7\xb4\x91\x95\x99\xc1\
\xbc\x2b\xae\xc0\xeb\xf5\x24\x37\x5a\x43\x9c\x3d\x1b\xa6\xa5\xb5\
\x8d\x37\xdf\x7a\x87\xc3\x4d\x3f\xda\xd5\x47\xac\xe8\x99\x87\xe2\
\xa7\xc5\xef\xbe\x49\xd5\xda\xcf\xf4\x3f\x2a\x6f\x73\x46\x24\x7a\
\x7b\x6d\xcd\xde\x26\x0b\xa0\xb6\x66\x6f\x93\x8a\x14\x03\x5f\x25\
\x37\xae\x04\x20\xb2\x5f\x45\x8a\x6b\x6b\xf6\x36\x01\xa3\x8e\x82\
\xca\xba\x4d\x55\xe5\x12\xd5\x72\xd0\x1c\xb0\x66\x4d\xa5\x0f\x45\
\x4b\x05\x16\x41\x6c\xf7\xc5\x29\xbd\xdd\xa7\x1a\x82\xc1\xbe\xae\
\xa9\x2b\x44\xcf\x82\x1c\x57\x4b\xf6\xd5\x7f\xbc\x67\x1f\xa0\xf6\
\x27\xae\x9c\x85\x5d\xbf\xb1\xaa\x1a\x74\x0b\xc0\x03\x0f\x3f\x6e\
\x40\x51\xab\xb6\xde\x79\x7b\xb5\x01\xa1\x51\x5c\x5e\x08\x25\x3b\
\x80\x8b\xd1\x11\x68\xe3\xa3\xea\xf7\x1f\xdb\xb0\xe1\x5e\x57\xf6\
\x26\x2e\x79\x03\x0e\xee\xff\x9c\x60\x6f\x8f\x3f\xea\x89\x3c\xe3\
\x86\xfe\x25\x6f\x40\x24\x72\x2e\x7e\x25\xae\x4c\xd1\xc6\x0d\xf0\
\xfb\xfd\x5e\xd0\x6c\xd3\xba\xa0\xd9\x31\x6d\xb3\x18\x35\x60\xfd\
\xc6\xbb\x56\xce\x9a\x9b\xd9\x08\x94\x01\x78\xbc\xce\xff\x76\x37\
\x4c\xa3\x6c\xd6\xdc\xcc\xc6\x8a\x4d\x5b\x9c\x1f\x0d\x1b\xae\x6f\
\x42\xc4\xef\xf7\x7b\x8b\x96\x97\x3c\x2d\x62\xbd\x4b\x7c\xfe\x4f\
\xf1\xf9\x58\x7d\xeb\x5a\xae\x4a\xcf\x70\xa4\x3d\xef\xca\x2b\xf9\
\xb3\xeb\x38\x91\x48\x04\x60\x01\xc8\xc3\x05\x45\xcb\xac\xdc\x85\
\xd9\x87\x02\x81\x40\xd4\x69\xec\x46\x0c\x58\xba\xfc\xc6\xe7\x40\
\x9e\xb2\xf5\x16\xe6\x5e\x43\x79\xc5\x26\xb2\xae\x5e\xe0\x58\xfb\
\xaa\xf9\x19\x14\x2c\x5e\x4a\x5f\x6f\x0f\xa7\x83\x7d\x00\x1e\x01\
\x7f\x8a\x2f\xd5\xd7\xda\xfc\xdb\x17\x4e\xf5\xcd\x9c\x15\xc6\x2a\
\xb4\x17\x57\xab\xcb\xd6\xb2\x78\xc9\x32\x13\xb2\x43\xa4\xa6\xa5\
\xb1\xb6\xa2\x92\xd6\xa3\xbf\xf2\xdd\x81\x2f\x87\xf5\xe9\x1c\x33\
\x83\x8a\x6a\xd8\x5e\x53\x76\x75\xb6\xd3\xd5\xd9\x6e\x44\xf6\xa2\
\x7d\x1a\xc0\x88\x01\x62\x69\x8d\xaa\xdc\x07\xb1\x85\x4b\x22\x10\
\x4b\x6b\x4c\xe8\x18\x19\x03\x5a\x9b\x7f\xfb\xa5\xb0\x68\x59\x18\
\xa1\x04\x98\x6d\x42\x73\x5c\x84\x3e\x81\x67\x6b\x3f\xf9\xf0\x0d\
\x13\x72\xff\x02\xcd\x4c\x46\xd9\xc5\x1b\xb8\x0b\x00\x00\x00\x00\
\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x0e\x85\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x40\x00\x00\x00\x40\x08\x06\x00\x00\x00\xaa\x69\x71\xde\
\x00\x00\x0e\x4c\x49\x44\x41\x54\x78\x5e\xe5\x5b\x59\x6c\x5b\xc7\
\xd5\xfe\xb8\x88\x12\x29\x52\x14\xa9\xd5\x5a\xbd\xc7\x8a\xfe\x38\
\x45\x1d\x77\xb1\x11\xfb\x57\xda\x3a\x45\xf3\xe0\x16\x28\x8a\x00\
\x29\xfa\x92\xb4\x49\x80\x22\x01\x5a\x20\x05\x02\xa4\x4d\xfa\xd4\
\x97\xb6\x68\x0b\xb4\x6f\x41\xd0\x07\x23\x08\x6a\x74\x03\x8a\xa6\
\x7b\x61\xc4\x2d\x62\xbb\x8d\x77\x6b\xb3\x76\x91\x94\x48\x89\x12\
\xc5\x4d\x24\xef\xed\x39\x07\xf7\xe2\x92\x99\x90\x14\x43\xca\x41\
\x90\x01\x0e\x66\xee\x0c\x6d\xea\x3b\xe7\x3b\xcb\xcc\x1d\xda\x74\
\x5d\xc7\x47\xb9\x39\xcb\x2d\xd8\xa8\x01\xb0\xf3\x50\xe4\xc3\xd9\
\x74\x43\x34\xbd\x8c\xa5\x2d\x06\xa8\xe0\x5d\x24\x6e\xa3\xb7\xe3\
\xc3\xd9\x34\x92\x6d\x92\x34\xf7\xac\x84\x9d\x32\xc0\x41\xe2\x25\
\xe9\x21\x69\x37\x3f\xf7\x21\x62\x82\x09\x34\x4f\x12\x27\x89\x90\
\x6c\xf0\x73\x2d\x0a\xf0\x91\xf4\xe7\xf2\xf9\x3f\xa5\x92\x29\x03\
\xba\xd9\xd9\x6a\x7b\xb6\xa8\x65\x8d\x55\x6d\xaa\x9f\xa9\x53\xeb\
\x2e\x97\x0b\x0e\x87\xe3\x0c\x80\x14\xc9\x56\x2d\x0a\x30\x5d\xc0\
\xc7\xe0\x13\x5b\x09\x9e\x62\xd7\x30\x30\xbc\xbb\x87\xac\xa9\x3d\
\x94\xb1\xb2\x56\x46\x31\x35\x28\x43\xfd\x6c\x29\xd3\x7d\x06\x16\
\x55\x8f\x55\x7c\x9b\x11\x38\xc4\x98\x36\x0b\x7c\x22\xb1\x85\xe9\
\xe9\x29\x44\xa3\x31\x5c\xba\xf4\x36\x36\x37\x13\xb2\xb6\xbc\xb4\
\x0c\x76\xb1\x3b\xb7\x6f\xd3\x67\x12\x58\x5c\x5c\x94\xf9\xf9\xf9\
\x79\x2c\x2d\x2d\x21\x1c\x0a\xf1\x58\xe6\xd6\xd7\xd7\x19\x08\x8f\
\x4d\x90\xe6\xb3\x35\xc7\xe3\xd2\x79\x11\x28\x62\xac\x01\x96\x58\
\x6b\x26\x9b\x6d\x35\x65\x01\x55\xe3\x96\xc5\x17\xe6\xe7\x10\x89\
\x44\x90\x4c\x26\xd1\xd1\xd1\x01\xbf\xbf\x4d\x80\x8c\x4f\x8c\x23\
\x14\x5a\x86\xdd\xe1\xc0\xec\xec\x2c\x7c\x3e\x1f\xb8\x6d\x67\xb3\
\x70\x3a\x9d\x98\x9d\x9b\xe3\xcf\x0b\x88\x42\xa1\x60\x02\xe4\xbe\
\xaa\xe5\x6d\x55\xdc\x44\x15\x35\x75\xbd\x4f\x05\x98\xe0\x2d\xda\
\xfe\xdf\x03\x0f\x90\x1c\x05\xa0\xd3\x9c\xdd\x5c\xc3\x23\x8f\x3c\
\xc2\xbd\x42\xfd\x20\x81\xee\xec\xec\xc4\xc0\xc0\x00\x62\xb1\x98\
\xcc\x77\x77\x75\x01\xe5\xdd\xa0\x7a\xdc\x68\xa0\x38\xcb\xa4\x40\
\x4b\x4c\xf0\xa5\x7e\xcf\xe0\x15\x9f\x27\x51\x00\x75\x11\x78\x65\
\x6c\x01\x51\x9f\xab\x2b\x62\xc7\x0a\x31\x69\x6b\x0a\x37\x9d\xda\
\xfb\x74\x81\xf7\x0e\x74\x77\xef\xde\x45\x30\x18\x94\xe7\x95\x95\
\x15\x0c\x0e\x0e\xca\x38\x12\x0e\xa3\xcd\xef\x17\xfa\x07\x03\x01\
\x6c\x91\xcb\x70\xd3\x88\xfe\x11\xfa\x5c\x17\xb1\xc0\x4f\xeb\xf4\
\x17\xc1\x66\xb7\x43\xb7\x0a\x13\xd3\x87\x6b\xc9\x16\xaa\xec\x8e\
\x0b\xa8\x7d\x26\x93\xc1\xe4\xe4\xa4\x80\x4c\xa5\x52\x98\x99\x99\
\x91\x79\x3b\x83\x8a\xc7\x05\x58\x5b\x5b\x1b\x66\x48\x51\x05\x4d\
\x93\xd8\xe1\x74\x38\x10\x5a\x5e\xc6\x91\x91\x11\x01\x6b\x27\xa1\
\x74\xc5\xf1\x43\x14\xe6\x6a\x6a\x42\x13\x09\xcd\xa9\x8a\xd8\x65\
\x17\x50\xa5\x04\xbc\xea\xe3\xa3\xa3\xa3\x0a\xf5\xcd\xf1\x76\x2e\
\x27\x4a\x59\x5c\x5c\xc2\xc2\x96\x0d\xd3\xd1\x6d\x24\xd2\x36\x6c\
\xe5\x0a\x48\x65\x6d\x48\xdf\xb9\x03\x3b\x34\x34\x3b\x74\xb8\x1d\
\x80\xc7\x65\x87\xdf\xed\xc4\x68\xbf\x1f\x47\xf7\xf7\xc0\x4f\x8a\
\x73\xbb\xdd\xac\xcc\x1a\xe3\x81\x9a\x6e\xeb\xc9\x02\x95\x7c\x5c\
\x99\x33\xfb\x6c\x36\x4b\x54\x5f\xc5\x1b\x97\x96\x71\x3d\x66\x43\
\x4e\x03\x34\x12\x5d\x27\x66\x68\x1a\xf5\x0e\xa3\xb7\x93\x68\x32\
\xd6\xf4\x3c\xf5\xdb\xf8\xf3\x64\x12\x81\x8b\x8b\xf8\xda\x89\x7e\
\x9c\x78\xe0\x00\x7c\x5e\xaf\xb0\x01\x2a\xc2\xdd\x66\x80\x0a\x5e\
\x2d\x70\x54\x25\x68\x04\x66\x73\x73\x13\x3f\xbf\x10\x22\xcb\x3b\
\x0c\x80\x3a\xf7\x24\xdc\x5b\x63\x6b\x4d\x07\x8a\xd6\x62\x69\x1d\
\x3f\xfe\xcb\x1c\xb2\xdb\x79\x7c\xee\x93\xa3\x68\x6d\x6d\x15\x57\
\xb9\xf7\x2e\xa0\x80\xaf\xce\x80\x1c\x51\xff\xc6\xdc\x2a\x81\xb7\
\x0b\xa0\xcf\x1f\x6e\xc5\x17\x3e\x36\x88\xf1\xa5\x35\xfc\xf4\xef\
\x8b\xbc\x35\x2b\x52\x88\xd5\x0b\x23\x4a\xd6\x80\xd7\xde\x5a\xc0\
\xc7\x0f\xf5\xc1\x43\xae\x40\x34\x50\xb2\xc6\x3d\x75\x01\x6e\xcb\
\x4b\x4b\xfc\x20\xbe\x79\xeb\xd6\x2d\x1c\x3f\x7e\x9c\xc7\x52\xed\
\x39\xc8\x57\xdd\x1e\x0f\xa6\xa7\xa6\x30\x15\xc9\x0b\xcd\x9b\xec\
\x1a\xbe\xfc\xa9\xfd\x68\x75\xb7\xa0\xb5\xd9\x81\x87\x26\x56\xf1\
\xef\x85\x94\x00\xb5\xc0\xaa\xca\x10\x61\x26\x65\x75\x5c\x9f\x89\
\x60\x4f\x4f\xb7\x04\x48\xec\x34\x23\xe8\x7a\x43\x18\xa0\x58\x79\
\x7a\x7a\x5a\x82\x52\x20\x18\xc4\x9e\xde\x5e\x01\xcf\x6d\x8a\x32\
\x81\x8f\x83\x56\x4b\x0b\x32\xe4\xff\xf3\xcb\x6b\x04\xa2\x87\x02\
\xa1\x46\xcf\xdb\xb0\xe9\x9a\x54\x80\xe1\xcd\x4c\x19\xeb\xcb\x18\
\x50\x5d\x05\x77\xc3\x1b\xa0\x4d\x19\xdc\x0a\xd0\x8a\xe6\x6f\x98\
\x02\x4a\x28\x7e\xfa\xf4\x69\xe9\x61\xe4\x6f\x53\x41\xff\x3f\x36\
\x66\x7e\x06\x9b\x1b\x1b\x78\x3b\x72\x0b\x93\x61\xa1\x31\x7e\xf8\
\xc7\x09\x9c\x19\xe9\xc0\xf5\xc5\x0d\xcc\xc4\x0b\xc5\x16\x2e\xee\
\xcb\xba\x43\xae\x20\xd1\xb3\x18\xdc\x3d\x73\x01\xb5\x66\x37\x9f\
\x05\xbc\x1a\x03\x04\xb1\xb1\x71\x32\x01\x4d\xac\x66\x31\x1e\x59\
\x2c\x63\x61\x5d\x0d\x86\xaa\x32\x14\x50\xf7\x2e\x08\x2a\x01\x4f\
\x06\x52\xfc\xf4\x92\x0b\x70\x5b\x5d\x59\x61\xfa\x4b\x01\xb3\x1a\
\x8d\xa2\xd5\xe3\x91\x4c\xa0\xfa\xb7\x8c\x6b\xb1\xbe\xcc\xc5\xe3\
\x71\xde\x41\x4a\x70\x5d\x5b\x5b\xe3\xca\x53\xd2\xe2\x06\x31\x8d\
\xf6\x19\x9c\x72\xa5\xaf\xd6\xea\x0f\x82\x56\xcf\x41\x8f\x8b\x1c\
\xb1\xd6\xdc\xfc\x3c\xfb\xbe\x28\x61\x25\x12\x81\xd7\xe7\x43\x47\
\x32\x84\xcf\xba\x73\xd8\xde\xde\x96\x3f\x6e\x68\x78\x18\x89\xcd\
\x4d\x21\x88\xdf\xdf\x2e\x3b\xc6\xd5\xd8\x1a\xde\x5c\x1f\x60\x90\
\x95\x82\xa1\x00\x9d\x9a\x9a\x12\x45\xd8\x8c\x34\xdb\xdf\xdf\x8f\
\x96\x96\x16\xee\x79\xeb\xbd\x5b\x0a\x28\x7f\xd8\x71\xf2\xe4\x49\
\x01\x74\x67\x31\x8a\x79\x5b\x1f\x56\x62\x79\xa4\x42\xec\xdf\x1d\
\xc0\x9a\x0e\x4d\x1f\x24\xd1\x00\x27\xb9\xc0\x3a\xf0\xd6\xda\x3a\
\xc4\x3b\xc0\x96\x8d\x21\x97\x6f\x21\x8b\x76\xef\x28\x18\xf6\xf5\
\xf5\xe1\xc0\x60\x01\x9d\x87\xe7\x24\x90\x72\xcb\x17\x96\x11\x4f\
\xfa\x70\x77\xca\x86\x9e\xde\xbd\xac\x14\x09\xce\x8d\x57\x80\x9a\
\xef\xd9\xaa\x52\xe5\xbd\x76\x71\x09\xb7\xe3\x5c\xd1\x99\x15\x9e\
\xcd\x04\x22\x56\xa2\xce\x9a\xd3\xec\xef\x02\x69\x87\xa6\x35\xc9\
\x9c\xea\x0e\x96\xc0\xf8\xbf\x72\x99\x28\x3a\xba\xa2\x28\x6e\x7d\
\x01\x62\x61\x76\x1a\xa1\xf8\x59\x78\x3c\x0f\x72\x46\xaa\x39\x08\
\xee\x48\x65\x36\xab\xe7\x0d\x8d\xf8\xe3\x4f\xde\x1c\x67\xf0\x65\
\xfd\x9b\x06\x15\xd3\x5d\xf5\xca\xd0\x8a\xfc\x5b\x5b\x5b\xb2\x89\
\xb2\x1a\x2b\x26\x4f\x52\x80\xa7\x29\x05\x77\xf6\x0f\xb8\x76\xed\
\x9a\x28\xca\xdc\xa0\x89\xf2\x80\x3a\x15\xa0\xd6\xf8\x72\xc2\xf3\
\xd6\x9d\x30\x96\x0b\x7e\x13\x48\x35\x1f\x56\xd6\x4c\x41\x69\xc0\
\x53\x94\x61\xb6\x70\x38\x2c\xa5\xb5\x34\x68\x02\xdc\x92\x3c\x31\
\x61\x15\xe9\xcd\x49\x01\x0e\xc0\x74\x93\x86\x28\x40\x49\x71\xc9\
\x54\x0a\xff\x9a\x4b\x57\xb3\x70\x3d\xd6\x57\xac\x37\x72\xdf\x21\
\xf4\xf6\x74\x0a\x60\x68\x02\x9a\xa4\xb4\x1f\x1d\x98\x41\x3a\x9d\
\x06\xb7\xe6\xe6\x66\x8e\x07\x0d\x4f\x83\x52\xc3\x27\xb6\x52\x58\
\x4e\x3b\x6b\xb7\x70\xf5\x74\x67\xae\x29\x06\x18\x08\x7a\xe0\x6d\
\xbe\x5b\x64\x75\x4d\x7a\x8b\x0d\x1a\xba\x5b\x67\xb1\x90\x4e\x41\
\xd3\x02\x7c\x96\xd0\x08\x06\xa8\x2c\xc8\xe7\xf3\x08\xc5\x53\xd0\
\xea\xf6\x6f\x6b\x0e\xa5\x8a\x54\xc0\x7b\x9c\x40\x4b\x21\x81\x76\
\x77\x4c\xb5\xbc\x66\xb9\x82\xc3\x96\x45\x6a\x73\x89\xdd\x40\xd2\
\x73\xfd\x31\x40\xad\x04\xe5\x38\x2b\x14\xcf\x30\x10\xc5\xc2\x65\
\x8b\x9d\x1a\x94\x05\xe8\x0a\xf1\x3e\xd1\x99\x86\x5b\xbb\x86\x40\
\x6b\xa2\x04\xbc\x39\x16\x25\x68\x32\x87\xad\xf5\x49\xae\x15\x58\
\x09\x1c\x10\xeb\x2c\x85\x55\x25\x48\x06\x58\x4d\x64\x15\x0b\xab\
\xc1\xd0\x12\xec\xcc\x55\x94\xdd\x9b\xbf\xc5\x8e\xaf\x1c\xeb\xc1\
\xd1\x01\xe0\xf8\xd0\xa4\x05\x1a\x9a\xe5\x02\x56\x2f\xd2\xd1\x96\
\xe5\x73\x46\x3e\x92\x6f\x78\x25\xc8\x00\x84\x01\x6b\xe9\xd2\xed\
\x2a\x64\x5c\x7e\x6f\xef\xa0\xe7\xfd\xed\xc0\x50\x7b\x33\xba\x7d\
\x4d\xb2\x65\xd6\x51\x02\x98\x3f\x67\x5a\x4b\xd6\xf7\xb4\xbb\x11\
\xf4\xba\xd0\xee\xba\x8d\x23\xbd\xef\xc0\xe5\xc8\x59\x40\x2d\xff\
\x57\xe6\x9c\xda\x0a\x67\x00\xf3\xff\x6b\x60\x25\x48\xa2\x1b\x74\
\x72\xda\x51\x66\x13\xa3\x5a\x38\xe8\xcc\xe0\x8b\xf7\x7b\x31\x18\
\x24\x1f\x2d\xcc\xa0\xa7\x43\xc8\xc4\xb5\x3b\x47\x6a\x06\x2e\x71\
\xc5\xe3\xf1\xc8\x7c\x32\xb9\x85\x26\xfa\x82\x36\x77\x92\x14\xb0\
\x01\x8f\x2b\xab\x00\xb5\xc6\x2a\x1b\xa0\xa5\x98\xfe\x5c\x22\xb3\
\x34\x36\x0b\xd8\x19\x3c\x45\xd7\x4e\x0f\x17\x3f\x85\x92\xa8\x0e\
\xd5\xbf\xe1\xb7\xa7\xf1\x99\xae\x38\x46\x7b\xe6\x70\x7c\x64\x03\
\x15\xb3\x92\xbe\x52\x91\xda\x40\xc9\x5c\x59\x36\xc4\x93\xad\xd8\
\xdb\xda\x6a\xf8\x7f\x83\xcf\x03\x4c\x7a\x76\xb7\xb5\x10\xc8\x0c\
\x54\xeb\x5b\x4a\xb0\x43\xc3\x57\x3f\xd1\x8b\x63\x43\x5b\x38\xdc\
\xb7\x51\x09\xf9\x4e\xa8\xbd\xe3\xb5\xd6\xe0\x08\xa7\x40\xe5\xe4\
\xa8\x51\xe7\x01\xf2\x1f\xf7\x05\x3c\x04\x76\x5d\xf1\x79\x14\x29\
\x64\xc8\x0f\x0c\x77\x68\x38\xd8\x3b\x8b\x32\xad\x2a\x98\xea\x16\
\x57\xd7\xec\x2d\x7b\x19\xbc\x59\x07\x34\xfe\x44\xc8\x41\x0a\xe8\
\x25\x05\xd8\xa0\x15\xd5\x02\xea\x26\xc6\xa7\x27\xb1\xb2\x34\x0e\
\xfb\x21\x1d\x6a\xd3\xcb\x51\xbb\x2e\x36\x64\x73\x64\x79\x6f\x37\
\x57\x80\x6c\x90\x06\x1f\x8a\x5a\x11\x5a\x0e\x3b\xf6\xb5\xe9\x98\
\x5c\x2f\x9f\x0a\x3b\x5b\x9d\x18\xe8\x6d\x06\x90\x50\xad\xae\x82\
\xa9\x85\x0d\x6a\x0f\x19\x23\x94\x3d\x09\xaf\xc7\x63\x1a\xa1\x41\
\x0c\x50\x37\x44\x72\xea\x7b\xe2\x40\x00\x13\x6f\x47\x0d\xeb\xab\
\xc1\xb0\x23\x18\x84\xcf\xb7\x09\x20\x0a\xa3\x95\x03\x53\x3f\x1b\
\xa0\x21\xaf\x39\x91\xf5\x9e\x45\x97\xb1\x1d\x36\x76\x85\xcc\x86\
\x3a\x15\xa0\x8a\x9c\xfc\x8c\x3d\xb8\x17\x17\xa7\xd6\x70\x27\x9a\
\x7b\xcf\x60\x08\xe8\xbb\x16\xe8\xac\x39\xeb\x7b\x96\x52\xc7\xe1\
\x1b\x1c\x10\xc0\xb2\x13\x2c\x7d\x99\xa3\x9b\xc2\xad\xae\xbd\x00\
\x8c\x97\x98\x81\xf6\x76\x7c\xf3\xcc\x11\xdc\xdf\xe9\x7c\xcf\x60\
\xb8\x99\x48\xc8\xa1\x09\xa0\x29\xa5\xab\xf4\x9a\x3a\x67\xad\xb1\
\x54\x5a\x33\xc6\x06\xf8\xf9\xb5\x5e\xcc\x26\x4f\x8b\xf2\x97\x97\
\x97\xb9\x0e\xe0\xb3\x03\xb3\x20\x6a\xf0\xa1\x68\xd1\xe5\xa3\x7d\
\x43\xfd\x78\xe9\x2b\x3e\xbc\x33\xb5\x84\xf1\xa5\x75\xfc\xf7\xe6\
\x04\xbf\xbd\x91\x83\xd2\xd6\xdc\x2a\x9f\x1b\x18\x40\xb5\x72\x51\
\x5b\x2a\xcb\x7f\x5e\x0d\xc8\x7a\x7f\x5f\x1f\x83\x92\x63\x36\x8f\
\xc7\x4d\xcb\x05\x38\x9d\x0e\x83\x41\x3a\x22\x91\x30\x82\x81\x76\
\x2e\xa0\xe4\x0d\x74\x5b\xa0\x1f\x69\x0c\x62\x3d\x3b\x80\x3d\x7b\
\x3a\xf9\xd5\x19\x2b\x80\x6f\xa1\x30\x78\x16\xce\x08\x0d\x8a\x01\
\xea\x31\x13\xff\x21\x72\x3a\x7b\xea\xe3\x6d\x38\x71\x34\x8f\xc7\
\x8e\xed\x35\xaf\xc0\x48\xa5\x97\x8d\xfe\x1a\xd0\x97\x2a\x53\x1b\
\x3a\x5a\xda\x0e\xc3\xed\x6e\x41\x5a\xb3\x41\xd8\x93\x75\x22\xef\
\x70\xc3\xd5\xe4\x42\x36\xaf\x8b\x12\x9c\xde\xc3\x18\x1a\x38\xc8\
\x80\xc4\xaa\x47\x06\x75\xa6\x3b\xb3\x91\x53\x1e\x9f\x50\x89\xd5\
\x0f\x1e\x3c\xc8\xdf\xcd\xd4\x2f\x66\x80\xde\x98\x18\xa0\xa6\x14\
\xd6\x30\x8b\x80\xf6\x7a\xbd\xe6\xb4\x9c\xe2\x6e\x1b\xbe\xaf\x46\
\x6d\x6b\x4c\x1e\x8b\x4f\xef\xfd\x47\xa9\x92\x3a\x55\xff\x9f\x49\
\x3f\x46\x0a\x1f\xe5\x33\xbf\xd2\x4d\x14\x20\x7d\x20\x10\x90\xb1\
\x65\x75\x19\xf3\xb6\x38\x6b\x5c\x94\xcc\x93\xe8\xf5\x1d\x8a\xaa\
\x2c\x60\x0d\xf3\xcd\x2f\xb6\x02\x2b\x80\xb7\xa2\xbc\x13\x13\x6b\
\x6c\x67\x33\xec\xbb\x8d\x08\x74\xf2\x3e\xc0\x45\x80\x8c\xe8\xce\
\xbd\x00\x2f\xed\x4b\x6d\x95\x48\x24\xf4\xf3\xe7\xcf\x9f\x33\x2e\
\x4a\xa6\x48\xb4\xba\x76\x83\x2a\x0b\xe4\x4b\x70\xf5\xea\x55\x8c\
\x8c\x8c\xc8\x71\xd4\xf8\xf8\x38\xbb\x81\x28\xc4\x0f\xc5\xfa\x95\
\xd8\x40\xc2\x00\x6d\x88\xb8\xbe\x05\xbb\x7b\x1f\xec\x6b\xaf\xa3\
\xcb\xfe\x57\x00\x30\x41\x9a\xbe\x2d\x1b\x28\x5d\x17\xc5\x98\xcf\
\x46\xfd\x6f\x67\x97\x91\x43\xd4\x0b\x17\x2e\xfc\xe6\xc5\x17\x5f\
\x7c\x03\x40\xd8\xb8\x24\x59\xa8\x2f\x08\xaa\x2c\x90\xab\x2f\x67\
\xcf\x9e\x85\xd9\x0e\x1d\x3a\x64\x2a\x06\xf1\xf9\x77\x38\x6a\xd7\
\x94\xf6\x62\xda\x18\x7c\xbd\xa7\x84\xc6\x5b\x4d\x5f\x87\xbe\xf2\
\x37\x02\x45\xe0\xe1\xe6\xac\xc2\x22\x8a\x36\xc7\xb9\x5c\x9e\xc0\
\xe7\x64\x37\x29\xf7\x8d\x6c\x36\x39\x3c\xbd\x7c\xf9\xf2\x5f\x9f\
\x7f\xfe\xf9\x57\x01\xcc\x93\xac\x92\xa4\x49\x61\x15\x19\xd0\xc8\
\xb7\xae\xc2\x00\xad\x69\x1f\xa0\xff\xb3\xa6\x8a\xce\xa1\xaf\x89\
\x25\x45\x0a\x19\x01\xcf\x2d\xeb\x38\x00\x1b\x59\x3b\x16\x5b\x23\
\xe5\x6e\x72\x16\x12\x97\xeb\xea\xea\x14\xff\x27\x70\xac\x74\x91\
\x1b\x37\x6e\x5c\x7e\xe6\x99\x67\x7e\x66\x80\x8f\xb0\xf5\x69\x3d\
\xdf\xb8\x2c\x50\xe6\xc5\x03\xbd\xba\xe2\x9b\x5f\x6c\x19\xb1\x42\
\x41\xef\x47\x38\x1e\x44\x6f\x5b\x78\xc7\x15\x5d\xd0\x7e\x09\xe1\
\x85\x57\x51\x70\xdd\x07\x6f\xe6\xbc\x54\x29\x91\xe4\x30\x1c\x9e\
\x03\x64\xf1\x9c\x80\x7f\xf4\xd1\x47\x61\x34\x0e\x72\x0c\xda\x14\
\x7e\x5f\x39\xfe\xe4\x93\x4f\xfe\xc0\x00\x1f\x32\x6a\xf1\x7c\xe3\
\xb3\x80\x2a\xfc\xe5\x08\x85\x42\x38\x75\xea\x14\x5f\x9c\x10\xf7\
\x58\x4d\x9c\x21\xca\xfe\x1e\xfb\xba\x56\xaa\x06\x3a\xb3\xf5\xe2\
\x57\xc0\x36\x04\x7c\x38\xb9\x1f\x2b\x4d\xdf\x80\xcf\xeb\xe3\x54\
\x27\xa9\xd7\x68\xec\x0a\xe2\xeb\xa6\x2c\x2c\x2c\x2c\x3e\xf5\xd4\
\x53\x2f\x53\x4c\x98\x03\xb0\x4c\xb2\x49\x92\xd3\xa9\xd5\xa1\x80\
\x2a\x96\xb7\x84\x6f\x8a\x08\x03\xb8\x8d\x8d\x8d\x31\x2d\x25\x27\
\xc7\xe3\x0f\x61\x22\xf6\x1f\x04\x0b\xbf\x45\xa7\x7b\x4e\x61\x83\
\xda\xd8\xea\x7b\x11\xd6\x1e\x83\xcb\xff\x31\x04\xbc\x5e\x76\x09\
\x66\x16\x17\x3b\x26\xf8\x62\xcb\xb3\xe2\xa3\x44\xfb\xef\x92\x22\
\x66\x0d\xf0\x1b\xca\xef\x03\x2a\x2b\xa0\x7e\x11\xf0\xa5\x4a\xe2\
\x63\x29\xe3\x42\xe4\x18\xb9\xc5\x31\x4c\x6f\x4c\x40\x4f\xdf\x85\
\xb3\xb0\x00\x97\x1e\x82\xc7\x19\x45\xae\xe0\x42\x5a\x23\xd7\x41\
\x37\x0a\x8e\x3e\x14\x9c\x83\x68\x0a\x0c\xa3\x8b\xc0\x72\xa1\xa3\
\x69\x3a\x51\x3d\x89\x4c\x26\x8b\x9e\x9e\x6e\x05\x7c\x34\x1a\x4d\
\xbc\xf0\xc2\x0b\x2f\x87\xc3\xe1\x09\x00\x8b\x24\xeb\x0a\xf8\x06\
\x2a\x80\xcb\x4d\x0e\x40\xfc\xc5\x1c\x7d\x59\xd8\x3a\x1c\xf8\xb8\
\x32\x2c\x57\x2c\x89\x32\x72\x81\x00\x0a\x85\x87\x38\x7d\x49\xea\
\x4a\x1b\xe9\xcc\x65\xb7\xa3\x85\x44\x2e\x4d\x52\x4f\xc2\xf3\x46\
\x8a\x33\xa2\x7f\x26\xcd\x29\xb6\x98\xf6\x02\xfe\x95\x57\x5e\xf9\
\xfe\xcd\x9b\x37\xaf\x17\x81\xcf\x9a\x11\xbf\xf1\x0a\x20\xab\x5e\
\xbf\x7e\x9d\xd3\x1d\x5f\x8b\x15\x6a\x9a\xe5\xe8\xf0\xf0\x30\x2a\
\x34\x06\x65\x1e\x54\x16\x57\x71\xc5\x39\xde\x04\x2d\x22\x99\x40\
\x9e\x35\x76\x25\x39\x87\x00\x60\x5a\x9e\x0d\x11\x23\xcb\x7f\x8f\
\xc0\x5f\x03\xb0\x40\x12\x53\xd3\x5d\xe3\x19\xc0\x51\x98\x2d\xc5\
\x75\x77\xad\xaf\xa2\xd5\xcf\x5a\x47\xe2\x2c\x0c\xba\xb4\xcc\xd5\
\x78\x2c\xfe\x5f\x6c\x7d\xae\x3e\x17\x9f\x7e\xfa\xe9\x97\x8a\x68\
\xbf\x56\x2b\x78\x75\x3b\xbc\xfb\x52\x93\xc2\x08\x8c\x59\x06\xb3\
\x62\x98\x3d\x66\xaa\x9b\x78\xe2\x89\x27\xbe\x4d\xe0\x6f\x19\xe9\
\x2e\x4a\x92\x22\xf0\x52\xe9\xd5\xad\x00\x23\x78\x58\x52\xf9\x6e\
\x2e\x6f\x4d\xe5\xde\x0e\x59\x83\xc7\xbc\x1f\xe0\x31\xa7\x42\xb3\
\x76\x67\x8b\xf1\x95\x18\x16\x2e\x54\x00\x80\xff\x0d\xcf\x57\x53\
\x02\x0b\xc7\x1c\xb6\x3c\xbb\xdf\x95\xc7\x1f\x7f\xfc\x3b\x34\x9e\
\x62\xf0\x06\xed\x33\x8a\xe5\x77\xcb\x05\x74\x55\x09\x9c\x7f\xf9\
\xee\xa0\xfc\x60\xe2\xe2\xc5\x8b\x6c\x25\xb6\x16\xd3\x96\x7d\x59\
\x62\xc4\xd0\xd0\x90\x69\x75\xde\x2f\x98\x7e\xcf\xf3\xdc\x57\x62\
\x89\x91\x09\x34\x5c\xb9\x72\xe5\x6f\x54\xe4\xfc\xc8\xf0\xf7\x50\
\x51\x9e\xd7\x76\xfd\xaa\x6c\x85\xc6\x1b\x21\x4e\x75\x02\xee\xe1\
\x87\x1f\x56\xe9\xad\x66\x05\x0e\x6a\x92\xd3\xab\x37\x1b\x67\x0b\
\x9d\x14\xfb\xbb\x67\x9f\x7d\xf6\x17\xc5\xe5\xad\x5a\xe4\x54\x97\
\x5a\x7e\x38\xd9\x02\x60\x90\xe4\x7e\xd2\xfe\x6f\xc8\x92\xca\x05\
\xc5\x4a\x20\x65\xad\xfa\x7c\x71\xc0\x2b\x0e\x80\xe6\x58\xf6\xf3\
\xe7\xce\x9d\x7b\xfd\xb9\xe7\x9e\xfb\xa5\x61\xf9\x55\x92\x24\x49\
\x5e\x01\xdf\x60\x06\x68\xc6\x1e\x3a\x4a\xe9\xeb\x4b\x00\x9a\xee\
\xe1\x4f\x68\xf5\xa2\xbf\x21\x63\xf8\x79\xd8\xe8\x53\xca\xc6\x66\
\x97\x14\x90\x37\xca\xc9\x19\x83\x72\x8e\x0f\xe8\xd7\x9f\x39\x92\
\xa4\x41\xf9\x6c\xa5\x48\x5f\xbf\x0b\xa8\x74\xb5\x1b\x0a\xe2\xde\
\xf6\x01\xfe\xf0\x99\x41\x6b\x4a\xb0\x6b\xa4\x02\x3e\xca\xed\x7f\
\xf7\x97\xad\xb8\xc8\x89\x57\x18\x00\x00\x00\x00\x49\x45\x4e\x44\
\xae\x42\x60\x82\
\x00\x00\x01\x9b\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\
\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x01\x3d\x49\x44\x41\x54\x38\x8d\x9d\
\x93\xbf\x6a\xc2\x50\x14\xc6\xbf\x73\x70\xa9\xb1\x6f\x20\x16\x87\
\x42\x08\x0e\xa2\x6b\x71\xc8\x64\x5f\xa3\x83\xae\x7d\x93\x0c\x05\
\x91\x3c\x49\x32\x28\xa5\x73\x07\x11\xc9\x90\xa1\x68\xc9\x23\xf4\
\x9a\x52\xe1\x9c\x0e\x4d\x6c\x88\x26\xa5\xfe\xa6\xcb\xbd\xe7\xfb\
\xce\x77\xff\x11\x4a\x44\xb6\x3d\x50\x91\x29\x03\x2e\x80\x9b\x6c\
\x7a\xab\xcc\x4b\x61\x9e\xf7\xa2\x68\x55\xac\xa7\x7c\xf0\x3a\x1c\
\x36\x9b\xc6\x3c\x11\xf0\x50\x36\x2d\x22\x22\xfe\xf5\x7e\xff\xd8\
\x49\x92\xf4\x68\x90\x89\x43\x02\xee\xea\xc4\x47\x54\x5f\x2c\x63\
\xc6\x9d\x24\x49\x19\x00\xb2\xce\x27\x62\xcb\xf3\x60\x79\xde\xa9\
\x01\xd1\xe8\xa3\xd5\xf2\x00\x80\x23\xdb\x1e\xfc\x15\xfb\x1c\x04\
\x4c\x37\x8e\xd3\x67\x15\x99\xfe\x57\x9c\xc3\x22\x13\xce\x4e\xfb\
\x22\x14\x70\x19\xbf\x57\x75\x49\x82\x2e\x5f\x2a\xce\x69\x00\xd8\
\x02\xb8\x3d\xb7\x78\x08\xc3\x5a\xb1\x30\xbf\x35\x94\x79\x49\x15\
\x06\x5f\x41\x50\x6b\xc0\xaa\x0b\x16\xe6\x79\x55\x41\xe5\x3b\xc8\
\x20\x55\x9f\x7b\x51\xb4\x12\x11\xff\x5c\xc1\x21\x0c\xab\xb7\xa1\
\x3a\xb3\xe3\x78\x4d\x00\xf0\xde\x6e\x5f\x19\xcb\x0a\x40\x34\xaa\
\xcd\x9c\x21\xc0\x73\x33\x4d\xef\xbb\xbb\xdd\x27\x03\x40\x27\x49\
\x52\xcb\x98\x71\x55\x92\x72\xe7\x5c\x0c\x14\x7e\x63\xce\xc6\x71\
\xfa\x2c\x32\x51\xc0\x65\x91\x2e\xf0\x73\xda\xac\xba\x20\x55\xdf\
\x8e\xe3\x75\xb1\xfe\x1b\xf7\xed\x87\xb0\x33\x1d\xd8\x89\x00\x00\
\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
"
qt_resource_name = b"\
\x00\x06\
\x07\x03\x7d\xc3\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x73\
\x00\x08\
\x08\x91\x58\xe7\
\x00\x77\
\x00\x61\x00\x72\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x08\
\x04\xd2\x59\x47\
\x00\x69\
\x00\x6e\x00\x66\x00\x6f\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x07\
\x08\x73\x57\x87\
\x00\x61\
\x00\x70\x00\x70\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x0a\
\x0f\x6e\x56\x07\
\x00\x70\
\x00\x79\x00\x74\x00\x68\x00\x6f\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x09\
\x09\x65\x8e\x67\
\x00\x65\
\x00\x72\x00\x72\x00\x6f\x00\x72\x00\x2e\x00\x70\x00\x6e\x00\x67\
"
qt_resource_struct_v1 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x05\x00\x00\x00\x02\
\x00\x00\x00\x28\x00\x00\x00\x00\x00\x01\x00\x00\x02\x1e\
\x00\x00\x00\x3e\x00\x00\x00\x00\x00\x01\x00\x00\x04\x4e\
\x00\x00\x00\x12\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x00\x6c\x00\x00\x00\x00\x00\x01\x00\x00\x19\x14\
\x00\x00\x00\x52\x00\x00\x00\x00\x00\x01\x00\x00\x0a\x8b\
"
qt_resource_struct_v2 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x05\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x28\x00\x00\x00\x00\x00\x01\x00\x00\x02\x1e\
\x00\x00\x01\x67\x6c\xe4\x66\xba\
\x00\x00\x00\x3e\x00\x00\x00\x00\x00\x01\x00\x00\x04\x4e\
\x00\x00\x01\x67\x6a\x2b\xc1\x53\
\x00\x00\x00\x12\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x67\x6c\xe4\xe1\x60\
\x00\x00\x00\x6c\x00\x00\x00\x00\x00\x01\x00\x00\x19\x14\
\x00\x00\x01\x67\x6c\xe5\x76\xaf\
\x00\x00\x00\x52\x00\x00\x00\x00\x00\x01\x00\x00\x0a\x8b\
\x00\x00\x01\x67\x6a\x2b\xc1\x53\
"
qt_version = [int(v) for v in QtCore.qVersion().split('.')]
if qt_version < [5, 8, 0]:
rcc_version = 1
qt_resource_struct = qt_resource_struct_v1
else:
rcc_version = 2
qt_resource_struct = qt_resource_struct_v2
def qInitResources():
QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()
| 58.827255
| 103
| 0.72619
| 7,336
| 30,649
| 3.028762
| 0.041848
| 0.058058
| 0.048607
| 0.030244
| 0.10005
| 0.098294
| 0.091903
| 0.091903
| 0.088933
| 0.086503
| 0
| 0.316834
| 0.019838
| 30,649
| 520
| 104
| 58.940385
| 0.422789
| 0.004959
| 0
| 0.085317
| 0
| 0.882937
| 0.000033
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0.003968
| false
| 0
| 0.001984
| 0
| 0.005952
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3bf990fdce7331b6e745400370736df105e7dc31
| 3,935
|
py
|
Python
|
designPattern/creational_patterns_创建型设计模式/abstract_factory_抽象工厂模式/abstract_factory_抽象工厂模式.py
|
bigfoolliu/liu_aistuff
|
aa661d37c05c257ee293285dd0868fb7e8227628
|
[
"MIT"
] | 1
|
2019-11-25T07:23:42.000Z
|
2019-11-25T07:23:42.000Z
|
designPattern/creational_patterns_创建型设计模式/abstract_factory_抽象工厂模式/abstract_factory_抽象工厂模式.py
|
bigfoolliu/liu_aistuff
|
aa661d37c05c257ee293285dd0868fb7e8227628
|
[
"MIT"
] | 13
|
2020-01-07T16:09:47.000Z
|
2022-03-02T12:51:44.000Z
|
designPattern/creational_patterns_创建型设计模式/abstract_factory_抽象工厂模式/abstract_factory_抽象工厂模式.py
|
bigfoolliu/liu_aistuff
|
aa661d37c05c257ee293285dd0868fb7e8227628
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# author: bigfoolliu
"""
抽象工厂模式
它能创建一系列相关的对象, 而无需指定其具体类。
https://refactoringguru.cn/design-patterns/abstract-factory
https://www.jianshu.com/p/7a56b7bafbb9
特点:
- 用来创建复杂的对象,这个对象由多个小对象组成,而这些'小对象'属于某一个 '系列'
- 抽象工厂模式在 Python 代码中很常见。 许多框架和程序库会将它作为扩展和自定义其标准组件的一种方式。
- 识别:可以通过方法来识别该模式——其会返回一个工厂对象
AbstractFactory:抽象工厂角色,如CourseFactory类,它声明了一组用于创建一种产品的方法,每一个方法对应一种产品,如创建视频和创建手记。
ConcreteFactory:具体工厂角色,如JavaCourseFactory和PythonCourseFactory类,它实现了在抽象工厂中定义的创建产品的方法,生成一组具体产品,这些产品构成了一个产品族,每一个产品都位于某个产品等级结构中。
AbstractProduce:抽象产品角色,如Video和Article类,它为每种产品声明接口。
ConcreteProduce:具体产品角色,如JavaVideo、JavaArticle、PythonVideo和PythonArticle类,它定义具体工厂生产的具体产品对象,实现抽象产品接口中声明的业务方法。
使用场景:
- 如果代码需要与多个不同系列的相关产品交互, 但是由于无法提前获取相关信息, 或者出于对未来扩展性的考虑, 你不希望代码基于产品的具体类进行构建
- 抽象工厂为你提供了一个接口, 可用于创建 '每个系列产品' 的对象。 只要代码通过该接口创建对象, 那么你就不会生成与应用程序已生成的产品类型不一致的产品
- 如果你有一个基于一组抽象方法的类, 且其主要功能因此变得不明确, 那么在这种情况下可以考虑使用抽象工厂模式
- 在设计良好的程序中, 每个类仅负责一件事。 如果一个类与多种类型产品交互, 就可以考虑将工厂方法抽取到独立的工厂类或具备完整功能的抽象工厂类中
1、客户端(应用层)不依赖于产品类实例如何被创建、实现等细节
2、强调一系列相关的产品对象(属于同一产品族)一起使用创建对象需要大量重复的代码
3、提供一个产品类的库,所有的产品以同样的接口出现,从而使客户端不依赖于具体实现
实现方式:
1.以不同的产品类型与产品变体为维度绘制矩阵
2.为所有产品声明抽象产品接口。 然后让所有具体产品类实现这些接口
3.声明抽象工厂接口, 并且在接口中为所有抽象产品提供一组构建方法。
4.为每种产品变体实现一个具体工厂类。
5.在应用程序中开发初始化代码。 该代码根据应用程序配置或当前环境, 对特定具体工厂类进行初始化。 然后将该工厂对象传递给所有需要创建产品的类。
6.找出代码中所有对产品构造函数的直接调用, 将其替换为对工厂对象中相应构建方法的调用。
优点:
- 你可以确保同一工厂生成的产品相互匹配。
- 你可以避免客户端和具体产品代码的耦合。
- 单一职责原则。 你可以将产品生成代码抽取到同一位置, 使得代码易于维护。
- 开闭原则。 向应用程序中引入新产品变体时, 你无需修改客户端代码。
缺点:
- 由于采用该模式需要向应用中引入众多接口和类, 代码可能会比之前更加复杂。
"""
from __future__ import annotations
from abc import ABC, abstractmethod
###############################################################################
# 一些抽象的基类,提供基础方法,供其他人继承复写
###############################################################################
# 1.构建抽象工厂
class AbstractFactory(ABC):
"""
抽象工厂
抽象工厂接口声明了一组方法,这些方法返回不同的抽象产品,即系列,一个系列的产品通常是能够相互协作。
一个产品系列可能有几个变体,但变体之间是不兼容的。
"""
@abstractmethod
def create_product_a(self) -> AbstractProductA:
"""
代表一类实体,返回抽象实体
"""
pass
@classmethod
def create_product_b(self) -> AbstractProductB:
pass
# 2.构建实体工厂
class ConcreteFactory1(AbstractFactory):
"""
实例工厂
实例工厂生产属于单一变体的一系列产品。 工厂方法保证产生的产品是兼容的。
请注意,具体工厂方法的签名返回一个抽象产品,而在方法内部实例化了一个具体产品。
"""
def create_product_a(self) -> AbstractProductA:
return ConcreteProductA1()
class ConcreteFactory2(AbstractFactory):
def create_product_b(self) -> AbstractProductB:
return ConcreteProductB1()
###############################################################################
# 每个实体都由对应的实体工厂创建,其他人复写
###############################################################################
# 3.构建抽象实体
class AbstractProductA(ABC):
"""
抽象实体
系列每个不同的实例的基础接口,所有的实体必须实现这些接口。
"""
@abstractmethod
def useful_function_a(self) -> str:
pass
class AbstractProductB(ABC):
@abstractmethod
def useful_function_b(self) -> str:
pass
# 4.构建实体,多个,均继承抽象实体,并需要实现其方法
class ConcreteProductA1(AbstractProductA):
"""
实体
必须实现所有的父类的抽象方法
"""
def useful_function_a(self) -> str:
return 'the result of the product a'
class ConcreteProductB1(AbstractProductB):
def useful_function_b(self) -> str:
return 'the result of the product b'
###############################################################################
# 客户端的调用
###############################################################################
def client_code(factory: AbstractFactory) -> None:
"""
客户端只通过抽象的类型-抽象工厂以及抽象实体 来和工厂协作,这样的话,就可以通过传递进来任何的工厂
的子类到客户端而不会重新修改客户端代码
"""
product_a = factory.create_product_a()
ret = product_a.useful_function_a()
print(ret)
def main():
client_code(ConcreteFactory1())
if __name__ == '__main__':
main()
| 24.290123
| 128
| 0.640915
| 302
| 3,935
| 8.238411
| 0.652318
| 0.019293
| 0.025723
| 0.013666
| 0.121383
| 0.121383
| 0.027331
| 0.027331
| 0
| 0
| 0
| 0.008157
| 0.158831
| 3,935
| 161
| 129
| 24.440994
| 0.7429
| 0.512325
| 0
| 0.405405
| 0
| 0
| 0.047619
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.27027
| false
| 0.108108
| 0.054054
| 0.108108
| 0.621622
| 0.027027
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
ce289f8e8cf6519c14de6c9ce1989d48fa017f06
| 23
|
py
|
Python
|
login.py
|
huangpuu/repo0
|
91408c4020149827721c67783b19ebb8903dcb23
|
[
"MIT"
] | null | null | null |
login.py
|
huangpuu/repo0
|
91408c4020149827721c67783b19ebb8903dcb23
|
[
"MIT"
] | null | null | null |
login.py
|
huangpuu/repo0
|
91408c4020149827721c67783b19ebb8903dcb23
|
[
"MIT"
] | null | null | null |
line 1
line 2 # jingli
| 7.666667
| 15
| 0.695652
| 5
| 23
| 3.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 0.26087
| 23
| 2
| 16
| 11.5
| 0.823529
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
cbf13c2365647c5692ba7a61376d65b9b0133c55
| 84
|
py
|
Python
|
Contest/ABC064/b/main.py
|
mpses/AtCoder
|
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
|
[
"CC0-1.0"
] | null | null | null |
Contest/ABC064/b/main.py
|
mpses/AtCoder
|
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
|
[
"CC0-1.0"
] | null | null | null |
Contest/ABC064/b/main.py
|
mpses/AtCoder
|
9c101fcc0a1394754fcf2385af54b05c30a5ae2a
|
[
"CC0-1.0"
] | null | null | null |
#!/usr/bin/env python3
_, *l = map(int, open(0).read().split())
print(max(l)-min(l))
| 28
| 40
| 0.607143
| 16
| 84
| 3.125
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025974
| 0.083333
| 84
| 3
| 41
| 28
| 0.623377
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
cbf57eaef89c2d0363c5264c2993f591b3a5b5b3
| 993
|
py
|
Python
|
yogiyo/core/permissions.py
|
YogiyoCloneTeamProject/YogiYoCloneAPI
|
477cfe0508aa685e513b24421466fb0d6707f5ef
|
[
"MIT"
] | 11
|
2020-10-06T16:59:01.000Z
|
2022-03-15T14:47:57.000Z
|
yogiyo/core/permissions.py
|
YogiyoCloneTeamProject/YogiYoCloneAPI
|
477cfe0508aa685e513b24421466fb0d6707f5ef
|
[
"MIT"
] | 38
|
2020-08-31T03:33:04.000Z
|
2020-10-08T00:46:32.000Z
|
yogiyo/core/permissions.py
|
YogiyoCloneTeamProject/YogiYoCloneAPI
|
477cfe0508aa685e513b24421466fb0d6707f5ef
|
[
"MIT"
] | 9
|
2020-08-16T09:07:10.000Z
|
2021-09-25T10:30:42.000Z
|
from rest_framework import permissions
from orders.models import Order
class IsOrderOwner(permissions.BasePermission):
def has_permission(self, request, view):
"""order의 owner == request.user """
return request.user == Order.objects.get(id=view.kwargs.get('order_pk')).owner
class IsUserSelf(permissions.IsAuthenticated):
"""유저 자신에 대한 권한"""
def has_object_permission(self, request, view, obj):
return obj == request.user
class IsOwner(permissions.BasePermission):
def has_object_permission(self, request, view, obj):
return obj.owner == request.user
class IsOwnerAndIsAuthenticated(permissions.IsAuthenticated):
def has_object_permission(self, request, view, obj):
return obj.owner == request.user
class IsSuperUser(permissions.BasePermission):
def has_permission(self, request, view):
"""super_user permission"""
return request.user and request.user.is_authenticated and request.user.is_superuser
| 27.583333
| 91
| 0.728097
| 117
| 993
| 6.068376
| 0.358974
| 0.123944
| 0.147887
| 0.176056
| 0.423944
| 0.423944
| 0.423944
| 0.423944
| 0.266197
| 0.266197
| 0
| 0
| 0.170191
| 993
| 35
| 92
| 28.371429
| 0.86165
| 0.064451
| 0
| 0.411765
| 0
| 0
| 0.008762
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.294118
| false
| 0
| 0.117647
| 0.176471
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
020d8ab238588c7d85d2e350320340885e7e2ce4
| 66
|
py
|
Python
|
fatima/utils/__init__.py
|
AmrMKayid/fatima
|
9ee5365889bca8bc05a84eb4130b9357a8177366
|
[
"MIT"
] | null | null | null |
fatima/utils/__init__.py
|
AmrMKayid/fatima
|
9ee5365889bca8bc05a84eb4130b9357a8177366
|
[
"MIT"
] | null | null | null |
fatima/utils/__init__.py
|
AmrMKayid/fatima
|
9ee5365889bca8bc05a84eb4130b9357a8177366
|
[
"MIT"
] | null | null | null |
from .args import parse_args
from .utils import init_random_seeds
| 22
| 36
| 0.848485
| 11
| 66
| 4.818182
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 66
| 2
| 37
| 33
| 0.913793
| 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
|
0213fc2d4166d1eaf1eb05f3788600d5abcde125
| 123
|
py
|
Python
|
src/zulu/helpers.py
|
ThomasChiroux/zulu
|
1ca2a73a391201b89fcc16767940389512f84687
|
[
"MIT"
] | null | null | null |
src/zulu/helpers.py
|
ThomasChiroux/zulu
|
1ca2a73a391201b89fcc16767940389512f84687
|
[
"MIT"
] | null | null | null |
src/zulu/helpers.py
|
ThomasChiroux/zulu
|
1ca2a73a391201b89fcc16767940389512f84687
|
[
"MIT"
] | null | null | null |
from decimal import Decimal
import sys
FOLD_AVAILABLE = sys.version_info >= (3, 6)
number_types = (int, float, Decimal)
| 15.375
| 43
| 0.739837
| 18
| 123
| 4.888889
| 0.777778
| 0.295455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019417
| 0.162602
| 123
| 7
| 44
| 17.571429
| 0.834951
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0223d305a92fced0d209f975ddca33d4ae97457a
| 149
|
py
|
Python
|
django_components_issue97/users/components.py
|
philipstarkey/django_components_issue97
|
50c99ddb08085e5f43d53638c21da5bc3be05056
|
[
"BSD-3-Clause"
] | null | null | null |
django_components_issue97/users/components.py
|
philipstarkey/django_components_issue97
|
50c99ddb08085e5f43d53638c21da5bc3be05056
|
[
"BSD-3-Clause"
] | null | null | null |
django_components_issue97/users/components.py
|
philipstarkey/django_components_issue97
|
50c99ddb08085e5f43d53638c21da5bc3be05056
|
[
"BSD-3-Clause"
] | null | null | null |
from django_components import component
@component.register("container")
class Container(component.Component):
template_name = "container.html"
| 24.833333
| 39
| 0.805369
| 16
| 149
| 7.375
| 0.6875
| 0.305085
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.100671
| 149
| 5
| 40
| 29.8
| 0.880597
| 0
| 0
| 0
| 0
| 0
| 0.154362
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
0229b4fb11e226147dbcc2273b7c5a4d434d7f79
| 97
|
py
|
Python
|
dauphin/text/datasets/__init__.py
|
PushparajaMurugan/dauphin
|
4d9832c72288282e6b3d03be1b0ad8708282b005
|
[
"Apache-2.0"
] | 18
|
2020-07-08T21:53:09.000Z
|
2021-02-18T03:46:54.000Z
|
dauphin/text/datasets/__init__.py
|
PushparajaMurugan/dauphin
|
4d9832c72288282e6b3d03be1b0ad8708282b005
|
[
"Apache-2.0"
] | 4
|
2020-08-30T17:47:35.000Z
|
2020-12-04T12:09:41.000Z
|
dauphin/text/datasets/__init__.py
|
PushparajaMurugan/dauphin
|
4d9832c72288282e6b3d03be1b0ad8708282b005
|
[
"Apache-2.0"
] | 8
|
2020-07-12T08:03:30.000Z
|
2021-04-13T15:09:37.000Z
|
from dauphin.text.datasets.imdb_dataset import ImdbDataset
ALL_DATASETS = {"imdb": ImdbDataset}
| 24.25
| 58
| 0.814433
| 12
| 97
| 6.416667
| 0.75
| 0.311688
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092784
| 97
| 3
| 59
| 32.333333
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0.041237
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0232354636efc95fa314ce92c2ea0dd7bd2b9f35
| 87
|
py
|
Python
|
wsgi.py
|
nmaekawa/redunlive
|
3f1830d605c46a300d028a32b564d803964f2384
|
[
"Apache-2.0"
] | null | null | null |
wsgi.py
|
nmaekawa/redunlive
|
3f1830d605c46a300d028a32b564d803964f2384
|
[
"Apache-2.0"
] | null | null | null |
wsgi.py
|
nmaekawa/redunlive
|
3f1830d605c46a300d028a32b564d803964f2384
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from redunlive import app
app.run()
| 8.7
| 25
| 0.609195
| 13
| 87
| 4.076923
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014286
| 0.195402
| 87
| 9
| 26
| 9.666667
| 0.742857
| 0.482759
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 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
|
027d0fd2de5a1a7d5357515965a772a13da807b3
| 261
|
py
|
Python
|
dm.py
|
HarryU/dm-online
|
82737a9417bf4b6e3f37e7abb71125a5d192c144
|
[
"MIT"
] | null | null | null |
dm.py
|
HarryU/dm-online
|
82737a9417bf4b6e3f37e7abb71125a5d192c144
|
[
"MIT"
] | 1
|
2018-05-04T10:28:45.000Z
|
2018-05-04T10:28:45.000Z
|
dm.py
|
HarryU/dm-online
|
82737a9417bf4b6e3f37e7abb71125a5d192c144
|
[
"MIT"
] | null | null | null |
#!/bin/env python
from app import create_app, socketio
app = create_app(debug=True)
if __name__ == '__main__':
socketio.run(app, certfile="/etc/letsencrypt/live/153.duckdns.org/fullchain.pem", keyfile="/etc/letsencrypt/live/153.duckdns.org/privkey.pem")
| 29
| 146
| 0.750958
| 38
| 261
| 4.894737
| 0.657895
| 0.096774
| 0.193548
| 0.225806
| 0.333333
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0.025316
| 0.091954
| 261
| 8
| 147
| 32.625
| 0.759494
| 0.061303
| 0
| 0
| 0
| 0
| 0.442623
| 0.409836
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.