uid
stringlengths
24
24
split
stringclasses
1 value
category
stringclasses
2 values
content
stringlengths
5
482k
signature
stringlengths
1
14k
suffix
stringlengths
1
482k
prefix
stringlengths
9
14k
prefix_token_count
int64
3
5.01k
prefix_token_budget
int64
64
256
element_token_count
int64
1
292k
signature_token_count
int64
1
5.01k
prefix_context_token_count
int64
0
255
repo
stringlengths
7
112
path
stringlengths
4
208
language
stringclasses
1 value
name
stringlengths
1
218
qualname
stringlengths
1
218
start_line
int64
1
26.7k
end_line
int64
1
26.7k
signature_start_line
int64
1
26.7k
signature_end_line
int64
1
26.7k
source_hash
stringlengths
40
40
source_dataset
stringclasses
1 value
source_split
stringclasses
1 value
3290c41ca01b9b07f7807571
train
class
class SEQUENCER_HT_tool_header(bpy_types.Header, bpy_types._GenericUI): bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): '...
class SEQUENCER_HT_tool_header(bpy_types.Header, bpy_types._GenericUI):
bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ...
def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass def property_unset(self): ...
140
140
468
19
120
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_HT_tool_header
SEQUENCER_HT_tool_header
176
349
176
176
2928338dfdcd083fb54136c8d69e441af7664a5e
bigcode/the-stack
train
55b1d10e65bed3032ed62fa8
train
class
class SEQUENCER_MT_add(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' bl_translation_context = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ...
class SEQUENCER_MT_add(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' bl_translation_context = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ...
pass def path_from_id(self): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_...
157
157
524
18
138
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_add
SEQUENCER_MT_add
352
538
352
352
a752f2855c189398362de7405a48cd9a957e85d6
bigcode/the-stack
train
9c100a3f67c2a05388b3e1b1
train
class
class SEQUENCER_PT_view(SequencerButtonsPanel_Output, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''...
class SEQUENCER_PT_view(SequencerButtonsPanel_Output, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ...
''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass ...
151
151
506
25
125
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_view
SEQUENCER_PT_view
10,400
10,586
10,400
10,401
ccc9c01dba5372014bfc22b0a588535949024120
bigcode/the-stack
train
2328088993d9f4f620016543
train
class
class SEQUENCER_PT_strip_cache(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = N...
class SEQUENCER_PT_strip_cache(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass ...
path_resolve(self): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): '...
159
159
533
25
133
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_strip_cache
SEQUENCER_PT_strip_cache
9,013
9,208
9,013
9,014
3003554f475fa12e93f698adee6d04c0a5e114ab
bigcode/the-stack
train
87f752a02b64389e3c20fb87
train
class
class SEQUENCER_PT_modifiers(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ...
class SEQUENCER_PT_modifiers(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ...
''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass ...
152
152
508
25
126
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_modifiers
SEQUENCER_PT_modifiers
8,062
8,248
8,062
8,063
38388095638e181a387bf9e459bab146929ac785
bigcode/the-stack
train
f20501629f62236118bbb9af
train
class
class SequencerButtonsPanel_Output: bl_region_type = None ''' ''' bl_space_type = None ''' ''' def has_preview(self, context): ''' ''' pass def poll(self, context): ''' ''' pass
class SequencerButtonsPanel_Output:
bl_region_type = None ''' ''' bl_space_type = None ''' ''' def has_preview(self, context): ''' ''' pass def poll(self, context): ''' ''' pass
encerButtonsPanel: bl_region_type = None ''' ''' bl_space_type = None ''' ''' def has_sequencer(self, context): ''' ''' pass def poll(self, context): ''' ''' pass class SequencerButtonsPanel_Output:
64
64
58
7
56
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SequencerButtonsPanel_Output
SequencerButtonsPanel_Output
5,746
5,763
5,746
5,746
220e7971fed6db00355d78437f1882dae6955196
bigcode/the-stack
train
c44c4b2c9df08aeb0548ab77
train
class
class SEQUENCER_PT_adjust_color(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type =...
class SEQUENCER_PT_adjust_color(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass ...
def values(self): ''' ''' pass class SequencerButtonsPanel: bl_region_type = None ''' ''' bl_space_type = None ''' ''' def has_sequencer(self, context): ''' ''' pass def poll(self, context): ''' ''' pass cla...
155
155
517
25
129
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_adjust_color
SEQUENCER_PT_adjust_color
5,766
5,955
5,766
5,767
294b09770284deb9f73efef38a82f63a7e79d2d6
bigcode/the-stack
train
6bcee023ea67424364ba4125
train
class
class SEQUENCER_PT_proxy_settings(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data ...
class SEQUENCER_PT_proxy_settings(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ...
''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass ...
152
152
508
25
126
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_proxy_settings
SEQUENCER_PT_proxy_settings
8,251
8,437
8,251
8,252
bf1308b6196d077f2a2beb8a1628e7454c25346d
bigcode/the-stack
train
be1820af3d491eab457e2892
train
class
class SEQUENCER_MT_strip_lock_mute(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_...
class SEQUENCER_MT_strip_lock_mute(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl...
_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): '...
155
155
518
21
133
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_strip_lock_mute
SEQUENCER_MT_strip_lock_mute
4,078
4,261
4,078
4,078
9d695f8a5e6abea74f79fa80ef92ad38f612db12
bigcode/the-stack
train
a30e971ce31cbb3e993ea456
train
function
def draw_color_balance(layout, color_balance): ''' ''' pass
def draw_color_balance(layout, color_balance):
''' ''' pass
remove(self, draw_func): ''' ''' pass def type_recast(self): ''' ''' pass def values(self): ''' ''' pass def act_strip(context): ''' ''' pass def draw_color_balance(layout, color_balance):
64
64
17
9
54
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
draw_color_balance
draw_color_balance
10,996
11,001
10,996
10,996
fe7a3d4e71f68bf5502d901b98f2721b22405022
bigcode/the-stack
train
18cd1aca06bc5de671decdf7
train
class
class SEQUENCER_MT_range(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_su...
class SEQUENCER_MT_range(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl...
, display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ...
154
154
515
18
135
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_range
SEQUENCER_MT_range
2,404
2,587
2,404
2,404
d23719483f9ace5d992b11acfe67119e91a60afd
bigcode/the-stack
train
f1b7c42d867b0465249aa2a4
train
class
class SEQUENCER_MT_add_transitions(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_...
class SEQUENCER_MT_add_transitions(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl...
_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): '...
154
154
516
20
133
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_add_transitions
SEQUENCER_MT_add_transitions
913
1,096
913
913
fe69a8536fbca97c92d1553519b43bdb19a8e035
bigcode/the-stack
train
8059af49c27855ee418f6fe6
train
class
class SEQUENCER_HT_header(bpy_types.Header, bpy_types._GenericUI): bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rn...
class SEQUENCER_HT_header(bpy_types.Header, bpy_types._GenericUI):
bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass d...
import sys import typing import bpy_types import bl_ui.space_toolsystem_common import bl_ui.properties_grease_pencil_common import rna_prop_ui class SEQUENCER_HT_header(bpy_types.Header, bpy_types._GenericUI):
53
132
440
18
34
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_HT_header
SEQUENCER_HT_header
9
173
9
9
e01b07e1a318f77e3a3507a6646f5c8301e75189
bigcode/the-stack
train
b0883a4bd02d5fcf8ae7c131
train
class
class SEQUENCER_MT_add_effect(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_g...
class SEQUENCER_MT_add_effect(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl...
display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ...
154
154
515
19
134
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_add_effect
SEQUENCER_MT_add_effect
541
724
541
541
e7a627f09c2df392150e2926ca6bd2230711d3b8
bigcode/the-stack
train
4c31aa27fa966760c842d29f
train
class
class SequencerButtonsPanel: bl_region_type = None ''' ''' bl_space_type = None ''' ''' def has_sequencer(self, context): ''' ''' pass def poll(self, context): ''' ''' pass
class SequencerButtonsPanel:
bl_region_type = None ''' ''' bl_space_type = None ''' ''' def has_sequencer(self, context): ''' ''' pass def poll(self, context): ''' ''' pass
def property_unset(self): ''' ''' pass def remove(self, draw_func): ''' ''' pass def type_recast(self): ''' ''' pass def values(self): ''' ''' pass class SequencerButtonsPanel:
64
64
59
6
57
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SequencerButtonsPanel
SequencerButtonsPanel
5,726
5,743
5,726
5,726
17dddecee9a5828041fcc1d0a47e925f1f20e699
bigcode/the-stack
train
fdcd2e57f360d1034d6b9ca3
train
class
class SEQUENCER_MT_strip_transform(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_...
class SEQUENCER_MT_strip_transform(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl...
display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ...
154
154
516
19
134
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_strip_transform
SEQUENCER_MT_strip_transform
4,450
4,633
4,450
4,450
c7c43fcaa716e8fe38cfa3cb66e5a338c4b1ecc7
bigcode/the-stack
train
c6bf3a8ae445bc2e838353b9
train
class
class SEQUENCER_PT_mask(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' ...
class SEQUENCER_PT_mask(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ...
''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pas...
152
152
507
24
127
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_mask
SEQUENCER_PT_mask
7,873
8,059
7,873
7,874
cf3c548a8016f0adc019f94aadf74fe618326733
bigcode/the-stack
train
bf7bab188430c2e474ea5f4b
train
class
class SEQUENCER_PT_cache_settings(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data ...
class SEQUENCER_PT_cache_settings(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ...
''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass ...
152
152
508
25
126
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_cache_settings
SEQUENCER_PT_cache_settings
6,912
7,098
6,912
6,913
f69de271b1b22cd86cfc52e2667b48403d7ef67e
bigcode/the-stack
train
a81353c5537849187917297c
train
class
class SEQUENCER_MT_strip_movie(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_...
class SEQUENCER_MT_strip_movie(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl...
display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ...
154
154
516
19
134
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_strip_movie
SEQUENCER_MT_strip_movie
4,264
4,447
4,264
4,264
f9b81693f2b28f596c97258985edf02c17898c5d
bigcode/the-stack
train
0aea8cd61fce1d11b7a252a0
train
class
class SEQUENCER_MT_strip_image_transform(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass d...
class SEQUENCER_MT_strip_image_transform(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl...
display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ...
155
155
517
20
134
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_strip_image_transform
SEQUENCER_MT_strip_image_transform
3,706
3,889
3,706
3,706
ea0273b580ec3cd1f4d124c54bd56bd2c1ebf105
bigcode/the-stack
train
e6ad5e4a2ada0ba3a0905cdc
train
class
class SEQUENCER_PT_effect_text_layout(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_parent_id = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' b...
class SEQUENCER_PT_effect_text_layout(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_parent_id = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass ...
''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' ...
155
155
519
26
128
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_effect_text_layout
SEQUENCER_PT_effect_text_layout
7,489
7,678
7,489
7,490
c764f59e26c6f204f857b744b54c07d4ee882714
bigcode/the-stack
train
c7f20fafb230f0bd86613567
train
class
class SEQUENCER_PT_active_tool( bl_ui.space_toolsystem_common.ToolActivePanelHelper, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' ...
class SEQUENCER_PT_active_tool( bl_ui.space_toolsystem_common.ToolActivePanelHelper, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ...
''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass def property_unset(self): ''' ''' pass ...
144
144
482
32
111
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_active_tool
SEQUENCER_PT_active_tool
5,008
5,183
5,008
5,010
d200d0c7cd04e59b53feb6d3239ce4d0839abb7c
bigcode/the-stack
train
6f588650f28f50777939968d
train
class
class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' '...
class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ...
''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pas...
152
152
507
24
127
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_effect
SEQUENCER_PT_effect
7,300
7,486
7,300
7,301
f8339f193c852ccefba073bec04df1af42f4aacb
bigcode/the-stack
train
87742be59af6fa19a675568e
train
class
class SEQUENCER_PT_preview_overlay(bpy_types.Panel, bpy_types._GenericUI): bl_label = None ''' ''' bl_parent_id = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ...
class SEQUENCER_PT_preview_overlay(bpy_types.Panel, bpy_types._GenericUI):
bl_label = None ''' ''' bl_parent_id = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): '''...
''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' pass d...
145
145
485
19
125
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_preview_overlay
SEQUENCER_PT_preview_overlay
5,362
5,541
5,362
5,362
de47e2df35445284db845a52dfb518b2c2a9fbc1
bigcode/the-stack
train
d92364ea8a513daaadfcadeb
train
class
class SEQUENCER_PT_effect_text_style(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_parent_id = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_...
class SEQUENCER_PT_effect_text_style(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_parent_id = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass ...
''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' ...
155
155
519
26
128
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_effect_text_style
SEQUENCER_PT_effect_text_style
7,681
7,870
7,681
7,682
c6abd619b7c1ceb06af78b18ee735813bdc9b70a
bigcode/the-stack
train
9709fcbe51e5219ec99c4020
train
class
class SEQUENCER_PT_annotation( SequencerButtonsPanel_Output, bl_ui.properties_grease_pencil_common.AnnotationDataPanel, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''...
class SEQUENCER_PT_annotation( SequencerButtonsPanel_Output, bl_ui.properties_grease_pencil_common.AnnotationDataPanel, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass ...
): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' ...
170
170
567
40
129
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_annotation
SEQUENCER_PT_annotation
9,604
9,807
9,604
9,607
b387cfe18afc0627550c48fd764b1ead4c191d8b
bigcode/the-stack
train
fd64069e08b31052b0eeaccb
train
class
class SEQUENCER_PT_custom_props(SequencerButtonsPanel, rna_prop_ui.PropertyPanel, bpy_types.Panel, bpy_types._GenericUI): COMPAT_ENGINES = None ''' ''' bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ...
class SEQUENCER_PT_custom_props(SequencerButtonsPanel, rna_prop_ui.PropertyPanel, bpy_types.Panel, bpy_types._GenericUI):
COMPAT_ENGINES = None ''' ''' bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_order = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' ...
): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' ...
163
163
546
33
129
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_custom_props
SEQUENCER_PT_custom_props
7,101
7,297
7,101
7,103
680bd1787b9d00472d4c6ed5a8606a8ecfeccef3
bigcode/the-stack
train
2dbcecef687015423b0dac8b
train
class
class SEQUENCER_PT_adjust_transform(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_spac...
class SEQUENCER_PT_adjust_transform(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass ...
): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ''' ...
155
155
517
25
129
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_adjust_transform
SEQUENCER_PT_adjust_transform
6,528
6,717
6,528
6,529
d3fa9943fe89db92bfb02f4a5205724c64e95df2
bigcode/the-stack
train
8b8f85d911995e7b7fd5358f
train
class
class SEQUENCER_MT_context_menu(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna...
class SEQUENCER_MT_context_menu(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl...
display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ...
154
154
515
19
134
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_context_menu
SEQUENCER_MT_context_menu
1,285
1,468
1,285
1,285
b38ef9ed52f608dad7050138a42c8ffabcde744a
bigcode/the-stack
train
69e8808a72b4f53c9b7b8c17
train
class
class SEQUENCER_MT_editor_menus(bpy_types.Menu, bpy_types._GenericUI): bl_idname = None ''' ''' bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ...
class SEQUENCER_MT_editor_menus(bpy_types.Menu, bpy_types._GenericUI):
bl_idname = None ''' ''' bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ...
_path, display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(se...
157
157
526
20
136
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_editor_menus
SEQUENCER_MT_editor_menus
1,471
1,657
1,471
1,471
1e516ba8dc6edf9cc520a1db792bcb4b9723293a
bigcode/the-stack
train
73b9da6253ff1d49a53af855
train
class
class SEQUENCER_PT_frame_overlay(SequencerButtonsPanel_Output, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_spa...
class SEQUENCER_PT_frame_overlay(SequencerButtonsPanel_Output, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass ...
_resolve(self): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ''' ...
159
159
532
26
132
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_frame_overlay
SEQUENCER_PT_frame_overlay
10,010
10,205
10,010
10,011
4624fb8970aa698175e176e124dda87530e3b911
bigcode/the-stack
train
05bca2eb5c6ce7b665718df5
train
class
class SEQUENCER_PT_time(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI): bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''...
class SEQUENCER_PT_time(SequencerButtonsPanel, bpy_types.Panel, bpy_types._GenericUI):
bl_category = None ''' ''' bl_label = None ''' ''' bl_options = None ''' ''' bl_region_type = None ''' ''' bl_rna = None ''' ''' bl_space_type = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass ...
def path_resolve(self): ''' ''' pass def poll(self, context): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ...
160
160
534
24
135
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_PT_time
SEQUENCER_PT_time
9,406
9,601
9,406
9,407
cb160e7d066b67e795c9483e921d1ade5d3ca1ed
bigcode/the-stack
train
36b6d730d2450ca9da56afbd
train
class
class SEQUENCER_MT_marker(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_s...
class SEQUENCER_MT_marker(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl...
, display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ...
154
154
514
18
135
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_marker
SEQUENCER_MT_marker
1,660
1,843
1,660
1,660
97d342a7dee23055d1485062c3f3705735d83297
bigcode/the-stack
train
00f20f5db9b8259de309bafc
train
class
class SEQUENCER_MT_add_empty(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_ge...
class SEQUENCER_MT_add_empty(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl...
display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ...
154
154
516
19
134
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_add_empty
SEQUENCER_MT_add_empty
727
910
727
727
ca652919ad2532e9d828d34bd591de0a291f5ade
bigcode/the-stack
train
8fe1166d9458c2cc533a187e
train
class
class SEQUENCER_MT_select(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_s...
class SEQUENCER_MT_select(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl...
, display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ...
154
154
515
18
135
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_select
SEQUENCER_MT_select
2,590
2,773
2,590
2,590
171e2c7933101ddfab513f456210fe2334dc17bd
bigcode/the-stack
train
109d1febaf79c152a985c068
train
class
class SEQUENCER_MT_select_channel(bpy_types.Menu, bpy_types._GenericUI): bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_r...
class SEQUENCER_MT_select_channel(bpy_types.Menu, bpy_types._GenericUI):
bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ''' pass def as_pointer(self): ''' ''' pass def bl_rna_get_subclass(self): ''' ''' pass def bl...
display_name, add_operator): ''' ''' pass def path_resolve(self): ''' ''' pass def pop(self): ''' ''' pass def prepend(self, draw_func): ''' ''' pass def property_overridable_library_set(self): ...
154
154
516
19
134
Argmaster/PyR3
typings/bl_ui/space_sequencer.py
Python
SEQUENCER_MT_select_channel
SEQUENCER_MT_select_channel
2,776
2,959
2,776
2,776
2f88966bb3566400cb26e3e1807747d6bd400541
bigcode/the-stack
train
099d4d3d30c4b0d015d4cdfd
train
function
def loadmat_v73(mat_path): arrays = {} f = h5py.File(mat_path, "r") for k, v in f.items(): arrays[k] = np.array(v) return arrays
def loadmat_v73(mat_path):
arrays = {} f = h5py.File(mat_path, "r") for k, v in f.items(): arrays[k] = np.array(v) return arrays
import glob import shlex import requests as r import numpy as np import h5py from cloudvolume import CloudVolume from collections import defaultdict import uuid from util import aws_cli import argparse from scipy.io import loadmat import pathlib def loadmat_v73(mat_path):
64
64
47
8
55
alishakodibagkar/brainlit
brainlit/cloudreg/scripts/registration_accuracy.py
Python
loadmat_v73
loadmat_v73
18
23
18
18
f908b765ed3b024dd19d95c9960293473ba6506a
bigcode/the-stack
train
84604cb39a2b88ac11bed86f
train
function
def get_distances(points1, points2): distances = {} for i in points1.keys(): try: distances[i] = np.linalg.norm(points1[i] - points2[i]) except KeyError: continue distances[i] = np.linalg.norm(points1[i] - points2[i.lower()]) return distances
def get_distances(points1, points2):
distances = {} for i in points1.keys(): try: distances[i] = np.linalg.norm(points1[i] - points2[i]) except KeyError: continue distances[i] = np.linalg.norm(points1[i] - points2[i.lower()]) return distances
] = -point[axis] return tmp_point def __str__(self): return f"{self.description}: [{self.point[0]}, {self.point[1]}, {self.point[2]} ]\norientation: {self.orientation}" def get_distances(points1, points2):
63
64
72
10
53
alishakodibagkar/brainlit
brainlit/cloudreg/scripts/registration_accuracy.py
Python
get_distances
get_distances
191
199
191
191
01df2dd26fc5ff4a9830856cbf535b73dd606760
bigcode/the-stack
train
5cb26a7701a15e3d82ab9783
train
function
def compute_regisration_accuracy( target_viz_link, atlas_viz_link, affine_path, velocity_path, # voxel size of velocity field velocity_field_vsize, atlas_orientation="PIR", target_orientation="LPS", ): # get json link from viz link target_viz = NGLink(target_viz_link.split("json_...
def compute_regisration_accuracy( target_viz_link, atlas_viz_link, affine_path, velocity_path, # voxel size of velocity field velocity_field_vsize, atlas_orientation="PIR", target_orientation="LPS", ): # get json link from viz link
target_viz = NGLink(target_viz_link.split("json_url=")[-1]) atlas_viz = NGLink(atlas_viz_link.split("json_url=")[-1]) # get origin-centered fiducials from viz link atlas_fiducials = [ Fiducial( j, atlas_orientation, atlas_viz.image_shape, atlas_vi...
return tmp_point def __str__(self): return f"{self.description}: [{self.point[0]}, {self.point[1]}, {self.point[2]} ]\norientation: {self.orientation}" def get_distances(points1, points2): distances = {} for i in points1.keys(): try: distances[i] = np.linalg.norm(points1[i] -...
183
183
612
65
117
alishakodibagkar/brainlit
brainlit/cloudreg/scripts/registration_accuracy.py
Python
compute_regisration_accuracy
compute_regisration_accuracy
202
264
202
212
354f9386cd76fa48bfa0b41c989258b302744a9c
bigcode/the-stack
train
60e4c83e4d7f72da4154e13b
train
class
class Fiducial: def __init__(self, point, orientation, image_shape, voxel_size, description=""): """ point: 3D point in physical space of fiducial (array-like len 3) image_size: size in physical units of native res image in each dim (array-like len 3) """ self.image_shape = n...
class Fiducial:
def __init__(self, point, orientation, image_shape, voxel_size, description=""): """ point: 3D point in physical space of fiducial (array-like len 3) image_size: size in physical units of native res image in each dim (array-like len 3) """ self.image_shape = np.asarray(image_...
!= "point": continue if "description" in i.keys(): self.points[i["description"].strip()] = i["point"] else: self.points[f"{i['id']}"] = i["point"] return layer_data def _parse_image_layer(self, layer_data): vol = CloudVolume(l...
256
256
887
5
250
alishakodibagkar/brainlit
brainlit/cloudreg/scripts/registration_accuracy.py
Python
Fiducial
Fiducial
90
188
90
90
8be50fbc30088f40dd618867147836191c0d5a06
bigcode/the-stack
train
a17f055093a5bb92c010d170
train
class
class NGLink: def __init__(self, json_link): self.points = defaultdict(lambda: "") self.json_link = json_link self._set_json_from_link() def get_annotations(self, points): annotations = [] for i, j in points.items(): x = { "point": j.tolist(),...
class NGLink:
def __init__(self, json_link): self.points = defaultdict(lambda: "") self.json_link = json_link self._set_json_from_link() def get_annotations(self, points): annotations = [] for i, j in points.items(): x = { "point": j.tolist(), ...
import os import subprocess from glob import glob import shlex import requests as r import numpy as np import h5py from cloudvolume import CloudVolume from collections import defaultdict import uuid from util import aws_cli import argparse from scipy.io import loadmat import pathlib def loadmat_v73(mat_path): ar...
115
165
553
4
110
alishakodibagkar/brainlit
brainlit/cloudreg/scripts/registration_accuracy.py
Python
NGLink
NGLink
26
87
26
26
1d7701d06a77132ffc7849acd2c87bb81f8920d2
bigcode/the-stack
train
6f8dfb9b1fd0f382879bfcb6
train
class
class TestCLI(unittest.TestCase): def test_check_workspace_list(self): with self.assertRaises(TypeError): Client.check_workspace(workspace=list()) def test_check_workspace_none(self): with self.assertRaises(TypeError): Client.check_workspace(workspace=None) def tes...
class TestCLI(unittest.TestCase):
def test_check_workspace_list(self): with self.assertRaises(TypeError): Client.check_workspace(workspace=list()) def test_check_workspace_none(self): with self.assertRaises(TypeError): Client.check_workspace(workspace=None) def test_check_workspace_dict(self): ...
import unittest from toggl2pl import Client class TestCLI(unittest.TestCase):
18
64
96
7
10
pa-yourserveradmin-com/toggl2pl
tests/test_main.py
Python
TestCLI
TestCLI
5
20
5
6
5388c2d9e811251c1499f8eedd434166ed398452
bigcode/the-stack
train
cae52faf444c024d5e65d714
train
class
class Parser: def __init__(self, code=None, loaded=None, path="modules/"): self.code = code self.loaded = loaded self.path = path def loadModules(self): """Modules loader for Py3PHP :return loaded_modules: """ loaded_modules = { "vars": [], ...
class Parser:
def __init__(self, code=None, loaded=None, path="modules/"): self.code = code self.loaded = loaded self.path = path def loadModules(self): """Modules loader for Py3PHP :return loaded_modules: """ loaded_modules = { "vars": [], "ext...
import os class Parser:
6
255
851
3
2
Py3Coders/Py3PHP
parser.py
Python
Parser
Parser
4
106
4
4
7044d12b6f83552e49ba8ce54d5a0578faff175a
bigcode/the-stack
train
e91028ec659cab8638341fb8
train
function
def initializer() -> Initializer: result = Initializer() @result.register("input") def _(classname, input): # type: ignore if classname == "StringInput": return StringInput(input=input) else: assert False @result.register("output") def _(classname): # typ...
def initializer() -> Initializer:
result = Initializer() @result.register("input") def _(classname, input): # type: ignore if classname == "StringInput": return StringInput(input=input) else: assert False @result.register("output") def _(classname): # type: ignore if classname == "...
from counter_processor import CounterProcessor from string_input import StringInput from text_analyzer import TextAnalyzer from text_output import TextOutput from pyntegrant.initializer import Initializer from pyntegrant.map import PRef from pyntegrant.system import System def initializer() -> Initializer:
63
64
168
7
55
vputz/pyntegrant
example/main.py
Python
initializer
initializer
11
40
11
12
e8d5605d65970239bd03470479ce6f4c5a6f162e
bigcode/the-stack
train
38efdd07f46e9ff62548a81c
train
class
@RegisterSet.tokenizer.register class FullTokenizer(Tokenizer): """FullTokenizer:basic, sentence_piece, word_piece的总集,按字粒度进行切分 """ def __init__(self, vocab_file, split_char=" ", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, params=params) self.basic_tokeni...
@RegisterSet.tokenizer.register class FullTokenizer(Tokenizer):
"""FullTokenizer:basic, sentence_piece, word_piece的总集,按字粒度进行切分 """ def __init__(self, vocab_file, split_char=" ", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, params=params) self.basic_tokenizer = BasicTokenizer(vocab_file=vocab_file, unk_token=unk_token,...
import Tokenizer from text2sql.framework.utils.util_helper import convert_to_unicode from text2sql.framework.utils.util_helper import whitespace_tokenize from text2sql.framework.utils.util_helper import is_control from text2sql.framework.utils.util_helper import is_whitespace from text2sql.framework.utils.util_helper ...
87
87
290
13
73
pkulzb/Research
NLP/DuSQL-Baseline/text2sql/framework/reader/tokenizer/tokenization_wp.py
Python
FullTokenizer
FullTokenizer
38
74
38
39
dc6ca17d02966cd687d9cea3efdc60f0529beb27
bigcode/the-stack
train
555b76f3f06dcd62282e9892
train
class
@RegisterSet.tokenizer.register class BasicTokenizer(Tokenizer): """Runs basic tokenization (punctuation splitting, lower casing, etc.).""" def __init__(self, vocab_file, split_char=" ", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, unk_token, params) self.do...
@RegisterSet.tokenizer.register class BasicTokenizer(Tokenizer):
"""Runs basic tokenization (punctuation splitting, lower casing, etc.).""" def __init__(self, vocab_file, split_char=" ", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, unk_token, params) self.do_lower_case = True if params: self.do_lower_c...
_file, split_char=" ", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, params=params) self.basic_tokenizer = BasicTokenizer(vocab_file=vocab_file, unk_token=unk_token, params=params) if params and params.get("use_sentence_piece_vocab", None): self.wo...
256
256
1,059
13
243
pkulzb/Research
NLP/DuSQL-Baseline/text2sql/framework/reader/tokenizer/tokenization_wp.py
Python
BasicTokenizer
BasicTokenizer
77
202
77
78
2a3f153a229b27ccbbdc78e423d8c2ea948337d1
bigcode/the-stack
train
a38a43a2b2f69b10100bd663
train
class
@RegisterSet.tokenizer.register class SentencepieceTokenizerErnie(Tokenizer): """Runs SentencePiece tokenziation.""" def __init__(self, vocab_file, split_char=" ", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, unk_token, params) model_file = params.get("senten...
@RegisterSet.tokenizer.register class SentencepieceTokenizerErnie(Tokenizer):
"""Runs SentencePiece tokenziation.""" def __init__(self, vocab_file, split_char=" ", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, unk_token, params) model_file = params.get("sentence_piece_model", None) self.tokenizer = sp.SentencePieceProcessor() ...
if sp_token in self.vocab: output_tokens.append(sp_token) return output_tokens def convert_tokens_to_ids(self, tokens): """convert tokens to ids""" return self.vocabulary.convert_tokens_to_ids(tokens) def convert_ids_to_tokens(self, ids): ...
93
93
311
16
77
pkulzb/Research
NLP/DuSQL-Baseline/text2sql/framework/reader/tokenizer/tokenization_wp.py
Python
SentencepieceTokenizerErnie
SentencepieceTokenizerErnie
399
438
399
400
f69d11da04ea5e36a35a282b90da9bb365c099f4
bigcode/the-stack
train
1d2e92dcfc7c7c5dc8d82cf0
train
class
@RegisterSet.tokenizer.register class SentencePieceTokenizer(WordPieceTokenizer): """tokenize""" def tokenize(self, text): """ :param text: :return: """ text = convert_to_unicode(text) output_tokens = [] for token in whitespace_tokenize(text): ...
@RegisterSet.tokenizer.register class SentencePieceTokenizer(WordPieceTokenizer):
"""tokenize""" def tokenize(self, text): """ :param text: :return: """ text = convert_to_unicode(text) output_tokens = [] for token in whitespace_tokenize(text): chars = list(token) if len(chars) > self.max_input_chars_per_word: ...
_tokens) return output_tokens def convert_tokens_to_ids(self, tokens): """ :param tokens: :return: """ pass def convert_ids_to_tokens(self, ids): """ :param ids: :return: """ pass @RegisterSet.tokenizer.register class Sent...
75
75
251
16
58
pkulzb/Research
NLP/DuSQL-Baseline/text2sql/framework/reader/tokenizer/tokenization_wp.py
Python
SentencePieceTokenizer
SentencePieceTokenizer
283
322
283
284
7a508e7b52e36da4f99f8dc841e7fcaa2f87fbf2
bigcode/the-stack
train
6c1691e6c0c627b0099ca1a4
train
class
@RegisterSet.tokenizer.register class WordPieceTokenizer(Tokenizer): """Runs WordPiece tokenziation.""" def __init__(self, vocab_file, split_char=" ", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, unk_token=unk_token, params=params) self.max_input_chars_per_w...
@RegisterSet.tokenizer.register class WordPieceTokenizer(Tokenizer):
"""Runs WordPiece tokenziation.""" def __init__(self, vocab_file, split_char=" ", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, unk_token=unk_token, params=params) self.max_input_chars_per_word = 100 if params: self.max_input_chars_per_wor...
<= 0xFAFF) or # (cp >= 0x2F800 and cp <= 0x2FA1F)): # return True return False def _clean_text(self, text): """Performs invalid character removal and whitespace cleanup on text.""" output = [] for char in text: cp = ord(char) if cp...
140
140
468
14
126
pkulzb/Research
NLP/DuSQL-Baseline/text2sql/framework/reader/tokenizer/tokenization_wp.py
Python
WordPieceTokenizer
WordPieceTokenizer
205
280
205
206
1b8713a640d92e16f16b8757c1b4f871ea7a24b2
bigcode/the-stack
train
65e097c5057e3c5792b72a64
train
class
@RegisterSet.tokenizer.register class WSSPTokenizer(Tokenizer): """WSSP:basic, sentence_piece, word_piece的总集,按字粒度进行切分 """ def __init__(self, vocab_file, split_char, unk_token, params=None): super(WSSPTokenizer, self).__init__(vocab_file, split_char, unk_token, params=None) self.sp_model = sp...
@RegisterSet.tokenizer.register class WSSPTokenizer(Tokenizer):
"""WSSP:basic, sentence_piece, word_piece的总集,按字粒度进行切分 """ def __init__(self, vocab_file, split_char, unk_token, params=None): super(WSSPTokenizer, self).__init__(vocab_file, split_char, unk_token, params=None) self.sp_model = sp.SentencePieceProcessor() self.window_size = 5 i...
in tokens: if token == self.sp_unk_token: token = self.unk_token if token in self.vocab: output_tokens.append(token) else: output_tokens.append(self.unk_token) return output_tokens def convert_tokens_to_ids(self, tokens)...
123
123
413
15
108
pkulzb/Research
NLP/DuSQL-Baseline/text2sql/framework/reader/tokenizer/tokenization_wp.py
Python
WSSPTokenizer
WSSPTokenizer
441
496
441
442
1c48fa2b4b4a1e7381d251ec1adf1adb0acb2d81
bigcode/the-stack
train
c5cabf602cb32d72e357a0c6
train
class
@RegisterSet.tokenizer.register class CharTokenizer(Tokenizer): """Runs end-to-end tokenziation.""" def __init__(self, vocab_file, split_char=" ", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, unk_token, params) self.wordpiece_tokenizer = WordPieceTokenizer(v...
@RegisterSet.tokenizer.register class CharTokenizer(Tokenizer):
"""Runs end-to-end tokenziation.""" def __init__(self, vocab_file, split_char=" ", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, unk_token, params) self.wordpiece_tokenizer = WordPieceTokenizer(vocab_file=vocab_file, params=None) def tokenize(self, text)...
is_bad = True break sub_tokens.append(cur_substr) start = end if is_bad: output_tokens.append(self.unk_token) else: output_tokens.extend(sub_tokens) return output_tokens @RegisterSet....
64
64
214
13
50
pkulzb/Research
NLP/DuSQL-Baseline/text2sql/framework/reader/tokenizer/tokenization_wp.py
Python
CharTokenizer
CharTokenizer
325
357
325
326
ce4ca5065755d0bea8225f269e3257968068a867
bigcode/the-stack
train
b2eab5cad14617eecd0788cc
train
class
@RegisterSet.tokenizer.register class WordsegTokenizer(Tokenizer): """Runs Wordseg tokenziation.""" def __init__(self, vocab_file, split_char="\1", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, unk_token, params) model_file = params.get("sentence_piece_model",...
@RegisterSet.tokenizer.register class WordsegTokenizer(Tokenizer):
"""Runs Wordseg tokenziation.""" def __init__(self, vocab_file, split_char="\1", unk_token="[UNK]", params=None): Tokenizer.__init__(self, vocab_file, split_char, unk_token, params) model_file = params.get("sentence_piece_model", None) self.tokenizer = sp.SentencePieceProcessor() ...
) return split_tokens def convert_tokens_to_ids(self, tokens): """ :param tokens: :return: """ return self.vocabulary.convert_tokens_to_ids(tokens) def convert_ids_to_tokens(self, ids): """ :param ids: :return: """ return...
88
88
296
14
74
pkulzb/Research
NLP/DuSQL-Baseline/text2sql/framework/reader/tokenizer/tokenization_wp.py
Python
WordsegTokenizer
WordsegTokenizer
360
396
360
361
c36105bf7b46aa72885bfc7435995123fb1798e8
bigcode/the-stack
train
7ab162b94412e1bd91310e95
train
function
def setup_logger(): """Return a logger with a default ColoredFormatter.""" formatter = ColoredFormatter( "%(white)s[%(cyan)s%(asctime)s%(white)s] %(white)s[%(log_color)s%(levelname)s%(white)s]%(reset)s %(message)s", datefmt="%H:%M:%S", reset=True, log_colors={ "DEBUG"...
def setup_logger():
"""Return a logger with a default ColoredFormatter.""" formatter = ColoredFormatter( "%(white)s[%(cyan)s%(asctime)s%(white)s] %(white)s[%(log_color)s%(levelname)s%(white)s]%(reset)s %(message)s", datefmt="%H:%M:%S", reset=True, log_colors={ "DEBUG": "cyan", ...
# - * - coding:utf-8 - * - import logging from colorlog import ColoredFormatter def setup_logger():
25
64
162
4
20
killvxk/lxhToolHTTPDecrypt
HTTPDecrypt/log.py
Python
setup_logger
setup_logger
6
27
6
6
028186938dda32685e316c1283a084803e5de9dc
bigcode/the-stack
train
c9bfc9621e0feff83b80bc20
train
function
def load_gaussian_cdf_data(): """Load example with numbers sampled from Gaussian normal distribution. Each feature and task is a column of values that is sampled from a normal distribution of mean 0, stdev 1.""" current_dir = os.path.dirname(os.path.abspath(__file__)) features = ["feat0", "feat1"] fea...
def load_gaussian_cdf_data():
"""Load example with numbers sampled from Gaussian normal distribution. Each feature and task is a column of values that is sampled from a normal distribution of mean 0, stdev 1.""" current_dir = os.path.dirname(os.path.abspath(__file__)) features = ["feat0", "feat1"] featurizer = dc.feat.UserDefinedF...
import os import deepchem as dc import numpy as np def load_gaussian_cdf_data():
22
64
156
8
13
cjgalvin/deepchem
deepchem/trans/tests/test_power.py
Python
load_gaussian_cdf_data
load_gaussian_cdf_data
6
18
6
6
0687ded5fd07b5ad63f2a442e47227cc421dd9b1
bigcode/the-stack
train
fecba3937e407cea83a4431a
train
function
def test_power_X_transformer(): """Test Power transformer on Gaussian normal dataset.""" N = 10 n_feat = 2 powers = [1, 2, 0.5] X = np.random.rand(N, n_feat) y = np.random.normal(size=(N,)) gaussian_dataset = dc.data.NumpyDataset(X, y) powers = [1, 2, 0.5] power_transformer = dc.trans.PowerTransformer...
def test_power_X_transformer():
"""Test Power transformer on Gaussian normal dataset.""" N = 10 n_feat = 2 powers = [1, 2, 0.5] X = np.random.rand(N, n_feat) y = np.random.normal(size=(N,)) gaussian_dataset = dc.data.NumpyDataset(X, y) powers = [1, 2, 0.5] power_transformer = dc.trans.PowerTransformer(transform_X=True, powers=powers...
.path.dirname(os.path.abspath(__file__)) features = ["feat0", "feat1"] featurizer = dc.feat.UserDefinedFeaturizer(features) tasks = ["task0", "task1"] input_file = os.path.join(current_dir, "../../models/tests/gaussian_cdf_example.csv") loader = dc.data.UserCSVLoader( tasks=t...
109
109
364
7
102
cjgalvin/deepchem
deepchem/trans/tests/test_power.py
Python
test_power_X_transformer
test_power_X_transformer
21
48
21
21
6ec3f625e1e314d7b276c6fbd857db787a6aeddf
bigcode/the-stack
train
e6d653c05b82531a7264bd3d
train
function
def test_power_y_transformer(): """Test Power transformer on Gaussian normal dataset.""" N = 10 n_feat = 2 powers = [1, 2, 0.5] X = np.random.rand(N, n_feat) y = np.random.rand(N) gaussian_dataset = dc.data.NumpyDataset(X, y) power_transformer = dc.trans.PowerTransformer(transform_y=True, powers=powers)...
def test_power_y_transformer():
"""Test Power transformer on Gaussian normal dataset.""" N = 10 n_feat = 2 powers = [1, 2, 0.5] X = np.random.rand(N, n_feat) y = np.random.rand(N) gaussian_dataset = dc.data.NumpyDataset(X, y) power_transformer = dc.trans.PowerTransformer(transform_y=True, powers=powers) X, y, w, ids = (gaussian_data...
np.testing.assert_allclose(w, w_t) # Check X is now holding the proper values in each column. np.testing.assert_allclose(X_t.shape[1], len(powers) * X.shape[1]) np.testing.assert_allclose(X, X_t[:, :2]) np.testing.assert_allclose(np.power(X, 2), X_t[:, 2:4]) np.testing.assert_allclose(np.power(X, 0.5), X_t...
111
112
375
7
105
cjgalvin/deepchem
deepchem/trans/tests/test_power.py
Python
test_power_y_transformer
test_power_y_transformer
51
80
51
51
7e8b4ee25f892bfd4853e4197fa2c870996d3ba1
bigcode/the-stack
train
ce32e57a6212b4e675367243
train
class
class TableCodec(BaseCodec): def __init__(self,CodecObj=None,keyEncWidth=20,keyDecWidth=4,cwEncWidth=5,cwDecWidth=1,Policy=None): BaseCodec.__init__(self,CodecObj=CodecObj,Policy=Policy) self._keyEncWidth = keyEncWidth self._keyDecWidth = keyDecWidth self._cwEncWidth = cwEncWidth ...
class TableCodec(BaseCodec):
def __init__(self,CodecObj=None,keyEncWidth=20,keyDecWidth=4,cwEncWidth=5,cwDecWidth=1,Policy=None): BaseCodec.__init__(self,CodecObj=CodecObj,Policy=Policy) self._keyEncWidth = keyEncWidth self._keyDecWidth = keyDecWidth self._cwEncWidth = cwEncWidth self._cwDecWidth = cwDec...
if Policy is None: self._Policy = AllowAll() else: self._Policy = Policy def _encode(self, s): return s def encode(self,s): if self._Obj != None: return self._encode(self._Obj.encode(s)) else: return self._encode(s) def _decode...
125
125
418
6
118
jamesmtuck/DORIS
doris/base.py
Python
TableCodec
TableCodec
26
61
26
26
a0bb2460d61ef702e625c8880c9f236b02ef680b
bigcode/the-stack
train
efd6c7c10f88d4756bf2461e
train
class
class BaseCodec(object): def __init__(self,CodecObj=None,Policy=None): self._Obj = CodecObj if Policy is None: self._Policy = AllowAll() else: self._Policy = Policy def _encode(self, s): return s def encode(self,s): if self._Obj != None: ...
class BaseCodec(object):
def __init__(self,CodecObj=None,Policy=None): self._Obj = CodecObj if Policy is None: self._Policy = AllowAll() else: self._Policy = Policy def _encode(self, s): return s def encode(self,s): if self._Obj != None: return self._encode...
from doris.base_conversion import convertIntToBytes,convertBytesToInt class BaseCodec(object):
21
64
147
5
15
jamesmtuck/DORIS
doris/base.py
Python
BaseCodec
BaseCodec
3
24
3
3
80f05b181eb1f582796b8835721a9a3e668029ab
bigcode/the-stack
train
400921bd48295b880615baaa
train
function
def geometric_mean(precisions): return (reduce(operator.mul, precisions)) ** (1.0 / len(precisions))
def geometric_mean(precisions):
return (reduce(operator.mul, precisions)) ** (1.0 / len(precisions))
ge_l_p", "rouge_l_f"] columns_train = np.zeros((len(training_set),len(column_names))) columns_test = np.zeros((len(test_set),len(column_names))) # Word tokenizer - alphanumeric only tokenizer = RegexpTokenizer(r'\w+') def geometric_mean(precisions):
64
64
28
7
56
paultheron-X/INF582-NLP_challenge
scripts/features_generation/rouge_features.py
Python
geometric_mean
geometric_mean
29
30
29
29
c3114992fed29bab90ffbaed052fca399d4a1333
bigcode/the-stack
train
02e9d68fb16c06be24a143de
train
function
def DP(N, M, first): return [[first] * M for n in range(N)]
def DP(N, M, first):
return [[first] * M for n in range(N)]
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 DP(N, M, first):
64
64
20
9
55
kojinho10/pcm
tests/data/test_sb/abc166_a/codes/solve.py
Python
DP
DP
35
35
35
35
5e015b3e6eb0f0ef38ca7dbc64647b11a4ecb1ce
bigcode/the-stack
train
09856e3f73c4ad70fc96b343
train
function
def I(): return int(sys.stdin.readline())
def I():
return int(sys.stdin.readline())
return [int(x) for x in 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():
64
64
9
4
60
kojinho10/pcm
tests/data/test_sb/abc166_a/codes/solve.py
Python
I
I
33
33
33
33
2b37f335b0a4a7aa1c9d0627a971f53b251791ac
bigcode/the-stack
train
6c7c914efb83a46a390f888d
train
function
def F(): return float(sys.stdin.readline())
def F():
return float(sys.stdin.readline())
.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():
64
64
9
4
60
kojinho10/pcm
tests/data/test_sb/abc166_a/codes/solve.py
Python
F
F
34
34
34
34
05fce03da0e5ed6ca7751288573656ef80f10a31
bigcode/the-stack
train
6e2843baf4925115231e5e0d
train
function
def solve(): s = input() if s == "ABC": print("ARC") else: print("ABC") return 0
def solve():
s = input() if s == "ABC": print("ARC") else: print("ABC") return 0
.stdin.readline()) def DP(N, M, first): return [[first] * M for n in range(N)] def DP3(N, M, L, first): return [[[first] * L for n in range(M)] for _ in range(N)] from inspect import currentframe # }}} def solve():
64
64
33
3
61
kojinho10/pcm
tests/data/test_sb/abc166_a/codes/solve.py
Python
solve
solve
40
47
40
40
880a2761701e800c190e6637db7103b5f9a403f2
bigcode/the-stack
train
a01755be2866f82a31badd4e
train
function
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LF():
return [float(x) for x in sys.stdin.readline().split()]
) for i in range(ord('a'), ord('z')+1)] # can also use string module def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF():
64
64
17
4
60
kojinho10/pcm
tests/data/test_sb/abc166_a/codes/solve.py
Python
LF
LF
31
31
31
31
f780b6ff9cfbc785093be1af77ec3f9ffb429ef3
bigcode/the-stack
train
580e0732ac2bc54cab9f21a7
train
function
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI():
return [int(x) for x in sys.stdin.readline().split()]
= 10**20 GOSA = 1.0 / 10**10 MOD = 10**9+7 ALPHABETS = [chr(i) for i in range(ord('a'), ord('z')+1)] # can also use string module def LI():
64
64
17
4
59
kojinho10/pcm
tests/data/test_sb/abc166_a/codes/solve.py
Python
LI
LI
29
29
29
29
5abbb42522946b6bf96183cd0f03150120dae5d3
bigcode/the-stack
train
fa24c806889503370f8a2991
train
function
def LS(): return sys.stdin.readline().split()
def LS():
return sys.stdin.readline().split()
# can also use string module def LI(): return [int(x) for x in 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():
64
64
10
4
60
kojinho10/pcm
tests/data/test_sb/abc166_a/codes/solve.py
Python
LS
LS
32
32
32
32
9c8604df477f75df275a039b0ab8e9d99adf86e2
bigcode/the-stack
train
33e35f24ccbe08822c56f1a6
train
function
def DP3(N, M, L, first): return [[[first] * L for n in range(M)] for _ in range(N)]
def DP3(N, M, L, first):
return [[[first] * L for n in range(M)] for _ in range(N)]
.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def F(): return float(sys.stdin.readline()) def DP(N, M, first): return [[first] * M for n in range(N)] def DP3(N, M, L, first):
64
64
29
12
52
kojinho10/pcm
tests/data/test_sb/abc166_a/codes/solve.py
Python
DP3
DP3
36
36
36
36
7c9b39a3f96897f8dce8495d0f30344dea07a33e
bigcode/the-stack
train
2526ce80e58de0664e5a02e6
train
function
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LI_():
return [int(x)-1 for x in sys.stdin.readline().split()]
MOD = 10**9+7 ALPHABETS = [chr(i) for i in range(ord('a'), ord('z')+1)] # can also use string module def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_():
64
64
19
5
59
kojinho10/pcm
tests/data/test_sb/abc166_a/codes/solve.py
Python
LI_
LI_
30
30
30
30
a407b8ff8e6e67f89a72311cb5f5146d2422e8ad
bigcode/the-stack
train
13a83586a6bf1da14e57948d
train
class
class okcoinusd(okcoin): def describe(self): return self.deep_extend(super(okcoinusd, self).describe(), { # self is a stub file that will be removed before 2020 Q2 # it is placed here for temporary backward compatibility 'id': 'okcoinusd', })
class okcoinusd(okcoin):
def describe(self): return self.deep_extend(super(okcoinusd, self).describe(), { # self is a stub file that will be removed before 2020 Q2 # it is placed here for temporary backward compatibility 'id': 'okcoinusd', })
-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.okcoin import okcoin class okcoinusd(okcoin):
64
64
67
7
56
lostleaf/ccxt
python/ccxt/okcoinusd.py
Python
okcoinusd
okcoinusd
9
16
9
10
876426a767a4f116cf625d0bfb6dd61ee9b8fc04
bigcode/the-stack
train
3988ff4c7fc03914643b7100
train
class
class WorkingDirTestCase(TestCase): @setup def setup_cwd(self): self.cwd = os.getcwd() self.temp_dir = tempfile.mkdtemp() self.second_dir = tempfile.mkdtemp() @teardown def cleanup(self): os.rmdir(self.temp_dir) os.rmdir(self.second_dir) @class_teardown ...
class WorkingDirTestCase(TestCase): @setup
def setup_cwd(self): self.cwd = os.getcwd() self.temp_dir = tempfile.mkdtemp() self.second_dir = tempfile.mkdtemp() @teardown def cleanup(self): os.rmdir(self.temp_dir) os.rmdir(self.second_dir) @class_teardown def check_for_test_pollution(self): ass...
import os import tempfile from testify import TestCase, run, assert_equal, setup, class_teardown, teardown from tests.assertions import assert_raises from tron.utils import tool_utils class WorkingDirTestCase(TestCase): @setup
53
76
254
12
40
dnephin/Tron
tests/utils/tool_utils_test.py
Python
WorkingDirTestCase
WorkingDirTestCase
7
43
7
9
9526962c249c69990a0446c42a0b796bf782866e
bigcode/the-stack
train
6e5d99c16f932a3eed25c7ed
train
function
def session(): """ Returns a :class:`Session` for context-management. .. deprecated:: 1.0.0 This method has been deprecated since version 1.0.0 and is only kept for backwards compatibility. New code should use :class:`~requests.sessions.Session` to create a session. This ma...
def session():
""" Returns a :class:`Session` for context-management. .. deprecated:: 1.0.0 This method has been deprecated since version 1.0.0 and is only kept for backwards compatibility. New code should use :class:`~requests.sessions.Session` to create a session. This may be removed at ...
) def __getstate__(self): state = {attr: getattr(self, attr, None) for attr in self.__attrs__} return state def __setstate__(self, state): for attr, value in state.items(): setattr(self, attr, value) def session():
64
64
91
3
61
kerwin-yang-yang/Bigplatform
flask1/.venv/Lib/site-packages/pip/_vendor/requests/sessions.py
Python
session
session
769
781
769
769
5fc36dcf0b3062693f73ce53e3ba2bfca969edce
bigcode/the-stack
train
d99d2ddf131c0fbcad1248ba
train
class
class Session(SessionRedirectMixin): """A Requests session. Provides cookie persistence, connection-pooling, and configuration. Basic Usage:: >>> import requests >>> s = requests.Session() >>> s.get('https://httpbin.org/get') <Response [200]> Or as a context manag...
class Session(SessionRedirectMixin):
"""A Requests session. Provides cookie persistence, connection-pooling, and configuration. Basic Usage:: >>> import requests >>> s = requests.Session() >>> s.get('https://httpbin.org/get') <Response [200]> Or as a context manager:: >>> with requests.Sessio...
, password = get_auth_from_url(new_proxies[scheme]) except KeyError: username, password = None, None if username and password: headers['Proxy-Authorization'] = _basic_auth_str(username, password) return new_proxies def rebuild_method(self, prepared_request...
256
256
3,553
6
249
kerwin-yang-yang/Bigplatform
flask1/.venv/Lib/site-packages/pip/_vendor/requests/sessions.py
Python
Session
Session
337
766
337
337
e4459f6425d04fd81cad52bb01d8c4de428af9d2
bigcode/the-stack
train
0449871b317641ecae4cffe6
train
function
def merge_setting(request_setting, session_setting, dict_class=OrderedDict): """Determines appropriate setting for a given request, taking into account the explicit setting on that request, and the setting in the session. If a setting is a dictionary, they will be merged together using `dict_class` ...
def merge_setting(request_setting, session_setting, dict_class=OrderedDict):
"""Determines appropriate setting for a given request, taking into account the explicit setting on that request, and the setting in the session. If a setting is a dictionary, they will be merged together using `dict_class` """ if session_setting is None: return request_setting ...
': try: # Python 3.4+ preferred_clock = time.perf_counter except AttributeError: # Earlier than Python 3. preferred_clock = time.clock else: preferred_clock = time.time def merge_setting(request_setting, session_setting, dict_class=OrderedDict):
66
66
221
15
50
kerwin-yang-yang/Bigplatform
flask1/.venv/Lib/site-packages/pip/_vendor/requests/sessions.py
Python
merge_setting
merge_setting
50
78
50
50
c91fbf64a0060be8263e5b2b8a0e5ec54607591b
bigcode/the-stack
train
14d7554a0a0ef7e581b5294a
train
class
class SessionRedirectMixin(object): def get_redirect_target(self, resp): """Receives a Response. Returns a redirect URI or ``None``""" # Due to the nature of how requests processes redirects this method will # be called at least once upon the original response and at least twice ...
class SessionRedirectMixin(object):
def get_redirect_target(self, resp): """Receives a Response. Returns a redirect URI or ``None``""" # Due to the nature of how requests processes redirects this method will # be called at least once upon the original response and at least twice # on each subsequent redirect respon...
_setting if request_setting is None: return session_setting # Bypass if not a dictionary (e.g. verify) if not ( isinstance(session_setting, Mapping) and isinstance(request_setting, Mapping) ): return request_setting merged_setting = dict_class(t...
256
256
2,073
6
250
kerwin-yang-yang/Bigplatform
flask1/.venv/Lib/site-packages/pip/_vendor/requests/sessions.py
Python
SessionRedirectMixin
SessionRedirectMixin
96
334
96
97
c8708a1e51f0c09859e61ff2a0f2b348cfae2ba4
bigcode/the-stack
train
276d3c204dc083e4d1300d15
train
function
def merge_hooks(request_hooks, session_hooks, dict_class=OrderedDict): """Properly merges both requests and session hooks. This is necessary because when request_hooks == {'response': []}, the merge breaks Session hooks entirely. """ if session_hooks is None or session_hooks.get('response') =...
def merge_hooks(request_hooks, session_hooks, dict_class=OrderedDict):
"""Properly merges both requests and session hooks. This is necessary because when request_hooks == {'response': []}, the merge breaks Session hooks entirely. """ if session_hooks is None or session_hooks.get('response') == []: return request_hooks if request_hooks is None or r...
altering # the dictionary during iteration. none_keys = [k for (k, v) in merged_setting.items() if v is None] for key in none_keys: del merged_setting[key] return merged_setting def merge_hooks(request_hooks, session_hooks, dict_class=OrderedDict):
64
64
106
15
48
kerwin-yang-yang/Bigplatform
flask1/.venv/Lib/site-packages/pip/_vendor/requests/sessions.py
Python
merge_hooks
merge_hooks
81
93
81
81
202923d34fecd98948518ec2a77a2e66a2aea343
bigcode/the-stack
train
7b8974ca30f5e0bf88f3f795
train
function
def add_holidays(df, holiday, n): holiday = holiday[holiday['SiteId'] == n] holiday['Date'] = pd.to_datetime(holiday['Date']) holiday['off1'] = 1 holiday = holiday.set_index('Date') holiday['month'] = holiday.index.month holiday['year'] = holiday.index.year holiday['mday'] = holiday.index.da...
def add_holidays(df, holiday, n):
holiday = holiday[holiday['SiteId'] == n] holiday['Date'] = pd.to_datetime(holiday['Date']) holiday['off1'] = 1 holiday = holiday.set_index('Date') holiday['month'] = holiday.index.month holiday['year'] = holiday.index.year holiday['mday'] = holiday.index.day holiday = holiday.reset_inde...
import pandas as pd import numpy as np def add_holidays(df, holiday, n):
20
64
194
10
9
luohaohao33/buidingdataluo
add_holiday.py
Python
add_holidays
add_holidays
5
19
5
5
00a9c6d43b95bfa1cc87661fe881331bc4635bf0
bigcode/the-stack
train
7406edee1d17408865761b67
train
function
def main(): holiday = pd.read_csv('../source/holidays.csv') for i in range(1, 306): train = pd.read_csv('../train_deal_c/train/data_add/data_add{num}.csv'.format(num=i)) test = pd.read_csv('../test_deal_c/test/data_add/data_add{num}.csv'.format(num=i)) train = add_holidays(train, holiday...
def main():
holiday = pd.read_csv('../source/holidays.csv') for i in range(1, 306): train = pd.read_csv('../train_deal_c/train/data_add/data_add{num}.csv'.format(num=i)) test = pd.read_csv('../test_deal_c/test/data_add/data_add{num}.csv'.format(num=i)) train = add_holidays(train, holiday, i) ...
year', 'mday']) df['off2'] = df[['off', 'off1']].max(axis=1) df = df.drop(['off', 'off1'], axis=1) df.rename(columns={'off2': 'off'}, inplace=True) return df def main():
64
64
162
3
60
luohaohao33/buidingdataluo
add_holiday.py
Python
main
main
21
30
21
21
a98e96c28c6f3763fd594bc2961404908aefda68
bigcode/the-stack
train
733aece5f920d99e1f2082e7
train
function
def test_read_exported_txt(): npz_filepath = get_txt_sample_path()[:-3] + "npz" if os.path.exists(npz_filepath): os.remove(npz_filepath) # Read from file mz, intensities = read_exported_txt(get_txt_sample_path()) npt.assert_equal((2, 26947), intensities.shape) npt.assert_equal(os.path.e...
def test_read_exported_txt():
npz_filepath = get_txt_sample_path()[:-3] + "npz" if os.path.exists(npz_filepath): os.remove(npz_filepath) # Read from file mz, intensities = read_exported_txt(get_txt_sample_path()) npt.assert_equal((2, 26947), intensities.shape) npt.assert_equal(os.path.exists(npz_filepath), True) ...
data["mz"], data["intensities"], data["times"] npt.assert_equal(len(intensities.shape), 2) npt.assert_equal(times.size, intensities.shape[0]) npt.assert_equal(mz.size, intensities.shape[1]) def test_read_exported_txt():
64
64
145
7
57
annliirosales/msanalysis
msanalysis/data_extraction/tests/test_utils.py
Python
test_read_exported_txt
test_read_exported_txt
19
32
19
19
d949ab11b770dec50aac582e876f1b090b60c705
bigcode/the-stack
train
6d434631eea46c5f3f50d37d
train
function
def test_read_mzXML(): data = read_mzXML(get_mzXML_sample_path()) mz, intensities, times = data["mz"], data["intensities"], data["times"] npt.assert_equal(len(intensities.shape), 2) npt.assert_equal(times.size, intensities.shape[0]) npt.assert_equal(mz.size, intensities.shape[1])
def test_read_mzXML():
data = read_mzXML(get_mzXML_sample_path()) mz, intensities, times = data["mz"], data["intensities"], data["times"] npt.assert_equal(len(intensities.shape), 2) npt.assert_equal(times.size, intensities.shape[0]) npt.assert_equal(mz.size, intensities.shape[1])
import os import pytest import numpy as np from msanalysis.data_extraction import read_mzXML, read_exported_txt from msanalysis.sample_data import get_mzXML_sample_path, get_txt_sample_path npt = np.testing def test_read_mzXML():
59
64
86
7
51
annliirosales/msanalysis
msanalysis/data_extraction/tests/test_utils.py
Python
test_read_mzXML
test_read_mzXML
11
16
11
11
5babc60620c344a8be682f3f536839bf03ca9228
bigcode/the-stack
train
20be0bd9a012be4cb07782ff
train
class
class TestEntryPoint: def test_shell(self, cli_runner): result = cli_runner.invoke(entry_point) assert not result.exit_code, print_tb(result.exc_info[2]) assert result.output.rstrip("\n").endswith("elis> ")
class TestEntryPoint:
def test_shell(self, cli_runner): result = cli_runner.invoke(entry_point) assert not result.exit_code, print_tb(result.exc_info[2]) assert result.output.rstrip("\n").endswith("elis> ")
from traceback import print_tb from elisctl.main import entry_point class TestEntryPoint:
20
64
52
5
14
proste/elisctl
tests/test_main.py
Python
TestEntryPoint
TestEntryPoint
6
10
6
6
1833fed8216c34efe1b0460d9975885a27747b48
bigcode/the-stack
train
62a5a571623913e84b59a0af
train
class
class TestV1beta1ClusterRoleBindingList(unittest.TestCase): """ V1beta1ClusterRoleBindingList unit test stubs """ def setUp(self): pass def tearDown(self): pass def testV1beta1ClusterRoleBindingList(self): """ Test V1beta1ClusterRoleBindingList """ mode...
class TestV1beta1ClusterRoleBindingList(unittest.TestCase):
""" V1beta1ClusterRoleBindingList unit test stubs """ def setUp(self): pass def tearDown(self): pass def testV1beta1ClusterRoleBindingList(self): """ Test V1beta1ClusterRoleBindingList """ model = kubernetes.client.models.v1beta1_cluster_role_binding_li...
import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1beta1_cluster_role_binding_list import V1beta1ClusterRoleBindingList class TestV1beta1ClusterRoleBindingList(unittest.TestCase):
64
64
100
14
49
jraby/kubernetes-client-python
kubernetes/test/test_v1beta1_cluster_role_binding_list.py
Python
TestV1beta1ClusterRoleBindingList
TestV1beta1ClusterRoleBindingList
25
38
25
25
a4c3b2f07083e710cc4e74861d9ee3d263cf6518
bigcode/the-stack
train
bb3fda54d444461b3ca789aa
train
function
def parse( string ): return TWE_Responce( string )
def parse( string ):
return TWE_Responce( string )
0.1.0' __author__ = 'Asahi Himura <himura@nitolab.com>' __date__ = '13/2/2016' __license__ = "MIT" from .twe_responce import TWE_Responce def parse( string ):
64
64
15
5
58
nc30/twe_parser
twe_parser/__init__.py
Python
parse
parse
17
18
17
17
7ebc415da1a6abd5671e8481b4efe88901910938
bigcode/the-stack
train
5b88861043f3874f86cedf6b
train
function
def main(): """ Module main """ argument_spec = dict( state=dict(choices=['present', 'absent'], default='present'), contact=dict(type='str', required=True) ) argument_spec.update(ce_argument_spec) module = SnmpContact(argument_spec=argument_spec) module.work()
def main():
""" Module main """ argument_spec = dict( state=dict(choices=['present', 'absent'], default='present'), contact=dict(type='str', required=True) ) argument_spec.update(ce_argument_spec) module = SnmpContact(argument_spec=argument_spec) module.work()
'] = self.changed self.results['proposed'] = self.proposed self.results['existing'] = self.existing self.results['end_state'] = self.end_state self.results['updates'] = self.updates_cmd self.module.exit_json(**self.results) def main():
64
64
67
3
61
lancerenteria/doFlask
myprojectenv/lib/python3.5/site-packages/ansible/modules/network/cloudengine/ce_snmp_contact.py
Python
main
main
237
247
237
237
e4cc1cb280a995bdf7c4d09aef6828830bea429d
bigcode/the-stack
train
ed2d5c6d0f1c415f99c0838b
train
class
class SnmpContact(object): """ Manages SNMP contact configuration """ def __init__(self, **kwargs): """ Class init """ # module argument_spec = kwargs["argument_spec"] self.spec = argument_spec self.module = AnsibleModule(argument_spec=self.spec, supports_check_mode=Tru...
class SnmpContact(object):
""" Manages SNMP contact configuration """ def __init__(self, **kwargs): """ Class init """ # module argument_spec = kwargs["argument_spec"] self.spec = argument_spec self.module = AnsibleModule(argument_spec=self.spec, supports_check_mode=True) # config ...
''' changed: description: check to see if a change was made on the device returned: always type: boolean sample: true proposed: description: k/v pairs of parameters passed into module returned: always type: dict sample: {"contact": "call Operator at 010-99999999", "state": ...
228
228
761
6
221
lancerenteria/doFlask
myprojectenv/lib/python3.5/site-packages/ansible/modules/network/cloudengine/ce_snmp_contact.py
Python
SnmpContact
SnmpContact
108
234
108
108
85389a6e52adf47a460c9f4c5185aaef3c68a382
bigcode/the-stack
train
62b7dbae5f222f2055c9de27
train
class
class RepositoryOwner(): """ Represents the owner of a GitHub repository. https://developer.github.com/v4/interface/repositoryowner/ Implemented by: * :class:`~github.AuthenticatedUser` * :class:`~github.Organization` * :class:`~github.User` """ __slots__ = () async def fetc...
class RepositoryOwner():
""" Represents the owner of a GitHub repository. https://developer.github.com/v4/interface/repositoryowner/ Implemented by: * :class:`~github.AuthenticatedUser` * :class:`~github.Organization` * :class:`~github.User` """ __slots__ = () async def fetch_repository(self, name: ...
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 ...
78
78
261
4
74
thestackcoder/notifao_app
myenv/Lib/site-packages/github/abc/repositoryowner.py
Python
RepositoryOwner
RepositoryOwner
19
68
19
19
65ae966c457816e2894ebbf9596e75e3994d45ad
bigcode/the-stack
train
5ddcfec599baa91870910eec
train
class
class FlexbeOnboard(object): """ Controls the execution of robot behaviors. """ def __init__(self, node): self._node = node ProxyPublisher._initialize(self._node) ProxySubscriberCached._initialize(self._node) Logger.initialize(self._node) self.be = None ...
class FlexbeOnboard(object):
""" Controls the execution of robot behaviors. """ def __init__(self, node): self._node = node ProxyPublisher._initialize(self._node) ProxySubscriberCached._initialize(self._node) Logger.initialize(self._node) self.be = None self._tracked_imports = list(...
#!/usr/bin/env python import rclpy from rclpy.exceptions import ParameterNotDeclaredException from rclpy.node import Node import os import sys import inspect import tempfile import threading import time import zlib import contextlib from ast import literal_eval as cast from flexbe_core import BehaviorLibrary, Logger f...
116
256
3,212
7
108
Jmz919/flexbe_behavior_engine
flexbe_onboard/flexbe_onboard/flexbe_onboard.py
Python
FlexbeOnboard
FlexbeOnboard
22
369
22
22
dd2ab7bf5a2fa18a1e03db5e0f8782627b4fad00
bigcode/the-stack
train
84906ab280e64e20a06edb59
train
class
class NuSpec: """ Helper class that provides access to .nuspec file properties """ def __init__(self, path, debug=False): self.path = NuSpec.get_nuspec_at_path(path) if not self.path: raise IOError("Failed to locate .nuspec file at path " + path) self.debug = debug ...
class NuSpec:
""" Helper class that provides access to .nuspec file properties """ def __init__(self, path, debug=False): self.path = NuSpec.get_nuspec_at_path(path) if not self.path: raise IOError("Failed to locate .nuspec file at path " + path) self.debug = debug def get_pac...
import os import xml.etree.ElementTree as ET from ugetcli import utils """ Helper module that provides access to .nuspec file helper methods """ class NuSpec:
38
114
383
4
34
AgeOfLearning/uget-cli
ugetcli/nuspec.py
Python
NuSpec
NuSpec
10
66
10
10
b03e2f65ecc8a7406098a0e7e785ae6f7ca2a8be
bigcode/the-stack
train
517d5d68bcf171526db0b077
train
class
class relpaths: """Relative paths used throughout the workflow.""" #: Path to the showyourwork workflow tex = Path("src") src = Path("src") #: Path to the showyourwork workflow figures = Path("src") / "figures" #: Path to the showyourwork workflow dot_github = Path(".github") #: ...
class relpaths:
"""Relative paths used throughout the workflow.""" #: Path to the showyourwork workflow tex = Path("src") src = Path("src") #: Path to the showyourwork workflow figures = Path("src") / "figures" #: Path to the showyourwork workflow dot_github = Path(".github") #: Path to the temp...
: workflow = user / "showyourwork" / "workflow" #: Path to the temp folder temp = user / ".showyourwork" if _workflow.basedir != "/path/to/repo/": if not temp.exists(): os.mkdir(str(temp)) class relpaths:
64
64
100
4
60
adrn/showyourwork
workflow/rules/paths.py
Python
relpaths
relpaths
39
53
39
39
ff6c25441006a183b46e7f18460e84bbf4881f26
bigcode/the-stack
train
e4b3709aa30ef2c3c50857ec
train
class
class abspaths: """Absolute paths used throughout the workflow.""" #: Path to the user's repository root user = Path(_workflow.basedir).absolute() #: Path to the showyourwork workflow try: workflow = ( Path(_workflow.modules["showyourswork"].snakefile).absolute().parents[0] ...
class abspaths:
"""Absolute paths used throughout the workflow.""" #: Path to the user's repository root user = Path(_workflow.basedir).absolute() #: Path to the showyourwork workflow try: workflow = ( Path(_workflow.modules["showyourswork"].snakefile).absolute().parents[0] ) excep...
for the workflow. """ from pathlib import Path, PurePosixPath import os from sphinx_mock import * _workflow = workflow def posix(path): """Convert a path object to a string containing the posix path.""" return str(PurePosixPath(path)) class abspaths:
64
64
138
5
59
adrn/showyourwork
workflow/rules/paths.py
Python
abspaths
abspaths
18
36
18
18
feccb3fb7ea506bc353e16472566bd5fb3b4b5e7
bigcode/the-stack
train
5a556ad843525ccba5dda643
train
function
def posix(path): """Convert a path object to a string containing the posix path.""" return str(PurePosixPath(path))
def posix(path):
"""Convert a path object to a string containing the posix path.""" return str(PurePosixPath(path))
""" Sets global constants for the workflow. """ from pathlib import Path, PurePosixPath import os from sphinx_mock import * _workflow = workflow def posix(path):
38
64
30
5
32
adrn/showyourwork
workflow/rules/paths.py
Python
posix
posix
13
15
13
13
1891610598e6dba5665815a4468bb36639be0029
bigcode/the-stack
train
6009c805cc7d51c9afd583bd
train
class
class GetNodeInfoRequestFilter(RequestFilter): def __init__(self): # `getNodeInfo` does not accept any parameters. # Using a filter here just to enforce that the request is empty. super(GetNodeInfoRequestFilter, self).__init__({})
class GetNodeInfoRequestFilter(RequestFilter):
def __init__(self): # `getNodeInfo` does not accept any parameters. # Using a filter here just to enforce that the request is empty. super(GetNodeInfoRequestFilter, self).__init__({})
:py:meth:`cornode.api.Strictcornode.get_node_info`. """ command = 'getNodeInfo' def get_request_filter(self): return GetNodeInfoRequestFilter() def get_response_filter(self): return GetNodeInfoResponseFilter() class GetNodeInfoRequestFilter(RequestFilter):
64
64
57
9
55
Cornode/cornode.lib.py
src/cornode/commands/core/get_node_info.py
Python
GetNodeInfoRequestFilter
GetNodeInfoRequestFilter
30
34
30
30
44a6317065f3142c285abfef5bca4ca80596aded
bigcode/the-stack
train
164c482c8154d86211a8d0c6
train
class
class GetNodeInfoCommand(FilterCommand): """ Executes `getNodeInfo` command. See :py:meth:`cornode.api.Strictcornode.get_node_info`. """ command = 'getNodeInfo' def get_request_filter(self): return GetNodeInfoRequestFilter() def get_response_filter(self): return GetNodeInfoResponseFilter()
class GetNodeInfoCommand(FilterCommand):
""" Executes `getNodeInfo` command. See :py:meth:`cornode.api.Strictcornode.get_node_info`. """ command = 'getNodeInfo' def get_request_filter(self): return GetNodeInfoRequestFilter() def get_response_filter(self): return GetNodeInfoResponseFilter()
, print_function, \ unicode_literals import filters as f from cornode import TransactionHash from cornode.commands import FilterCommand, RequestFilter, ResponseFilter from cornode.filters import Trytes __all__ = [ 'GetNodeInfoCommand', ] class GetNodeInfoCommand(FilterCommand):
64
64
76
8
56
Cornode/cornode.lib.py
src/cornode/commands/core/get_node_info.py
Python
GetNodeInfoCommand
GetNodeInfoCommand
15
27
15
15
6fb6ee85a52addd6128710f7bfcb17637c5586a1
bigcode/the-stack
train
f4c1bdeeb4b40524ca702fef
train
class
class GetNodeInfoResponseFilter(ResponseFilter): def __init__(self): super(GetNodeInfoResponseFilter, self).__init__({ 'latestMilestone': f.ByteString(encoding='ascii') | Trytes(result_type=TransactionHash), 'latestSolidSubtangleMilestone': f.ByteString(encoding='ascii') | Trytes(resu...
class GetNodeInfoResponseFilter(ResponseFilter):
def __init__(self): super(GetNodeInfoResponseFilter, self).__init__({ 'latestMilestone': f.ByteString(encoding='ascii') | Trytes(result_type=TransactionHash), 'latestSolidSubtangleMilestone': f.ByteString(encoding='ascii') | Trytes(result_type=TransactionHash), })
InfoRequestFilter(RequestFilter): def __init__(self): # `getNodeInfo` does not accept any parameters. # Using a filter here just to enforce that the request is empty. super(GetNodeInfoRequestFilter, self).__init__({}) class GetNodeInfoResponseFilter(ResponseFilter):
63
64
83
9
55
Cornode/cornode.lib.py
src/cornode/commands/core/get_node_info.py
Python
GetNodeInfoResponseFilter
GetNodeInfoResponseFilter
37
45
37
37
8ce27b54064629f5252f8edc8ebaacdd537f58de
bigcode/the-stack
train
cbf11183515078e4d9e0fcba
train
function
def plot_roc(fpr, tpr, logit_roc_auc): plt.figure() plt.plot(fpr, tpr, label='Logistic Regression (area = %0.2f)' % logit_roc_auc) plt.plot([0, 1], [0, 1], 'r--') plt.xlim([0.0, 1.05]) plt.ylim([0.0, 1.05]) plt.xlabel('False Positive Rate') plt.ylabel('True Positive Rate') plt.title('ROC...
def plot_roc(fpr, tpr, logit_roc_auc):
plt.figure() plt.plot(fpr, tpr, label='Logistic Regression (area = %0.2f)' % logit_roc_auc) plt.plot([0, 1], [0, 1], 'r--') plt.xlim([0.0, 1.05]) plt.ylim([0.0, 1.05]) plt.xlabel('False Positive Rate') plt.ylabel('True Positive Rate') plt.title('ROC curve') plt.legend(loc="lower righ...
fpr, tpr, thresholds = roc_curve(y_test, logreg.predict_proba(X_test)[:,1]) # Plot the FPR vs. TPR, and the diagonal line representing the null model. # In[14]: def plot_roc(fpr, tpr, logit_roc_auc):
64
64
140
16
48
iammowgoud/class_notebooks
scripts/Logistic regression.py
Python
plot_roc
plot_roc
239
250
239
239
5f92003c7aabc28b883fd4098fe5d3a400d6705f
bigcode/the-stack
train
8c97c3111aacc77bde904455
train
function
def print_metainformation(meta): print('Available types:', meta['description']['dtype'].unique()) print('{} Features'.format(meta['description'].shape[0])) print('{} categorical features'.format(len(meta['categorical_features']))) print('{} numerical features'.format(len(meta['numerical_features']))) ...
def print_metainformation(meta):
print('Available types:', meta['description']['dtype'].unique()) print('{} Features'.format(meta['description'].shape[0])) print('{} categorical features'.format(len(meta['categorical_features']))) print('{} numerical features'.format(len(meta['numerical_features']))) print('{} categorical features ...
_features'] = categorical_features meta['categorical_features_na'] = categorical_features_na meta['numerical_features'] = numerical_features meta['numerical_features_na'] = numerical_features_na meta['complete_features'] = complete_features return meta def print_metainformation(meta):
64
64
117
7
56
iammowgoud/class_notebooks
scripts/Logistic regression.py
Python
print_metainformation
print_metainformation
68
75
68
68
28286a6ec53b3548ae17a684d301cdde99f4757f
bigcode/the-stack
train
a59e0add8d8081ee561f8efb
train
function
def plot_descriptive(data): fig = plt.figure(figsize=(9, 4)) gs = GridSpec(1, 3, width_ratios=[3, 1, 1]) ax0 = plt.subplot(gs[0]) ax0 = plt.scatter(data.balance[data.default==0], data.income[data.default==0], label='default=No', marker...
def plot_descriptive(data):
fig = plt.figure(figsize=(9, 4)) gs = GridSpec(1, 3, width_ratios=[3, 1, 1]) ax0 = plt.subplot(gs[0]) ax0 = plt.scatter(data.balance[data.default==0], data.income[data.default==0], label='default=No', marker='.', c='red', alpha=0.5) ...
payment, on the basis of annual income and monthly credit card balance. # # It is worth noting that figure below displays a very pronounced relationship between the predictor balance and the response default. In most real applications, the relationship between the predictor and the response will not be nearly so stro...
69
69
233
6
63
iammowgoud/class_notebooks
scripts/Logistic regression.py
Python
plot_descriptive
plot_descriptive
336
358
336
336
1cd982466d8d33b3b07bc98766771de4d31ff75d
bigcode/the-stack
train
7a0f2337ead65bb27e6eabf7
train
function
def plot_classes(show=True): plt.scatter(data.balance[data.default==0], data.default[data.default==0], marker='o', color='red', alpha=0.5) plt.scatter(data.balance[data.default==1], data.default[data.default==1], marker='+', color='green', alph...
def plot_classes(show=True):
plt.scatter(data.balance[data.default==0], data.default[data.default==0], marker='o', color='red', alpha=0.5) plt.scatter(data.balance[data.default==1], data.default[data.default==1], marker='+', color='green', alpha=0.7) plt.xlabel('Balanc...
range between 0 and 1. Then for any given value of `balance`, a prediction can be made for `default`. For example, one might predict `default = Yes` for any individual for whom $p(balance) > 0.5$. # In[22]: def plot_classes(show=True):
64
64
115
6
58
iammowgoud/class_notebooks
scripts/Logistic regression.py
Python
plot_classes
plot_classes
378
389
378
378
a5c21bbd19ccccbe2888ec2253f97ae2ea9fe679
bigcode/the-stack
train
f4904258a06560fa5ecee831
train
function
def model(x): return 1 / (1 + np.exp(-x))
def model(x):
return 1 / (1 + np.exp(-x))
(show=False) plt.plot(sigm.x.values, sigm.y.values, color='black', linewidth=3); plt.xlim(1925, 1990) plt.title('Zooming the Sigmoid') plt.tight_layout() plt.show() # In[26]: def model(x):
64
64
17
4
60
iammowgoud/class_notebooks
scripts/Logistic regression.py
Python
model
model
442
443
442
442
58c0d644e0bd4b7b5cccbd256b7d45ff6bbc802f
bigcode/the-stack
train
7fc7cd6d709593d27c4aab50
train
function
def dataframe_metainformation(df): meta = dict() descr = pd.DataFrame({'dtype': df.dtypes, 'NAs': df.isna().sum()}) categorical_features = descr.loc[descr['dtype'] == 'object'].index.values.tolist() numerical_features = descr.loc[descr['dtype'] != 'object'].index.values.tolist() numerical_features_n...
def dataframe_metainformation(df):
meta = dict() descr = pd.DataFrame({'dtype': df.dtypes, 'NAs': df.isna().sum()}) categorical_features = descr.loc[descr['dtype'] == 'object'].index.values.tolist() numerical_features = descr.loc[descr['dtype'] != 'object'].index.values.tolist() numerical_features_na = descr.loc[(descr['dtype'] != 'o...
_complete_prepared.csv.gz') data.head() # Lets build a dataframe that will contain the type and number of NAs that each feature contains. We will use it to decide what variables to select. We will now from there what features are numerical and categorical, and how many contain NAs. # In[3]: def dataframe_metainforma...
71
71
237
7
64
iammowgoud/class_notebooks
scripts/Logistic regression.py
Python
dataframe_metainformation
dataframe_metainformation
51
66
51
51
ede7bf7afa90c4606a9e9a8c77c9273fdb050b64
bigcode/the-stack
train
ad141f29bc0fed95510580e5
train
function
def plot_sigmoid(): plt.figure(figsize=(10,4)) plt.subplot(1, 2, 1) plot_classes(show=False) plt.plot(sigm.x.values, sigm.y.values, color='black', linewidth=3); plt.title('Sigmoid') plt.subplot(1, 2, 2) plot_classes(show=False) plt.plot(sigm.x.values, sigm.y.values, color='black', linew...
def plot_sigmoid():
plt.figure(figsize=(10,4)) plt.subplot(1, 2, 1) plot_classes(show=False) plt.plot(sigm.x.values, sigm.y.values, color='black', linewidth=3); plt.title('Sigmoid') plt.subplot(1, 2, 2) plot_classes(show=False) plt.plot(sigm.x.values, sigm.y.values, color='black', linewidth=3); plt.xli...
y_test) print('Accuracy on test: {:.2f}'.format(acc_test)) print(confusion_matrix(y_test, y_pred)) print(classification_report(y_test, y_pred)) # And now represent where is the model setting the separation function between the two classes. # In[25]: def plot_sigmoid():
64
64
130
5
59
iammowgoud/class_notebooks
scripts/Logistic regression.py
Python
plot_sigmoid
plot_sigmoid
423
436
423
423
2580359a9131c4673acbd17fb9cf2cd8f9f82bec
bigcode/the-stack
train