AhmedSSoliman
commited on
Commit
•
3841fa3
1
Parent(s):
db57706
Upload 12 files
Browse files- Output.txt +0 -0
- config.json +194 -0
- merges.txt +0 -0
- predictions.txt +1805 -0
- pytorch_model.bin +3 -0
- references.txt +1805 -0
- special_tokens_map.json +15 -0
- tokenizer.json +0 -0
- tokenizer_config.json +16 -0
- trainer_state.json +2125 -0
- training_args.bin +3 -0
- vocab.json +0 -0
Output.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
config.json
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_commit_hash": null,
|
3 |
+
"_name_or_path": "./distilroberta-marian-training",
|
4 |
+
"architectures": [
|
5 |
+
"EncoderDecoderModel"
|
6 |
+
],
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"decoder": {
|
9 |
+
"_name_or_path": "Helsinki-NLP/opus-mt-en-nl",
|
10 |
+
"_num_labels": 3,
|
11 |
+
"activation_dropout": 0.0,
|
12 |
+
"activation_function": "swish",
|
13 |
+
"add_bias_logits": false,
|
14 |
+
"add_cross_attention": true,
|
15 |
+
"add_final_layer_norm": false,
|
16 |
+
"architectures": [
|
17 |
+
"MarianMTModel"
|
18 |
+
],
|
19 |
+
"attention_dropout": 0.0,
|
20 |
+
"bad_words_ids": [
|
21 |
+
[
|
22 |
+
67027
|
23 |
+
]
|
24 |
+
],
|
25 |
+
"bos_token_id": 0,
|
26 |
+
"chunk_size_feed_forward": 0,
|
27 |
+
"classif_dropout": 0.0,
|
28 |
+
"classifier_dropout": 0.0,
|
29 |
+
"cross_attention_hidden_size": null,
|
30 |
+
"d_model": 512,
|
31 |
+
"decoder_attention_heads": 8,
|
32 |
+
"decoder_ffn_dim": 2048,
|
33 |
+
"decoder_layerdrop": 0.0,
|
34 |
+
"decoder_layers": 6,
|
35 |
+
"decoder_start_token_id": 67027,
|
36 |
+
"decoder_vocab_size": 67028,
|
37 |
+
"diversity_penalty": 0.0,
|
38 |
+
"do_sample": false,
|
39 |
+
"dropout": 0.1,
|
40 |
+
"early_stopping": false,
|
41 |
+
"encoder_attention_heads": 8,
|
42 |
+
"encoder_ffn_dim": 2048,
|
43 |
+
"encoder_layerdrop": 0.0,
|
44 |
+
"encoder_layers": 6,
|
45 |
+
"encoder_no_repeat_ngram_size": 0,
|
46 |
+
"eos_token_id": 0,
|
47 |
+
"exponential_decay_length_penalty": null,
|
48 |
+
"finetuning_task": null,
|
49 |
+
"forced_bos_token_id": null,
|
50 |
+
"forced_eos_token_id": 0,
|
51 |
+
"id2label": {
|
52 |
+
"0": "LABEL_0",
|
53 |
+
"1": "LABEL_1",
|
54 |
+
"2": "LABEL_2"
|
55 |
+
},
|
56 |
+
"init_std": 0.02,
|
57 |
+
"is_decoder": true,
|
58 |
+
"is_encoder_decoder": false,
|
59 |
+
"label2id": {
|
60 |
+
"LABEL_0": 0,
|
61 |
+
"LABEL_1": 1,
|
62 |
+
"LABEL_2": 2
|
63 |
+
},
|
64 |
+
"length_penalty": 1.0,
|
65 |
+
"max_length": 512,
|
66 |
+
"max_position_embeddings": 512,
|
67 |
+
"min_length": 0,
|
68 |
+
"model_type": "marian",
|
69 |
+
"no_repeat_ngram_size": 0,
|
70 |
+
"normalize_before": false,
|
71 |
+
"normalize_embedding": false,
|
72 |
+
"num_beam_groups": 1,
|
73 |
+
"num_beams": 4,
|
74 |
+
"num_hidden_layers": 6,
|
75 |
+
"num_return_sequences": 1,
|
76 |
+
"output_attentions": false,
|
77 |
+
"output_hidden_states": false,
|
78 |
+
"output_scores": false,
|
79 |
+
"pad_token_id": 67027,
|
80 |
+
"prefix": null,
|
81 |
+
"problem_type": null,
|
82 |
+
"pruned_heads": {},
|
83 |
+
"remove_invalid_values": false,
|
84 |
+
"repetition_penalty": 1.0,
|
85 |
+
"return_dict": true,
|
86 |
+
"return_dict_in_generate": false,
|
87 |
+
"scale_embedding": true,
|
88 |
+
"sep_token_id": null,
|
89 |
+
"share_encoder_decoder_embeddings": true,
|
90 |
+
"static_position_embeddings": true,
|
91 |
+
"task_specific_params": null,
|
92 |
+
"temperature": 1.0,
|
93 |
+
"tf_legacy_loss": false,
|
94 |
+
"tie_encoder_decoder": false,
|
95 |
+
"tie_word_embeddings": true,
|
96 |
+
"tokenizer_class": null,
|
97 |
+
"top_k": 50,
|
98 |
+
"top_p": 1.0,
|
99 |
+
"torch_dtype": null,
|
100 |
+
"torchscript": false,
|
101 |
+
"transformers_version": "4.23.0.dev0",
|
102 |
+
"typical_p": 1.0,
|
103 |
+
"use_bfloat16": false,
|
104 |
+
"use_cache": true,
|
105 |
+
"vocab_size": 67028
|
106 |
+
},
|
107 |
+
"decoder_start_token_id": 0,
|
108 |
+
"encoder": {
|
109 |
+
"_name_or_path": "distilroberta-base",
|
110 |
+
"add_cross_attention": false,
|
111 |
+
"architectures": [
|
112 |
+
"RobertaForMaskedLM"
|
113 |
+
],
|
114 |
+
"attention_probs_dropout_prob": 0.1,
|
115 |
+
"bad_words_ids": null,
|
116 |
+
"bos_token_id": 0,
|
117 |
+
"chunk_size_feed_forward": 0,
|
118 |
+
"classifier_dropout": null,
|
119 |
+
"cross_attention_hidden_size": null,
|
120 |
+
"decoder_start_token_id": null,
|
121 |
+
"diversity_penalty": 0.0,
|
122 |
+
"do_sample": false,
|
123 |
+
"early_stopping": false,
|
124 |
+
"encoder_no_repeat_ngram_size": 0,
|
125 |
+
"eos_token_id": 2,
|
126 |
+
"exponential_decay_length_penalty": null,
|
127 |
+
"finetuning_task": null,
|
128 |
+
"forced_bos_token_id": null,
|
129 |
+
"forced_eos_token_id": null,
|
130 |
+
"hidden_act": "gelu",
|
131 |
+
"hidden_dropout_prob": 0.1,
|
132 |
+
"hidden_size": 768,
|
133 |
+
"id2label": {
|
134 |
+
"0": "LABEL_0",
|
135 |
+
"1": "LABEL_1"
|
136 |
+
},
|
137 |
+
"initializer_range": 0.02,
|
138 |
+
"intermediate_size": 3072,
|
139 |
+
"is_decoder": false,
|
140 |
+
"is_encoder_decoder": false,
|
141 |
+
"label2id": {
|
142 |
+
"LABEL_0": 0,
|
143 |
+
"LABEL_1": 1
|
144 |
+
},
|
145 |
+
"layer_norm_eps": 1e-05,
|
146 |
+
"length_penalty": 1.0,
|
147 |
+
"max_length": 20,
|
148 |
+
"max_position_embeddings": 514,
|
149 |
+
"min_length": 0,
|
150 |
+
"model_type": "roberta",
|
151 |
+
"no_repeat_ngram_size": 0,
|
152 |
+
"num_attention_heads": 12,
|
153 |
+
"num_beam_groups": 1,
|
154 |
+
"num_beams": 1,
|
155 |
+
"num_hidden_layers": 6,
|
156 |
+
"num_return_sequences": 1,
|
157 |
+
"output_attentions": false,
|
158 |
+
"output_hidden_states": false,
|
159 |
+
"output_scores": false,
|
160 |
+
"pad_token_id": 1,
|
161 |
+
"position_embedding_type": "absolute",
|
162 |
+
"prefix": null,
|
163 |
+
"problem_type": null,
|
164 |
+
"pruned_heads": {},
|
165 |
+
"remove_invalid_values": false,
|
166 |
+
"repetition_penalty": 1.0,
|
167 |
+
"return_dict": true,
|
168 |
+
"return_dict_in_generate": false,
|
169 |
+
"sep_token_id": null,
|
170 |
+
"task_specific_params": null,
|
171 |
+
"temperature": 1.0,
|
172 |
+
"tf_legacy_loss": false,
|
173 |
+
"tie_encoder_decoder": false,
|
174 |
+
"tie_word_embeddings": true,
|
175 |
+
"tokenizer_class": null,
|
176 |
+
"top_k": 50,
|
177 |
+
"top_p": 1.0,
|
178 |
+
"torch_dtype": null,
|
179 |
+
"torchscript": false,
|
180 |
+
"transformers_version": "4.23.0.dev0",
|
181 |
+
"type_vocab_size": 1,
|
182 |
+
"typical_p": 1.0,
|
183 |
+
"use_bfloat16": false,
|
184 |
+
"use_cache": true,
|
185 |
+
"vocab_size": 50265
|
186 |
+
},
|
187 |
+
"eos_token_id": 2,
|
188 |
+
"is_encoder_decoder": true,
|
189 |
+
"max_length": 512,
|
190 |
+
"model_type": "encoder-decoder",
|
191 |
+
"pad_token_id": 1,
|
192 |
+
"torch_dtype": "float32",
|
193 |
+
"transformers_version": null
|
194 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
predictions.txt
ADDED
@@ -0,0 +1,1805 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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ATOR ), HttpAP )
|
7 |
+
def validate ( self, value ) :
|
8 |
+
self. can_read. release ( )
|
9 |
+
__contains__ = has_header
|
10 |
+
if self. feed [ 'ttl' ] is not None :
|
11 |
+
def render ( self, context ) :
|
12 |
+
import datetime
|
13 |
+
if size :
|
14 |
+
raise TypeError ( "Non- integer base36 input." )
|
15 |
+
def size ( self, name ) :
|
16 |
+
new_ip = ip_str. split ( ':' )
|
17 |
+
from decimal import Decimal, DecimalException
|
18 |
+
except AttributeError :
|
19 |
+
from django. core import signing
|
20 |
+
__Y = r'(?P<year>\d{4}'
|
21 |
+
value = self. pop ( key, default )
|
22 |
+
if constant_time_compare ( k, self. sign ( value ) ) :
|
23 |
+
return tempdir
|
24 |
+
raise TemplateSyntaxError ( "'templatetag' statement takes one argument" )
|
25 |
+
p_pattern = pattern. regex. pattern
|
26 |
+
if command. verbosity > 1 :
|
27 |
+
else :
|
28 |
+
style = method. split ( ',' )
|
29 |
+
if isinstance ( s, Promise ) :
|
30 |
+
return '', val = ''
|
31 |
+
if options [ 'outlog' ] :
|
32 |
+
raise TemplateSyntaxError ( " only'silent' flags is allowed the cycle name, '%s'." % ( name, cycleup )
|
33 |
+
parser. add_argument ('migration_name', nargs = '?', help = 'Nominates a database to '
|
34 |
+
full_module_name = package_name + '.' + module_name
|
35 |
+
statements = sql_all ( app_config, self. style, connection )
|
36 |
+
handler. name = name
|
37 |
+
return new_value
|
38 |
+
current = getattr ( current, bit )
|
39 |
+
self. use_natural_foreign_keys = options. pop ( 'use_natural_primary_keys', None )
|
40 |
+
pass
|
41 |
+
except AttributeError :
|
42 |
+
def with_metaclass ( meta, * bases ) :
|
43 |
+
commands. update ( { name : find_config_name for name in path. update ( path ) ) if name in app_configs
|
44 |
+
def attach ( self, filename = None, content = None, mimetype = None ) :
|
45 |
+
def load_command_class ( app_name, name ) :
|
46 |
+
url = quote ( url, safe = b'*;@@&&+++$' )
|
47 |
+
for ldir in dirs :
|
48 |
+
_fields_ = [ ( '_offset', _OFFSET', PValueID ], PValueIDID ] )
|
49 |
+
return self. render ( )
|
50 |
+
renderer = CheckboxFieldRenderer
|
51 |
+
field_name = force_text ( field_name, encoding, errors )
|
52 |
+
def initial_form_count ( self ) :
|
53 |
+
continue
|
54 |
+
def __init__ ( self, language, deactivate = False ) :
|
55 |
+
raise TemplateSyntaxError ( "Invalid arguments provided to simple_tag" )
|
56 |
+
_format_cache [ cache_key ] = val
|
57 |
+
from django. utils. encoding import python_2_unicode_compatible
|
58 |
+
widget = URLInput
|
59 |
+
def __init__ ( self, data = None ) :
|
60 |
+
signal ='signals'
|
61 |
+
return bool ( ret )
|
62 |
+
from django. core. exceptions import ImproperlyConfigured
|
63 |
+
foreals = dict ( color_names [ x ], "3", x. name )
|
64 |
+
return "< DeserializedObject: %s.%s(pk=%s)>" % ( self. _meta. app_label
|
65 |
+
parser. add_argument ( '--extensions', '-e', dest = 'extensions', dest = 'extensions'
|
66 |
+
@ register. filter ( is_safe = False )
|
67 |
+
if response. streaming :
|
68 |
+
words = force_text ( text_split_re ). split ( )
|
69 |
+
def parse_http_date_safe ( date ) :
|
70 |
+
from xml. s import handler
|
71 |
+
use_natural_foreign_keys = options. get ( 'use_natural_foreign_keys' )
|
72 |
+
return RegexURLResolver ( r'^/', ns_resolver )
|
73 |
+
return timedelta ( 0 )
|
74 |
+
self. loaddata ( fixture_labels )
|
75 |
+
def __setitem__ ( self, key, value ) :
|
76 |
+
pass
|
77 |
+
except UnicodeDecodeError :
|
78 |
+
self. instance = opts. model ( )
|
79 |
+
compile_func, kwargs = generic_tag_comp compile ( params = params, varargs = varargs, varkw = defaults
|
80 |
+
raise CommandError ( "Unknown application: %s" % app_label )
|
81 |
+
self. data = data or { }
|
82 |
+
from __future__ import unicode_literals
|
83 |
+
if form. cleaned_data and form. cleaned_data [ field ] is not None :
|
84 |
+
key = self. make_key ( key, version = version )
|
85 |
+
primary_keys = [ ]
|
86 |
+
self. _populate ( )
|
87 |
+
save.al_data = True
|
88 |
+
if value is not result :
|
89 |
+
if command. use_argparse :
|
90 |
+
return attr
|
91 |
+
if num > self. _max_entries :
|
92 |
+
strip_entities = allow_lazy ( strip_entities, six. text_type )
|
93 |
+
return self. strptime ( value, format )
|
94 |
+
parser. add_argument ( '--no-ignore', action ='store_false', dest = 'no_ignore', default
|
95 |
+
from django. core. management. sql import sql_delete
|
96 |
+
self. _deleted_form_indexes. append ( i )
|
97 |
+
if args [ - 1 ]!= "silent" :
|
98 |
+
self. _unget_history = [ ]
|
99 |
+
elif not isinstance ( file_name, six. string_types ) and is_iterable ( file_name ) :
|
100 |
+
form = ManagementForm ( auto_id = self. auto_id, prefix = self. prefix, formfield_form = attrs, prefix
|
101 |
+
if isinstance ( receiver, types. FunctionType ) :
|
102 |
+
def __text_cast ( self ) :
|
103 |
+
else :
|
104 |
+
del ( key, version = version )
|
105 |
+
from __future__ import unicode_literals
|
106 |
+
def urletet ofrunc ( value, limit, autoescape = None ) :
|
107 |
+
return False
|
108 |
+
if self. can_delete :
|
109 |
+
nodelist_true = parser. parse ( ( 'else', end_tag ) )
|
110 |
+
from django. utils. safestring import mark_safe
|
111 |
+
def stringformat ( value, arg ) :
|
112 |
+
guessed_filename = params. get ( 'filename', None )
|
113 |
+
return self. text
|
114 |
+
import os
|
115 |
+
return lazy_number ( ungettext, six. text_type, singular = singular, plural = plural, plural = plural_html = True
|
116 |
+
open_tags = [ ]
|
117 |
+
if name is None :
|
118 |
+
self. blocks = list ( defaultdict )
|
119 |
+
return None
|
120 |
+
clean = lambda self, x : len ( x )
|
121 |
+
return apps. get_model ('auth', 'permissions' )
|
122 |
+
template_with_clear = '%(clear)s<label for="(clear_checkbox_id)s</label>'
|
123 |
+
def invalid_block_tag ( self, token, command, parse_until = None ) :
|
124 |
+
except ImportError :
|
125 |
+
@ register. tag ( 'with', parser. compile_filter ( max_value_expr ), ** kwargs )
|
126 |
+
def pretty_name ( name ) :
|
127 |
+
while len ( line ) > max_width :
|
128 |
+
pass
|
129 |
+
data_value = data if data is not None else [ ]
|
130 |
+
return re. compile ( r'^(?:0-9', number, 0, count_Dict )
|
131 |
+
response = None
|
132 |
+
fk = _get_foreign_key ( parent_model, model, fk_name = fk_name )
|
133 |
+
self. unlink ( self. name )
|
134 |
+
chunk = stream. read ( max_header_size )
|
135 |
+
for label in app_labels :
|
136 |
+
fixture. close ( )
|
137 |
+
if len ( val1 )!= len ( val2 ) :
|
138 |
+
else :
|
139 |
+
return '\n'. join ( output )
|
140 |
+
default_validators = [ validators. validate_ipv4_address ]
|
141 |
+
except ( LookupError, Badascii ) as e :
|
142 |
+
from functools import wraps
|
143 |
+
self. urlconf_module = self. urlconf_name
|
144 |
+
pass
|
145 |
+
rem -= len ( emit )
|
146 |
+
memo = { }
|
147 |
+
indent = options. get ( "indent" )
|
148 |
+
def __init__ ( self, regex ) :
|
149 |
+
help = ''
|
150 |
+
last = self. data. day // 10
|
151 |
+
for location in format_locations :
|
152 |
+
raise ValueError ( "Unable to convert %r" % value )
|
153 |
+
def recipients ( self ) :
|
154 |
+
six. reraise ( UnreadablePostError, UnreadablePostError ( * e. args ), sys. exc_info ( ) [ 2
|
155 |
+
for fname in filelist :
|
156 |
+
return LANG_INFO [ generic_lang_code ]
|
157 |
+
return metaclass ( 'temporary_class', { } )
|
158 |
+
for k, v in ** kwargs :
|
159 |
+
if options [ 'plain' ] :
|
160 |
+
def get_internal_wsgi_application ( ) :
|
161 |
+
for lineno, line in enumerate ( content. splitlines ( True ) ) :
|
162 |
+
def contains ( source, inst ) :
|
163 |
+
def __getitem__ ( self, key ) :
|
164 |
+
if pathext is None :
|
165 |
+
else :
|
166 |
+
__all__ = ( 'WSGIServer', 'WSGIRequestHandler' )
|
167 |
+
except Exception :
|
168 |
+
error_dict. setdefault ( NON_FIELD_ERRORS, [ ] )
|
169 |
+
with open ( old_file_name, 'rb' ) as f :
|
170 |
+
parser. add_argument ( '--keep-pot', action ='store_true', dest = 'use_true', default
|
171 |
+
try :
|
172 |
+
idstring = '.' + idstring
|
173 |
+
return self. filter ( name, func, ** flags )
|
174 |
+
if len_values < 1 :
|
175 |
+
pass
|
176 |
+
self. file. seek ( 0 )
|
177 |
+
if link is not None :
|
178 |
+
except StopUpload as e :
|
179 |
+
open_method, mode = self.compformats [ ctype_fmt ]
|
180 |
+
else :
|
181 |
+
from django. forms import Form
|
182 |
+
if text [ 0 ] in 'xX' :
|
183 |
+
inner_html = '<ul{id_attr}></ul>'
|
184 |
+
def _get_size_from_underlying_file ( self ) :
|
185 |
+
from django. utils. six. moves. urllib. parse import urlparse
|
186 |
+
self. _stream = stream
|
187 |
+
return Header ( value, 'utf-8', maxlinen = sys. maxsize ( ) ). encode ( )
|
188 |
+
self. seconds = parser. expression ( bp )
|
189 |
+
tok = match. group ( name )
|
190 |
+
else :
|
191 |
+
else :
|
192 |
+
super ( JsonResponse, self ). __init__ ( content = data, * args, ** kwargs )
|
193 |
+
length = int ( arg )
|
194 |
+
self. configure_logger ( name, loggers [ name ], True )
|
195 |
+
if start > upto :
|
196 |
+
def compile_messages ( self, locations ) :
|
197 |
+
excluded_apps. add ( app_config )
|
198 |
+
return self. represent_scalues ( 'tag:yaml.m2, data: strs', str ( data ) )
|
199 |
+
known_models = [ ]
|
200 |
+
run_syncdb = False
|
201 |
+
class pylibMCCCache ( BaseMemcachedCache ) :
|
202 |
+
import re
|
203 |
+
try :
|
204 |
+
return b''. join ( [ t ) + F ( t [ : r ] ) + 1 ]
|
205 |
+
return lang_code
|
206 |
+
elif str ( level ) == level :
|
207 |
+
self. _raw_ipv6 = False
|
208 |
+
default_validators = [ validators.URLValidator ( ) ]
|
209 |
+
if item [ 'unique_id' ] is not None :
|
210 |
+
return formats. date_format ( value, arg )
|
211 |
+
import warnings
|
212 |
+
class Request LocalTimezone ( tzinfo ) :
|
213 |
+
clean = self. clean ( value )
|
214 |
+
from django. utils import six
|
215 |
+
color_names = ('-','re', 'j', 'jango', 'May', 'May',
|
216 |
+
if language_code not in self. _regex_dict :
|
217 |
+
def _make_parser ( self ) :
|
218 |
+
from django. core. exceptions import ValidationError
|
219 |
+
return instance
|
220 |
+
if CONTEXT_SEPARATOR in result :
|
221 |
+
Iterator = object
|
222 |
+
if indent :
|
223 |
+
def Z ( self ) :
|
224 |
+
self. current_app = current_app
|
225 |
+
name = args [ 1 ]
|
226 |
+
html_class_attr = ''
|
227 |
+
return ( ( self ) < other or ( self. __get__ is not None else ( other, ) )
|
228 |
+
from __future__ import unicode_literals
|
229 |
+
import sys
|
230 |
+
def validate ( request ) :
|
231 |
+
from django. utils import six
|
232 |
+
class DummyCache ( BaseCache ) :
|
233 |
+
if getattr ( e, 'winerror', 16 ) and getattr ( 'errno', 13 ) :
|
234 |
+
from django. conf import settings
|
235 |
+
want_unicode = True
|
236 |
+
msgs = self. copy_plural_forms ( msgs, locale )
|
237 |
+
getattr ( request, 'LANGUAGE_CODE', get_language ( request, 'LANGUAGE_CODE )
|
238 |
+
return int ( timeout )
|
239 |
+
parser. add_argument ( '--database', default = DEFAULT_DB_ALIAS, help = 'database', default = DEFAULT
|
240 |
+
self. _fname = None
|
241 |
+
raise TypeError ( msg )
|
242 |
+
if self. cc :
|
243 |
+
for k, v in ret. items ( ) :
|
244 |
+
return mark_safe ( ''. join ( bits ) )
|
245 |
+
DjangoSafeDumper. add_render ( decimal. Decimal, DjangoSafeDumper. represent_decimal )
|
246 |
+
self. error ( rawdata [ i : j ]: %r" % e )
|
247 |
+
def __exit__ ( self, exc_type, exc_value, traceback ) :
|
248 |
+
field_desc += '. join ( [ ')' for k, v in extra_params. items ( ) ] )
|
249 |
+
cursor = hashlib ( dirs )
|
250 |
+
while current_chunk :
|
251 |
+
loop_dict [ 'first' ] = i == 0
|
252 |
+
content_type, content_type_extra = meta_data. get ( 'content-type', None )
|
253 |
+
def pop ( self, k, * args ) :
|
254 |
+
def add_truncation_text ( self, text, truncate = None ) :
|
255 |
+
parser. add_argument ( '--fail-parser', action ='store_true', dest = 'database', default = DE_
|
256 |
+
chars = 'abcdefghijklmnopqrstststuvzinfo.@^_= formats
|
257 |
+
digits = len ( digittuple )
|
258 |
+
__version__ = "0.1"
|
259 |
+
self. max_expr = max_expr
|
260 |
+
class DeserializationError ( Exception ) :
|
261 |
+
if autoescape :
|
262 |
+
def force_bytes ( s, encoding = 'utf-8', strings_only = False, errors ='strict' ) :
|
263 |
+
except VariableDoesNotExist :
|
264 |
+
regex_re = re. compile ( r"""^(?:(?P<addr>(?P<ipv4,3{
|
265 |
+
data = self. form. initial. get ( self. name, self. initial )
|
266 |
+
signals. request_finished. connect ( cache. close )
|
267 |
+
return None
|
268 |
+
return iter ( self. file )
|
269 |
+
prefix = settings. MEDIA_URL
|
270 |
+
smlob_path = os. path. join ( tmpdir,'sysml' )
|
271 |
+
def render ( self, context ) :
|
272 |
+
use_natural_primary_keys = options. get ( 'use_natural_primary_keys' )
|
273 |
+
def inner ( self, * args ) :
|
274 |
+
if '::' not in ip_str and len ( ':' )!= 7 :
|
275 |
+
parser. add_argument ( 'args', metavar = 'app_label', nargs = '*', help = '
|
276 |
+
if os. path. exists ( django_po ) :
|
277 |
+
now = datetime. now ( )
|
278 |
+
kwargs [ 'tzinfo' ] = tzinfo
|
279 |
+
raise ValidationError ( self. error_messages [ 'list' ], code = 'list' )
|
280 |
+
class MigrationEmailHandler ( logging.Handler ) :
|
281 |
+
t = select_template ( template_name, dirs )
|
282 |
+
if value in self. empty_values and self. required :
|
283 |
+
except TypeError :
|
284 |
+
from io import BytesIO
|
285 |
+
tell = property ( lambda self : self. file. tell )
|
286 |
+
continue
|
287 |
+
parser. delete_first_token ( )
|
288 |
+
class FieldField ( ChoiceField ) :
|
289 |
+
import fcntl
|
290 |
+
if can_fail :
|
291 |
+
if template_source_loaders is None :
|
292 |
+
callback = pattern. _callback
|
293 |
+
call_command ( 'loaddata', * fixture_labels, ** kwargs )
|
294 |
+
if value is None :
|
295 |
+
return int ( value )
|
296 |
+
elif '=' in part :
|
297 |
+
compare_to = [ var. resolve ( context, True ) for var in var_list ]
|
298 |
+
def to_python ( self, value ) :
|
299 |
+
elif isinstance ( value, decimal. Decimal, float, six. integer_types ) :
|
300 |
+
@ contextlib. contextmanager
|
301 |
+
if event. path. endswith ( '.mo' ) :
|
302 |
+
if node. must_be_first and nodelist :
|
303 |
+
return False
|
304 |
+
self. auto_id = auto_id
|
305 |
+
def rss_attributes ( self ) :
|
306 |
+
return ungettext_lazy ( 'Ensure this value has at least %(limit_value)d, % ( force_text (
|
307 |
+
if six. PY3 :
|
308 |
+
for k, v in six. iteritems ( self ) :
|
309 |
+
pass
|
310 |
+
def b64_hmac ( salt, value, key ) :
|
311 |
+
del _active. value
|
312 |
+
for basedir in basedirs :
|
313 |
+
else :
|
314 |
+
full_path = self. path ( name )
|
315 |
+
if not self. form. is_bound :
|
316 |
+
del self. dicts [ - 1 ] [ key ]
|
317 |
+
self. reader_leaves ( )
|
318 |
+
_regex_re = re. compile ( r"""^(?:(?:a-z0-9]+[A-Z0-9
|
319 |
+
class Widget ( six. with_metaclass ( MediaDefiningClass ) ) :
|
320 |
+
get_language = lambda settings. LANGUAGE_CODE
|
321 |
+
from django. utils. six. moves. urllib. parse import urlsplit, urlunsplit
|
322 |
+
from email. mime. text import MIMEText
|
323 |
+
self. fed = [ ]
|
324 |
+
class MaxLengthValidator ( BaseValidator ) :
|
325 |
+
self. lookups = None
|
326 |
+
raise TypeError ( " if the flags is set, regex must be a normal expression." )
|
327 |
+
return default
|
328 |
+
attrs. get ('step',step )
|
329 |
+
import sys
|
330 |
+
break
|
331 |
+
value = ''
|
332 |
+
to_delete. add ( model )
|
333 |
+
file_, _, _, _ = imp. find_module ( module_name, [ entry ] )
|
334 |
+
self. _cache = _caches. setdefault ( name, { } )
|
335 |
+
html4_singets = ( '10', 'col', 'link', 'html', 'html', 'html'
|
336 |
+
if os. path. isdir ( template_dir ) :
|
337 |
+
def make_key ( self, key, version = None ) :
|
338 |
+
return self. __name
|
339 |
+
if not match :
|
340 |
+
def to_python ( self, value ) :
|
341 |
+
def lower ( value ) :
|
342 |
+
ip ( )
|
343 |
+
connection = connections [ database ]
|
344 |
+
def _format_value ( self, value ) :
|
345 |
+
args = parse_header ( boundary ( 'ascii' ) )
|
346 |
+
initial = self. initial. get ( name, field. initial )
|
347 |
+
from django. utils import six
|
348 |
+
if data in self. children :
|
349 |
+
elif isinstance ( timezone, six. string_types ) and pytz is not None :
|
350 |
+
@ register. filter ( is_safe = True )
|
351 |
+
status_code = 300
|
352 |
+
if i >= self. initial_form_count ( ) and not form. has_changed ( ) :
|
353 |
+
return ord ( bs [ 0 ] )
|
354 |
+
if is_ignored ( file_path, self. ignore_patterns ) :
|
355 |
+
if app_config. models_module is None or app_config in excluded_apps :
|
356 |
+
return code
|
357 |
+
chunks = ( zip ( ', 'ascii' ), ( ), ( ), ( ) )
|
358 |
+
else :
|
359 |
+
message = e
|
360 |
+
FormSet = modelformset_factory ( model, str ( 'FormSet', '_num', max_max ) )
|
361 |
+
rest = value
|
362 |
+
raise SuspiciousFileOperation ( "arsed access to '%s' and name." % name )
|
363 |
+
hidden_widget = SplitHiddenDateTimeWidget
|
364 |
+
for node in compiled_parent. nodelist :
|
365 |
+
if isinstance ( template_name, ( list, tuple ) ) :
|
366 |
+
def get_str_from_wsgi ( environ, key, default ) :
|
367 |
+
model_models = model. check ( ** kwargs ) for model in apps. get_models ( ) ]
|
368 |
+
def initial_form_count ( self ) :
|
369 |
+
def j ( self ) :
|
370 |
+
pass
|
371 |
+
if format not in _serializers :
|
372 |
+
return int ( tzinfo ) > int ( tzinfo [ 3 : 3 ] ) + int ( tzinfo ) + int ( tz
|
373 |
+
return False
|
374 |
+
if not content_type :
|
375 |
+
elif cwords [ 0 ] in sorted ( subcommands ) and 'help' in _ ( 'help' ) :
|
376 |
+
return ip_str
|
377 |
+
else :
|
378 |
+
class HttpResponseForbidden ( HttpResponse ) :
|
379 |
+
return
|
380 |
+
nodes. append ( self )
|
381 |
+
if instance is None :
|
382 |
+
if ip_str. split ( ':' )!= hextet :
|
383 |
+
for app_dir in app_dirs :
|
384 |
+
DEBUG = 300
|
385 |
+
os. chdir ( our_home_dir )
|
386 |
+
config ['mail' ] = self. as_tuple ( config ['mailhost' ] )
|
387 |
+
obj. widgets = copy. deepcopy ( self. widgets )
|
388 |
+
yield buf. read ( )
|
389 |
+
if not isinstance ( self. regex, six. string_types ) :
|
390 |
+
if hasattr ( timezone, 'normalize' ) :
|
391 |
+
from django. utils import termcolors
|
392 |
+
except ( ssl. SLError, smtplib. SMTPutor ) :
|
393 |
+
self. stdout. write ( 'ignoring file %s in %s\n' % ( filename, dirpath ) )
|
394 |
+
default_settings = module_to_dict ( global_settings )
|
395 |
+
self. imp = self. imp ( used )
|
396 |
+
def decorating_function ( user_function ) :
|
397 |
+
pass
|
398 |
+
key = self. to_field_name or 'pk'
|
399 |
+
stats [ MISSES ] += 1
|
400 |
+
return False
|
401 |
+
from django. utils import six
|
402 |
+
if self. is_reversed :
|
403 |
+
for line in text. splitlines ( True ) :
|
404 |
+
return value
|
405 |
+
return self. forms [ index ]
|
406 |
+
if isinstance ( path, six. string_types ) :
|
407 |
+
all_models = [ ]
|
408 |
+
truncate_text = self. add_truncation_text ( '', truncate )
|
409 |
+
help = "Prints the SQL statements for the named migration."
|
410 |
+
initial = [ ]
|
411 |
+
value = arg. replace ( arg, value )
|
412 |
+
httpd = httpd_cls ( server_address, WSGIRequestHandler, ipv6 = ipv6 )
|
413 |
+
_urllib_request_moved_attributes = [ MovedAttribute ( "c", "urllib", "ur
|
414 |
+
def empty_form ( self ) :
|
415 |
+
def handle ( self, * args, ** options ) :
|
416 |
+
other_dict = args
|
417 |
+
if params. get ( 'filename' ) :
|
418 |
+
try :
|
419 |
+
raise TemplateSyntaxError ( "'%s' is not a valid tag library: %s" % ( taglib, e ) )
|
420 |
+
_translations [ language ] = Djangolations ( language )
|
421 |
+
c = subject [ i ]
|
422 |
+
return IfchangedNode ( nodelist_true, nodelist_false, * values )
|
423 |
+
from django. core. management. base import BaseCommand, CommandError
|
424 |
+
_version = "0. ser"
|
425 |
+
finally :
|
426 |
+
guessed_path = path. join ( tempdir, guessed_filename )
|
427 |
+
else :
|
428 |
+
value = '.'. join ( reversed ( parts ) )
|
429 |
+
def __init__ ( self ) :
|
430 |
+
class RssStns1Feed ( RssFeed ) :
|
431 |
+
new_filenames += os. path. join ( dirpath, filename )
|
432 |
+
parser. add_argument ( '-v', '--osity', action ='store_true', dest = 'interactive'
|
433 |
+
urlconf = settings. new_POT_urLCONF
|
434 |
+
return [ '', [ ] ], [ ]
|
435 |
+
else :
|
436 |
+
continue
|
437 |
+
def dec ( func ) :
|
438 |
+
if old_attr is None :
|
439 |
+
name, val = forbid_multi_line_headers ( name, val, self. encoding )
|
440 |
+
class Input ( Widget ) :
|
441 |
+
handler. startElement ( "channel", self. root_attributes ( ) )
|
442 |
+
opts = ( s for s in opt_dict. keys ( ) )
|
443 |
+
warnings. warn ( "django.utils.tzinfo. FixedOffset will be removed in Django 1.9.", RemovedInDjango
|
444 |
+
self. fixture_object_count = 0
|
445 |
+
extra_classes. add ( self. form. required_css_class )
|
446 |
+
from django. utils import six
|
447 |
+
filelist = int ( num_cull_entries, self. _cull_frequency )
|
448 |
+
try :
|
449 |
+
if os. path. exists ( new_path ) :
|
450 |
+
class Lexer ( object ) :
|
451 |
+
error_messages = opts. error_messages [ NON_FIELD_ERRORS ]
|
452 |
+
self. _table = table
|
453 |
+
return _trans. to_locale ( language )
|
454 |
+
tempdir = tempfile. mkdtemp ( prefix = prefix, suffix = '_ext extract' )
|
455 |
+
tt = ( ( [ tt ], [ tt ] ) [ 1 : ] )
|
456 |
+
except Exception as e :
|
457 |
+
def __iter__ ( self ) :
|
458 |
+
else :
|
459 |
+
os. chmod ( full_path, self. file_permissions_mode )
|
460 |
+
for fname in glob.glob1 ( self. _dir, * args ) :
|
461 |
+
for log in existing :
|
462 |
+
for app_label in app_labels :
|
463 |
+
return fastcgi_help ( "Invalid * host + port, socket." )
|
464 |
+
def as_widget ( self, widget = None, attrs = None, only_initial = False ) :
|
465 |
+
return
|
466 |
+
SINGLE_BRACE_END = '}'
|
467 |
+
url = 'view.decorators.cache.%s' % ( key_prefix, str ( urllib, 'cache' ) )
|
468 |
+
label = conditional_escape ( checkbox_id )
|
469 |
+
else :
|
470 |
+
if self. interactive :
|
471 |
+
yield safe_join ( template_dir, template_name )
|
472 |
+
if delta < 0 :
|
473 |
+
def error ( self, message ) :
|
474 |
+
return template_name
|
475 |
+
def update_watch ( sender = None, ** kwargs ) :
|
476 |
+
else :
|
477 |
+
val2 = self. var2. resolve ( context, True )
|
478 |
+
class NullBooleanSelect ( Select ) :
|
479 |
+
if not isinstance ( value, ( bytes, six. text_type ) ) :
|
480 |
+
parser. add_argument ( '--noinput', action ='store_false', dest = 'interactive', default = True
|
481 |
+
return default
|
482 |
+
try :
|
483 |
+
msguniq_options = [ '--to-code=utf-8' ]
|
484 |
+
if self. locale_paths :
|
485 |
+
version = get_complete_version ( version )
|
486 |
+
return strip_prefix = lambda s : s [ 'a-z0-9' ]
|
487 |
+
ns = "http://www.w3. os. getto/to/ path"
|
488 |
+
else :
|
489 |
+
app_dir = os. path. join ( app_config. path, 'fixtures' )
|
490 |
+
from gzip import GzipFile
|
491 |
+
self. active_writers = 0
|
492 |
+
raise ValueError ( "alternative base36 input input." )
|
493 |
+
def __eq__ ( self ) :
|
494 |
+
try :
|
495 |
+
tag, self. lasttag = match. group ( 1 ). lower ( )
|
496 |
+
else :
|
497 |
+
secret = settings. SECRET_KEY
|
498 |
+
project_name, target = options. pop ( 'name', 'dummy' )
|
499 |
+
logger = logging. getLogger ( 'django.request' )
|
500 |
+
tmpdir = tempfile. mkdtemp ( )
|
501 |
+
def handle_m2m ( value ) :
|
502 |
+
except ImportError as e :
|
503 |
+
self. stdout. write ( " No else features." )
|
504 |
+
moved_oved_oved_attributes = MovedModule ( "_thread", "thread" )
|
505 |
+
locale = options. get ( 'locale' )
|
506 |
+
self. cookies [ key ] = cookie_date ( [ key ] )
|
507 |
+
if isinstance ( f, models. FileField ) :
|
508 |
+
os. unlink ( work_file )
|
509 |
+
_regex_re = re. compile ( r"""^\s*transtrans(\s+context\s+*?"*(?:
|
510 |
+
import time as _time
|
511 |
+
raise CommandError ( "Django't does not use to use the SQL statements, " "\n" % app_label )
|
512 |
+
if self. verbosity > 0 :
|
513 |
+
def delete ( self, key, version = None ) :
|
514 |
+
if representative is None :
|
515 |
+
self. language = language
|
516 |
+
callable = callable
|
517 |
+
iteritems = _iteritems
|
518 |
+
continue
|
519 |
+
sign Name = "%4d" % dt. year
|
520 |
+
m = re. match (ipipip_re, options [ 'addrport' ] )
|
521 |
+
if isinstance ( template, ( list, tuple ) ) :
|
522 |
+
def __exit__ ( self, exc_type, exc_value, tb ) :
|
523 |
+
yield "from__ import unicode_literals
|
524 |
+
try :
|
525 |
+
if timeout is None :
|
526 |
+
def end_serialization ( self ) :
|
527 |
+
if att_name == 'id' and extra_params == { 'invalid' : True } :
|
528 |
+
try :
|
529 |
+
parser. add_argument ( '--plain', action ='store_true', dest = 'plain', default = True, help
|
530 |
+
class DisallowedRedirect ( SuspiciousOperation ) :
|
531 |
+
else :
|
532 |
+
raise CommandError ( "You must provide at least one app label if using." )
|
533 |
+
i = 0
|
534 |
+
if value and hasattr ( value, 'url' ) :
|
535 |
+
self. validate_key ( key )
|
536 |
+
if i >= 0 :
|
537 |
+
elif indexes [ column_name ] [ 'unique' ] :
|
538 |
+
else :
|
539 |
+
assert to not isinstance ( six. string_types, '"to" argument must be a list or tuple' )
|
540 |
+
WSGIServer = module. WSGIServer
|
541 |
+
def _createdir ( self ) :
|
542 |
+
if message_context :
|
543 |
+
else :
|
544 |
+
sites = [ ]
|
545 |
+
def set ( self, key, value, timeout = DEFAULT_TIMEOUT, version = None ) :
|
546 |
+
def setlistdefault ( self, key, default_list = None ) :
|
547 |
+
self. widgetchoices = self. choices
|
548 |
+
trim_whitespace_re = re. compile ( '\s*\n\s*' )
|
549 |
+
input_type = 'text'
|
550 |
+
def __getinitargs__ ( self ) :
|
551 |
+
raise
|
552 |
+
location = '%s:%s' % self. get_full_path ( )
|
553 |
+
msgs = msgs. decode ( 'utf-8' )
|
554 |
+
try :
|
555 |
+
from django. utils import six
|
556 |
+
raise ValueError ( 'Unable to configure handler''%r: %s' % ( name, e ) )
|
557 |
+
with self. mutex :
|
558 |
+
from django. middleware.csrf import get_token
|
559 |
+
except OSError as e :
|
560 |
+
value = self. make_bytes ( value )
|
561 |
+
queryset = self. model. _default_manager
|
562 |
+
if settings. USE_TZ and value is not None and timezone. is_naive ( value ) :
|
563 |
+
with transaction. atomic ( using = connection. alias, savepoint = connection. features. can_rollback_ddl ) :
|
564 |
+
if serializers is None :
|
565 |
+
return self. find_template_cache [ key ]
|
566 |
+
def flatten ( self ) :
|
567 |
+
def is_valid_ipv6_address ( ip_str ) :
|
568 |
+
pass
|
569 |
+
url = None
|
570 |
+
self. _request_middleware = None
|
571 |
+
import importlib
|
572 |
+
self. version = params. get ('version', 1 )
|
573 |
+
if not isinstance ( index, six. integer_types, tuple ) :
|
574 |
+
@ register. filter ( is_safe = False )
|
575 |
+
members = [ member for member in self. _archive. get members ( ) for member in self. items ( ) ]
|
576 |
+
return obj
|
577 |
+
return list ( urlsplit ( url ) )
|
578 |
+
else :
|
579 |
+
raise AttributeError ( "%s cannot be import " % self. name )
|
580 |
+
if self. verbosity > 1 :
|
581 |
+
def validate ( self, value ) :
|
582 |
+
self. _cache. set ( key, value, self. get_backend_timeout ( timeout ) )
|
583 |
+
from django. utils. six. moves import zip
|
584 |
+
self. _setup ( )
|
585 |
+
builtins = [ ]
|
586 |
+
except ValueError :
|
587 |
+
logger_kwargs [ 'out_log' ] = options [ 'outlog' ]
|
588 |
+
return
|
589 |
+
MIN_NUM_FORM_COUNT = 'MIN_NUM_FORMS'
|
590 |
+
validate_conETA_separated_string_list = RegexValidator ( _separated_int_list, _ ( 'Enter
|
591 |
+
def is_checked ( self ) :
|
592 |
+
return self. management_form. cleaned_data [INITIAL_FORM_COUNT ]
|
593 |
+
pass
|
594 |
+
forclable in self. _closable_objects :
|
595 |
+
def __init__ ( self, * args, ** kwargs ) :
|
596 |
+
from django. forms. fields import Field, FileField
|
597 |
+
self. file. close ( )
|
598 |
+
parts = viewname. split ( ':' )
|
599 |
+
raise ValidationError ( ungettext ( "invalid", "gettext_num", self. min_message = _gettext
|
600 |
+
def get_json_data ( self, escape_html = False ) :
|
601 |
+
MAXSIZE = int ( ( 1 << 31 ) - 1 )
|
602 |
+
yield ''
|
603 |
+
result. parent = self
|
604 |
+
message = message. replace ( '\r\n', '\n' ). replace ( '\r', '\n'
|
605 |
+
return 1 << [ 2 : - 2 ]
|
606 |
+
def _populate ( self ) :
|
607 |
+
if not token. contents :
|
608 |
+
from django. core import checks
|
609 |
+
if len ( parts ) > 1 and parts [ - 1 ] in self. compression_formats :
|
610 |
+
newline = b'\n'
|
611 |
+
def widget_attrs ( self, widget ) :
|
612 |
+
pot_path = os. path. join ( path, '%s.pot' % self. domain )
|
613 |
+
for field, error_list in error. items ( ) :
|
614 |
+
def _set_regex ( self, regex ) :
|
615 |
+
if dirname and not os. path. exists ( dirname ) :
|
616 |
+
output_transaction = True
|
617 |
+
return force_text ( ngettext ( singular, plural, number ) )
|
618 |
+
def add_prefix ( self, field_name ) :
|
619 |
+
return False
|
620 |
+
try :
|
621 |
+
original_path = os. path. join ( tmpdir, " original" )
|
622 |
+
in_index = index if is_reversed else 2
|
623 |
+
lexer = lexer_class ( template_string, origin )
|
624 |
+
self. _non_form_errors = self. error_class ( )
|
625 |
+
if hasattr ( test_runner_class, 'add_arguments' ) :
|
626 |
+
def __repr__ ( self ) :
|
627 |
+
if var. endswith ( '.' ) :
|
628 |
+
import json
|
629 |
+
options = [ opt [ 0 ] if opt in options [ 0 ] not in var_opts ]
|
630 |
+
fs_encoding = sys. getfilesfilesencoding ( ) or not self. getfilespath ( )
|
631 |
+
if isinstance ( message, ValidationError ) :
|
632 |
+
def __init__ ( self, stream_or_string, ** options ) :
|
633 |
+
return _import_module ( self. mod )
|
634 |
+
continue
|
635 |
+
if isinstance ( slots, str ) :
|
636 |
+
self. __starttag_text = None
|
637 |
+
return int ( bytes ) for bytes in buf
|
638 |
+
raise UnrecognizedArchiveFormat ( "File object not a than archive format." )
|
639 |
+
self. options. update ( dictionary, 'use_decimal' )
|
640 |
+
def validate ( self, value ) :
|
641 |
+
fail_message = 'created'
|
642 |
+
state = { "pk : Tok ( Tok ( "pkg", "pkg", "pk", "rel",
|
643 |
+
for item in values :
|
644 |
+
def utcoffset ( self, dt ) :
|
645 |
+
leave_locale_alone = False
|
646 |
+
from __future__ import unicode_literals
|
647 |
+
def __str__ ( self ) :
|
648 |
+
end = rawdata [ k : endpos ]. strip ( )
|
649 |
+
zipfile. ZipFile. read ( self, self. nelist [ 0 ] )
|
650 |
+
def render ( self, context ) :
|
651 |
+
confirm = 'Please must be "yes" or "no:" '
|
652 |
+
return b'\v4" % b'\\0', "\\03", "\\#3" )
|
653 |
+
widget. is_localized = self. is_localized
|
654 |
+
klass. deconstruct = deconstruct
|
655 |
+
if extend :
|
656 |
+
connection = connections [ options [ 'database' ] ]
|
657 |
+
try :
|
658 |
+
warnings. warn ( "No fixture named '%s' found." % fixture_name )
|
659 |
+
return self. data. replace ( month = 1, day = 1 ). replace ( 1 )
|
660 |
+
if self. lookups is not None :
|
661 |
+
initial_path = os. path. join ( migrations_directory, "__init__.py" )
|
662 |
+
return value
|
663 |
+
value = timezone. normalize ( value )
|
664 |
+
@ property
|
665 |
+
subject = self. subject
|
666 |
+
return '0'
|
667 |
+
super ( LoaderOrigin, self ). __init__ ( display_name )
|
668 |
+
if pos >= last :
|
669 |
+
from django. conf import settings
|
670 |
+
def normalize ( pattern ) :
|
671 |
+
import operator
|
672 |
+
finally :
|
673 |
+
def tzname ( self, dt ) :
|
674 |
+
if self. allow_files :
|
675 |
+
if not custom_sql :
|
676 |
+
msg = SafeMIMEMultipart ( _subtype = self. alternatives_subtype, encoding = encoding )
|
677 |
+
if field in self. cleaned_data :
|
678 |
+
if args and kwargs :
|
679 |
+
builtins. append ( import_library ( module ) )
|
680 |
+
return self. compress ( [ ] )
|
681 |
+
def parse_endtag ( self, i ) :
|
682 |
+
import types
|
683 |
+
def M ( self ) :
|
684 |
+
self. creation_counter = Field. creation_counter
|
685 |
+
attrs = {'model' : model }
|
686 |
+
except ( ImportError, AttributeError ) as e :
|
687 |
+
def __getitem__ ( self, key ) :
|
688 |
+
if '=' in x :
|
689 |
+
def tell ( self ) :
|
690 |
+
raise AttributeError ( "This QueryDict instance is_ object" )
|
691 |
+
@ python_2_unicode_compatible
|
692 |
+
if p. find ( ':' in p. find ( ':' ) >= 0 :
|
693 |
+
flags = 0
|
694 |
+
target_app_labels_only = False
|
695 |
+
class IfchangedNode ( Node ) :
|
696 |
+
p open ( file ). check ( ). open ( )
|
697 |
+
if self. selected_fields is None or field. attname in self. selected_fields :
|
698 |
+
name = self. split_leading_dir ( name ) [ 0 ]
|
699 |
+
from django. utils import six
|
700 |
+
except AttributeError :
|
701 |
+
return arg
|
702 |
+
return _trans. get_language_from_path ( path )
|
703 |
+
if db. settings_ddef getattr ( 'AT must provideICES', db. alias, 'atomic_atomic_ vES'
|
704 |
+
class InlineForeignKeyField ( Field ) :
|
705 |
+
if is_aware ( o ) :
|
706 |
+
try :
|
707 |
+
self. years = [ this_year ] + 10_year
|
708 |
+
for refto, refs in references. items ( ) :
|
709 |
+
from django. core. exceptions import AppRegistryNotReady
|
710 |
+
settings.FORMATAT_MODULE_PATH = settings.FORMAT_MODULE_PATH
|
711 |
+
if ch in '*?+' :
|
712 |
+
try :
|
713 |
+
else :
|
714 |
+
if send :
|
715 |
+
http = http_cookies. SimpleCookie ( ). value_encode ( ";" )
|
716 |
+
nodelist_empty = parser. parse ( ( 'endfor', ) )
|
717 |
+
except ( KeyError, AttributeError ) as exc :
|
718 |
+
class objectDoesNotExist ( Exception ) :
|
719 |
+
@ register. filter ( is_safe = False )
|
720 |
+
return iri
|
721 |
+
value = environ. get ( key, str ( default ) )
|
722 |
+
def __init__ ( self, lexer ) :
|
723 |
+
return time. mktime ( self. data. timeetuple ( ) )
|
724 |
+
try :
|
725 |
+
safe_data = { }
|
726 |
+
import stat
|
727 |
+
def write_items ( self, handler ) :
|
728 |
+
wrap = allow_lazy ( wrap, six. text_type )
|
729 |
+
from __future__ import unicode_literals
|
730 |
+
for path in paths :
|
731 |
+
sys. stdout. write ( self. main_help_text ( ) + '\n' )
|
732 |
+
def __init__ ( self ) :
|
733 |
+
import sys
|
734 |
+
def ngettext ( context, singular, plural, number ) :
|
735 |
+
def reload ( self ) :
|
736 |
+
from django. utils. module_loading import import_string
|
737 |
+
else :
|
738 |
+
continue
|
739 |
+
import warnings
|
740 |
+
if exp is not None and exp < time. time ( ) :
|
741 |
+
if t is not None :
|
742 |
+
time_str = time_str. decode ( 'utf-8' )
|
743 |
+
field_notes. append ( "Field renamed because it wasn." )
|
744 |
+
super ( QueryDict, self ). __setitem__ ( key, value )
|
745 |
+
def write_message ( self, message ) :
|
746 |
+
def list ( self ) :
|
747 |
+
return mark_safe ( '\n'. join ( output ) )
|
748 |
+
super ( LocaleRegexURLResolver, self ). __init__ ( None, urlconf_name, default_kwargs, namespace
|
749 |
+
var_obj = None
|
750 |
+
response = middleware. process_template_response ( request, response )
|
751 |
+
loop_dict [ 'counter' ] = i + 1
|
752 |
+
return size
|
753 |
+
is_a_names = hasattr ( sys. stdout, 'isatty' ) and not sys. stdout. is_to
|
754 |
+
if isinstance ( offset, timedelta ) :
|
755 |
+
self. _assert_mutable ( )
|
756 |
+
return int ( values [ 0 ] ), ch
|
757 |
+
import codecs
|
758 |
+
try :
|
759 |
+
@ register. tag
|
760 |
+
result. setFormatter ( formatter )
|
761 |
+
memo [ id ( self ) ] = result
|
762 |
+
other = other. __cast ( )
|
763 |
+
if isinstance ( other, Promise ) :
|
764 |
+
else :
|
765 |
+
self. _cull ( )
|
766 |
+
e. args = ( "Problem installing [ fixture: %s" % e )
|
767 |
+
os. makedirs ( directory )
|
768 |
+
raise OverflowError ( 'dklen too large' )
|
769 |
+
return clean_ipv6_address ( value, self. unpack_ipv4 )
|
770 |
+
from importlib import import_module
|
771 |
+
parser. add_argument ( '--pks', action ='store_true', dest = 'use_base', default =
|
772 |
+
if header_end == - 1 :
|
773 |
+
def b ( s ) :
|
774 |
+
g = loader. ByGenerator ( fp, pickle_from_ = False )
|
775 |
+
import unicodedata
|
776 |
+
if t. token_type == TOKEN_BLOCK :
|
777 |
+
if len ( self. nelist ) :
|
778 |
+
else :
|
779 |
+
for medium in extend :
|
780 |
+
if url :
|
781 |
+
from collections import defaultdict
|
782 |
+
now = datetime. datetime ( now. year, now. month, now. day )
|
783 |
+
while i < len ( subject ) and subject [ i ]!= c :
|
784 |
+
self. _changed_data = [ ]
|
785 |
+
yield parse_boundary_stream ( sub_stream, 1024 )
|
786 |
+
return value. replace ( tzinfo )
|
787 |
+
def __init__ ( self, cyclevars, variable_name = None, silent = False ) :
|
788 |
+
if six. PY3 :
|
789 |
+
return value. strftime ( format )
|
790 |
+
logger_kwargs [ 'errlog' ] = options [ 'errlog' ]
|
791 |
+
for migration_name in migration_names :
|
792 |
+
from itertools import chain
|
793 |
+
return obj_dict
|
794 |
+
buffer_ = line
|
795 |
+
raise ValueError ( "Key '%s' not found" % key )
|
796 |
+
if self. _request_middleware is None :
|
797 |
+
def render ( self, name, value, attrs = None ) :
|
798 |
+
TYPE = RAW
|
799 |
+
TYPE = FILE
|
800 |
+
tok = '"' + roots + '"'
|
801 |
+
condition = TemplateIfParser ( parser, bits ). parse ( )
|
802 |
+
return apps. get_model ( model_identifier )
|
803 |
+
return loader. get_template ( template )
|
804 |
+
def cl ( ) :
|
805 |
+
def handle_data ( self, d ) :
|
806 |
+
def lock ( f, flags ) :
|
807 |
+
template_string = force_text ( template_string )
|
808 |
+
if not os. path. exists ( potfile ) :
|
809 |
+
self. active_writers -= 1
|
810 |
+
if hasattr ( self, '_coerce' ) :
|
811 |
+
return _trans.templatize ( src, origin )
|
812 |
+
def compile_string ( template_string, origin ) :
|
813 |
+
try :
|
814 |
+
raise NotImplementedError ( 'Subclasses must define this method.' )
|
815 |
+
@ wraps ( func )
|
816 |
+
return value. replace ( '\x0', '\x0' )
|
817 |
+
request_middleware. append ( mw_instance. process_request )
|
818 |
+
if not boundary or cgi. valid_boundary ( boundary ) :
|
819 |
+
val = list ( val )
|
820 |
+
except ValueError :
|
821 |
+
import re
|
822 |
+
over = allow_lazy ( capfirst, six. text_type ) + [ six. text_type ( )
|
823 |
+
def eval ( self, context ) :
|
824 |
+
from django. utils. six import StringIO
|
825 |
+
self. _size = size
|
826 |
+
errors = [ ]
|
827 |
+
if 'error_messages' in kwargs :
|
828 |
+
self. _add_local_translations ( )
|
829 |
+
class Node ( object ) :
|
830 |
+
if os. path. sep in fixture_name :
|
831 |
+
def __init__ ( self, tokens ) :
|
832 |
+
if primary_keys :
|
833 |
+
def __mod__ ( self, rhs ) :
|
834 |
+
except socket. error as e :
|
835 |
+
self. __dict__ [ '_setupfunc' ] = func
|
836 |
+
data = None
|
837 |
+
from django. utils. text import get_valid_filename
|
838 |
+
elif auto_id :
|
839 |
+
self. get_json_data ( escape_html )
|
840 |
+
self. nodelist_empty = NodeList ( )
|
841 |
+
except ValidationError as e :
|
842 |
+
app = 'django'
|
843 |
+
try :
|
844 |
+
for char in self. add_truncation_text ( '', truncate ) :
|
845 |
+
etags = etAG_Match. findall ( etag_str )
|
846 |
+
if field_type == 'autoField(' :
|
847 |
+
c = SimpleCookie ( )
|
848 |
+
attrs = {'model' : smart_text ( obj. _meta ) }
|
849 |
+
return ip_str. split ( 1 ) [ 1 ]
|
850 |
+
def flatten_result ( source ) :
|
851 |
+
if request. _post_parse_error :
|
852 |
+
except KeyError :
|
853 |
+
for f in opts. fields :
|
854 |
+
field_url_re = constant_string_regex ( r'^\n', re.w )
|
855 |
+
def incr ( self, key, delta = 1, version = None ) :
|
856 |
+
if type ( result ) in ( ConvertingDict, ConvertingList, ConvertingTuple ) :
|
857 |
+
message = ','. join ( [ " %s.model.__name ] )
|
858 |
+
comment_lineno_cache = None
|
859 |
+
else :
|
860 |
+
result = avoid_wrapping ( name % count )
|
861 |
+
values = [ ]
|
862 |
+
if hasattr ( field. rel. to. _default_manager, 'get_by_natural_key' ) :
|
863 |
+
self. dict = OrderedDict ( ( x, None ) for x in iterable ( x ) if x. dict_dict. join
|
864 |
+
else :
|
865 |
+
@ register. tag ( 'filter' )
|
866 |
+
def _samefile ( src, dst ) :
|
867 |
+
requires_system_checks = False
|
868 |
+
if not ( message, six. PY3 ) and not hasattr ( message,'message' ) and not hasattr ( message, 'code
|
869 |
+
except KeyError :
|
870 |
+
try :
|
871 |
+
try :
|
872 |
+
m = int ( d ) - d
|
873 |
+
def make_key ( self, key, version = None ) :
|
874 |
+
filemsg = 'file %s,'% origin
|
875 |
+
if hasattr ( cls, k ) :
|
876 |
+
else :
|
877 |
+
raise TemplateSyntaxError ( "backcalled with next after the given params" )
|
878 |
+
for field_name in self. fields :
|
879 |
+
self. _upload_handlers = upload_handlers
|
880 |
+
if options. get ( 'no_color', sys. stdout ) :
|
881 |
+
if self. instance. pk is not None :
|
882 |
+
try :
|
883 |
+
return klass
|
884 |
+
value = [ ]
|
885 |
+
try :
|
886 |
+
import time
|
887 |
+
raise NoReverseMatch ( "%s is not a registered namespace" % key )
|
888 |
+
nodelist. append ( node )
|
889 |
+
error_messages [ 'invalid' ] = error_messages
|
890 |
+
if options. traceback or e isinstance ( ) :
|
891 |
+
return self. _choices
|
892 |
+
try :
|
893 |
+
try :
|
894 |
+
try :
|
895 |
+
to_python = self. _get_to_python ( pk_field )
|
896 |
+
self. varlist = varlist
|
897 |
+
return encoding
|
898 |
+
if now == True and not isinstance ( now, datetime. datetime ) :
|
899 |
+
if token. contents == 'else' :
|
900 |
+
return results
|
901 |
+
plmatch = plural_re. match ( t. contents )
|
902 |
+
for middleware_method in self. _exception_middleware :
|
903 |
+
from xml.sals.sals import xmlGenerator
|
904 |
+
if fields :
|
905 |
+
for c in reversed ( self. __class__. __mro__ ) :
|
906 |
+
from django. utils import six
|
907 |
+
return
|
908 |
+
return '<page %s of %s' % ( self. number, self. paginator. num_pages )
|
909 |
+
else :
|
910 |
+
default_error_messages = { 'invalid' : _ ( 'Enter a list of values.' ), 'invalid_choice'
|
911 |
+
_called_from_command_line = False
|
912 |
+
if opts. model :
|
913 |
+
def copy ( self ) :
|
914 |
+
collect = [ ]
|
915 |
+
if len ( value )!= 1 :
|
916 |
+
self. blocks = dict ( ( n. name, n ) for n in nodelist. get_nodes_by_type ( ) )
|
917 |
+
label = ''
|
918 |
+
old_attr = name
|
919 |
+
ch, escaped = next ( pattern_iter )
|
920 |
+
except ( AttributeError, UnsupportedOperation ) :
|
921 |
+
raise ValidationError ( self. error_messages [ 'invalid_date' ], code = 'invalid_date' )
|
922 |
+
def __init__ ( self, request, template, context = None, content_type = None, content_type = None, content_type
|
923 |
+
if self. field. cache_choices :
|
924 |
+
def fix_location_header ( request, response ) :
|
925 |
+
del attr
|
926 |
+
pk_key = "%s-%s" % ( i % i ) for i in self. add_prefix if has_value is
|
927 |
+
from __future__ import unicode_literals
|
928 |
+
from __future__ import unicode_literals
|
929 |
+
def widget_attrs ( self, widget ) :
|
930 |
+
value = self. to_python ( value ). strip ( )
|
931 |
+
yield line
|
932 |
+
self. file. write ( raw_data )
|
933 |
+
self. empty_label = empty_label
|
934 |
+
TemplateLoader = import_string ( loader )
|
935 |
+
for sql in connection. creation. sql_for_pending_references ( model, style, style, style, html_references_
|
936 |
+
if response. streaming :
|
937 |
+
output. append ( error_row % force_text ( top_errors ) )
|
938 |
+
@ register. filter ( is_safe = True )
|
939 |
+
raise ImproperlyConfigured ( 'Loader does not define a "load_template" callable' )
|
940 |
+
new_value. append ( self. coerce ( choice ) )
|
941 |
+
for i in range ( 0, self. total_form_count ( ) ) :
|
942 |
+
raise NoReverseMatch ( "Reverse for '%s' % ( key " "%s" % ( key, keyword )
|
943 |
+
except CommandError :
|
944 |
+
table_output. append ( '%s_%s' % ( tablename, f. name ) )
|
945 |
+
response = self. get_response ( request )
|
946 |
+
import django. core. checks. compatibility. django_1_7_0
|
947 |
+
escaped = True
|
948 |
+
self. unclosed_block_tag ( [ endtag ] )
|
949 |
+
def __init__ ( self, cmd, ** kwargs ) :
|
950 |
+
if len ( list_ ) == 0 :
|
951 |
+
return value
|
952 |
+
try :
|
953 |
+
max_width = ( line. endswith ( '\n' ) + width )
|
954 |
+
result = getattr ( t, translation_function ) ( eol_message )
|
955 |
+
import hmac
|
956 |
+
from django. utils import six, lru_cache
|
957 |
+
models = app_config. get_models ( include_auto_created = True )
|
958 |
+
raise TemplateDoesNotExist ( "Could not " " notfound", self. __class__. __name__ )
|
959 |
+
return False
|
960 |
+
__all__ = ( 'Template', 'Context', 'RequestContext', 'comp compile_string' )
|
961 |
+
def conditional_escape ( text ) :
|
962 |
+
if not isinstance ( candidate, six. string_types ) :
|
963 |
+
comment = [ ]
|
964 |
+
emit_post_migrate_signal ( set ( all_models, interactive, database ) )
|
965 |
+
if'%s%s' % ( line,') < len ( table_output - 1 ) :
|
966 |
+
if ch == '?' :
|
967 |
+
self. inverse_match = inverse_match
|
968 |
+
self. _pk_field, pk = self. model. _meta. pk
|
969 |
+
return super ( Error, self ). __init__ ( ERROR, * args, ** kwargs )
|
970 |
+
if token. token_type == 0 :
|
971 |
+
if 'forloop' in context :
|
972 |
+
class BoundaryIter ( six. Iterator ) :
|
973 |
+
self. path_info = path_info
|
974 |
+
def clean ( self, value ) :
|
975 |
+
args. append ( get_file ( ), get_text_key, help = '--notext_l10n', help =
|
976 |
+
if html :
|
977 |
+
self. is_reversed = is_reversed
|
978 |
+
def total_ordering ( cls ) :
|
979 |
+
return ''
|
980 |
+
final_output. append ( '--The You that will be removed in nontables:' )
|
981 |
+
return [ ( i, i ) for i in range ( 1, str ( i ) ) ]
|
982 |
+
self. _clean_form ( )
|
983 |
+
for handler in handlers :
|
984 |
+
if imatch :
|
985 |
+
return None
|
986 |
+
fixture = 0
|
987 |
+
from django. core. management. sql import sql_custom
|
988 |
+
l = len ( tokens )
|
989 |
+
if fk_name :
|
990 |
+
except HTMLParseError :
|
991 |
+
view_name = callback. name ( )
|
992 |
+
def __setattr__ ( self, name, value ) :
|
993 |
+
self. use_l10n = use_l10n
|
994 |
+
match = kwarg_re. match ( bits [ 0 ] )
|
995 |
+
for hook in sys. path_loops :
|
996 |
+
intrans = False
|
997 |
+
warnings. warn ( "msg_msg, TranslatorCommentWarning )
|
998 |
+
def compress ( self, data_list ) :
|
999 |
+
class ViewDoesNotExist ( Exception ) :
|
1000 |
+
final_output. extend ( output )
|
1001 |
+
requires_system_checks = False
|
1002 |
+
else :
|
1003 |
+
if self. choices :
|
1004 |
+
callback, param_dict = resolver. resolve_error_handler ( status_code )
|
1005 |
+
def render ( self ) :
|
1006 |
+
return data
|
1007 |
+
else :
|
1008 |
+
level = config. pop ( 'level', None )
|
1009 |
+
res, args = flatten_result ( item )
|
1010 |
+
obj_pk = obj_pk. pk
|
1011 |
+
return False
|
1012 |
+
class NoReverseMatch ( Exception ) :
|
1013 |
+
import json
|
1014 |
+
global _default
|
1015 |
+
def configure_handler ( self, config ) :
|
1016 |
+
if ch!= '\\' :
|
1017 |
+
else :
|
1018 |
+
translated = int ( rhs )
|
1019 |
+
if location is None :
|
1020 |
+
biggest_number = max ( number )
|
1021 |
+
wsgi_opts = {'maxup' : options ['maxup' ], int ( options ),'maxup' :
|
1022 |
+
raise AttributeError ( "You cannot set content to a 304 (Not MB) response" )
|
1023 |
+
is_usable = True
|
1024 |
+
raise ValueError ( "Not a string literal: %r" % s )
|
1025 |
+
yield 'year'
|
1026 |
+
return scheme in self. url_schemes
|
1027 |
+
if six. PY2 and value > sys. maxint :
|
1028 |
+
if match :
|
1029 |
+
def extend_nodelist ( self, nodelist, node, token ) :
|
1030 |
+
return ( form. has_changed ( ) for form in self ) :
|
1031 |
+
construct_instance_exclude = list ( exclude )
|
1032 |
+
if new_conn_created :
|
1033 |
+
@ register. tag ( 'block' )
|
1034 |
+
if bf_errors :
|
1035 |
+
if not self. is_bound :
|
1036 |
+
if var. startswith ( '_(' ) and var. endswith ( ')' ) :
|
1037 |
+
__M = r'(?P< os>\w{3}'
|
1038 |
+
return TemplateTagNode ( tag )
|
1039 |
+
def strftime ( self, fmt ) :
|
1040 |
+
if isinstance ( stream_or_string, six. string_types ) :
|
1041 |
+
setattr ( Module_six_moves_urllib_response, attr. name, attr )
|
1042 |
+
def write ( self, outfile, encoding ) :
|
1043 |
+
continue
|
1044 |
+
def add_filters ( self, filtersterer, filters ) :
|
1045 |
+
time_str = time_str. decode ( 'utf-8' )
|
1046 |
+
__dir__ = new_method_proxy ( dir )
|
1047 |
+
def __len__ ( self ) :
|
1048 |
+
bits = token. split_contents ( ) [ 1 : ]
|
1049 |
+
return offset. days * 86400 + offset. seconds // 60
|
1050 |
+
yield b''. join ( self )
|
1051 |
+
import warnings
|
1052 |
+
else :
|
1053 |
+
import warnings
|
1054 |
+
return (TYPE, outdict, stream )
|
1055 |
+
from collections import OrderedDict
|
1056 |
+
def safe_join ( base, ** paths ) :
|
1057 |
+
newline = unicode ( '\n' )
|
1058 |
+
exp = datetime. utcfromtimestamp ( timeout )
|
1059 |
+
LockFileEx. restype = BOOL
|
1060 |
+
return _serializers [ format ]. Serializer
|
1061 |
+
unpack = num_loopvars > 1
|
1062 |
+
words [ i ] = mark_safe ( word )
|
1063 |
+
openLock = Lock ( )
|
1064 |
+
@ deconstructible
|
1065 |
+
chunk_size = 64 * 2 ** 10
|
1066 |
+
def __init__ ( self, conditions_nodelists ) :
|
1067 |
+
def _save ( self, name, content ) :
|
1068 |
+
return '%s_%s' % ( id_, first_select )
|
1069 |
+
if len ( key ) > ModelCACHE_MAX_KEY_LENGTH_LENGTH :
|
1070 |
+
if formfield :
|
1071 |
+
cache [ settings. CACHE_MIDDLEWARE_ALIAS ] = cache [ settings. CACHE_MIDDLE
|
1072 |
+
return nodelist_true_output ( self. nodelist_true. render ( context ) )
|
1073 |
+
return repr ( list ( self ) )
|
1074 |
+
if number > self. num_pages :
|
1075 |
+
return force_text ( name, "\\", '/' )
|
1076 |
+
return True
|
1077 |
+
save.al_data = True
|
1078 |
+
s = s1
|
1079 |
+
return 'tag:%s:%s' % ( ( bits. hostname, d. path, bits. str ( ) ) )
|
1080 |
+
return 0
|
1081 |
+
if cache_timeout == None :
|
1082 |
+
class TemplateLiteral ( Literal ) :
|
1083 |
+
color_settings = termcolors. parse_color_setting ( "ANGO_locORS )
|
1084 |
+
TOANGO_COMMENT_MARK = 'translators_MARK'
|
1085 |
+
response = self. handle_uncaught_exception ( request, resolver, sys. exc_info ( ) )
|
1086 |
+
latest_date = item_date
|
1087 |
+
value, prog = signed_value. rsplit ( self. sep, 1 )
|
1088 |
+
qs = f. value_from_object ( instance )
|
1089 |
+
from email import charset as Charset, ( or message_from_string, token )
|
1090 |
+
if isinstance ( v, ( list, tuple ) ) :
|
1091 |
+
incomment = True
|
1092 |
+
return self. _num_pages
|
1093 |
+
return get_supported_language_variant ( accept_lang )
|
1094 |
+
if unicodedata. combining ( char ) :
|
1095 |
+
@ deconstructible
|
1096 |
+
use_base_manager = options. get ( 'use_base_manager' )
|
1097 |
+
def reverse ( viewname, urlconf = None, args = None, kwargs = None, use_l10n = None ) :
|
1098 |
+
if self. _is_rendered :
|
1099 |
+
while current_len <= length :
|
1100 |
+
def _set_response_etag ( response ) :
|
1101 |
+
@ register. filter ( "escapejs" )
|
1102 |
+
if hasattr ( mw_instance, 'process_response' ) :
|
1103 |
+
self. xml. endElement ( "object" )
|
1104 |
+
django_%s_template_' % self. app_or_project
|
1105 |
+
out. write ( blankout ( part, 'S' ) )
|
1106 |
+
from django. utils import six
|
1107 |
+
parser. add_argument ( 'args', metavar = 'app_label', nargs = '*' )
|
1108 |
+
if six. PY2 :
|
1109 |
+
self. waiting_readers = 0
|
1110 |
+
return node. render ( context )
|
1111 |
+
name, ext = os. path. splitex ( name )
|
1112 |
+
@ stringfilter
|
1113 |
+
PATTERN = "class default'(?class'(?:seselfp*etime' or '('>', '(''
|
1114 |
+
self. invoked_for_django = True
|
1115 |
+
media_attrs = kwargs
|
1116 |
+
def read ( self, * args, ** kwargs ) :
|
1117 |
+
num_num = num // self. _cull_frequency
|
1118 |
+
def cleanup_url ( url ) :
|
1119 |
+
def streaming_content ( self, value ) :
|
1120 |
+
import re
|
1121 |
+
self. tags [ name ] = compile_function
|
1122 |
+
created_models = set ( manifest. values ( ), [ p. it ] )
|
1123 |
+
WSGIServer ( get_wsgi_application, ** wgi_opts ). run ( )
|
1124 |
+
def is_naive ( value ) :
|
1125 |
+
return connection. creation. sql_create_model ( model, no_style ( ), seen_models )
|
1126 |
+
post = '<could not parse>'
|
1127 |
+
context = Context ( ** kwargs : ** options [ ** options : ** 'en_key' ], ** kwargs )
|
1128 |
+
for key in self. keyOrder :
|
1129 |
+
current_len += 1
|
1130 |
+
class SuspiciousipartForm ( SuspiciousOperation ) :
|
1131 |
+
from django. utils. http import urlquote
|
1132 |
+
from django. core. serializers. base import DeserializationError
|
1133 |
+
from django. utils. deprecation import RemovedInDjango19Warning
|
1134 |
+
if self. _wrapped is empty :
|
1135 |
+
return make_origin ( display_name, self. load_template_source, template_name, template_dirs )
|
1136 |
+
return not self. file or self. file. closed
|
1137 |
+
import warnings
|
1138 |
+
self. pubid = pubid
|
1139 |
+
if len ( bits )!= 2 or 3 :
|
1140 |
+
return WithNode ( None, None, nodelist, extra_context = extra_context )
|
1141 |
+
_iterlists = "lists"
|
1142 |
+
from django. core. exceptions import ValidationError
|
1143 |
+
def __reduce__ ( self ) :
|
1144 |
+
if html_message :
|
1145 |
+
return False
|
1146 |
+
def __init__ ( self, name, regex, next = None ) :
|
1147 |
+
except pickle. pickleError :
|
1148 |
+
def get_public_serializer_formats ( ) :
|
1149 |
+
with open ( writer. path, "wb" ) as fh :
|
1150 |
+
def do_ifequal ( parser, token, negate ) :
|
1151 |
+
def _assert_mutable ( self ) :
|
1152 |
+
pass
|
1153 |
+
if isinstance ( data, bytes ) :
|
1154 |
+
except OSError as e :
|
1155 |
+
for pythonrc in ( os. environ. get ( "PY2START", "PATHS" ), "PAT
|
1156 |
+
parser. add_argument ( '--no-initial-data', action ='store_true', dest = 'interactive',
|
1157 |
+
return False
|
1158 |
+
for dirname in dirs :
|
1159 |
+
try :
|
1160 |
+
val, encoding = super ( SimpleCookie, self ). value_encode ( val )
|
1161 |
+
using_sysrandom = False
|
1162 |
+
user_settings = module_to_dict ( settings. _wrapped )
|
1163 |
+
ttl = force_text ( ttl )
|
1164 |
+
statements. append ( cleaned_lazy )
|
1165 |
+
if y and m and d :
|
1166 |
+
from django. utils. deprecation import RemovedInDjango19Warning
|
1167 |
+
return date. strftime ( '%s, %d %s % (d: %s: %s: %s' % ( y
|
1168 |
+
def u ( s ) :
|
1169 |
+
super ( AssignmentNode, self ). __init__ ( takes_context, args, kwargs )
|
1170 |
+
except ( ValueError, TypeError ) :
|
1171 |
+
__all__ = [ 'File' ]
|
1172 |
+
return retval
|
1173 |
+
self. stream. write ( '%s\n' % msg_data )
|
1174 |
+
logger. level = logging.NotSET
|
1175 |
+
elif basetype =='message' and subtype == 'rfc8' :
|
1176 |
+
def value_from_datadict ( self, data, files, name ) :
|
1177 |
+
raise ValueError ( "Key '%s' not found" % key )
|
1178 |
+
except SuspiciousOperation as e :
|
1179 |
+
ttl = force_text ( ttl )
|
1180 |
+
if kwargs. split ( defaults )!= set ( defaults, prefix ) :
|
1181 |
+
if self. asvar is None :
|
1182 |
+
if isinstance ( s, ( six. text_type, Promise ) ) :
|
1183 |
+
self. stdout. write ( "Installing %d object(s) from %d fixture(s)" % ( fixture_s ) )
|
1184 |
+
t.ed ( left, self )
|
1185 |
+
return '<extendsNode: %s>' % self. parent_name. token
|
1186 |
+
for attachment in self. attachments :
|
1187 |
+
return value
|
1188 |
+
from django. core. cache. backends. base import BaseCache, DEFAULT_TIMEOUT
|
1189 |
+
def __init__ ( self ) :
|
1190 |
+
value = next ( cycle_iter ). resolve ( context )
|
1191 |
+
if not self. compile_function_error ( token, e ) :
|
1192 |
+
chunks = [ ]
|
1193 |
+
logging.Handler. __init__ ( self )
|
1194 |
+
confconf = executor. loader.t_confconf ( )
|
1195 |
+
_localtime = None
|
1196 |
+
return self. number + self. paginator. per_page
|
1197 |
+
seen_models. add ( model )
|
1198 |
+
def clean ( self, value ) :
|
1199 |
+
if not data and initial :
|
1200 |
+
else :
|
1201 |
+
def url ( self, name ) :
|
1202 |
+
if not hasattr ( package, 'rindex' ) :
|
1203 |
+
raise
|
1204 |
+
match = re_DATE. match ( value )
|
1205 |
+
from django. db. migrations. writer import MigrationWriter
|
1206 |
+
if value in ( None, '' ) :
|
1207 |
+
msg = "Unclosed tag '%s'. a one of: %s " % command %s" % ( command, e )
|
1208 |
+
app_config = apps. get_app_config ( app_label )
|
1209 |
+
def _iterkeys ( self ) :
|
1210 |
+
shutdown_message = options. get ( 'locup_message', False )
|
1211 |
+
return self. source
|
1212 |
+
if f is None :
|
1213 |
+
def handle ( self, ** options ) :
|
1214 |
+
class CommentNode ( Node ) :
|
1215 |
+
from django. utils. encoding import force_text
|
1216 |
+
module = import_module ( module_path )
|
1217 |
+
return result
|
1218 |
+
temp_lib. tags [ name ] = lib. tags [ name ]
|
1219 |
+
if self. to_field :
|
1220 |
+
from django. http. response import ( HttpResponse, StreamingHttpResponse, HttpResponseRedirect, HttpResponse, self. H
|
1221 |
+
handler. addQuickElement ( "rights", item [ 'item_copyright' ] )
|
1222 |
+
def bytes2int ( bs ) :
|
1223 |
+
return lazy_number ( ngettext, str, singular = singular, plural = plural, plural = True )
|
1224 |
+
class Command ( BaseCommand ) :
|
1225 |
+
stream. unget ( chunk )
|
1226 |
+
for k, v in [ six. iteritems ( fields ) :
|
1227 |
+
_func_defaults = "func_defaults"
|
1228 |
+
parser. add_argument ( '--exclude', '-x', dest = '-e', dest = 'locale'
|
1229 |
+
try :
|
1230 |
+
raise ExternalReferenceForbidden ( context, base, sysid, pubid )
|
1231 |
+
with connection. concrete_checks_false ( ) :
|
1232 |
+
delta = expires. utcnow ( ) - expires
|
1233 |
+
super ( Serializer, self ). handle_fstore ( obj, field )
|
1234 |
+
pass
|
1235 |
+
else :
|
1236 |
+
else :
|
1237 |
+
error = Error ( "%s is connection to connection the '%s' signal ( lazy_view " "%s.%s" % ( i
|
1238 |
+
kwargs [ 'instance' ] = self. _existing_object ( pk )
|
1239 |
+
if len ( bits ) < 2 :
|
1240 |
+
return copy. deepcopy ( self. _wrapped, memo )
|
1241 |
+
loaded_objects_in_fixture = 0
|
1242 |
+
return result
|
1243 |
+
super ( RadioChoiceInput, self ). __init__ ( * args, ** kwargs )
|
1244 |
+
self. dicts [ - 1 ] [ key ] = value
|
1245 |
+
from django. core. cache. backends. base import BaseCache, DEFAULT_TIMEOUT
|
1246 |
+
if self. max_digits is not None and self. decimal_places is not None and self. decimal_places > self. decimal_
|
1247 |
+
if not value and self. required :
|
1248 |
+
base_url. append ( '/' )
|
1249 |
+
if dirname and not os. path. exists ( dirname ) :
|
1250 |
+
def regex ( self ) :
|
1251 |
+
parser. add_argument ( 'args', nargs = '*' )
|
1252 |
+
if plan_node in loader. app_migrations :
|
1253 |
+
self. _regex_dict [ language_code ] = regex_comp compile
|
1254 |
+
self. file. seek ( 0 )
|
1255 |
+
return self. __name
|
1256 |
+
self. _body = self. read ( )
|
1257 |
+
return result
|
1258 |
+
boundary = opts. get ( 'boundary' )
|
1259 |
+
raise InvalidCacheBackendError ( "Could not find backend '%s': %s" % ( backend, e ) )
|
1260 |
+
else :
|
1261 |
+
def save_existing_objects ( self, commit = True ) :
|
1262 |
+
from django. core. mail. utils import DNS_NAME
|
1263 |
+
needs_multipart_form = True
|
1264 |
+
pass
|
1265 |
+
def indexbytes ( buf, i ) :
|
1266 |
+
__getattr__ = new_method_proxy ( getattr ( getattr ) )
|
1267 |
+
sep = hextet [ 0 ]. split ( ':' )
|
1268 |
+
def __contains__ ( self, item ) :
|
1269 |
+
bits = host. split ( ':', host = ':' )
|
1270 |
+
try :
|
1271 |
+
result. append ( path )
|
1272 |
+
class MiddlewareNotUsed ( Exception ) :
|
1273 |
+
import os
|
1274 |
+
handler = self. configure_handler ( handlers [ name ] )
|
1275 |
+
else :
|
1276 |
+
with connections [ db ]. cursor ( ) as cursor :
|
1277 |
+
return datetime. time ( ** kw )
|
1278 |
+
filelist = _cached_filenames + new_filenames + _error_files
|
1279 |
+
strip_tags = allow_lazy ( strip_tags )
|
1280 |
+
self. queryset = field. queryset
|
1281 |
+
next = klass. __dict__
|
1282 |
+
import_module ( templatetag_module )
|
1283 |
+
def tag ( self, name = None, compile_function = None ) :
|
1284 |
+
if kwargs. pop ( 'ipv6' ) :
|
1285 |
+
def writer ( self ) :
|
1286 |
+
class InvalidTemplateLibrary ( Exception ) :
|
1287 |
+
def render ( self, context ) :
|
1288 |
+
self. allow_empty_first_page = allow_empty_first_page
|
1289 |
+
s = s. replace ( '\t', '\\t' )
|
1290 |
+
needs_multipart_form = False
|
1291 |
+
self. handle_starttag ( tag, attrs )
|
1292 |
+
try :
|
1293 |
+
self. _catalog. update ( other. _catalog )
|
1294 |
+
for f in sorted ( opts. concrete_fields + sortable_m_fields, opts. many_to_many ) :
|
1295 |
+
if isinstance ( message, SafeData ) :
|
1296 |
+
if not self. data and not self. files :
|
1297 |
+
setattr ( filter_func, attr, value )
|
1298 |
+
if nodelist. get_nodes_by_type ( ExtendsNode ) :
|
1299 |
+
try :
|
1300 |
+
obj = super ( MultiWidget, self ). __deepcopy__ ( memo )
|
1301 |
+
else :
|
1302 |
+
def sql_indexes ( app_config, style, connection ) :
|
1303 |
+
if app_config. models_module is None :
|
1304 |
+
raise NotImplementedError ('subclasses of Origin must provide a reload() method' )
|
1305 |
+
self. kwargs = kwargs
|
1306 |
+
return True
|
1307 |
+
self. paths_to_remove. append ( tempdir )
|
1308 |
+
if fk. unique :
|
1309 |
+
elif connection. cursor ( ) as cursor :
|
1310 |
+
fields. update ( new_class. declared_fields )
|
1311 |
+
self. choices. append ( ( f, f. replace ( path, "", 1 ) ) )
|
1312 |
+
use_null_fallback = False
|
1313 |
+
kwargs [ name ] = parser. compile_filter ( value )
|
1314 |
+
class SplitDateTimeField ( MultiValueField ) :
|
1315 |
+
result = middleware. process_view ( request, view_func, args, kwargs )
|
1316 |
+
return '\r\n'. join ( [ '. join ( value, 'latin-1' ) ) for 'latin in
|
1317 |
+
class Http404 ( Exception ) :
|
1318 |
+
def media ( self ) :
|
1319 |
+
if ( isinstance ( data, datetime. datetime, datetime. time ) and not self. supports_microseconds ) and not self.
|
1320 |
+
from django. conf import settings
|
1321 |
+
state_frame [ self ] = None
|
1322 |
+
error_msg = "Invalid template name in 'extends' tag: %r." % parent
|
1323 |
+
if option_value is None :
|
1324 |
+
class LocalTimezone ( Date LocalTimezone ) :
|
1325 |
+
@ register. filter ( is_safe = False )
|
1326 |
+
elif field_type =='idField(' and connection. features. can_intspection_autoescape :
|
1327 |
+
return QueryDict ( '', encoding = self. _encoding ). __init__ ( )
|
1328 |
+
def to_python ( self, value ) :
|
1329 |
+
if ( not pk_is_not_edable ( ) or ( pk. rel. to. _meta. pk ) and
|
1330 |
+
if match :
|
1331 |
+
def patch_cache_Control ( response, ** kwargs ) :
|
1332 |
+
def __init__ ( self, level, msg, hint = None, obj = None, if default = None ) :
|
1333 |
+
tag, this_value_expr, max_value_expr, max_width = bits
|
1334 |
+
db = options. pop ( 'using', False )
|
1335 |
+
if not filename :
|
1336 |
+
super ( InlinelineForeignKeyField, self ). __init__ ( * args, ** kwargs )
|
1337 |
+
def __init__ ( self, name ) :
|
1338 |
+
from django. core. exceptions import ImproperlyConfigured
|
1339 |
+
def __init__ ( self ) :
|
1340 |
+
value = [ conditional_escape ( v ) for v in value ]
|
1341 |
+
class TemplateEncodingError ( Exception ) :
|
1342 |
+
if version is None :
|
1343 |
+
self. xml. startElement ( "field", { "field" : field. name, "field" : self. xml. name,
|
1344 |
+
thefile = self. file
|
1345 |
+
seconds = int ( m. group ('seconds' ) )
|
1346 |
+
self. stdout. write ( self. style. MIGRATE_HEADING ( "merge %s" % app_label )
|
1347 |
+
value = getattr ( opts, opt, opt )
|
1348 |
+
for basedir in basedirs :
|
1349 |
+
if hasattr ( file_or_path,'read' ) :
|
1350 |
+
@ classmethod
|
1351 |
+
def _replace_entity ( match ) :
|
1352 |
+
self. _post, self. _files = self. parse_file_upload ( self. META, data )
|
1353 |
+
path_info = get_bytes_from_wsgi ( environ, 'PATH_INFO', '/' )
|
1354 |
+
except Exception :
|
1355 |
+
if self. empty_apps :
|
1356 |
+
subcommand = 'help'
|
1357 |
+
def handle ( self, * app_labels, ** options ) :
|
1358 |
+
raise ValueError ( "'%s' has no field named '%s'." % ( self. __class__. __name__, field )
|
1359 |
+
model_fields = Model. _meta. get_all_field_names ( )
|
1360 |
+
f = os. path. join ( p, cmd )
|
1361 |
+
error_messages = self. fields [ field ]. error_messages [ 0 ]
|
1362 |
+
self. _lock = threading. RLock ( )
|
1363 |
+
from UserList import UserList
|
1364 |
+
from django. http import Http404
|
1365 |
+
token [ id_bit ( upto, ( upto ) + len ( last_bit ) + self. create_token ( ) ) +
|
1366 |
+
class dummy :
|
1367 |
+
def __del__ ( self ) :
|
1368 |
+
link [ NEXT ] = root
|
1369 |
+
from django. apps import apps
|
1370 |
+
else :
|
1371 |
+
while i < l :
|
1372 |
+
def render ( self, context ) :
|
1373 |
+
def _cache ( self ) :
|
1374 |
+
_re = re. compile ( r'<.*?>|(.)?|', r'(??:?:?:?:?:?:
|
1375 |
+
return { }
|
1376 |
+
model = app_config. get_model ( model_label )
|
1377 |
+
if value is not result :
|
1378 |
+
return tt. tm_isdst > 0
|
1379 |
+
def _get_choices ( self ) :
|
1380 |
+
loader = MigrationLoader ( connection )
|
1381 |
+
termios. tzsetattr ( fd, termios. CSL67 new, attr_list )
|
1382 |
+
_urllib_robotparser_moved_attributes = [ MovedAttribute ( "DovedAttribute", "urllib
|
1383 |
+
def render ( self, name, value, attrs = None ) :
|
1384 |
+
cursor. close ( )
|
1385 |
+
endbmatch = endblock_re. match ( t. contents )
|
1386 |
+
for key, value in parse_gsl ( query_string or '', use_blank_values = True ) :
|
1387 |
+
def get_resolver ( urlconf ) :
|
1388 |
+
app_dir = apps. get_app_config ( model. _m. app_label )
|
1389 |
+
if locations :
|
1390 |
+
class signalsExpired ( BadSignature ) :
|
1391 |
+
def get ( self, key, default = None ) :
|
1392 |
+
def _mark_post_parse_error ( self ) :
|
1393 |
+
self. xml. endElement ( "field" )
|
1394 |
+
super ( GenericIPAddressField, self ). __init__ ( * args, ** kwargs )
|
1395 |
+
from django. utils import six, timezone
|
1396 |
+
return value
|
1397 |
+
return filelist
|
1398 |
+
if self. verbosity >= 1 :
|
1399 |
+
stream = StringIO ( stream_or_string )
|
1400 |
+
from django. utils import archive
|
1401 |
+
return time_str + '-0000'
|
1402 |
+
if not self. allow_multiple_selected :
|
1403 |
+
raise TemplateSyntaxError ( "'%s' received some keyword argument '%s'" % ( name, i ) )
|
1404 |
+
else :
|
1405 |
+
from django. apps import apps
|
1406 |
+
localpart = str ( Header ( localpart, encoding ) )
|
1407 |
+
class FileInput ( Input ) :
|
1408 |
+
d = { }
|
1409 |
+
return data
|
1410 |
+
for line in content. split ( '\n' ) :
|
1411 |
+
if value :
|
1412 |
+
@ property
|
1413 |
+
data [ field. attname ] = value
|
1414 |
+
s = six. text_type ( s, encoding, errors )
|
1415 |
+
raise
|
1416 |
+
if app_config. models_module is None :
|
1417 |
+
for tag in open_tags :
|
1418 |
+
_assertRegex = "assertRegex"
|
1419 |
+
class EmailBackend ( BaseEmailBackend ) :
|
1420 |
+
self. _regex_validator = validators. RegexValidator ( regex = regex )
|
1421 |
+
if error_messages and f. name in error_messages :
|
1422 |
+
parser. add_argument ( 'args', metavar = 'app_label', nargs = '+', help = '
|
1423 |
+
child_loggers. append ( existing [ i ] )
|
1424 |
+
metype, _ = mimetypes. guess_type ( filename )
|
1425 |
+
secret = force_bytes ( secret )
|
1426 |
+
params, varargs, varkw, defaults = getargspec ( func )
|
1427 |
+
def html_quote ( s, quote_double_quotes = False ) :
|
1428 |
+
i += 1
|
1429 |
+
@ deconstructible
|
1430 |
+
break
|
1431 |
+
def cleaned_data ( self ) :
|
1432 |
+
break
|
1433 |
+
key = self. make_key ( key, version = version )
|
1434 |
+
value = data. get ( name )
|
1435 |
+
changeset = timestamp. strftime ( '%Y%m%d%H%M%S' )
|
1436 |
+
if val is None :
|
1437 |
+
def clear ( self ) :
|
1438 |
+
six. reraise ( exc_type, exc_value, sys. exc_info ( ) )
|
1439 |
+
raise ValidationError ( self. error_messages ['required' ], code ='required' )
|
1440 |
+
def get_default_timezone ( ) :
|
1441 |
+
def get_host ( self ) :
|
1442 |
+
return
|
1443 |
+
fmt = config. get ( 'format', None )
|
1444 |
+
if finder. find_module ( name ) :
|
1445 |
+
ipv4_address = "%d.%d.%d%d" % ( 6 [ 2 : 2 ], ( hextets
|
1446 |
+
return [ bytes_to_text ( elt, self. encoding ) for elt in list_ ]
|
1447 |
+
return name, ser_fmt, ccmp_fmt
|
1448 |
+
from django. utils. http import urlquote
|
1449 |
+
if value. tzinfo is None and value. tzinfo. utcoffset ( value ) is None :
|
1450 |
+
else :
|
1451 |
+
code_list. append ( context [ v ] )
|
1452 |
+
kwargs [ 'initial' ] = self. parent_instance. pk
|
1453 |
+
last = max ( 0, end - 1 )
|
1454 |
+
def __init__ ( self, widgets, attrs = None ) :
|
1455 |
+
class WSGIServer ( simple_server. WSGIServer, object ) :
|
1456 |
+
except Exception as e :
|
1457 |
+
state = self. state
|
1458 |
+
def __get__ ( self, obj, tp ) :
|
1459 |
+
if not tag in tags. tag_exists ( tag ) :
|
1460 |
+
if use_l10n or ( use_l10n is None and settings. USE_L10N ) :
|
1461 |
+
self. activated = True
|
1462 |
+
return '', ''
|
1463 |
+
def wrapper ( * args, ** kwargs ) :
|
1464 |
+
id_ += '_0'
|
1465 |
+
def format_subject ( self, subject ) :
|
1466 |
+
kwargs = match. groupdict ( )
|
1467 |
+
for dict_ in self. dicts :
|
1468 |
+
self. nodelist = t. nodelist
|
1469 |
+
def __bool__ ( self ) :
|
1470 |
+
import sys
|
1471 |
+
kwargs [ 'number' ] = number_value
|
1472 |
+
return result
|
1473 |
+
if hasattr ( timezone, 'normalize' ) :
|
1474 |
+
value = force_text ( value )
|
1475 |
+
weight = 0
|
1476 |
+
from super ( SimpleCookie, self ). load ( rawdata )
|
1477 |
+
class DefusedXmlException ( ValueError ) :
|
1478 |
+
else :
|
1479 |
+
self. _leftover = b''. join ( bytes, self. _leftover )
|
1480 |
+
formfield = f. formfield ( ** kwargs )
|
1481 |
+
return
|
1482 |
+
def make_decorator ( * m_args, ** m_kwargs ) :
|
1483 |
+
def _set_post ( self, post ) :
|
1484 |
+
def clear ( self ) :
|
1485 |
+
if safe is not None :
|
1486 |
+
filter_expression = self. compile_filter ( token. contents )
|
1487 |
+
attrs = super ( DecimalField, self ). widget_attrs ( widget )
|
1488 |
+
return bytes ( value )
|
1489 |
+
if self. allow_folders :
|
1490 |
+
app_list = resolver. app_dict [ ns ]
|
1491 |
+
def activate ( timezone ) :
|
1492 |
+
else :
|
1493 |
+
def writeString ( self, encoding ) :
|
1494 |
+
else :
|
1495 |
+
choices = property ( _get_choices, _set_choices )
|
1496 |
+
def has_other_pages ( self ) :
|
1497 |
+
parser. modules [ __name__ + ".moves.urllib_parse" ] = sys. modules [ __name__ + ".m
|
1498 |
+
form. save_m2m = save_m2m
|
1499 |
+
else :
|
1500 |
+
_templatetags_modules. append ( templatetag_module )
|
1501 |
+
return format_html_join ( '', '{0}{1}"', format_join ( self. _meta [ 2 ],
|
1502 |
+
return self
|
1503 |
+
self. can_write. release ( )
|
1504 |
+
raise KeyError ( key )
|
1505 |
+
for arg in args :
|
1506 |
+
def has_key ( self, key ) :
|
1507 |
+
kw ['microsecond' ] = kw ['microsecond' ]. ljust ( 6, '0' )
|
1508 |
+
if var. find ( VARIABLE_ATTRIBUTE_SEPARATOR ) > - 1 :
|
1509 |
+
__all__ = ( 'MultiPartParser', 'MultiPartParserError', 'InputStreamExhausted' )
|
1510 |
+
dictreprs = ', '. join ( repr ( d ) for d in self. dicts )
|
1511 |
+
elif field. rel and isinstance ( field. rel, models. ManyToOneRel ) :
|
1512 |
+
if text == len ( opts ) and len ( opts ) == 1 and opts [ 0 ] =='reset' :
|
1513 |
+
from django. utils. six. moves. urllib. parse import urljoin
|
1514 |
+
self. xml. startElement ( "natural", { } )
|
1515 |
+
@ property
|
1516 |
+
raise ValidationError ( self. error_messages [ 'invalid_choice' ], code = 'invalid_choice', params
|
1517 |
+
self. delete ( key, version = version )
|
1518 |
+
new_matches = normalize ( parent_pat + pat )
|
1519 |
+
yield self [ key ]
|
1520 |
+
cache [ key ] = result
|
1521 |
+
self. cookies [ key ] ['max-age' ] = max_age
|
1522 |
+
def __copy__ ( self ) :
|
1523 |
+
from django. utils. functional import lazy
|
1524 |
+
sites1 = _findall ( str ( s1, year ) )
|
1525 |
+
for middleware_method in self. _request_middleware :
|
1526 |
+
def add_arguments ( self, parser ) :
|
1527 |
+
ULONG_PTR = c_int64
|
1528 |
+
if not language_code_re. search ( lang_code ) :
|
1529 |
+
if isinstance ( s, bytes ) :
|
1530 |
+
for connector_name, object_list in self. m2m_data. items ( ) :
|
1531 |
+
if isinstance ( obj, datetime. datetime ) :
|
1532 |
+
handler. addQuickElement ( "pubDate", rfc2822_date ( item [ 'pubdate' ] ) )
|
1533 |
+
self. file = file. mode
|
1534 |
+
fils = int ( candidate ) + int ( c ) + ( c )
|
1535 |
+
if sys. version_info [ 0 ] == 3 :
|
1536 |
+
chunk = b''. join ( chunks )
|
1537 |
+
app_template_dirs = [ ]
|
1538 |
+
def split_leading_dir ( self, path ) :
|
1539 |
+
with self. _lock. reader ( ) :
|
1540 |
+
locale_dir = self. default_locale_path
|
1541 |
+
output_transaction = True
|
1542 |
+
obj = Model ( ** data )
|
1543 |
+
return apps. setdefault ( pattern, [ ] ). append ( pattern. namespace )
|
1544 |
+
for key, value in data :
|
1545 |
+
def configure_root ( self, config, incremental = False ) :
|
1546 |
+
if item [ 'pubdate' ] is not None :
|
1547 |
+
tzinfo = get_fixed_timezone ( offset )
|
1548 |
+
class SuspiciousOperation ( Exception ) :
|
1549 |
+
from django. conf import settings
|
1550 |
+
try :
|
1551 |
+
if os. path. isdir ( app_dir ) :
|
1552 |
+
def mark_for_escaping ( s ) :
|
1553 |
+
except AttributeError :
|
1554 |
+
obj_pk = field. rel. to. _meta. get_field ( field. rel. field_name ). to_python
|
1555 |
+
def __init__ ( self, object_list, number, paginator ) :
|
1556 |
+
return [ None, None ]
|
1557 |
+
def timeuntil ( d, now = None ) :
|
1558 |
+
super ( DecimalField, self ). validate ( value )
|
1559 |
+
field_type ='ForeignKey(' + rel_to
|
1560 |
+
def avoid_wrapping ( value ) :
|
1561 |
+
from django. core. serializers. python import Deserializer as PythonDeserializer
|
1562 |
+
if code is not None :
|
1563 |
+
raise TemplateSyntaxError ( "'firstof' statement requires at least one argument" )
|
1564 |
+
from importlib import find_loader as importlib_find
|
1565 |
+
msgs, errors, status = popen_wrapper ( args )
|
1566 |
+
id_ = self. field. widget. attrs. get ( 'id' ) or self. auto_id
|
1567 |
+
return "< Block Node: %s. contents: %r>" % ( self. name, self. nodelist )
|
1568 |
+
if nodelist_empty is None :
|
1569 |
+
def __iter__ ( self ) :
|
1570 |
+
from django. utils. module_loading import import_string
|
1571 |
+
return b''. join ( b' '\n'. join ( self. make_bytes ( chunk ) ) for chunk in value )
|
1572 |
+
if value in self. empty_values :
|
1573 |
+
parser. add_argument ('migration_name', action ='store_true', dest ='migration', default =
|
1574 |
+
def jython_reloader ( main_func, args, kwargs ) :
|
1575 |
+
from django. test. signals import setting_changed
|
1576 |
+
file. seek ( 0 )
|
1577 |
+
return False
|
1578 |
+
from django. template. base import TemplateDoesNotExist
|
1579 |
+
from django. http import HttpResponse
|
1580 |
+
code = 'limit_value'
|
1581 |
+
text = match. group ( 1 )
|
1582 |
+
for line in '\r\n'. split ( '\r\n' ) :
|
1583 |
+
obj = base. build_instance ( Model, data, db )
|
1584 |
+
iterkeys = _iterkeys
|
1585 |
+
return value. pk
|
1586 |
+
quant. append ( ch )
|
1587 |
+
def write ( self, val ) :
|
1588 |
+
def handle_app_config ( self, app_config, ** options ) :
|
1589 |
+
return None
|
1590 |
+
num_loopvars = len ( self. loopvars )
|
1591 |
+
deactivate, deactivate_all = lambda self : None
|
1592 |
+
AG = 1 << 10
|
1593 |
+
start = 0
|
1594 |
+
def render_option ( self, selected_choices, option_value, option_label ) :
|
1595 |
+
def __getitem__ ( self, key ) :
|
1596 |
+
language_code = get_language ( )
|
1597 |
+
if bit. startswith ( '_(' ). startswith ( "_(' ) :
|
1598 |
+
return _i18n_cache_key_suffix ( request, cache_key )
|
1599 |
+
try :
|
1600 |
+
c = int ( text [ 1 : ] )
|
1601 |
+
if not os. path. isdir ( self. file_path, os. path. isdir ) :
|
1602 |
+
if self. feed [ 'feed_url' ] is not None :
|
1603 |
+
return
|
1604 |
+
import os
|
1605 |
+
return iter ( getattr ( d, _iterlists ) ( ** kw ) )
|
1606 |
+
def wrapper ( * args, ** kwds ) :
|
1607 |
+
out. write ('pgettext(%r, %r)'% join_tokens ( message_context, join_only
|
1608 |
+
return self. getlist ( key )
|
1609 |
+
defaults = dict ( defaults. _get_kwargs, ** options )
|
1610 |
+
response = self. urlconf_module ( 'handler%s' % view_type )
|
1611 |
+
warnings_msg = "The translation- target '%s' %sline %d) be set ( " "The importt't it
|
1612 |
+
return force_text ( getattr ( self, getattr ( self, getattr ( ) ) ) )
|
1613 |
+
d = data. get ( self. day_field % name )
|
1614 |
+
func = getattr ( func, '_decorated_function', func )
|
1615 |
+
for name, block in six. iteritems ( blocks ) :
|
1616 |
+
import django
|
1617 |
+
potfiles = self. build_potfiles ( )
|
1618 |
+
self. stdout. write ( "Runninging %s for for fixtures in tags if ser_fmt is not None )
|
1619 |
+
import sys
|
1620 |
+
if len ( bits )!= 3 :
|
1621 |
+
extim = self. _archive. extractfile ( member )
|
1622 |
+
import binascii
|
1623 |
+
else :
|
1624 |
+
filES = property ( _get_files )
|
1625 |
+
return True
|
1626 |
+
with self. mutex :
|
1627 |
+
return get_template ( template_name, dirs )
|
1628 |
+
l = lambda x : self. make_key ( x, version = version )
|
1629 |
+
def upload_handlers ( self ) :
|
1630 |
+
except AmbiguityError :
|
1631 |
+
except ValidationError as e :
|
1632 |
+
return {'request' : request }
|
1633 |
+
except AttributeError :
|
1634 |
+
result = func ( * args )
|
1635 |
+
else :
|
1636 |
+
from django. utils. encoding import force_text, DEFAULT_LOCALE_ENCODING
|
1637 |
+
field_fields = [ field for field in apps. get_models if model. get_models ( "configs is None else None )
|
1638 |
+
self. ignore = options. get ( 'ignore' )
|
1639 |
+
class NowNode ( Node ) :
|
1640 |
+
except StandardError as e :
|
1641 |
+
if msg :
|
1642 |
+
_error_files = [ ]
|
1643 |
+
@ register. filter ( is_safe = True, needs_autoescape = True )
|
1644 |
+
if isinstance ( filename, MIMEBase ) :
|
1645 |
+
class DebugNodeList ( NodeList ) :
|
1646 |
+
prefix = 1. 0
|
1647 |
+
raise KeyError ( key )
|
1648 |
+
elif isinstance ( klass, logging. handlers. SMTPHandler ) and'mail' in config :
|
1649 |
+
return maybe
|
1650 |
+
def _handle_m2m_field_node ( self, node, field ) :
|
1651 |
+
return super ( DebugParser, self ). extend_nodelist ( nodelist, node, token )
|
1652 |
+
from django. utils. itercompat import is_iterable
|
1653 |
+
return self. has_key ( key )
|
1654 |
+
new_class = super ( mcsFieldsMetaclass, mcs, bases, attrs )
|
1655 |
+
continue
|
1656 |
+
return self. save_existing_objects ( commit ) + self. save_new_objects. items ( ) + self. save_existing_
|
1657 |
+
for attr in ( 'expects_localtime', 'is_safe','needs_autoescape' ) :
|
1658 |
+
for f in file_list :
|
1659 |
+
import re
|
1660 |
+
for processors in get_standard_processors ( ) :
|
1661 |
+
field_name = force_text ( old_field_name, self. _encoding, errors ='replace' )
|
1662 |
+
yield v
|
1663 |
+
else :
|
1664 |
+
cc = dict ( _to_tuple ( el ), dict ( el ) for el in items )
|
1665 |
+
scheme = template. split ( ':'' ) [ 0 ]. lower ( )
|
1666 |
+
DEATE_MAPPING = { 'A' : None, 'b' : None, 'd' : '0' : '2'
|
1667 |
+
locales = [ locale ]
|
1668 |
+
nodelist = parser. parse ( ( 'endblock', ) )
|
1669 |
+
loaders = [ ]
|
1670 |
+
@ register. tag
|
1671 |
+
return client
|
1672 |
+
bit. append ( os. stat ( path ), stat. S_Imode )
|
1673 |
+
def __delitem__ ( self, key ) :
|
1674 |
+
expanded_template = path. expanduser ( template )
|
1675 |
+
data [ field. widget. value_from_datadict ( self. data, self. files, self. handle ( ) ) ] =
|
1676 |
+
def pbkdf2 ( password, salt, iterations, dklen = 0, digest = None ) :
|
1677 |
+
def get_default_timezone_name ( ) :
|
1678 |
+
ch2 = None
|
1679 |
+
def handle_uncaught_exception ( self, request, resolver, exc_info ) :
|
1680 |
+
new_attr = name
|
1681 |
+
parts = config_string. lower ( ). split ( ';' )
|
1682 |
+
doublecolon_start = - 1
|
1683 |
+
self. _start_relational_field ( field )
|
1684 |
+
s = s. decode ( encoding, errors )
|
1685 |
+
if token == "not" and i + 1 < l :
|
1686 |
+
self. help_texts = getattr ( options, 'help_texts', None )
|
1687 |
+
if not match or match. group ( 1 ) :
|
1688 |
+
elif ch == 'P' :
|
1689 |
+
from django. core. wgi import get_wsgi_application
|
1690 |
+
self. appendlist ( force_text ( force_text ( "Django 1.0", encoding = 'ascii',
|
1691 |
+
while i < len ( subject ) and subject [ i ]!= p [ i ] :
|
1692 |
+
return value. replace ( tzinfo = None )
|
1693 |
+
return type ( self ). __bool__ ( self )
|
1694 |
+
parser. add_argument ( '--database', action ='store', dest = 'database', default = DEFAULT_DB_
|
1695 |
+
pk_value = form. instance. pk
|
1696 |
+
return [ etag_str ]
|
1697 |
+
readline. parse_and_bind ( " tab:complete" )
|
1698 |
+
while ch!= terminal_char :
|
1699 |
+
return self. _namespace_dict [ language_code ]
|
1700 |
+
self. changed_objects. append ( ( obj, form. changed_data ) )
|
1701 |
+
Content = delta. days + 24 + 60, 60. seconds // 60
|
1702 |
+
key += tuple ( type ( k, v ) for k, v in sorted_items )
|
1703 |
+
translation. activate ( saved_locale )
|
1704 |
+
for func in self. response_fixes :
|
1705 |
+
class DebugNode ( Node ) :
|
1706 |
+
import os
|
1707 |
+
try :
|
1708 |
+
if expires < now :
|
1709 |
+
from django. utils. translation import ugettext, ungettext
|
1710 |
+
def valid_value ( self, value ) :
|
1711 |
+
obj = mark_safe ( new_obj )
|
1712 |
+
MB = 1 << 40
|
1713 |
+
return r
|
1714 |
+
from django. core. exceptions import ImproperlyConfigured
|
1715 |
+
handle_app ( app_config. models_module, ** options )
|
1716 |
+
self. validate_key ( key )
|
1717 |
+
@ stringfilter
|
1718 |
+
self. xml = SimplerXMLGenerator ( self. stream, self. encoding [ 'encoding' ] )
|
1719 |
+
self. validate_key ( key )
|
1720 |
+
parser. add_argument ( '--noreload', action ='store_true', dest = 'use_false', default
|
1721 |
+
try :
|
1722 |
+
import cgi
|
1723 |
+
attrs [ 'error_messages' ] = error_messages
|
1724 |
+
return output
|
1725 |
+
def load_template ( self, template_name, template_dirs = None ) :
|
1726 |
+
def __str__ ( self ) :
|
1727 |
+
return len ( self. get_queryset ( ) )
|
1728 |
+
return compiled_parent. _render ( context )
|
1729 |
+
self. exception = Exception
|
1730 |
+
from django. core. files. base import File
|
1731 |
+
handlers = config. get ( 'handlers', EMPTY_DICT )
|
1732 |
+
for root in settings. ALLOWED_INCTUAGE_ROOT_roOT :
|
1733 |
+
for field in self. fields. values ( ) :
|
1734 |
+
def O ( self ) :
|
1735 |
+
return mark_safe ( n for n in nodelist ( force_text ( n ) )
|
1736 |
+
parser. add_argument ( '-o', action ='store', dest = 'interactive', default = DEFAULT_DB
|
1737 |
+
raise NotImplementedError ('subclasses of Storage must provide a listdir() method' )
|
1738 |
+
if is_templatized :
|
1739 |
+
import sys
|
1740 |
+
want_unicode = True
|
1741 |
+
_format_cache = { }
|
1742 |
+
return ( ret == 0 )
|
1743 |
+
self. message_context = None
|
1744 |
+
if varDAYS_re = { 1 : 'Mon', 'Sun' : { 'Sun' : 2 : _ ( 'Sat',
|
1745 |
+
for _, nodelist in self. conditions_nodelists :
|
1746 |
+
else :
|
1747 |
+
val = None
|
1748 |
+
if USE_INOTIFY :
|
1749 |
+
hidden_fields. append ( six. text_type ( bf ) )
|
1750 |
+
return bool ( value )
|
1751 |
+
from django. utils. six. moves. urllib. parse import parse_qsl, urlencode, urllsplit
|
1752 |
+
self. xml. startElement ( "field", { "rel" : field. name, "rel" : self. xml. startsw
|
1753 |
+
from django. db import connections, router, transaction, DEFAULT_DB_ALIAS
|
1754 |
+
self. active_readers += t
|
1755 |
+
return super ( DateField, self ). to_python ( value )
|
1756 |
+
def _get_scheme ( self ) :
|
1757 |
+
self. loaded_object_count = 0
|
1758 |
+
defaults [ 'empty_permitted' ] >= self. min_num
|
1759 |
+
raise TemplateDoesNotExist ( )
|
1760 |
+
s = s. replace ( '\\', '\\' )
|
1761 |
+
firstfirst = lambda x : force_text ( x ) if x else force_text ( x )
|
1762 |
+
return self. data. isoformat ( )
|
1763 |
+
result = super ( MultiValueField, self ). __deepcopy__ ( memo )
|
1764 |
+
elif count > 1 :
|
1765 |
+
self. stdout. write ( " - %s\n" % operation.out ( ) )
|
1766 |
+
return repr ( list ( self ) )
|
1767 |
+
@ python_2_unicode_compatible
|
1768 |
+
if '__str__' not in __dict__. __dict__ :
|
1769 |
+
from. import Error, Tags, register
|
1770 |
+
if self. data. minute == 0 and self. data. hour == 0 :
|
1771 |
+
field_desc +='#'. join ( comment_notes )
|
1772 |
+
else :
|
1773 |
+
return self. DTDIFF
|
1774 |
+
self. stdout. write ( self. template_with_clear ( "%s" % errors )
|
1775 |
+
traceback. print_exc ( )
|
1776 |
+
self. timezone = None
|
1777 |
+
return tpl. format ( self. name, self. sysid, self. pubid )
|
1778 |
+
else :
|
1779 |
+
raise NotImplementedError ( "This backend doesn't support % paths." )
|
1780 |
+
from. import six
|
1781 |
+
if isinstance ( rhs, dict ) and number :
|
1782 |
+
connection = connections [ options [ 'database' ] ]
|
1783 |
+
elif cls. _delegate_bytes :
|
1784 |
+
inner. update ( password. translate ( hmac. trans_unicCookie ) )
|
1785 |
+
if 'charset' in content_params :
|
1786 |
+
def __str__ ( self ) :
|
1787 |
+
with self. _lock. writer ( ) :
|
1788 |
+
if ip_str. count ( '.' )!= 3 :
|
1789 |
+
return self. dicts. pop ( )
|
1790 |
+
kwargs [ 'error_messages' ] = error_messages [ f. name ]
|
1791 |
+
return ( val, encoding )
|
1792 |
+
try :
|
1793 |
+
self. command_stack. append ( ( command, token. source ) )
|
1794 |
+
for character in name :
|
1795 |
+
def yesno ( value, arg = None ) :
|
1796 |
+
def incr ( self, key, delta = 1, version = None ) :
|
1797 |
+
os. makedirs ( migrations_directory )
|
1798 |
+
form. fields [ BLING_FIELD_NAME ] = IntegerField ( label = _ ( 'Enter a valid choice' ), initial = Integer
|
1799 |
+
using = options. get ( 'database' )
|
1800 |
+
return '%s%s' % six. text_type ( arg )
|
1801 |
+
hashlib. argv [ force_bytes ( key ) ] = hashlib. shadata ( force_bytes ( key )
|
1802 |
+
defaults = { 'auto_id' : self. auto_id, 'id_prefix' : self. auto_prefix ( ) }
|
1803 |
+
else :
|
1804 |
+
else :
|
1805 |
+
except StopIteration :
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3f52464be92b9e32f8566fd1ffc7d7fcdf897ac405f1f1ca198c7ba02a71a0e5
|
3 |
+
size 569360689
|
references.txt
ADDED
@@ -0,0 +1,1805 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) :
|
8 |
+
self . can_read . release ( )
|
9 |
+
__contains__ = has_header
|
10 |
+
if self . feed [ 'ttl' ] is not None :
|
11 |
+
def render ( self , context ) :
|
12 |
+
import datetime
|
13 |
+
if size :
|
14 |
+
raise TypeError ( "Non-integer base36 conversion input." )
|
15 |
+
def size ( self , name ) :
|
16 |
+
new_ip = ip_str . split ( ':' )
|
17 |
+
from decimal import Decimal , DecimalException
|
18 |
+
except AttributeError :
|
19 |
+
from django . core import signing
|
20 |
+
__Y = r'(?P<year>\d{4})'
|
21 |
+
value = dict . pop ( self , key , default )
|
22 |
+
if constant_time_compare ( sig , self . signature ( value ) ) :
|
23 |
+
return tempdir
|
24 |
+
raise TemplateSyntaxError ( "'templatetag' statement takes one argument" )
|
25 |
+
p_pattern = pattern . regex . pattern
|
26 |
+
if command . verbosity > 1 :
|
27 |
+
else :
|
28 |
+
styles = instructions . split ( ',' )
|
29 |
+
if isinstance ( s , Promise ) :
|
30 |
+
return ''
|
31 |
+
if options [ 'outlog' ] :
|
32 |
+
raise TemplateSyntaxError ( "Only 'silent' flag is allowed after cycle's name, not '%s'." % args [ - 1 ] )
|
33 |
+
parser . add_argument ( 'migration_name' , nargs = '?' , help = 'Database state will be brought to the state after that migration.' )
|
34 |
+
full_module_name = package_name + '.' + module_name
|
35 |
+
statements = sql_all ( app_config , self . style , connection )
|
36 |
+
handler . name = name
|
37 |
+
return new_value
|
38 |
+
current = getattr ( current , bit )
|
39 |
+
self . use_natural_foreign_keys = options . pop ( 'use_natural_foreign_keys' , False ) or self . use_natural_keys
|
40 |
+
pass
|
41 |
+
except AttributeError :
|
42 |
+
def with_metaclass ( meta , * bases ) :
|
43 |
+
commands . update ( { name : app_config . name for name in find_commands ( path ) } )
|
44 |
+
def attach ( self , filename = None , content = None , mimetype = None ) :
|
45 |
+
def load_command_class ( app_name , name ) :
|
46 |
+
url = quote ( url , safe = b'!*\'();:@&=+$,/?#[]~' )
|
47 |
+
for ldir in dirs :
|
48 |
+
_fields_ = [ ( '_offset' , _OFFSET ) , ( 'Pointer' , PVOID ) ]
|
49 |
+
return self . render ( )
|
50 |
+
renderer = CheckboxFieldRenderer
|
51 |
+
field_name = force_text ( field_name , encoding , errors = 'replace' )
|
52 |
+
def initial_form_count ( self ) :
|
53 |
+
continue
|
54 |
+
def __init__ ( self , language , deactivate = False ) :
|
55 |
+
raise TemplateSyntaxError ( "Invalid arguments provided to simple_tag" )
|
56 |
+
_format_cache [ cache_key ] = val
|
57 |
+
from django . utils . encoding import python_2_unicode_compatible
|
58 |
+
widget = URLInput
|
59 |
+
def __init__ ( self , data = None ) :
|
60 |
+
signals = 'signals'
|
61 |
+
return bool ( ret )
|
62 |
+
from django . core . exceptions import ImproperlyConfigured
|
63 |
+
foreground = dict ( ( color_names [ x ] , '3%s' % x ) for x in range ( 8 ) )
|
64 |
+
return "<DeserializedObject: %s.%s(pk=%s)>" % ( self . object . _meta . app_label , self . object . _meta . object_name , self . object . pk )
|
65 |
+
parser . add_argument ( '--extension' , '-e' , dest = 'extensions' , action = 'append' , default = [ 'py' ] , help = 'The file extension(s) to render (default: "py"). ' 'Separate multiple extensions with commas, or use ' '-e multiple times.' )
|
66 |
+
@ register . filter ( is_safe = False )
|
67 |
+
if response . streaming :
|
68 |
+
words = word_split_re . split ( force_text ( text ) )
|
69 |
+
def parse_http_date_safe ( date ) :
|
70 |
+
from xml . sax import handler
|
71 |
+
use_natural_foreign_keys = options . get ( 'use_natural_foreign_keys' ) or use_natural_keys
|
72 |
+
return RegexURLResolver ( r'^/' , [ ns_resolver ] )
|
73 |
+
return timedelta ( 0 )
|
74 |
+
self . loaddata ( fixture_labels )
|
75 |
+
def __setitem__ ( self , key , value ) :
|
76 |
+
pass
|
77 |
+
except UnicodeDecodeError :
|
78 |
+
self . instance = opts . model ( )
|
79 |
+
compile_func = partial ( generic_tag_compiler , params = params , varargs = varargs , varkw = varkw , defaults = defaults , name = function_name , takes_context = takes_context , node_class = SimpleNode )
|
80 |
+
raise CommandError ( 'Unknown app in excludes: %s' % exclude )
|
81 |
+
self . data = data or { }
|
82 |
+
from __future__ import unicode_literals
|
83 |
+
if ( form . cleaned_data and form . cleaned_data [ field ] is not None and form . cleaned_data [ unique_for ] is not None ) :
|
84 |
+
key = self . make_key ( key , version = version )
|
85 |
+
primary_keys = [ ]
|
86 |
+
self . _populate ( )
|
87 |
+
save . alters_data = True
|
88 |
+
if value is not result :
|
89 |
+
if command . use_argparse :
|
90 |
+
return attr
|
91 |
+
if num > self . _max_entries :
|
92 |
+
strip_entities = allow_lazy ( strip_entities , six . text_type )
|
93 |
+
return self . strptime ( value , format )
|
94 |
+
parser . add_argument ( '--no-wrap' , action = 'store_true' , dest = 'no_wrap' , default = False , help = "Don't break long message lines into several lines." )
|
95 |
+
from django . core . management . sql import sql_delete
|
96 |
+
self . _deleted_form_indexes . append ( i )
|
97 |
+
if args [ - 1 ] != "silent" :
|
98 |
+
self . _unget_history = [ ]
|
99 |
+
elif not isinstance ( file_name , six . string_types ) and is_iterable ( file_name ) :
|
100 |
+
form = ManagementForm ( auto_id = self . auto_id , prefix = self . prefix , initial = { TOTAL_FORM_COUNT : self . total_form_count ( ) , INITIAL_FORM_COUNT : self . initial_form_count ( ) , MIN_NUM_FORM_COUNT : self . min_num , MAX_NUM_FORM_COUNT : self . max_num } )
|
101 |
+
if isinstance ( receiver , types . FunctionType ) :
|
102 |
+
def __text_cast ( self ) :
|
103 |
+
else :
|
104 |
+
self . delete ( key , version = version )
|
105 |
+
from __future__ import unicode_literals
|
106 |
+
def urlizetrunc ( value , limit , autoescape = None ) :
|
107 |
+
return False
|
108 |
+
if self . can_delete :
|
109 |
+
nodelist_loop = parser . parse ( ( 'else' , end_tag ) )
|
110 |
+
from django . utils . safestring import mark_safe
|
111 |
+
def stringformat ( value , arg ) :
|
112 |
+
guessed_filename = params . get ( 'filename' ) or used_name
|
113 |
+
return self . text
|
114 |
+
import os
|
115 |
+
return lazy_number ( ungettext , six . text_type , singular = singular , plural = plural , number = number )
|
116 |
+
open_tags = [ ]
|
117 |
+
if name is None :
|
118 |
+
self . blocks = defaultdict ( list )
|
119 |
+
return None
|
120 |
+
clean = lambda self , x : len ( x )
|
121 |
+
apps . get_model ( 'auth' , 'Permission' )
|
122 |
+
template_with_clear = '%(clear)s <label for="%(clear_checkbox_id)s">%(clear_checkbox_label)s</label>'
|
123 |
+
def invalid_block_tag ( self , token , command , parse_until = None ) :
|
124 |
+
except ImportError :
|
125 |
+
@ register . tag ( 'with' )
|
126 |
+
def pretty_name ( name ) :
|
127 |
+
while len ( line ) > max_width :
|
128 |
+
pass
|
129 |
+
data_value = data if data is not None else ''
|
130 |
+
ipv4_re = re . compile ( r'^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$' )
|
131 |
+
response = None
|
132 |
+
fk = _get_foreign_key ( parent_model , model , fk_name = fk_name )
|
133 |
+
self . unlink ( self . name )
|
134 |
+
chunk = stream . read ( max_header_size )
|
135 |
+
for label in app_labels :
|
136 |
+
fixture . close ( )
|
137 |
+
if len ( val1 ) != len ( val2 ) :
|
138 |
+
else :
|
139 |
+
return mark_safe ( '\n' . join ( output ) )
|
140 |
+
default_validators = [ validators . validate_ipv4_address ]
|
141 |
+
except ( LookupError , BinasciiError ) as e :
|
142 |
+
from functools import wraps
|
143 |
+
self . _urlconf_module = self . urlconf_name
|
144 |
+
pass
|
145 |
+
remaining -= len ( emitting )
|
146 |
+
memo = { }
|
147 |
+
indent = options . get ( 'indent' )
|
148 |
+
def __init__ ( self , regex ) :
|
149 |
+
help = ''
|
150 |
+
last = self . data . day % 10
|
151 |
+
for location in format_locations :
|
152 |
+
raise ValueError ( "Unable to convert %r" % value )
|
153 |
+
def recipients ( self ) :
|
154 |
+
six . reraise ( UnreadablePostError , UnreadablePostError ( * e . args ) , sys . exc_info ( ) [ 2 ] )
|
155 |
+
for fname in filelist :
|
156 |
+
return LANG_INFO [ generic_lang_code ]
|
157 |
+
return metaclass ( 'temporary_class' , None , { } )
|
158 |
+
for ( k , v ) in kwargs . items ( ) :
|
159 |
+
if options [ 'plain' ] :
|
160 |
+
def get_internal_wsgi_application ( ) :
|
161 |
+
for lineno , line in enumerate ( content . splitlines ( True ) ) :
|
162 |
+
def contains ( source , inst ) :
|
163 |
+
def __getitem__ ( self , key ) :
|
164 |
+
if pathext is None :
|
165 |
+
else :
|
166 |
+
__all__ = ( 'WSGIServer' , 'WSGIRequestHandler' )
|
167 |
+
except Exception :
|
168 |
+
error_dict . setdefault ( NON_FIELD_ERRORS , [ ] ) . extend ( self . error_list )
|
169 |
+
with open ( old_file_name , 'rb' ) as old_file :
|
170 |
+
parser . add_argument ( '--keep-pot' , action = 'store_true' , dest = 'keep_pot' , default = False , help = "Keep .pot file after making messages. Useful when debugging." )
|
171 |
+
try :
|
172 |
+
idstring = '.' + idstring
|
173 |
+
return self . filter ( name , func , ** flags )
|
174 |
+
if len_values < 1 :
|
175 |
+
pass
|
176 |
+
self . file . seek ( 0 )
|
177 |
+
if link is not None :
|
178 |
+
except StopUpload as e :
|
179 |
+
open_method , mode = self . compression_formats [ cmp_fmt ]
|
180 |
+
else :
|
181 |
+
from django . forms import Form
|
182 |
+
if text [ 0 ] in 'xX' :
|
183 |
+
outer_html = '<ul{id_attr}>{content}</ul>'
|
184 |
+
def _get_size_from_underlying_file ( self ) :
|
185 |
+
from django . utils . six . moves . urllib . parse import urlparse
|
186 |
+
self . _stream = stream
|
187 |
+
value = str ( Header ( value , 'utf-8' , maxlinelen = sys . maxsize ) . encode ( ) )
|
188 |
+
self . second = parser . expression ( bp )
|
189 |
+
toktext = match . group ( name )
|
190 |
+
else :
|
191 |
+
else :
|
192 |
+
super ( JsonResponse , self ) . __init__ ( content = data , ** kwargs )
|
193 |
+
length = int ( arg )
|
194 |
+
self . configure_logger ( name , loggers [ name ] , True )
|
195 |
+
if start > upto :
|
196 |
+
def compile_messages ( self , locations ) :
|
197 |
+
excluded_apps . add ( app_config )
|
198 |
+
return self . represent_scalar ( 'tag:yaml.org,2002:str' , str ( data ) )
|
199 |
+
known_models = [ ]
|
200 |
+
run_syncdb = False
|
201 |
+
class PyLibMCCache ( BaseMemcachedCache ) :
|
202 |
+
import re
|
203 |
+
try :
|
204 |
+
return b'' . join ( T ) + F ( l ) [ : r ]
|
205 |
+
return lang_code
|
206 |
+
elif str ( level ) == level :
|
207 |
+
self . _raw_ipv6 = False
|
208 |
+
default_validators = [ validators . URLValidator ( ) ]
|
209 |
+
if item [ 'unique_id' ] is not None :
|
210 |
+
return formats . time_format ( value , arg )
|
211 |
+
import warnings
|
212 |
+
class ReferenceLocalTimezone ( tzinfo ) :
|
213 |
+
cleaned = self . clean ( value )
|
214 |
+
from django . utils import six
|
215 |
+
color_names = ( 'black' , 'red' , 'green' , 'yellow' , 'blue' , 'magenta' , 'cyan' , 'white' )
|
216 |
+
if language_code not in self . _regex_dict :
|
217 |
+
def _make_parser ( self ) :
|
218 |
+
from django . core . exceptions import ValidationError
|
219 |
+
return instance
|
220 |
+
if CONTEXT_SEPARATOR in result :
|
221 |
+
Iterator = object
|
222 |
+
if indent :
|
223 |
+
def Z ( self ) :
|
224 |
+
self . current_app = current_app
|
225 |
+
name = args [ 1 ]
|
226 |
+
html_class_attr = ''
|
227 |
+
roots = set ( dir ( cls ) ) & set ( convert )
|
228 |
+
from __future__ import unicode_literals
|
229 |
+
import sys
|
230 |
+
def static ( request ) :
|
231 |
+
from django . utils import six
|
232 |
+
class DummyCache ( BaseCache ) :
|
233 |
+
if getattr ( e , 'winerror' , 0 ) != 32 and getattr ( e , 'errno' , 0 ) != 13 :
|
234 |
+
from django . conf import settings
|
235 |
+
want_unicode = True
|
236 |
+
msgs = self . copy_plural_forms ( msgs , locale )
|
237 |
+
cache_key += '.%s' % getattr ( request , 'LANGUAGE_CODE' , get_language ( ) )
|
238 |
+
return int ( timeout )
|
239 |
+
parser . add_argument ( '--database' , default = DEFAULT_DB_ALIAS , help = 'Nominates a database to synchronize. Defaults to the "default" database.' )
|
240 |
+
self . _fname = None
|
241 |
+
raise TypeError ( msg )
|
242 |
+
if self . cc :
|
243 |
+
for k , v in ret . items ( ) :
|
244 |
+
return mark_safe ( '' . join ( bits ) )
|
245 |
+
DjangoSafeDumper . add_representer ( decimal . Decimal , DjangoSafeDumper . represent_decimal )
|
246 |
+
self . error ( "bad end tag: %r" % ( rawdata [ i : j ] , ) )
|
247 |
+
def __exit__ ( self , exc_type , exc_value , traceback ) :
|
248 |
+
field_desc += ')'
|
249 |
+
ctx = hashlib . md5 ( )
|
250 |
+
while current_chunk != b'' :
|
251 |
+
loop_dict [ 'first' ] = ( i == 0 )
|
252 |
+
content_type , content_type_extra = meta_data . get ( 'content-type' , ( '' , { } ) )
|
253 |
+
def pop ( self , k , * args ) :
|
254 |
+
def add_truncation_text ( self , text , truncate = None ) :
|
255 |
+
parser . add_argument ( '--fake' , action = 'store_true' , dest = 'fake' , default = False , help = 'Mark migrations as run without actually running them' )
|
256 |
+
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
|
257 |
+
digits = len ( digittuple )
|
258 |
+
__version__ = "0.1"
|
259 |
+
self . max_expr = max_expr
|
260 |
+
class DeserializationError ( Exception ) :
|
261 |
+
if autoescape :
|
262 |
+
def force_bytes ( s , encoding = 'utf-8' , strings_only = False , errors = 'strict' ) :
|
263 |
+
except VariableDoesNotExist :
|
264 |
+
naiveip_re = re . compile ( r"""^(?: (?P<addr> (?P<ipv4>\d{1,3}(?:\.\d{1,3}){3}) | # IPv4 address (?P<ipv6>\[[a-fA-F0-9:]+\]) | # IPv6 address (?P<fqdn>[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*) # FQDN ):)?(?P<port>\d+)$""" , re . X )
|
265 |
+
data = self . form . initial . get ( self . name , self . field . initial )
|
266 |
+
signals . request_finished . connect ( cache . close )
|
267 |
+
return None
|
268 |
+
return iter ( self . file )
|
269 |
+
prefix = settings . MEDIA_URL
|
270 |
+
symlink_path = os . path . join ( tmpdir , 'symlink' )
|
271 |
+
def render ( self , context ) :
|
272 |
+
use_natural_primary_keys = options . get ( 'use_natural_primary_keys' )
|
273 |
+
def inner ( self , * args ) :
|
274 |
+
if '::' not in ip_str and ip_str . count ( ':' ) != 7 :
|
275 |
+
parser . add_argument ( 'args' , metavar = 'app_label' , nargs = '*' , help = 'Specify the app label(s) to create migrations for.' )
|
276 |
+
if os . path . exists ( django_po ) :
|
277 |
+
now = datetime . now ( )
|
278 |
+
kw [ 'tzinfo' ] = tzinfo
|
279 |
+
raise ValidationError ( self . error_messages [ 'list' ] , code = 'list' )
|
280 |
+
class AdminEmailHandler ( logging . Handler ) :
|
281 |
+
t = select_template ( template_name , dirs )
|
282 |
+
if value in self . empty_values and self . required :
|
283 |
+
except TypeError :
|
284 |
+
from io import BytesIO
|
285 |
+
tell = property ( lambda self : self . file . tell )
|
286 |
+
continue
|
287 |
+
parser . delete_first_token ( )
|
288 |
+
class Field ( object ) :
|
289 |
+
import fcntl
|
290 |
+
if can_fail :
|
291 |
+
if template_source_loaders is None :
|
292 |
+
callback = pattern . _callback
|
293 |
+
call_command ( 'loaddata' , * fixture_labels , ** { 'verbosity' : verbosity } )
|
294 |
+
if value is None :
|
295 |
+
return int ( value )
|
296 |
+
elif '=' in part :
|
297 |
+
compare_to = [ var . resolve ( context , True ) for var in self . _varlist ]
|
298 |
+
def to_python ( self , value ) :
|
299 |
+
elif isinstance ( value , ( decimal . Decimal , float ) + six . integer_types ) :
|
300 |
+
@ contextlib . contextmanager
|
301 |
+
if event . path . endswith ( '.mo' ) :
|
302 |
+
if node . must_be_first and nodelist :
|
303 |
+
return False
|
304 |
+
self . auto_id = auto_id
|
305 |
+
def rss_attributes ( self ) :
|
306 |
+
message = ungettext_lazy ( 'Ensure this value has at most %(limit_value)d character (it has %(show_value)d).' , 'Ensure this value has at most %(limit_value)d characters (it has %(show_value)d).' , 'limit_value' )
|
307 |
+
if six . PY3 :
|
308 |
+
return '{%s}' % ', ' . join ( '%r: %r' % ( k , v ) for k , v in six . iteritems ( self ) )
|
309 |
+
pass
|
310 |
+
def base64_hmac ( salt , value , key ) :
|
311 |
+
del _active . value
|
312 |
+
for basedir in basedirs :
|
313 |
+
else :
|
314 |
+
full_path = self . path ( name )
|
315 |
+
if not self . form . is_bound :
|
316 |
+
del self . dicts [ - 1 ] [ key ]
|
317 |
+
self . reader_leaves ( )
|
318 |
+
regex = re . compile ( r'^(?:[a-z0-9\.\-]*)://' r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}(?<!-)\.?)|' r'localhost|' r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|' r'\[?[A-F0-9]*:[A-F0-9:]+\]?)' r'(?::\d+)?' r'(?:/?|[/?]\S+)$' , re . IGNORECASE )
|
319 |
+
class Widget ( six . with_metaclass ( MediaDefiningClass ) ) :
|
320 |
+
get_language = lambda : settings . LANGUAGE_CODE
|
321 |
+
from django . utils . six . moves . urllib . parse import urlsplit , urlunsplit
|
322 |
+
from email . mime . text import MIMEText
|
323 |
+
self . fed = [ ]
|
324 |
+
class MinLengthValidator ( BaseValidator ) :
|
325 |
+
self . lookups = None
|
326 |
+
raise TypeError ( "If the flags are set, regex must be a regular expression string." )
|
327 |
+
return default
|
328 |
+
attrs . setdefault ( 'step' , step )
|
329 |
+
import sys
|
330 |
+
break
|
331 |
+
value = ''
|
332 |
+
to_delete . add ( model )
|
333 |
+
file_ , _ , _ = imp . find_module ( module_name , [ entry ] )
|
334 |
+
self . _cache = _caches . setdefault ( name , { } )
|
335 |
+
html4_singlets = ( 'br' , 'col' , 'link' , 'base' , 'img' , 'param' , 'area' , 'hr' , 'input' )
|
336 |
+
if os . path . isdir ( template_dir ) :
|
337 |
+
def make_key ( self , key , version = None ) :
|
338 |
+
return self . __name
|
339 |
+
if not match :
|
340 |
+
def to_python ( self , value ) :
|
341 |
+
def upper ( value ) :
|
342 |
+
ip ( )
|
343 |
+
connection = connections [ database ]
|
344 |
+
def _format_value ( self , value ) :
|
345 |
+
ctypes , opts = parse_header ( content_type . encode ( 'ascii' ) )
|
346 |
+
initial = self . initial . get ( name , field . initial )
|
347 |
+
from django . utils import six
|
348 |
+
if data in self . children :
|
349 |
+
elif isinstance ( timezone , six . string_types ) and pytz is not None :
|
350 |
+
@ register . filter ( is_safe = True )
|
351 |
+
status_code = 400
|
352 |
+
if i >= self . initial_form_count ( ) and i >= self . min_num :
|
353 |
+
return ord ( bs [ 0 ] )
|
354 |
+
if is_ignored ( file_path , self . ignore_patterns ) :
|
355 |
+
if app_config . models_module is None or app_config in excluded_apps :
|
356 |
+
return code
|
357 |
+
chunks = ( ( 60 * 60 * 24 * 365 , ungettext_lazy ( '%d year' , '%d years' ) ) , ( 60 * 60 * 24 * 30 , ungettext_lazy ( '%d month' , '%d months' ) ) , ( 60 * 60 * 24 * 7 , ungettext_lazy ( '%d week' , '%d weeks' ) ) , ( 60 * 60 * 24 , ungettext_lazy ( '%d day' , '%d days' ) ) , ( 60 * 60 , ungettext_lazy ( '%d hour' , '%d hours' ) ) , ( 60 , ungettext_lazy ( '%d minute' , '%d minutes' ) ) )
|
358 |
+
else :
|
359 |
+
message = e
|
360 |
+
return type ( form . __name__ + str ( 'FormSet' ) , ( formset , ) , attrs )
|
361 |
+
rest = value
|
362 |
+
raise SuspiciousFileOperation ( "Attempted access to '%s' denied." % name )
|
363 |
+
hidden_widget = SplitHiddenDateTimeWidget
|
364 |
+
for node in compiled_parent . nodelist :
|
365 |
+
if isinstance ( template_name , ( list , tuple ) ) :
|
366 |
+
def get_str_from_wsgi ( environ , key , default ) :
|
367 |
+
errors = [ model . check ( ** kwargs ) for model in apps . get_models ( ) if app_configs is None or model . _meta . app_config in app_configs ]
|
368 |
+
def initial_form_count ( self ) :
|
369 |
+
def j ( self ) :
|
370 |
+
pass
|
371 |
+
if format not in _serializers :
|
372 |
+
offset_mins = int ( tzinfo [ - 2 : ] ) if len ( tzinfo ) > 3 else 0
|
373 |
+
return False
|
374 |
+
if not content_type :
|
375 |
+
elif cwords [ 0 ] in subcommands and cwords [ 0 ] != 'help' :
|
376 |
+
return ip_str
|
377 |
+
else :
|
378 |
+
class HttpResponseForbidden ( HttpResponse ) :
|
379 |
+
return
|
380 |
+
nodes . append ( self )
|
381 |
+
if instance is None :
|
382 |
+
if not ip_str . split ( ':' ) [ - 1 ] == hextet :
|
383 |
+
for app_dir in app_dirs :
|
384 |
+
WARNING = 30
|
385 |
+
os . chdir ( our_home_dir )
|
386 |
+
config [ 'mailhost' ] = self . as_tuple ( config [ 'mailhost' ] )
|
387 |
+
obj . widgets = copy . deepcopy ( self . widgets )
|
388 |
+
yield buf . read ( )
|
389 |
+
if isinstance ( self . _regex , six . string_types ) :
|
390 |
+
if hasattr ( timezone , 'normalize' ) :
|
391 |
+
from django . utils import termcolors
|
392 |
+
except ( ssl . SSLError , smtplib . SMTPServerDisconnected ) :
|
393 |
+
self . stdout . write ( 'ignoring file %s in %s\n' % ( filename , dirpath ) )
|
394 |
+
default_settings = module_to_dict ( global_settings )
|
395 |
+
self . importer ( used )
|
396 |
+
def decorating_function ( user_function ) :
|
397 |
+
pass
|
398 |
+
key = self . to_field_name or 'pk'
|
399 |
+
stats [ MISSES ] += 1
|
400 |
+
return False
|
401 |
+
from django . utils import six
|
402 |
+
if self . is_reversed :
|
403 |
+
for line in text . splitlines ( True ) :
|
404 |
+
return value
|
405 |
+
return self . forms [ index ]
|
406 |
+
if isinstance ( path , six . string_types ) :
|
407 |
+
all_models = [ ]
|
408 |
+
truncate_text = self . add_truncation_text ( '' , truncate )
|
409 |
+
help = "Prints the SQL statements for the named migration."
|
410 |
+
initial = [ ]
|
411 |
+
value = value . replace ( arg , '' )
|
412 |
+
httpd = httpd_cls ( server_address , WSGIRequestHandler , ipv6 = ipv6 )
|
413 |
+
_urllib_request_moved_attributes = [ MovedAttribute ( "urlopen" , "urllib2" , "urllib.request" ) , MovedAttribute ( "install_opener" , "urllib2" , "urllib.request" ) , MovedAttribute ( "build_opener" , "urllib2" , "urllib.request" ) , MovedAttribute ( "pathname2url" , "urllib" , "urllib.request" ) , MovedAttribute ( "url2pathname" , "urllib" , "urllib.request" ) , MovedAttribute ( "getproxies" , "urllib" , "urllib.request" ) , MovedAttribute ( "Request" , "urllib2" , "urllib.request" ) , MovedAttribute ( "OpenerDirector" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPDefaultErrorHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPRedirectHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPCookieProcessor" , "urllib2" , "urllib.request" ) , MovedAttribute ( "ProxyHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "BaseHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPPasswordMgr" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPPasswordMgrWithDefaultRealm" , "urllib2" , "urllib.request" ) , MovedAttribute ( "AbstractBasicAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPBasicAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "ProxyBasicAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "AbstractDigestAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPDigestAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "ProxyDigestAuthHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPSHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "FileHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "FTPHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "CacheFTPHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "UnknownHandler" , "urllib2" , "urllib.request" ) , MovedAttribute ( "HTTPErrorProcessor" , "urllib2" , "urllib.request" ) , MovedAttribute ( "urlretrieve" , "urllib" , "urllib.request" ) , MovedAttribute ( "urlcleanup" , "urllib" , "urllib.request" ) , MovedAttribute ( "URLopener" , "urllib" , "urllib.request" ) , MovedAttribute ( "FancyURLopener" , "urllib" , "urllib.request" ) , MovedAttribute ( "proxy_bypass" , "urllib" , "urllib.request" ) , ]
|
414 |
+
def empty_form ( self ) :
|
415 |
+
def handle ( self , * args , ** options ) :
|
416 |
+
other_dict = args [ 0 ]
|
417 |
+
if params . get ( 'filename' ) :
|
418 |
+
try :
|
419 |
+
raise TemplateSyntaxError ( "'%s' is not a valid tag library: %s" % ( taglib , e ) )
|
420 |
+
_translations [ language ] = DjangoTranslation ( language )
|
421 |
+
c = subject [ i ]
|
422 |
+
return IfChangedNode ( nodelist_true , nodelist_false , * values )
|
423 |
+
from django . core . management . base import BaseCommand , CommandError
|
424 |
+
_version = "0.91"
|
425 |
+
finally :
|
426 |
+
guessed_path = path . join ( tempdir , guessed_filename )
|
427 |
+
else :
|
428 |
+
value = '.' . join ( reversed ( parts ) )
|
429 |
+
def __init__ ( self ) :
|
430 |
+
class RssUserland091Feed ( RssFeed ) :
|
431 |
+
new_filenames . append ( os . path . join ( dirpath , filename ) )
|
432 |
+
parser . add_option ( '-v' , '--verbosity' , action = 'store' , dest = 'verbosity' , default = '1' , type = 'choice' , choices = [ '0' , '1' , '2' , '3' ] , help = 'Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output' )
|
433 |
+
urlconf = settings . ROOT_URLCONF
|
434 |
+
return [ '' ] , [ [ ] ]
|
435 |
+
else :
|
436 |
+
continue
|
437 |
+
def dec ( func ) :
|
438 |
+
if old_attr is None :
|
439 |
+
name , val = forbid_multi_line_headers ( name , val , self . encoding )
|
440 |
+
class Input ( Widget ) :
|
441 |
+
handler . startElement ( "channel" , self . root_attributes ( ) )
|
442 |
+
opts = tuple ( s for s in styles if s in opt_dict . keys ( ) )
|
443 |
+
warnings . warn ( "django.utils.tzinfo.FixedOffset will be removed in Django 1.9. " "Use django.utils.timezone.get_fixed_timezone instead." , RemovedInDjango19Warning )
|
444 |
+
self . fixture_object_count = 0
|
445 |
+
extra_classes . add ( self . form . required_css_class )
|
446 |
+
from django . utils import six
|
447 |
+
filelist = random . sample ( filelist , int ( num_entries / self . _cull_frequency ) )
|
448 |
+
try :
|
449 |
+
if path . exists ( new_path ) :
|
450 |
+
class Lexer ( object ) :
|
451 |
+
error_messages = opts . error_messages [ NON_FIELD_ERRORS ]
|
452 |
+
self . _table = table
|
453 |
+
return _trans . to_locale ( language )
|
454 |
+
tempdir = tempfile . mkdtemp ( prefix = prefix , suffix = '_extract' )
|
455 |
+
tt = ( 2037 , ) + tt [ 1 : ]
|
456 |
+
except Exception as e :
|
457 |
+
def __iter__ ( self ) :
|
458 |
+
else :
|
459 |
+
os . chmod ( full_path , self . file_permissions_mode )
|
460 |
+
filelist = [ os . path . join ( self . _dir , fname ) for fname in glob . glob1 ( self . _dir , '*%s' % self . cache_suffix ) ]
|
461 |
+
for log in existing :
|
462 |
+
for app_label in app_labels :
|
463 |
+
return fastcgi_help ( "Invalid combination of host, port, socket." )
|
464 |
+
def as_widget ( self , widget = None , attrs = None , only_initial = False ) :
|
465 |
+
return
|
466 |
+
SINGLE_BRACE_END = '}'
|
467 |
+
cache_key = 'views.decorators.cache.cache_header.%s.%s' % ( key_prefix , url . hexdigest ( ) )
|
468 |
+
substitutions [ 'clear_checkbox_id' ] = conditional_escape ( checkbox_id )
|
469 |
+
else :
|
470 |
+
if self . interactive :
|
471 |
+
yield safe_join ( template_dir , template_name )
|
472 |
+
if delta < 0 :
|
473 |
+
def error ( self , message ) :
|
474 |
+
return template_name
|
475 |
+
def update_watch ( sender = None , ** kwargs ) :
|
476 |
+
else :
|
477 |
+
val2 = self . var2 . resolve ( context , True )
|
478 |
+
class NullBooleanSelect ( Select ) :
|
479 |
+
if not isinstance ( value , ( bytes , six . text_type ) ) :
|
480 |
+
parser . add_argument ( '--noinput' , action = 'store_false' , dest = 'interactive' , default = True , help = 'Tells Django to NOT prompt the user for input of any kind.' )
|
481 |
+
return default
|
482 |
+
try :
|
483 |
+
msguniq_options = [ '--to-code=utf-8' ]
|
484 |
+
if self . locale_paths :
|
485 |
+
version = get_complete_version ( version )
|
486 |
+
strip_prefix = lambda s : s [ 1 : ] if s . startswith ( "u'" ) else s
|
487 |
+
ns = "http://www.w3.org/2005/Atom"
|
488 |
+
else :
|
489 |
+
app_dir = os . path . join ( app_config . path , 'fixtures' )
|
490 |
+
from gzip import GzipFile
|
491 |
+
self . active_writers = 0
|
492 |
+
raise ValueError ( "Negative base36 conversion input." )
|
493 |
+
def __eq__ ( self , other ) :
|
494 |
+
try :
|
495 |
+
self . lasttag = tag = match . group ( 1 ) . lower ( )
|
496 |
+
else :
|
497 |
+
secret = settings . SECRET_KEY
|
498 |
+
project_name , target = options . pop ( 'name' ) , options . pop ( 'directory' )
|
499 |
+
logger = logging . getLogger ( 'django.request' )
|
500 |
+
tmpdir = tempfile . mkdtemp ( )
|
501 |
+
def handle_m2m ( value ) :
|
502 |
+
except ImportError as e :
|
503 |
+
self . stdout . write ( " No optimizations possible." )
|
504 |
+
add_move ( MovedModule ( "_thread" , "thread" ) )
|
505 |
+
locale = options . get ( 'locale' )
|
506 |
+
self . cookies [ key ] [ 'expires' ] = cookie_date ( time . time ( ) + max_age )
|
507 |
+
if isinstance ( f , models . FileField ) :
|
508 |
+
os . unlink ( work_file )
|
509 |
+
block_re = re . compile ( r"""^\s*blocktrans(\s+.*context\s+((?:"[^"]*?")|(?:'[^']*?')))?(?:\s+|$)""" )
|
510 |
+
import time as _time
|
511 |
+
raise CommandError ( "Django doesn't know which syntax to use for your SQL statements,\n" + "because you haven't properly specified the ENGINE setting for the database.\n" + "see: https://docs.djangoproject.com/en/dev/ref/settings/#databases" )
|
512 |
+
if self . verbosity > 0 :
|
513 |
+
def delete ( self , key , version = None ) :
|
514 |
+
if representative is None :
|
515 |
+
self . language = language
|
516 |
+
callable = callable
|
517 |
+
iteritems = _iteritems
|
518 |
+
continue
|
519 |
+
syear = "%04d" % ( dt . year , )
|
520 |
+
m = re . match ( naiveip_re , options [ 'addrport' ] )
|
521 |
+
if isinstance ( template , ( list , tuple ) ) :
|
522 |
+
def __exit__ ( self , exc_type , exc_value , tb ) :
|
523 |
+
yield "from __future__ import unicode_literals"
|
524 |
+
try :
|
525 |
+
if timeout is None :
|
526 |
+
def end_serialization ( self ) :
|
527 |
+
if att_name == 'id' and extra_params == { 'primary_key' : True } :
|
528 |
+
try :
|
529 |
+
parser . add_argument ( '--plain' , action = 'store_true' , dest = 'plain' , help = 'Tells Django to use plain Python, not IPython or bpython.' )
|
530 |
+
class DisallowedRedirect ( SuspiciousOperation ) :
|
531 |
+
else :
|
532 |
+
raise CommandError ( "You must supply at least one app label when using --empty." )
|
533 |
+
i = 0
|
534 |
+
if value and hasattr ( value , "url" ) :
|
535 |
+
self . validate_key ( key )
|
536 |
+
if i >= 0 :
|
537 |
+
elif indexes [ column_name ] [ 'unique' ] :
|
538 |
+
else :
|
539 |
+
assert not isinstance ( to , six . string_types ) , '"to" argument must be a list or tuple'
|
540 |
+
WSGIServer = module . WSGIServer
|
541 |
+
def _createdir ( self ) :
|
542 |
+
if message_context :
|
543 |
+
else :
|
544 |
+
sites = [ ]
|
545 |
+
def set ( self , key , value , timeout = DEFAULT_TIMEOUT , version = None ) :
|
546 |
+
def setlistdefault ( self , key , default_list = None ) :
|
547 |
+
self . widget . choices = self . choices
|
548 |
+
trim_whitespace_re = re . compile ( '\s*\n\s*' )
|
549 |
+
input_type = 'text'
|
550 |
+
def __getinitargs__ ( self ) :
|
551 |
+
raise
|
552 |
+
location = '//%s' % self . get_full_path ( )
|
553 |
+
msgs = msgs . decode ( 'utf-8' )
|
554 |
+
try :
|
555 |
+
from django . utils import six
|
556 |
+
raise ValueError ( 'Unable to configure handler ' '%r: %s' % ( name , e ) )
|
557 |
+
with self . mutex :
|
558 |
+
from django . middleware . csrf import get_token
|
559 |
+
except OSError as e :
|
560 |
+
value = self . make_bytes ( value )
|
561 |
+
queryset = self . model . _default_manager
|
562 |
+
if settings . USE_TZ and value is not None and timezone . is_naive ( value ) :
|
563 |
+
with transaction . atomic ( using = connection . alias , savepoint = connection . features . can_rollback_ddl ) :
|
564 |
+
if serializers is None :
|
565 |
+
return self . template_cache [ key ]
|
566 |
+
def flatten ( self ) :
|
567 |
+
def is_valid_ipv6_address ( ip_str ) :
|
568 |
+
pass
|
569 |
+
url = None
|
570 |
+
self . _request_middleware = None
|
571 |
+
import importlib
|
572 |
+
self . version = params . get ( 'VERSION' , 1 )
|
573 |
+
if not isinstance ( index , ( slice , ) + six . integer_types ) :
|
574 |
+
@ register . filter ( is_safe = False )
|
575 |
+
members = [ member for member in self . _archive . getmembers ( ) if member . name != 'pax_global_header' ]
|
576 |
+
return obj
|
577 |
+
return list ( urlsplit ( url ) )
|
578 |
+
else :
|
579 |
+
raise AttributeError ( "%s could not be imported " % self . name )
|
580 |
+
if self . verbosity > 1 :
|
581 |
+
def validate ( self , value ) :
|
582 |
+
self . _cache . set ( key , value , self . get_backend_timeout ( timeout ) )
|
583 |
+
from django . utils . six . moves import zip
|
584 |
+
self . _setup ( )
|
585 |
+
builtins = [ ]
|
586 |
+
except ValueError :
|
587 |
+
daemon_kwargs [ 'out_log' ] = options [ 'outlog' ]
|
588 |
+
return
|
589 |
+
MIN_NUM_FORM_COUNT = 'MIN_NUM_FORMS'
|
590 |
+
validate_comma_separated_integer_list = RegexValidator ( comma_separated_int_list_re , _ ( 'Enter only digits separated by commas.' ) , 'invalid' )
|
591 |
+
def is_checked ( self ) :
|
592 |
+
return self . management_form . cleaned_data [ INITIAL_FORM_COUNT ]
|
593 |
+
pass
|
594 |
+
for closable in self . _closable_objects :
|
595 |
+
def __init__ ( self , * args , ** kwargs ) :
|
596 |
+
from django . forms . fields import Field , FileField
|
597 |
+
self . file . close ( )
|
598 |
+
parts = viewname . split ( ':' )
|
599 |
+
raise ValidationError ( ungettext ( "Please submit %d or more forms." , "Please submit %d or more forms." , self . min_num ) % self . min_num , code = 'too_few_forms' )
|
600 |
+
def get_json_data ( self , escape_html = False ) :
|
601 |
+
MAXSIZE = int ( ( 1 << 31 ) - 1 )
|
602 |
+
yield ''
|
603 |
+
result . parent = self
|
604 |
+
eol_message = message . replace ( str ( '\r\n' ) , str ( '\n' ) ) . replace ( str ( '\r' ) , str ( '\n' ) )
|
605 |
+
return 1 << 31
|
606 |
+
def _populate ( self ) :
|
607 |
+
if not token . contents :
|
608 |
+
from django . core import checks
|
609 |
+
if len ( parts ) > 1 and parts [ - 1 ] in self . compression_formats :
|
610 |
+
newline = "\n"
|
611 |
+
def widget_attrs ( self , widget ) :
|
612 |
+
pot_path = os . path . join ( path , '%s.pot' % str ( self . domain ) )
|
613 |
+
for field , error_list in error . items ( ) :
|
614 |
+
def _set_regex ( self , regex ) :
|
615 |
+
if dirname and not os . path . exists ( dirname ) :
|
616 |
+
output_transaction = True
|
617 |
+
return force_text ( ngettext ( singular , plural , number ) )
|
618 |
+
def add_prefix ( self , field_name ) :
|
619 |
+
return False
|
620 |
+
try :
|
621 |
+
original_path = os . path . join ( tmpdir , 'original' )
|
622 |
+
in_index = - 3 if is_reversed else - 2
|
623 |
+
lexer = lexer_class ( template_string , origin )
|
624 |
+
self . _non_form_errors = self . error_class ( )
|
625 |
+
if hasattr ( test_runner_class , 'add_arguments' ) :
|
626 |
+
def __repr__ ( self ) :
|
627 |
+
if var . endswith ( '.' ) :
|
628 |
+
import json
|
629 |
+
options = [ opt for opt in options if opt [ 0 ] not in prev_opts ]
|
630 |
+
fs_encoding = sys . getfilesystemencoding ( ) or sys . getdefaultencoding ( )
|
631 |
+
if isinstance ( message , ValidationError ) :
|
632 |
+
def __init__ ( self , stream_or_string , ** options ) :
|
633 |
+
return _import_module ( self . mod )
|
634 |
+
continue
|
635 |
+
if isinstance ( slots , str ) :
|
636 |
+
self . __starttag_text = None
|
637 |
+
return ( ord ( byte ) for byte in buf )
|
638 |
+
raise UnrecognizedArchiveFormat ( "File object not a recognized archive format." )
|
639 |
+
self . options . update ( { 'use_decimal' : False } )
|
640 |
+
def validate ( self , value ) :
|
641 |
+
fail_message = 'created'
|
642 |
+
states = { 'div' : both_before + [ Tok ( "punct" , literals ( "/= /" ) , next = 'reg' ) , ] + both_after , 'reg' : both_before + [ Tok ( "regex" , r""" / # opening slash # First character is.. ( [^*\\/[] # anything but * \ / or [ | \\. # or an escape sequence | \[ # or a class, which has ( [^\]\\] # anything but \ or ] | \\. # or an escape sequence )* # many times \] ) # Following characters are same, except for excluding a star ( [^\\/[] # anything but \ / or [ | \\. # or an escape sequence | \[ # or a class, which has ( [^\]\\] # anything but \ or ] | \\. # or an escape sequence )* # many times \] )* # many times / # closing slash [a-zA-Z0-9]* # trailing flags """ , next = 'div' ) , ] + both_after , }
|
643 |
+
for item in values :
|
644 |
+
def utcoffset ( self , dt ) :
|
645 |
+
leave_locale_alone = False
|
646 |
+
from __future__ import unicode_literals
|
647 |
+
def __str__ ( self ) :
|
648 |
+
end = rawdata [ k : endpos ] . strip ( )
|
649 |
+
return zipfile . ZipFile . read ( self , self . namelist ( ) [ 0 ] )
|
650 |
+
def render ( self , context ) :
|
651 |
+
confirm = input ( 'Please enter either "yes" or "no": ' )
|
652 |
+
encoded = encoded . replace ( ";" , "\\073" ) . replace ( "," , "\\054" )
|
653 |
+
widget . is_localized = self . is_localized
|
654 |
+
klass . deconstruct = deconstruct
|
655 |
+
if extend :
|
656 |
+
connection = connections [ options [ 'database' ] ]
|
657 |
+
try :
|
658 |
+
warnings . warn ( "No fixture named '%s' found." % fixture_name )
|
659 |
+
jan1_weekday = self . data . replace ( month = 1 , day = 1 ) . weekday ( ) + 1
|
660 |
+
if self . lookups is not None :
|
661 |
+
init_path = os . path . join ( migrations_directory , "__init__.py" )
|
662 |
+
return value
|
663 |
+
value = timezone . normalize ( value )
|
664 |
+
@ property
|
665 |
+
subject = self . subject
|
666 |
+
return '0'
|
667 |
+
super ( LoaderOrigin , self ) . __init__ ( display_name )
|
668 |
+
if pos >= last :
|
669 |
+
from django . conf import settings
|
670 |
+
def normalize ( pattern ) :
|
671 |
+
import operator
|
672 |
+
finally :
|
673 |
+
def tzname ( self , dt ) :
|
674 |
+
if self . allow_files :
|
675 |
+
if custom_sql :
|
676 |
+
msg = SafeMIMEMultipart ( _subtype = self . alternative_subtype , encoding = encoding )
|
677 |
+
if field in self . cleaned_data :
|
678 |
+
if args and kwargs :
|
679 |
+
builtins . append ( import_library ( module ) )
|
680 |
+
return self . compress ( [ ] )
|
681 |
+
def parse_endtag ( self , i ) :
|
682 |
+
import types
|
683 |
+
def M ( self ) :
|
684 |
+
self . creation_counter = Field . creation_counter
|
685 |
+
attrs = { 'model' : model }
|
686 |
+
except ( ImportError , AttributeError ) as e :
|
687 |
+
def __getitem__ ( self , key ) :
|
688 |
+
if "=" in x :
|
689 |
+
def tell ( self ) :
|
690 |
+
raise AttributeError ( "This QueryDict instance is immutable" )
|
691 |
+
@ python_2_unicode_compatible
|
692 |
+
if p . find ( ':_(' ) >= 0 :
|
693 |
+
flags = 0
|
694 |
+
target_app_labels_only = False
|
695 |
+
class IfChangedNode ( Node ) :
|
696 |
+
Image . open ( file ) . verify ( )
|
697 |
+
if self . selected_fields is None or field . attname in self . selected_fields :
|
698 |
+
name = self . split_leading_dir ( name ) [ 1 ]
|
699 |
+
from django . utils import six
|
700 |
+
except AttributeError :
|
701 |
+
return arg
|
702 |
+
return _trans . get_language_from_path ( path )
|
703 |
+
if ( db . settings_dict [ 'ATOMIC_REQUESTS' ] and db . alias not in non_atomic_requests ) :
|
704 |
+
class InlineForeignKeyField ( Field ) :
|
705 |
+
if is_aware ( o ) :
|
706 |
+
try :
|
707 |
+
self . years = range ( this_year , this_year + 10 )
|
708 |
+
for refto , refs in references . items ( ) :
|
709 |
+
from django . core . exceptions import AppRegistryNotReady
|
710 |
+
format_module_path = settings . FORMAT_MODULE_PATH
|
711 |
+
if ch in '*?+' :
|
712 |
+
try :
|
713 |
+
else :
|
714 |
+
if sent :
|
715 |
+
_cookie_encodes_correctly = http_cookies . SimpleCookie ( ) . value_encode ( ';' ) == ( ';' , '"\\073"' )
|
716 |
+
nodelist_empty = parser . parse ( ( 'endfor' , ) )
|
717 |
+
except ( KeyError , AttributeError ) as exc :
|
718 |
+
class ObjectDoesNotExist ( Exception ) :
|
719 |
+
@ register . filter ( is_safe = False )
|
720 |
+
return iri
|
721 |
+
value = environ . get ( str ( key ) , str ( default ) )
|
722 |
+
def __init__ ( self , lexer ) :
|
723 |
+
return int ( time . mktime ( self . data . timetuple ( ) ) )
|
724 |
+
try :
|
725 |
+
safe_data = { }
|
726 |
+
import stat
|
727 |
+
def write_items ( self , handler ) :
|
728 |
+
wrap = allow_lazy ( wrap , six . text_type )
|
729 |
+
from __future__ import unicode_literals
|
730 |
+
for path in paths :
|
731 |
+
sys . stdout . write ( self . main_help_text ( ) + '\n' )
|
732 |
+
def __init__ ( self ) :
|
733 |
+
import sys
|
734 |
+
def npgettext ( context , singular , plural , number ) :
|
735 |
+
def __init__ ( self ) :
|
736 |
+
from django . utils . module_loading import import_string
|
737 |
+
else :
|
738 |
+
continue
|
739 |
+
import warnings
|
740 |
+
if exp is not None and exp < time . time ( ) :
|
741 |
+
if t is not None :
|
742 |
+
time_str = time_str . decode ( 'utf-8' )
|
743 |
+
field_notes . append ( 'Field renamed because of name conflict.' )
|
744 |
+
super ( QueryDict , self ) . __setitem__ ( key , value )
|
745 |
+
def write_message ( self , message ) :
|
746 |
+
def extract ( self ) :
|
747 |
+
return mark_safe ( '\n' . join ( output ) )
|
748 |
+
super ( LocaleRegexURLResolver , self ) . __init__ ( None , urlconf_name , default_kwargs , app_name , namespace )
|
749 |
+
var_obj = None
|
750 |
+
response = middleware . process_template_response ( request , response )
|
751 |
+
loop_dict [ 'counter' ] = i + 1
|
752 |
+
return size
|
753 |
+
is_a_tty = hasattr ( sys . stdout , 'isatty' ) and sys . stdout . isatty ( )
|
754 |
+
if isinstance ( offset , timedelta ) :
|
755 |
+
self . _assert_mutable ( )
|
756 |
+
return int ( values [ 0 ] ) , ch
|
757 |
+
import codecs
|
758 |
+
try :
|
759 |
+
@ register . tag
|
760 |
+
result . setFormatter ( formatter )
|
761 |
+
memo [ id ( self ) ] = result
|
762 |
+
other = other . __cast ( )
|
763 |
+
if isinstance ( other , Promise ) :
|
764 |
+
else :
|
765 |
+
self . _cull ( )
|
766 |
+
e . args = ( "Problem installing fixtures: %s" % e , )
|
767 |
+
os . makedirs ( directory )
|
768 |
+
raise OverflowError ( 'dklen too big' )
|
769 |
+
return clean_ipv6_address ( value , self . unpack_ipv4 )
|
770 |
+
from importlib import import_module
|
771 |
+
parser . add_argument ( '--pks' , dest = 'primary_keys' , help = "Only dump objects with given primary keys. " "Accepts a comma separated list of keys. " "This option will only work when you specify one model." )
|
772 |
+
if header_end == - 1 :
|
773 |
+
def b ( s ) :
|
774 |
+
g = generator . BytesGenerator ( fp , mangle_from_ = False )
|
775 |
+
import unicodedata
|
776 |
+
if t . token_type == TOKEN_BLOCK :
|
777 |
+
if len ( self . namelist ( ) ) != 1 :
|
778 |
+
else :
|
779 |
+
for medium in extend :
|
780 |
+
if url :
|
781 |
+
from collections import defaultdict
|
782 |
+
now = datetime . datetime ( now . year , now . month , now . day )
|
783 |
+
while i < len ( subject ) and subject [ i ] != c :
|
784 |
+
self . _changed_data = [ ]
|
785 |
+
yield parse_boundary_stream ( sub_stream , 1024 )
|
786 |
+
return value . replace ( tzinfo = timezone )
|
787 |
+
def __init__ ( self , cyclevars , variable_name = None , silent = False ) :
|
788 |
+
if six . PY3 :
|
789 |
+
return value . strftime ( format )
|
790 |
+
daemon_kwargs [ 'err_log' ] = options [ 'errlog' ]
|
791 |
+
for migration_name in migration_names :
|
792 |
+
from itertools import chain
|
793 |
+
return obj_dict
|
794 |
+
buffer_ = line
|
795 |
+
raise ValueError ( "Key '%s' not found" % key )
|
796 |
+
if self . _request_middleware is None :
|
797 |
+
def render ( self , name , value , attrs = None ) :
|
798 |
+
TYPE = RAW
|
799 |
+
TYPE = FILE
|
800 |
+
tok = '"' + guts + '"'
|
801 |
+
condition = TemplateIfParser ( parser , bits ) . parse ( )
|
802 |
+
return apps . get_model ( model_identifier )
|
803 |
+
return loader . get_template ( template )
|
804 |
+
def catalog ( ) :
|
805 |
+
def handle_data ( self , d ) :
|
806 |
+
def lock ( f , flags ) :
|
807 |
+
template_string = force_text ( template_string )
|
808 |
+
if not os . path . exists ( potfile ) :
|
809 |
+
self . active_writers -= 1
|
810 |
+
if hasattr ( self , '_coerce' ) :
|
811 |
+
return _trans . templatize ( src , origin )
|
812 |
+
def compile_string ( template_string , origin ) :
|
813 |
+
try :
|
814 |
+
raise NotImplementedError ( 'Subclasses must implement this method.' )
|
815 |
+
@ wraps ( func )
|
816 |
+
return value . replace ( " " , "\xa0" )
|
817 |
+
request_middleware . append ( mw_instance . process_request )
|
818 |
+
if not boundary or not cgi . valid_boundary ( boundary ) :
|
819 |
+
val = list ( val )
|
820 |
+
except ValueError :
|
821 |
+
import re
|
822 |
+
capfirst = allow_lazy ( capfirst , six . text_type )
|
823 |
+
def eval ( self , context ) :
|
824 |
+
from django . utils . six import StringIO
|
825 |
+
self . _size = size
|
826 |
+
errors = [ ]
|
827 |
+
if 'error_messages' in kwargs :
|
828 |
+
self . _add_local_translations ( )
|
829 |
+
class Node ( object ) :
|
830 |
+
if os . path . sep in fixture_name :
|
831 |
+
def __init__ ( self , tokens ) :
|
832 |
+
if primary_keys :
|
833 |
+
def __mod__ ( self , rhs ) :
|
834 |
+
except socket . error as e :
|
835 |
+
self . __dict__ [ '_setupfunc' ] = func
|
836 |
+
data = None
|
837 |
+
from django . utils . text import get_valid_filename
|
838 |
+
elif auto_id :
|
839 |
+
return json . dumps ( self . get_json_data ( escape_html ) )
|
840 |
+
self . nodelist_empty = NodeList ( )
|
841 |
+
except ValidationError as e :
|
842 |
+
app = 'django'
|
843 |
+
try :
|
844 |
+
for char in self . add_truncation_text ( '' , truncate ) :
|
845 |
+
etags = ETAG_MATCH . findall ( etag_str )
|
846 |
+
if field_type == 'AutoField(' :
|
847 |
+
c = SimpleCookie ( )
|
848 |
+
attrs = { "model" : smart_text ( obj . _meta ) }
|
849 |
+
return ip_str . rsplit ( ':' , 1 ) [ 1 ]
|
850 |
+
def flatten_result ( source ) :
|
851 |
+
if request . _post_parse_error :
|
852 |
+
except KeyError :
|
853 |
+
for f in opts . fields :
|
854 |
+
constant_string = constant_string . replace ( "\n" , "" )
|
855 |
+
def incr ( self , key , delta = 1 , version = None ) :
|
856 |
+
if type ( result ) in ( ConvertingDict , ConvertingList , ConvertingTuple ) :
|
857 |
+
message = message % ( ', ' . join ( missing_fields ) , opts . model . __name__ )
|
858 |
+
comment_lineno_cache = None
|
859 |
+
else :
|
860 |
+
result = avoid_wrapping ( name % count )
|
861 |
+
values = [ ]
|
862 |
+
if hasattr ( field . rel . to . _default_manager , 'get_by_natural_key' ) :
|
863 |
+
self . dict = OrderedDict ( ( ( x , None ) for x in iterable ) if iterable else [ ] )
|
864 |
+
else :
|
865 |
+
@ register . tag ( 'filter' )
|
866 |
+
def _samefile ( src , dst ) :
|
867 |
+
requires_system_checks = False
|
868 |
+
elif not hasattr ( message , 'message' if six . PY3 else 'code' ) :
|
869 |
+
except KeyError :
|
870 |
+
try :
|
871 |
+
try :
|
872 |
+
m = int ( d ) - d
|
873 |
+
def make_key ( self , key , version = None ) :
|
874 |
+
filemsg = 'file %s, ' % origin
|
875 |
+
if hasattr ( cls , k ) :
|
876 |
+
else :
|
877 |
+
raise TemplateSyntaxError ( "back called without some previous " "parsing" )
|
878 |
+
for field_name in self . fields :
|
879 |
+
self . _upload_handlers = upload_handlers
|
880 |
+
if options . get ( 'no_color' ) :
|
881 |
+
if self . instance . pk is not None :
|
882 |
+
try :
|
883 |
+
return klass
|
884 |
+
value = [ ]
|
885 |
+
try :
|
886 |
+
import time
|
887 |
+
raise NoReverseMatch ( "%s is not a registered namespace" % key )
|
888 |
+
nodelist . append ( node )
|
889 |
+
error_messages [ 'invalid' ] = error_message
|
890 |
+
if options . traceback or not isinstance ( e , CommandError ) :
|
891 |
+
return self . _choices
|
892 |
+
try :
|
893 |
+
try :
|
894 |
+
try :
|
895 |
+
to_python = self . _get_to_python ( pk_field )
|
896 |
+
self . _varlist = varlist
|
897 |
+
return encoding
|
898 |
+
if now and not isinstance ( now , datetime . datetime ) :
|
899 |
+
if token . contents == 'else' :
|
900 |
+
return results
|
901 |
+
pluralmatch = plural_re . match ( t . contents )
|
902 |
+
for middleware_method in self . _exception_middleware :
|
903 |
+
from xml . sax . saxutils import XMLGenerator
|
904 |
+
if fields :
|
905 |
+
for c in reversed ( self . __class__ . __mro__ ) :
|
906 |
+
from django . utils import six
|
907 |
+
return
|
908 |
+
return '<Page %s of %s>' % ( self . number , self . paginator . num_pages )
|
909 |
+
else :
|
910 |
+
default_error_messages = { 'invalid' : _ ( 'Enter a number.' ) , 'max_digits' : ungettext_lazy ( 'Ensure that there are no more than %(max)s digit in total.' , 'Ensure that there are no more than %(max)s digits in total.' , 'max' ) , 'max_decimal_places' : ungettext_lazy ( 'Ensure that there are no more than %(max)s decimal place.' , 'Ensure that there are no more than %(max)s decimal places.' , 'max' ) , 'max_whole_digits' : ungettext_lazy ( 'Ensure that there are no more than %(max)s digit before the decimal point.' , 'Ensure that there are no more than %(max)s digits before the decimal point.' , 'max' ) , }
|
911 |
+
_called_from_command_line = False
|
912 |
+
if opts . model :
|
913 |
+
def copy ( self ) :
|
914 |
+
collect = [ ]
|
915 |
+
if len ( value ) != 1 :
|
916 |
+
self . blocks = dict ( ( n . name , n ) for n in nodelist . get_nodes_by_type ( BlockNode ) )
|
917 |
+
label = ''
|
918 |
+
old_attr = name
|
919 |
+
ch , escaped = next ( input_iter )
|
920 |
+
except ( AttributeError , UnsupportedOperation ) :
|
921 |
+
raise ValidationError ( self . error_messages [ 'invalid_date' ] , code = 'invalid_date' )
|
922 |
+
def __init__ ( self , request , template , context = None , content_type = None , status = None , current_app = None ) :
|
923 |
+
if self . field . cache_choices :
|
924 |
+
def fix_location_header ( request , response ) :
|
925 |
+
del attr
|
926 |
+
pk_key = "%s-%s" % ( self . add_prefix ( i ) , self . model . _meta . pk . name )
|
927 |
+
from __future__ import unicode_literals
|
928 |
+
from __future__ import unicode_literals
|
929 |
+
def widget_attrs ( self , widget ) :
|
930 |
+
value = self . to_python ( value ) . strip ( )
|
931 |
+
yield line
|
932 |
+
self . file . write ( raw_data )
|
933 |
+
self . empty_label = empty_label
|
934 |
+
TemplateLoader = import_string ( loader )
|
935 |
+
alter_sql . extend ( [ '-- ' + sql for sql in connection . creation . sql_for_pending_references ( model , style , pending_references ) ] )
|
936 |
+
if response . streaming :
|
937 |
+
output . insert ( 0 , error_row % force_text ( top_errors ) )
|
938 |
+
@ register . filter ( is_safe = True )
|
939 |
+
raise ImproperlyConfigured ( 'Loader does not define a "load_template" callable template source loader' )
|
940 |
+
new_value . append ( self . coerce ( choice ) )
|
941 |
+
for i in range ( 0 , self . total_form_count ( ) ) :
|
942 |
+
raise NoReverseMatch ( "Reverse for '%s' with arguments '%s' and keyword " "arguments '%s' not found. %d pattern(s) tried: %s" % ( lookup_view_s , args , kwargs , len ( patterns ) , patterns ) )
|
943 |
+
except CommandError :
|
944 |
+
table_output . append ( " " . join ( field_output ) )
|
945 |
+
response = self . get_response ( request )
|
946 |
+
import django . core . checks . compatibility . django_1_7_0
|
947 |
+
escaped = True
|
948 |
+
self . unclosed_block_tag ( [ endtag ] )
|
949 |
+
def __init__ ( self , cmd , ** kwargs ) :
|
950 |
+
if len ( list_ ) == 0 :
|
951 |
+
return value
|
952 |
+
try :
|
953 |
+
max_width = min ( ( line . endswith ( '\n' ) and width + 1 or width ) , width )
|
954 |
+
result = getattr ( t , translation_function ) ( eol_message )
|
955 |
+
import hmac
|
956 |
+
from django . utils import six , lru_cache
|
957 |
+
models = app_config . get_models ( include_auto_created = True )
|
958 |
+
raise TemplateDoesNotExist ( ', ' . join ( not_found ) )
|
959 |
+
return False
|
960 |
+
__all__ = ( 'Template' , 'Context' , 'RequestContext' , 'compile_string' )
|
961 |
+
def conditional_escape ( text ) :
|
962 |
+
if not isinstance ( candidate , six . string_types ) :
|
963 |
+
comment = [ ]
|
964 |
+
emit_post_migrate_signal ( set ( all_models ) , verbosity , interactive , database )
|
965 |
+
full_statement . append ( ' %s%s' % ( line , ',' if i < len ( table_output ) - 1 else '' ) )
|
966 |
+
if ch == '?' :
|
967 |
+
self . inverse_match = inverse_match
|
968 |
+
self . _pk_field = pk = self . model . _meta . pk
|
969 |
+
return super ( Error , self ) . __init__ ( ERROR , * args , ** kwargs )
|
970 |
+
if token . token_type == 0 :
|
971 |
+
if 'forloop' in context :
|
972 |
+
class BoundaryIter ( six . Iterator ) :
|
973 |
+
self . path_info = path_info
|
974 |
+
def clean ( self , value ) :
|
975 |
+
args . append ( work_file )
|
976 |
+
if html :
|
977 |
+
self . is_reversed = is_reversed
|
978 |
+
def total_ordering ( cls ) :
|
979 |
+
return ''
|
980 |
+
final_output . append ( '-- The following references should be added but depend on non-existent tables:' )
|
981 |
+
choices = [ ( i , i ) for i in range ( 1 , 32 ) ]
|
982 |
+
self . _clean_form ( )
|
983 |
+
for handler in handlers :
|
984 |
+
if imatch :
|
985 |
+
return None
|
986 |
+
factor = 0
|
987 |
+
from django . core . management . sql import sql_custom
|
988 |
+
l = len ( tokens )
|
989 |
+
if fk_name :
|
990 |
+
except HTMLParseError :
|
991 |
+
view_name = callback . __name__
|
992 |
+
def __setattr__ ( self , name , value ) :
|
993 |
+
self . use_l10n = use_l10n
|
994 |
+
match = kwarg_re . match ( bits [ 0 ] )
|
995 |
+
for hook in sys . path_hooks :
|
996 |
+
intrans = False
|
997 |
+
warnings . warn ( warn_msg , TranslatorCommentWarning )
|
998 |
+
def compress ( self , data_list ) :
|
999 |
+
class ViewDoesNotExist ( Exception ) :
|
1000 |
+
final_output . extend ( output )
|
1001 |
+
requires_system_checks = False
|
1002 |
+
else :
|
1003 |
+
if self . choices :
|
1004 |
+
callback , param_dict = resolver . resolve_error_handler ( status_code )
|
1005 |
+
def render ( self ) :
|
1006 |
+
return data
|
1007 |
+
else :
|
1008 |
+
level = config . pop ( 'level' , None )
|
1009 |
+
res , args = flatten_result ( item )
|
1010 |
+
obj_pk = obj_pk . pk
|
1011 |
+
return False
|
1012 |
+
class NoReverseMatch ( Exception ) :
|
1013 |
+
import json
|
1014 |
+
global _default
|
1015 |
+
def configure_handler ( self , config ) :
|
1016 |
+
if ch != '\\' :
|
1017 |
+
else :
|
1018 |
+
translated = translated % rhs
|
1019 |
+
if location is None :
|
1020 |
+
biggest_number = max ( [ x for x in numbers if x is not None ] )
|
1021 |
+
wsgi_opts = { 'maxSpare' : int ( options [ "maxspare" ] ) , 'minSpare' : int ( options [ "minspare" ] ) , 'maxChildren' : int ( options [ "maxchildren" ] ) , 'maxRequests' : int ( options [ "maxrequests" ] ) , }
|
1022 |
+
raise AttributeError ( "You cannot set content to a 304 (Not Modified) response" )
|
1023 |
+
is_usable = True
|
1024 |
+
raise ValueError ( "Not a string literal: %r" % s )
|
1025 |
+
yield 'year'
|
1026 |
+
return scheme in self . url_schemes
|
1027 |
+
if six . PY2 and value > sys . maxint :
|
1028 |
+
if match :
|
1029 |
+
def extend_nodelist ( self , nodelist , node , token ) :
|
1030 |
+
return any ( form . has_changed ( ) for form in self )
|
1031 |
+
construct_instance_exclude = list ( exclude )
|
1032 |
+
if new_conn_created :
|
1033 |
+
@ register . tag ( 'block' )
|
1034 |
+
if bf_errors :
|
1035 |
+
if not self . is_bound :
|
1036 |
+
if var . startswith ( '_(' ) and var . endswith ( ')' ) :
|
1037 |
+
__M = r'(?P<mon>\w{3})'
|
1038 |
+
return TemplateTagNode ( tag )
|
1039 |
+
def strftime ( self , fmt ) :
|
1040 |
+
if isinstance ( stream_or_string , six . string_types ) :
|
1041 |
+
setattr ( Module_six_moves_urllib_response , attr . name , attr )
|
1042 |
+
def write ( self , outfile , encoding ) :
|
1043 |
+
continue
|
1044 |
+
def add_filters ( self , filterer , filters ) :
|
1045 |
+
time_str = time_str . decode ( 'utf-8' )
|
1046 |
+
__dir__ = new_method_proxy ( dir )
|
1047 |
+
def __len__ ( self ) :
|
1048 |
+
bits = token . split_contents ( ) [ 1 : ]
|
1049 |
+
return offset . days * 86400 + offset . seconds
|
1050 |
+
yield b'' . join ( self )
|
1051 |
+
import warnings
|
1052 |
+
else :
|
1053 |
+
import warnings
|
1054 |
+
return ( TYPE , outdict , stream )
|
1055 |
+
from collections import OrderedDict
|
1056 |
+
def safe_join ( base , * paths ) :
|
1057 |
+
newline = unicode ( "\n" )
|
1058 |
+
exp = datetime . utcfromtimestamp ( timeout )
|
1059 |
+
LockFileEx . restype = BOOL
|
1060 |
+
return _serializers [ format ] . Serializer
|
1061 |
+
unpack = num_loopvars > 1
|
1062 |
+
words [ i ] = mark_safe ( word )
|
1063 |
+
initLock = Lock ( )
|
1064 |
+
@ deconstructible
|
1065 |
+
chunk_size = 64 * 2 ** 10
|
1066 |
+
def __init__ ( self , conditions_nodelists ) :
|
1067 |
+
def _save ( self , name , content ) :
|
1068 |
+
return '%s_%s' % ( id_ , first_select )
|
1069 |
+
if len ( key ) > MEMCACHE_MAX_KEY_LENGTH :
|
1070 |
+
if formfield :
|
1071 |
+
cache = caches [ settings . CACHE_MIDDLEWARE_ALIAS ]
|
1072 |
+
return nodelist_true_output or self . nodelist_true . render ( context )
|
1073 |
+
return repr ( list ( self ) )
|
1074 |
+
if number > self . num_pages :
|
1075 |
+
return force_text ( name . replace ( '\\' , '/' ) )
|
1076 |
+
return False
|
1077 |
+
save . alters_data = True
|
1078 |
+
s = s1
|
1079 |
+
return 'tag:%s%s:%s/%s' % ( bits . hostname , d , bits . path , bits . fragment )
|
1080 |
+
return 0
|
1081 |
+
if cache_timeout is None :
|
1082 |
+
class TemplateLiteral ( Literal ) :
|
1083 |
+
color_settings = termcolors . parse_color_setting ( DJANGO_COLORS )
|
1084 |
+
TRANSLATOR_COMMENT_MARK = 'Translators'
|
1085 |
+
response = self . handle_uncaught_exception ( request , resolver , sys . exc_info ( ) )
|
1086 |
+
latest_date = item_date
|
1087 |
+
value , sig = signed_value . rsplit ( self . sep , 1 )
|
1088 |
+
qs = f . value_from_object ( instance )
|
1089 |
+
from email import ( charset as Charset , encoders as Encoders , message_from_string , generator )
|
1090 |
+
if isinstance ( v , ( list , tuple ) ) :
|
1091 |
+
incomment = True
|
1092 |
+
return self . _num_pages
|
1093 |
+
return get_supported_language_variant ( accept_lang )
|
1094 |
+
if unicodedata . combining ( char ) :
|
1095 |
+
@ deconstructible
|
1096 |
+
use_base_manager = options . get ( 'use_base_manager' )
|
1097 |
+
def reverse ( viewname , urlconf = None , args = None , kwargs = None , prefix = None , current_app = None ) :
|
1098 |
+
if self . _is_rendered :
|
1099 |
+
while current_len <= length :
|
1100 |
+
def _set_response_etag ( response ) :
|
1101 |
+
@ register . filter ( "escapejs" )
|
1102 |
+
if hasattr ( mw_instance , 'process_response' ) :
|
1103 |
+
self . xml . endElement ( "object" )
|
1104 |
+
prefix = 'django_%s_template_' % self . app_or_project
|
1105 |
+
out . write ( blankout ( part , 'S' ) )
|
1106 |
+
from django . utils import six
|
1107 |
+
parser . add_argument ( 'args' , metavar = 'app_label' , nargs = '*' )
|
1108 |
+
if six . PY2 :
|
1109 |
+
self . waiting_readers = 0
|
1110 |
+
return node . render ( context )
|
1111 |
+
name , ext = os . path . splitext ( name )
|
1112 |
+
@ stringfilter
|
1113 |
+
PATTERN = """ classdef< 'class' any+ ':' suite< any* funcdef< 'def' unifunc='__unicode__' parameters< '(' NAME ')' > any+ > any* > > """
|
1114 |
+
self . invoked_for_django = True
|
1115 |
+
media_attrs = kwargs
|
1116 |
+
def read ( self , * args , ** kwargs ) :
|
1117 |
+
cull_num = num // self . _cull_frequency
|
1118 |
+
def cleanup_url ( url ) :
|
1119 |
+
def streaming_content ( self , value ) :
|
1120 |
+
import re
|
1121 |
+
self . tags [ name ] = compile_function
|
1122 |
+
create_models = set ( itertools . chain ( * manifest . values ( ) ) )
|
1123 |
+
WSGIServer ( get_internal_wsgi_application ( ) , ** wsgi_opts ) . run ( )
|
1124 |
+
def is_naive ( value ) :
|
1125 |
+
sql , references = connection . creation . sql_create_model ( model , no_style ( ) , seen_models )
|
1126 |
+
post = '<could not parse>'
|
1127 |
+
context = Context ( dict ( options , ** { base_name : name , base_directory : top_dir , 'docs_version' : docs_version , } ) , autoescape = False )
|
1128 |
+
for key in self . keyOrder :
|
1129 |
+
current_len += 1
|
1130 |
+
class SuspiciousMultipartForm ( SuspiciousOperation ) :
|
1131 |
+
from django . utils . http import urlquote
|
1132 |
+
from django . core . serializers . base import DeserializationError
|
1133 |
+
from django . utils . deprecation import RemovedInDjango19Warning
|
1134 |
+
if self . _wrapped is empty :
|
1135 |
+
origin = make_origin ( display_name , self . load_template_source , template_name , template_dirs )
|
1136 |
+
return not self . file or self . file . closed
|
1137 |
+
import warnings
|
1138 |
+
self . pubid = pubid
|
1139 |
+
if len ( bits ) not in ( 2 , 3 ) :
|
1140 |
+
return WithNode ( None , None , nodelist , extra_context = extra_context )
|
1141 |
+
_iterlists = "lists"
|
1142 |
+
from django . core . exceptions import ValidationError
|
1143 |
+
def __reduce__ ( self ) :
|
1144 |
+
if html_message :
|
1145 |
+
return False
|
1146 |
+
def __init__ ( self , name , regex , next = None ) :
|
1147 |
+
except pickle . PickleError :
|
1148 |
+
def get_public_serializer_formats ( ) :
|
1149 |
+
with open ( writer . path , "wb" ) as fh :
|
1150 |
+
def do_ifequal ( parser , token , negate ) :
|
1151 |
+
def _assert_mutable ( self ) :
|
1152 |
+
pass
|
1153 |
+
if isinstance ( data , bytes ) :
|
1154 |
+
except OSError as e :
|
1155 |
+
for pythonrc in ( os . environ . get ( "PYTHONSTARTUP" ) , '~/.pythonrc.py' ) :
|
1156 |
+
parser . add_argument ( '--no-initial-data' , action = 'store_false' , dest = 'load_initial_data' , default = True , help = 'Tells Django not to load any initial data after database synchronization.' )
|
1157 |
+
return False
|
1158 |
+
for dirname in dirs [ : ] :
|
1159 |
+
try :
|
1160 |
+
val , encoded = super ( SimpleCookie , self ) . value_encode ( val )
|
1161 |
+
using_sysrandom = False
|
1162 |
+
user_settings = module_to_dict ( settings . _wrapped )
|
1163 |
+
ttl = force_text ( ttl )
|
1164 |
+
statement . append ( cleaned_line )
|
1165 |
+
if y and m and d :
|
1166 |
+
from django . utils . deprecation import RemovedInDjango19Warning
|
1167 |
+
time_str = date . strftime ( '%s, %%d %s %%Y %%H:%%M:%%S ' % ( dow , month ) )
|
1168 |
+
def u ( s ) :
|
1169 |
+
super ( AssignmentNode , self ) . __init__ ( takes_context , args , kwargs )
|
1170 |
+
except ( ValueError , TypeError ) :
|
1171 |
+
__all__ = [ 'File' ]
|
1172 |
+
return retval
|
1173 |
+
self . stream . write ( '%s\n' % msg_data )
|
1174 |
+
logger . level = logging . NOTSET
|
1175 |
+
elif basetype == 'message' and subtype == 'rfc822' :
|
1176 |
+
def value_from_datadict ( self , data , files , name ) :
|
1177 |
+
raise ValueError ( "Key '%s' not found" % key )
|
1178 |
+
except SuspiciousOperation as e :
|
1179 |
+
ttl = force_text ( ttl )
|
1180 |
+
if set ( kwargs . keys ( ) ) | set ( defaults . keys ( ) ) != set ( params ) | set ( defaults . keys ( ) ) | set ( prefix_args ) :
|
1181 |
+
if self . asvar is None :
|
1182 |
+
if isinstance ( s , ( six . text_type , Promise ) ) :
|
1183 |
+
self . stdout . write ( "Installed %d object(s) from %d fixture(s)" % ( self . loaded_object_count , self . fixture_count ) )
|
1184 |
+
left = t . led ( left , self )
|
1185 |
+
return '<ExtendsNode: extends %s>' % self . parent_name . token
|
1186 |
+
for attachment in self . attachments :
|
1187 |
+
return value
|
1188 |
+
from django . core . cache . backends . base import BaseCache , DEFAULT_TIMEOUT
|
1189 |
+
def __init__ ( self ) :
|
1190 |
+
value = next ( cycle_iter ) . resolve ( context )
|
1191 |
+
if not self . compile_function_error ( token , e ) :
|
1192 |
+
chunks = [ ]
|
1193 |
+
logging . Handler . __init__ ( self )
|
1194 |
+
conflicts = executor . loader . detect_conflicts ( )
|
1195 |
+
_localtime = None
|
1196 |
+
return self . number * self . paginator . per_page
|
1197 |
+
seen_models . add ( model )
|
1198 |
+
def clean ( self , value ) :
|
1199 |
+
if not data and initial :
|
1200 |
+
else :
|
1201 |
+
def url ( self , name ) :
|
1202 |
+
if not hasattr ( package , 'rindex' ) :
|
1203 |
+
raise
|
1204 |
+
match = RE_DATE . match ( value )
|
1205 |
+
from django . db . migrations . writer import MigrationWriter
|
1206 |
+
if value in ( None , '' ) :
|
1207 |
+
msg = "Unclosed tag '%s'. Looking for one of: %s " % ( command , ', ' . join ( parse_until ) )
|
1208 |
+
app_config = apps . get_app_config ( app_label )
|
1209 |
+
def _iterkeys ( self ) :
|
1210 |
+
shutdown_message = options . get ( 'shutdown_message' , '' )
|
1211 |
+
return self . source
|
1212 |
+
if f is None :
|
1213 |
+
def handle ( self , ** options ) :
|
1214 |
+
class CommentNode ( Node ) :
|
1215 |
+
from django . utils . encoding import force_text
|
1216 |
+
module = import_module ( module_path )
|
1217 |
+
return result
|
1218 |
+
temp_lib . tags [ name ] = lib . tags [ name ]
|
1219 |
+
if self . to_field :
|
1220 |
+
from django . http . response import ( HttpResponse , StreamingHttpResponse , HttpResponseRedirect , HttpResponsePermanentRedirect , HttpResponseNotModified , HttpResponseBadRequest , HttpResponseForbidden , HttpResponseNotFound , HttpResponseNotAllowed , HttpResponseGone , HttpResponseServerError , Http404 , BadHeaderError , JsonResponse )
|
1221 |
+
handler . addQuickElement ( "rights" , item [ 'item_copyright' ] )
|
1222 |
+
def byte2int ( bs ) :
|
1223 |
+
return lazy_number ( ngettext , str , singular = singular , plural = plural , number = number )
|
1224 |
+
class Command ( BaseCommand ) :
|
1225 |
+
stream . unget ( chunk )
|
1226 |
+
none_model_fields = [ k for k , v in six . iteritems ( fields ) if not v ]
|
1227 |
+
_func_defaults = "func_defaults"
|
1228 |
+
parser . add_argument ( '--exclude' , '-x' , default = [ ] , dest = 'exclude' , action = 'append' , help = 'Locales to exclude. Default is none. Can be used multiple times.' )
|
1229 |
+
try :
|
1230 |
+
raise ExternalReferenceForbidden ( context , base , sysid , pubid )
|
1231 |
+
with connection . constraint_checks_disabled ( ) :
|
1232 |
+
delta = expires - expires . utcnow ( )
|
1233 |
+
super ( Serializer , self ) . handle_field ( obj , field )
|
1234 |
+
pass
|
1235 |
+
else :
|
1236 |
+
else :
|
1237 |
+
errors . append ( Error ( "%s was connected to the '%s' signal " "with a lazy reference to the '%s' sender, " "which has not been installed." % ( description , name , '.' . join ( reference ) ) , obj = receiver . __module__ , hint = None , id = 'signals.E001' ) )
|
1238 |
+
kwargs [ 'instance' ] = self . _existing_object ( pk )
|
1239 |
+
if len ( bits ) < 2 :
|
1240 |
+
return copy . deepcopy ( self . _wrapped , memo )
|
1241 |
+
loaded_objects_in_fixture = 0
|
1242 |
+
return result
|
1243 |
+
super ( RadioChoiceInput , self ) . __init__ ( * args , ** kwargs )
|
1244 |
+
self . dicts [ - 1 ] [ key ] = value
|
1245 |
+
from django . core . cache . backends . base import BaseCache , DEFAULT_TIMEOUT
|
1246 |
+
if ( self . max_digits is not None and self . decimal_places is not None and whole_digits > ( self . max_digits - self . decimal_places ) ) :
|
1247 |
+
if not value and self . required :
|
1248 |
+
base_url += '/'
|
1249 |
+
if dirname and not os . path . exists ( dirname ) :
|
1250 |
+
def regex ( self ) :
|
1251 |
+
parser . add_argument ( 'args' , nargs = '*' )
|
1252 |
+
if plan_node in loader . applied_migrations :
|
1253 |
+
self . _regex_dict [ language_code ] = regex_compiled
|
1254 |
+
self . file . seek ( 0 )
|
1255 |
+
return self . __name
|
1256 |
+
self . _body = self . read ( )
|
1257 |
+
return result
|
1258 |
+
boundary = opts . get ( 'boundary' )
|
1259 |
+
raise InvalidCacheBackendError ( "Could not find backend '%s': %s" % ( backend , e ) )
|
1260 |
+
else :
|
1261 |
+
def save_existing_objects ( self , commit = True ) :
|
1262 |
+
from django . core . mail . utils import DNS_NAME
|
1263 |
+
needs_multipart_form = True
|
1264 |
+
pass
|
1265 |
+
def indexbytes ( buf , i ) :
|
1266 |
+
__getattr__ = new_method_proxy ( getattr )
|
1267 |
+
sep = len ( hextet [ 0 ] . split ( ':' ) ) + len ( hextet [ 1 ] . split ( ':' ) )
|
1268 |
+
def __contains__ ( self , item ) :
|
1269 |
+
bits = host . rsplit ( ':' , 1 )
|
1270 |
+
try :
|
1271 |
+
mask = ( pyinotify . IN_MODIFY | pyinotify . IN_DELETE | pyinotify . IN_ATTRIB | pyinotify . IN_MOVED_FROM | pyinotify . IN_MOVED_TO | pyinotify . IN_CREATE )
|
1272 |
+
class MiddlewareNotUsed ( Exception ) :
|
1273 |
+
import os
|
1274 |
+
handler = self . configure_handler ( handlers [ name ] )
|
1275 |
+
else :
|
1276 |
+
with connections [ db ] . cursor ( ) as cursor :
|
1277 |
+
return datetime . time ( ** kw )
|
1278 |
+
filelist = _cached_filenames + new_filenames + _error_files
|
1279 |
+
strip_tags = allow_lazy ( strip_tags )
|
1280 |
+
self . queryset = field . queryset
|
1281 |
+
next = advance_iterator
|
1282 |
+
import_module ( templatetag_module )
|
1283 |
+
def tag ( self , name = None , compile_function = None ) :
|
1284 |
+
if kwargs . pop ( 'ipv6' , False ) :
|
1285 |
+
def writer ( self ) :
|
1286 |
+
class InvalidTemplateLibrary ( Exception ) :
|
1287 |
+
def render ( self , context ) :
|
1288 |
+
self . allow_empty_first_page = allow_empty_first_page
|
1289 |
+
s = s . replace ( '\t' , '\\t' )
|
1290 |
+
needs_multipart_form = False
|
1291 |
+
self . handle_starttag ( tag , attrs )
|
1292 |
+
try :
|
1293 |
+
self . _catalog . update ( other . _catalog )
|
1294 |
+
for f in sorted ( opts . concrete_fields + sortable_virtual_fields + opts . many_to_many ) :
|
1295 |
+
if isinstance ( message , SafeData ) :
|
1296 |
+
if not ( self . data or self . files ) :
|
1297 |
+
setattr ( filter_func , attr , value )
|
1298 |
+
if nodelist . get_nodes_by_type ( ExtendsNode ) :
|
1299 |
+
try :
|
1300 |
+
obj = super ( MultiWidget , self ) . __deepcopy__ ( memo )
|
1301 |
+
else :
|
1302 |
+
def sql_indexes ( app_config , style , connection ) :
|
1303 |
+
if app_config . models_module is None :
|
1304 |
+
raise NotImplementedError ( 'subclasses of Origin must provide a reload() method' )
|
1305 |
+
self . kwargs = kwargs
|
1306 |
+
return True
|
1307 |
+
self . paths_to_remove . append ( tempdir )
|
1308 |
+
if fk . unique :
|
1309 |
+
with connection . cursor ( ) as cursor :
|
1310 |
+
fields . update ( new_class . declared_fields )
|
1311 |
+
self . choices . append ( ( f , f . replace ( path , "" , 1 ) ) )
|
1312 |
+
use_null_fallback = False
|
1313 |
+
kwargs [ name ] = parser . compile_filter ( value )
|
1314 |
+
class SplitDateTimeField ( MultiValueField ) :
|
1315 |
+
result = middleware . process_view ( request , view_func , args , kwargs )
|
1316 |
+
return b'\r\n' . join ( headers )
|
1317 |
+
class Http404 ( Exception ) :
|
1318 |
+
def media ( self ) :
|
1319 |
+
if ( isinstance ( data , ( datetime . datetime , datetime . time ) ) and not getattr ( self . field . widget , 'supports_microseconds' , True ) ) :
|
1320 |
+
from django . conf import settings
|
1321 |
+
state_frame [ self ] = None
|
1322 |
+
error_msg = "Invalid template name in 'extends' tag: %r." % parent
|
1323 |
+
if option_value is None :
|
1324 |
+
class LocalTimezone ( ReferenceLocalTimezone ) :
|
1325 |
+
@ register . filter ( is_safe = False )
|
1326 |
+
elif field_type == 'IntegerField(' and not connection . features . can_introspect_autofield :
|
1327 |
+
return QueryDict ( '' , encoding = self . _encoding ) , MultiValueDict ( )
|
1328 |
+
def to_python ( self , value ) :
|
1329 |
+
if pk_is_not_editable ( pk ) or pk . name not in form . fields :
|
1330 |
+
if match :
|
1331 |
+
def patch_cache_control ( response , ** kwargs ) :
|
1332 |
+
def __init__ ( self , level , msg , hint = None , obj = None , id = None ) :
|
1333 |
+
tag , this_value_expr , max_value_expr , max_width = bits
|
1334 |
+
db = options . pop ( 'using' , DEFAULT_DB_ALIAS )
|
1335 |
+
if not filename :
|
1336 |
+
super ( InlineForeignKeyField , self ) . __init__ ( * args , ** kwargs )
|
1337 |
+
def __init__ ( self , name ) :
|
1338 |
+
from django . core . exceptions import ImproperlyConfigured
|
1339 |
+
def xreadlines ( self ) :
|
1340 |
+
value = [ conditional_escape ( v ) for v in value ]
|
1341 |
+
class TemplateEncodingError ( Exception ) :
|
1342 |
+
if version is None :
|
1343 |
+
self . xml . startElement ( "field" , { "name" : field . name , "type" : field . get_internal_type ( ) } )
|
1344 |
+
thefile = self . file
|
1345 |
+
sec = int ( m . group ( 'sec' ) )
|
1346 |
+
self . stdout . write ( self . style . MIGRATE_HEADING ( "Merging %s" % app_label ) )
|
1347 |
+
value = getattr ( opts , opt )
|
1348 |
+
for basedir in basedirs :
|
1349 |
+
if hasattr ( file_or_path , 'read' ) :
|
1350 |
+
@ classmethod
|
1351 |
+
def _replace_entity ( match ) :
|
1352 |
+
self . _post , self . _files = self . parse_file_upload ( self . META , data )
|
1353 |
+
path_info = get_bytes_from_wsgi ( environ , 'PATH_INFO' , '/' )
|
1354 |
+
except Exception :
|
1355 |
+
if self . empty :
|
1356 |
+
subcommand = 'help'
|
1357 |
+
def handle ( self , * app_labels , ** options ) :
|
1358 |
+
raise ValueError ( "'%s' has no field named '%s'." % ( self . __class__ . __name__ , field ) )
|
1359 |
+
model_fields = Model . _meta . get_all_field_names ( )
|
1360 |
+
f = os . path . join ( p , cmd )
|
1361 |
+
error_messages = self . fields [ field ] . error_messages
|
1362 |
+
self . _lock = threading . RLock ( )
|
1363 |
+
from UserList import UserList
|
1364 |
+
from django . http import Http404
|
1365 |
+
result . append ( self . create_token ( last_bit , ( upto , upto + len ( last_bit ) ) , False ) )
|
1366 |
+
class dummy :
|
1367 |
+
def __del__ ( self ) :
|
1368 |
+
link [ NEXT ] = root
|
1369 |
+
from django . apps import apps
|
1370 |
+
else :
|
1371 |
+
while i < l :
|
1372 |
+
def render ( self , context ) :
|
1373 |
+
def _cache ( self ) :
|
1374 |
+
re_chars = re . compile ( r'<.*?>|(.)' , re . U | re . S )
|
1375 |
+
return { }
|
1376 |
+
model = app_config . get_model ( model_label )
|
1377 |
+
if value is not result :
|
1378 |
+
return tt . tm_isdst > 0
|
1379 |
+
def _get_choices ( self ) :
|
1380 |
+
loader = MigrationLoader ( connection )
|
1381 |
+
termios . tcsetattr ( fd , termios . TCSANOW , attr_list )
|
1382 |
+
_urllib_robotparser_moved_attributes = [ MovedAttribute ( "RobotFileParser" , "robotparser" , "urllib.robotparser" ) , ]
|
1383 |
+
def render ( self , name , value , attrs = None ) :
|
1384 |
+
cursor . close ( )
|
1385 |
+
endbmatch = endblock_re . match ( t . contents )
|
1386 |
+
for key , value in parse_qsl ( query_string or '' , keep_blank_values = True ) :
|
1387 |
+
def get_resolver ( urlconf ) :
|
1388 |
+
app_dir = apps . get_app_config ( model . _meta . app_label ) . path
|
1389 |
+
if locations :
|
1390 |
+
class SignatureExpired ( BadSignature ) :
|
1391 |
+
def get ( self , key , default = None ) :
|
1392 |
+
def _mark_post_parse_error ( self ) :
|
1393 |
+
self . xml . endElement ( "field" )
|
1394 |
+
super ( GenericIPAddressField , self ) . __init__ ( * args , ** kwargs )
|
1395 |
+
from django . utils import six , timezone
|
1396 |
+
return value
|
1397 |
+
return filelist
|
1398 |
+
if self . verbosity >= 1 :
|
1399 |
+
stream = StringIO ( stream_or_string )
|
1400 |
+
from django . utils import archive
|
1401 |
+
return time_str + '-0000'
|
1402 |
+
if not self . allow_multiple_selected :
|
1403 |
+
raise TemplateSyntaxError ( "'%s' received unexpected keyword argument '%s'" % ( name , param ) )
|
1404 |
+
else :
|
1405 |
+
from django . apps import apps
|
1406 |
+
localpart = str ( Header ( localpart , encoding ) )
|
1407 |
+
class FileInput ( Input ) :
|
1408 |
+
d = { }
|
1409 |
+
return data
|
1410 |
+
for line in content . split ( "\n" ) :
|
1411 |
+
if value :
|
1412 |
+
@ property
|
1413 |
+
data [ field . attname ] = value
|
1414 |
+
s = six . text_type ( s , encoding , errors )
|
1415 |
+
raise
|
1416 |
+
if app_config . models_module is None :
|
1417 |
+
for tag in open_tags :
|
1418 |
+
_assertRegex = "assertRegex"
|
1419 |
+
class EmailBackend ( BaseEmailBackend ) :
|
1420 |
+
self . _regex_validator = validators . RegexValidator ( regex = regex )
|
1421 |
+
if error_messages and f . name in error_messages :
|
1422 |
+
parser . add_argument ( 'args' , metavar = 'app_label' , nargs = '+' , help = 'One or more application label.' )
|
1423 |
+
child_loggers . append ( existing [ i ] )
|
1424 |
+
mimetype , _ = mimetypes . guess_type ( filename )
|
1425 |
+
secret = force_bytes ( secret )
|
1426 |
+
params , varargs , varkw , defaults = getargspec ( func )
|
1427 |
+
def javascript_quote ( s , quote_double_quotes = False ) :
|
1428 |
+
i += 1
|
1429 |
+
@ deconstructible
|
1430 |
+
break
|
1431 |
+
def cleaned_data ( self ) :
|
1432 |
+
break
|
1433 |
+
key = self . make_key ( key , version = version )
|
1434 |
+
value = data . get ( name )
|
1435 |
+
changeset = timestamp . strftime ( '%Y%m%d%H%M%S' )
|
1436 |
+
if val is None :
|
1437 |
+
def clear ( self ) :
|
1438 |
+
six . reraise ( exc_type , exc_value , sys . exc_info ( ) [ 2 ] )
|
1439 |
+
raise ValidationError ( self . error_messages [ 'required' ] , code = 'required' )
|
1440 |
+
def get_default_timezone ( ) :
|
1441 |
+
def get_host ( self ) :
|
1442 |
+
return
|
1443 |
+
fmt = config . get ( 'format' , None )
|
1444 |
+
if finder . find_module ( name ) :
|
1445 |
+
ipv4_address = "%d.%d.%d.%d" % ( int ( hextets [ 6 ] [ 0 : 2 ] , 16 ) , int ( hextets [ 6 ] [ 2 : 4 ] , 16 ) , int ( hextets [ 7 ] [ 0 : 2 ] , 16 ) , int ( hextets [ 7 ] [ 2 : 4 ] , 16 ) , )
|
1446 |
+
list_ = [ bytes_to_text ( elt , self . encoding ) for elt in list_ ]
|
1447 |
+
return name , ser_fmt , cmp_fmt
|
1448 |
+
from django . utils . http import urlquote
|
1449 |
+
return value . tzinfo is None or value . tzinfo . utcoffset ( value ) is None
|
1450 |
+
else :
|
1451 |
+
code_list . append ( background [ v ] )
|
1452 |
+
kwargs [ "initial" ] = self . parent_instance . pk
|
1453 |
+
last = max ( 0 , end - 1 )
|
1454 |
+
def __init__ ( self , widgets , attrs = None ) :
|
1455 |
+
class WSGIServer ( simple_server . WSGIServer , object ) :
|
1456 |
+
except Exception as e :
|
1457 |
+
state = self . state
|
1458 |
+
def __get__ ( self , obj , tp ) :
|
1459 |
+
invalid_tag = next ( tag for tag in tags if not checks . tag_exists ( tag ) )
|
1460 |
+
if use_l10n or ( use_l10n is None and settings . USE_L10N ) :
|
1461 |
+
self . activated = True
|
1462 |
+
return '' , ''
|
1463 |
+
def wrapper ( * args , ** kwargs ) :
|
1464 |
+
id_ += '_0'
|
1465 |
+
def format_subject ( self , subject ) :
|
1466 |
+
kwargs = match . groupdict ( )
|
1467 |
+
for dict_ in self . dicts :
|
1468 |
+
self . nodelist = t . nodelist
|
1469 |
+
def __bool__ ( self ) :
|
1470 |
+
import sys
|
1471 |
+
kwargs [ 'number' ] = number_value
|
1472 |
+
return result
|
1473 |
+
if hasattr ( timezone , 'normalize' ) :
|
1474 |
+
value = force_text ( value )
|
1475 |
+
weight = 0
|
1476 |
+
super ( SimpleCookie , self ) . load ( rawdata )
|
1477 |
+
class DefusedXmlException ( ValueError ) :
|
1478 |
+
else :
|
1479 |
+
self . _leftover = b'' . join ( [ bytes , self . _leftover ] )
|
1480 |
+
formfield = f . formfield ( ** kwargs )
|
1481 |
+
return
|
1482 |
+
def _make_decorator ( * m_args , ** m_kwargs ) :
|
1483 |
+
def _set_post ( self , post ) :
|
1484 |
+
def clear ( self ) :
|
1485 |
+
if safe is not None :
|
1486 |
+
filter_expression = self . compile_filter ( token . contents )
|
1487 |
+
attrs = super ( DecimalField , self ) . widget_attrs ( widget )
|
1488 |
+
return bytes ( value )
|
1489 |
+
if self . allow_folders :
|
1490 |
+
app_list = resolver . app_dict [ ns ]
|
1491 |
+
def activate ( timezone ) :
|
1492 |
+
else :
|
1493 |
+
def writeString ( self , encoding ) :
|
1494 |
+
else :
|
1495 |
+
choices = property ( _get_choices , _set_choices )
|
1496 |
+
def has_other_pages ( self ) :
|
1497 |
+
parse = sys . modules [ __name__ + ".moves.urllib_parse" ]
|
1498 |
+
form . save_m2m = save_m2m
|
1499 |
+
else :
|
1500 |
+
_templatetags_modules . append ( templatetag_module )
|
1501 |
+
return ( format_html_join ( '' , ' {0}="{1}"' , sorted ( attrs . items ( ) ) ) + format_html_join ( '' , ' {0}' , sorted ( boolean_attrs ) ) )
|
1502 |
+
return self
|
1503 |
+
self . can_write . release ( )
|
1504 |
+
raise KeyError ( key )
|
1505 |
+
for arg in args :
|
1506 |
+
def has_key ( self , key ) :
|
1507 |
+
kw [ 'microsecond' ] = kw [ 'microsecond' ] . ljust ( 6 , '0' )
|
1508 |
+
if var . find ( VARIABLE_ATTRIBUTE_SEPARATOR + '_' ) > - 1 or var [ 0 ] == '_' :
|
1509 |
+
__all__ = ( 'MultiPartParser' , 'MultiPartParserError' , 'InputStreamExhausted' )
|
1510 |
+
dictreprs = ', ' . join ( repr ( d ) for d in self . dicts )
|
1511 |
+
elif field . rel and isinstance ( field . rel , models . ManyToOneRel ) :
|
1512 |
+
if text == '' and len ( opts ) == 1 and opts [ 0 ] == 'reset' :
|
1513 |
+
from django . utils . six . moves . urllib . parse import urljoin
|
1514 |
+
self . xml . startElement ( "natural" , { } )
|
1515 |
+
@ property
|
1516 |
+
raise ValidationError ( self . error_messages [ 'invalid_choice' ] , code = 'invalid_choice' , params = { 'value' : value } , )
|
1517 |
+
self . delete ( key , version = version )
|
1518 |
+
new_matches = normalize ( parent_pat + pat )
|
1519 |
+
yield self [ key ]
|
1520 |
+
cache [ key ] = result
|
1521 |
+
self . cookies [ key ] [ 'max-age' ] = max_age
|
1522 |
+
def __copy__ ( self ) :
|
1523 |
+
from django . utils . functional import lazy
|
1524 |
+
sites1 = _findall ( s1 , str ( year ) )
|
1525 |
+
for middleware_method in self . _request_middleware :
|
1526 |
+
def add_arguments ( self , parser ) :
|
1527 |
+
ULONG_PTR = c_int64
|
1528 |
+
if not language_code_re . search ( lang_code ) :
|
1529 |
+
if isinstance ( s , bytes ) :
|
1530 |
+
for accessor_name , object_list in self . m2m_data . items ( ) :
|
1531 |
+
if isinstance ( obj , datetime . datetime ) :
|
1532 |
+
handler . addQuickElement ( "pubDate" , rfc2822_date ( item [ 'pubdate' ] ) )
|
1533 |
+
self . mode = file . mode
|
1534 |
+
evens = sum ( int ( c ) for c in candidate [ - 1 : : - 2 ] )
|
1535 |
+
if sys . version_info [ : 2 ] >= ( 3 , 3 ) :
|
1536 |
+
chunk = b'' . join ( chunks )
|
1537 |
+
app_template_dirs = [ ]
|
1538 |
+
def split_leading_dir ( self , path ) :
|
1539 |
+
with self . _lock . reader ( ) :
|
1540 |
+
locale_dir = self . default_locale_path
|
1541 |
+
output_transaction = True
|
1542 |
+
obj = Model ( ** data )
|
1543 |
+
apps . setdefault ( pattern . app_name , [ ] ) . append ( pattern . namespace )
|
1544 |
+
for key , value in data :
|
1545 |
+
def configure_root ( self , config , incremental = False ) :
|
1546 |
+
if item [ 'pubdate' ] is not None :
|
1547 |
+
tzinfo = get_fixed_timezone ( offset )
|
1548 |
+
class SuspiciousOperation ( Exception ) :
|
1549 |
+
from django . conf import settings
|
1550 |
+
try :
|
1551 |
+
if os . path . isdir ( app_dir ) :
|
1552 |
+
def mark_for_escaping ( s ) :
|
1553 |
+
except AttributeError :
|
1554 |
+
return field . rel . to . _meta . get_field ( field . rel . field_name ) . to_python ( field_value )
|
1555 |
+
def __init__ ( self , object_list , number , paginator ) :
|
1556 |
+
return [ None , None ]
|
1557 |
+
def timeuntil ( d , now = None ) :
|
1558 |
+
super ( DecimalField , self ) . validate ( value )
|
1559 |
+
field_type = 'ForeignKey(%s' % rel_to
|
1560 |
+
def avoid_wrapping ( value ) :
|
1561 |
+
from django . core . serializers . python import Deserializer as PythonDeserializer
|
1562 |
+
if code is not None :
|
1563 |
+
raise TemplateSyntaxError ( "'firstof' statement requires at least one argument" )
|
1564 |
+
from importlib import find_loader as importlib_find
|
1565 |
+
msgs , errors , status = popen_wrapper ( args )
|
1566 |
+
id_ = self . field . widget . attrs . get ( 'id' ) or self . auto_id
|
1567 |
+
return "<Block Node: %s. Contents: %r>" % ( self . name , self . nodelist )
|
1568 |
+
if nodelist_empty is None :
|
1569 |
+
def __iter__ ( self ) :
|
1570 |
+
from django . utils . module_loading import import_string
|
1571 |
+
value = b'' . join ( self . make_bytes ( chunk ) for chunk in value )
|
1572 |
+
if value in self . empty_values :
|
1573 |
+
parser . add_argument ( 'migration_name' , help = 'Migrations will be squashed until and including this migration.' )
|
1574 |
+
def jython_reloader ( main_func , args , kwargs ) :
|
1575 |
+
from django . test . signals import setting_changed
|
1576 |
+
file . seek ( 0 )
|
1577 |
+
return False
|
1578 |
+
from django . template . base import TemplateDoesNotExist
|
1579 |
+
from django . http import HttpResponse
|
1580 |
+
code = 'limit_value'
|
1581 |
+
text = match . group ( 1 )
|
1582 |
+
for line in header . split ( b'\r\n' ) :
|
1583 |
+
obj = base . build_instance ( Model , data , db )
|
1584 |
+
iterkeys = _iterkeys
|
1585 |
+
return value . pk
|
1586 |
+
quant . append ( ch )
|
1587 |
+
def write ( self , val ) :
|
1588 |
+
def handle_app_config ( self , app_config , ** options ) :
|
1589 |
+
return None
|
1590 |
+
num_loopvars = len ( self . loopvars )
|
1591 |
+
deactivate = deactivate_all = lambda : None
|
1592 |
+
PB = 1 << 50
|
1593 |
+
start = 0
|
1594 |
+
def render_option ( self , selected_choices , option_value , option_label ) :
|
1595 |
+
def __getitem__ ( self , key ) :
|
1596 |
+
language_code = get_language ( )
|
1597 |
+
if bit . startswith ( '_("' ) or bit . startswith ( "_('" ) :
|
1598 |
+
return _i18n_cache_key_suffix ( request , cache_key )
|
1599 |
+
try :
|
1600 |
+
c = int ( text [ 1 : ] , 16 )
|
1601 |
+
if os . path . exists ( self . file_path ) and not os . path . isdir ( self . file_path ) :
|
1602 |
+
if self . feed [ 'feed_url' ] is not None :
|
1603 |
+
return
|
1604 |
+
import os
|
1605 |
+
return iter ( getattr ( d , _iterlists ) ( ** kw ) )
|
1606 |
+
def wrapper ( * args , ** kwds ) :
|
1607 |
+
out . write ( ' pgettext(%r, %r) ' % ( message_context , join_tokens ( singular , trimmed ) ) )
|
1608 |
+
return self . getlist ( key )
|
1609 |
+
defaults = dict ( defaults . _get_kwargs ( ) , ** options )
|
1610 |
+
callback = getattr ( self . urlconf_module , 'handler%s' % view_type , None )
|
1611 |
+
warn_msg = ( "The translator-targeted comment '%s' " "(%sline %d) was ignored, because it wasn't the last item " "on the line." ) % ( c , filemsg , comment_lineno_cache )
|
1612 |
+
pieces . append ( force_text ( getattr ( self , piece ) ( ) ) )
|
1613 |
+
d = data . get ( self . day_field % name )
|
1614 |
+
func = getattr ( func , '_decorated_function' , func )
|
1615 |
+
for name , block in six . iteritems ( blocks ) :
|
1616 |
+
import django
|
1617 |
+
potfiles = self . build_potfiles ( )
|
1618 |
+
self . stdout . write ( "Checking %s for fixtures..." % humanize ( fixture_dir ) )
|
1619 |
+
import sys
|
1620 |
+
if len ( bits ) != 3 :
|
1621 |
+
extracted = self . _archive . extractfile ( member )
|
1622 |
+
import binascii
|
1623 |
+
else :
|
1624 |
+
FILES = property ( _get_files )
|
1625 |
+
return True
|
1626 |
+
with self . mutex :
|
1627 |
+
return get_template ( template_name , dirs )
|
1628 |
+
l = lambda x : self . make_key ( x , version = version )
|
1629 |
+
def upload_handlers ( self ) :
|
1630 |
+
except AmbiguityError :
|
1631 |
+
except ValidationError as e :
|
1632 |
+
return { 'request' : request }
|
1633 |
+
except AttributeError :
|
1634 |
+
result = func ( * args )
|
1635 |
+
else :
|
1636 |
+
from django . utils . encoding import force_text , DEFAULT_LOCALE_ENCODING
|
1637 |
+
problem_fields = [ field for model in apps . get_models ( ** kwargs ) if app_configs is None or model . _meta . app_config in app_configs for field in model . _meta . local_fields if isinstance ( field , models . BooleanField ) and not field . has_default ( ) ]
|
1638 |
+
self . ignore = options . get ( 'ignore' )
|
1639 |
+
class NowNode ( Node ) :
|
1640 |
+
except StandardError as e :
|
1641 |
+
if msg :
|
1642 |
+
_error_files = [ ]
|
1643 |
+
@ register . filter ( is_safe = True , needs_autoescape = True )
|
1644 |
+
if isinstance ( filename , MIMEBase ) :
|
1645 |
+
class DebugNodeList ( NodeList ) :
|
1646 |
+
priority = 1.0
|
1647 |
+
raise KeyError ( key )
|
1648 |
+
elif issubclass ( klass , logging . handlers . SMTPHandler ) and 'mailhost' in config :
|
1649 |
+
return maybe
|
1650 |
+
def _handle_m2m_field_node ( self , node , field ) :
|
1651 |
+
super ( DebugParser , self ) . extend_nodelist ( nodelist , node , token )
|
1652 |
+
from django . utils . itercompat import is_iterable
|
1653 |
+
return self . has_key ( key )
|
1654 |
+
new_class = ( super ( DeclarativeFieldsMetaclass , mcs ) . __new__ ( mcs , name , bases , attrs ) )
|
1655 |
+
continue
|
1656 |
+
return self . save_existing_objects ( commit ) + self . save_new_objects ( commit )
|
1657 |
+
for attr in ( 'expects_localtime' , 'is_safe' , 'needs_autoescape' ) :
|
1658 |
+
for f in file_list :
|
1659 |
+
import re
|
1660 |
+
for processor in get_standard_processors ( ) + processors :
|
1661 |
+
self . _files . appendlist ( force_text ( old_field_name , self . _encoding , errors = 'replace' ) , file_obj )
|
1662 |
+
yield v
|
1663 |
+
else :
|
1664 |
+
cc = dict ( _to_tuple ( el ) for el in cc_delim_re . split ( response [ 'Cache-Control' ] ) )
|
1665 |
+
scheme = template . split ( ':' , 1 ) [ 0 ] . lower ( )
|
1666 |
+
ESCAPE_MAPPINGS = { "A" : None , "b" : None , "B" : None , "d" : "0" , "D" : "x" , "s" : " " , "S" : "x" , "w" : "x" , "W" : "!" , "Z" : None , }
|
1667 |
+
locales = [ locale ]
|
1668 |
+
nodelist = parser . parse ( ( 'endblock' , ) )
|
1669 |
+
loaders = [ ]
|
1670 |
+
@ register . tag
|
1671 |
+
return client
|
1672 |
+
if ( ( os . stat ( path ) . st_mode & stat . S_IREAD ) != stat . S_IREAD ) :
|
1673 |
+
def __delitem__ ( self , key ) :
|
1674 |
+
expanded_template = path . expanduser ( template )
|
1675 |
+
value = field . widget . value_from_datadict ( self . data , self . files , self . add_prefix ( name ) )
|
1676 |
+
def pbkdf2 ( password , salt , iterations , dklen = 0 , digest = None ) :
|
1677 |
+
def get_default_timezone_name ( ) :
|
1678 |
+
ch2 = None
|
1679 |
+
def handle_uncaught_exception ( self , request , resolver , exc_info ) :
|
1680 |
+
new_attr = name
|
1681 |
+
parts = config_string . lower ( ) . split ( ';' )
|
1682 |
+
doublecolon_start = - 1
|
1683 |
+
self . _start_relational_field ( field )
|
1684 |
+
s = s . decode ( encoding , errors )
|
1685 |
+
if token == "not" and i + 1 < l and tokens [ i + 1 ] == "in" :
|
1686 |
+
self . help_texts = getattr ( options , 'help_texts' , None )
|
1687 |
+
if not match or not match . group ( 1 ) :
|
1688 |
+
elif ch != 'P' :
|
1689 |
+
from django . core . wsgi import get_wsgi_application
|
1690 |
+
self . appendlist ( force_text ( key , encoding , errors = 'replace' ) , force_text ( value , encoding , errors = 'replace' ) )
|
1691 |
+
while i < len ( subject ) and subject [ i ] != subject [ p ] :
|
1692 |
+
return value . replace ( tzinfo = None )
|
1693 |
+
return type ( self ) . __bool__ ( self )
|
1694 |
+
parser . add_argument ( '--database' , action = 'store' , dest = 'database' , default = DEFAULT_DB_ALIAS , help = 'Nominates a database to ' 'introspect. Defaults to using the "default" database.' )
|
1695 |
+
pk_value = form . instance . pk
|
1696 |
+
return [ etag_str ]
|
1697 |
+
readline . parse_and_bind ( "tab:complete" )
|
1698 |
+
while ch != terminal_char :
|
1699 |
+
return self . _namespace_dict [ language_code ]
|
1700 |
+
self . changed_objects . append ( ( obj , form . changed_data ) )
|
1701 |
+
since = delta . days * 24 * 60 * 60 + delta . seconds
|
1702 |
+
key += tuple ( type ( v ) for k , v in sorted_items )
|
1703 |
+
translation . activate ( saved_locale )
|
1704 |
+
for func in self . response_fixes :
|
1705 |
+
class DebugNode ( Node ) :
|
1706 |
+
import os
|
1707 |
+
try :
|
1708 |
+
if expires < now :
|
1709 |
+
from django . utils . translation import ugettext , ungettext
|
1710 |
+
def valid_value ( self , value ) :
|
1711 |
+
obj = mark_safe ( new_obj )
|
1712 |
+
GB = 1 << 30
|
1713 |
+
return r
|
1714 |
+
from django . core . exceptions import ImproperlyConfigured
|
1715 |
+
return handle_app ( app_config . models_module , ** options )
|
1716 |
+
self . validate_key ( key )
|
1717 |
+
@ stringfilter
|
1718 |
+
self . xml = SimplerXMLGenerator ( self . stream , self . options . get ( "encoding" , settings . DEFAULT_CHARSET ) )
|
1719 |
+
self . validate_key ( key )
|
1720 |
+
parser . add_argument ( '--noreload' , action = 'store_false' , dest = 'use_reloader' , default = True , help = 'Tells Django to NOT use the auto-reloader.' )
|
1721 |
+
try :
|
1722 |
+
import cgi
|
1723 |
+
attrs [ 'error_messages' ] = error_messages
|
1724 |
+
return output
|
1725 |
+
def load_template ( self , template_name , template_dirs = None ) :
|
1726 |
+
def __str__ ( self ) :
|
1727 |
+
return len ( self . get_queryset ( ) )
|
1728 |
+
return compiled_parent . _render ( context )
|
1729 |
+
self . exception = exception
|
1730 |
+
from django . core . files . base import File
|
1731 |
+
handlers = config . get ( 'handlers' , EMPTY_DICT )
|
1732 |
+
for root in settings . ALLOWED_INCLUDE_ROOTS :
|
1733 |
+
for field in self . fields . values ( ) :
|
1734 |
+
def O ( self ) :
|
1735 |
+
return mark_safe ( '' . join ( force_text ( n ) for n in nodelist ) )
|
1736 |
+
parser . add_argument ( '-o' , '--output' , default = None , dest = 'output' , help = 'Specifies file to which the output is written.' )
|
1737 |
+
raise NotImplementedError ( 'subclasses of Storage must provide a listdir() method' )
|
1738 |
+
if is_templatized :
|
1739 |
+
import sys
|
1740 |
+
want_unicode = True
|
1741 |
+
_format_cache = { }
|
1742 |
+
return ( ret == 0 )
|
1743 |
+
self . message_context = None
|
1744 |
+
WEEKDAYS_REV = { 'monday' : 0 , 'tuesday' : 1 , 'wednesday' : 2 , 'thursday' : 3 , 'friday' : 4 , 'saturday' : 5 , 'sunday' : 6 }
|
1745 |
+
for _ , nodelist in self . conditions_nodelists :
|
1746 |
+
else :
|
1747 |
+
val = None
|
1748 |
+
if USE_INOTIFY :
|
1749 |
+
hidden_fields . append ( six . text_type ( bf ) )
|
1750 |
+
return bool ( value )
|
1751 |
+
from django . utils . six . moves . urllib . parse import parse_qsl , urlencode , quote , urljoin , urlsplit
|
1752 |
+
self . xml . startElement ( "field" , { "name" : field . name , "rel" : field . rel . __class__ . __name__ , "to" : smart_text ( field . rel . to . _meta ) , } )
|
1753 |
+
from django . db import connections , router , transaction , DEFAULT_DB_ALIAS
|
1754 |
+
self . active_readers += t
|
1755 |
+
return super ( DateField , self ) . to_python ( value )
|
1756 |
+
def _get_scheme ( self ) :
|
1757 |
+
self . loaded_object_count = 0
|
1758 |
+
defaults [ 'empty_permitted' ] = True
|
1759 |
+
raise TemplateDoesNotExist
|
1760 |
+
s = s . replace ( '\\' , '\\\\' )
|
1761 |
+
capfirst = lambda x : x and force_text ( x ) [ 0 ] . upper ( ) + force_text ( x ) [ 1 : ]
|
1762 |
+
return self . data . isoformat ( )
|
1763 |
+
result = super ( MultiValueField , self ) . __deepcopy__ ( memo )
|
1764 |
+
elif count > 1 :
|
1765 |
+
self . stdout . write ( " - %s\n" % operation . describe ( ) )
|
1766 |
+
return repr ( list ( self ) )
|
1767 |
+
@ python_2_unicode_compatible
|
1768 |
+
if '__str__' not in klass . __dict__ :
|
1769 |
+
from . import Error , Tags , register
|
1770 |
+
if self . data . minute == 0 and self . data . hour == 0 :
|
1771 |
+
field_desc += ' # ' + ' ' . join ( comment_notes )
|
1772 |
+
else :
|
1773 |
+
return self . DSTDIFF
|
1774 |
+
substitutions [ 'clear_template' ] = self . template_with_clear % substitutions
|
1775 |
+
traceback . print_exc ( )
|
1776 |
+
self . timezone = None
|
1777 |
+
return tpl . format ( self . name , self . sysid , self . pubid )
|
1778 |
+
else :
|
1779 |
+
raise NotImplementedError ( "This backend doesn't support absolute paths." )
|
1780 |
+
from . import six
|
1781 |
+
if isinstance ( rhs , dict ) and number :
|
1782 |
+
connection = connections [ options [ 'database' ] ]
|
1783 |
+
elif cls . _delegate_bytes :
|
1784 |
+
outer . update ( password . translate ( hmac . trans_5C ) )
|
1785 |
+
if 'charset' in content_params :
|
1786 |
+
def __str__ ( self ) :
|
1787 |
+
with self . _lock . writer ( ) :
|
1788 |
+
if ip_str . count ( '.' ) != 3 :
|
1789 |
+
return self . dicts . pop ( )
|
1790 |
+
kwargs [ 'error_messages' ] = error_messages [ f . name ]
|
1791 |
+
return val , encoded
|
1792 |
+
try :
|
1793 |
+
self . command_stack . append ( ( command , token . source ) )
|
1794 |
+
for character in name :
|
1795 |
+
def yesno ( value , arg = None ) :
|
1796 |
+
def incr ( self , key , delta = 1 , version = None ) :
|
1797 |
+
os . mkdir ( migrations_directory )
|
1798 |
+
form . fields [ ORDERING_FIELD_NAME ] = IntegerField ( label = _ ( 'Order' ) , required = False )
|
1799 |
+
database = options . get ( 'database' )
|
1800 |
+
return ( "%" + six . text_type ( arg ) ) % value
|
1801 |
+
args = hashlib . md5 ( force_bytes ( key ) )
|
1802 |
+
defaults = { 'auto_id' : self . auto_id , 'prefix' : self . add_prefix ( i ) , 'error_class' : self . error_class , }
|
1803 |
+
else :
|
1804 |
+
else :
|
1805 |
+
except StopIteration :
|
special_tokens_map.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"cls_token": "<s>",
|
4 |
+
"eos_token": "</s>",
|
5 |
+
"mask_token": {
|
6 |
+
"content": "<mask>",
|
7 |
+
"lstrip": true,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false
|
11 |
+
},
|
12 |
+
"pad_token": "<pad>",
|
13 |
+
"sep_token": "</s>",
|
14 |
+
"unk_token": "<unk>"
|
15 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"bos_token": "<s>",
|
4 |
+
"cls_token": "<s>",
|
5 |
+
"eos_token": "</s>",
|
6 |
+
"errors": "replace",
|
7 |
+
"mask_token": "<mask>",
|
8 |
+
"model_max_length": 512,
|
9 |
+
"name_or_path": "distilroberta-base",
|
10 |
+
"pad_token": "<pad>",
|
11 |
+
"sep_token": "</s>",
|
12 |
+
"special_tokens_map_file": null,
|
13 |
+
"tokenizer_class": "RobertaTokenizer",
|
14 |
+
"trim_offsets": true,
|
15 |
+
"unk_token": "<unk>"
|
16 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,2125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 0.2726329565048218,
|
3 |
+
"best_model_checkpoint": "./distilroberta-marian-training1/checkpoint-144000",
|
4 |
+
"epoch": 10.0,
|
5 |
+
"global_step": 160000,
|
6 |
+
"is_hyper_param_search": false,
|
7 |
+
"is_local_process_zero": true,
|
8 |
+
"is_world_process_zero": true,
|
9 |
+
"log_history": [
|
10 |
+
{
|
11 |
+
"epoch": 0.03,
|
12 |
+
"learning_rate": 6.225000000000001e-07,
|
13 |
+
"loss": 0.1837,
|
14 |
+
"step": 500
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"epoch": 0.06,
|
18 |
+
"learning_rate": 1.2462500000000001e-06,
|
19 |
+
"loss": 0.2157,
|
20 |
+
"step": 1000
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"epoch": 0.09,
|
24 |
+
"learning_rate": 1.8712500000000003e-06,
|
25 |
+
"loss": 0.22,
|
26 |
+
"step": 1500
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"epoch": 0.12,
|
30 |
+
"learning_rate": 2.4962500000000005e-06,
|
31 |
+
"loss": 0.1969,
|
32 |
+
"step": 2000
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"epoch": 0.16,
|
36 |
+
"learning_rate": 3.12125e-06,
|
37 |
+
"loss": 0.2,
|
38 |
+
"step": 2500
|
39 |
+
},
|
40 |
+
{
|
41 |
+
"epoch": 0.19,
|
42 |
+
"learning_rate": 3.745e-06,
|
43 |
+
"loss": 0.2612,
|
44 |
+
"step": 3000
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 0.22,
|
48 |
+
"learning_rate": 4.3700000000000005e-06,
|
49 |
+
"loss": 0.2172,
|
50 |
+
"step": 3500
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"epoch": 0.25,
|
54 |
+
"learning_rate": 4.9950000000000005e-06,
|
55 |
+
"loss": 0.1853,
|
56 |
+
"step": 4000
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"epoch": 0.28,
|
60 |
+
"learning_rate": 5.620000000000001e-06,
|
61 |
+
"loss": 0.1987,
|
62 |
+
"step": 4500
|
63 |
+
},
|
64 |
+
{
|
65 |
+
"epoch": 0.31,
|
66 |
+
"learning_rate": 6.243750000000001e-06,
|
67 |
+
"loss": 0.232,
|
68 |
+
"step": 5000
|
69 |
+
},
|
70 |
+
{
|
71 |
+
"epoch": 0.34,
|
72 |
+
"learning_rate": 6.868750000000001e-06,
|
73 |
+
"loss": 0.2513,
|
74 |
+
"step": 5500
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"epoch": 0.38,
|
78 |
+
"learning_rate": 7.493750000000001e-06,
|
79 |
+
"loss": 0.2117,
|
80 |
+
"step": 6000
|
81 |
+
},
|
82 |
+
{
|
83 |
+
"epoch": 0.41,
|
84 |
+
"learning_rate": 8.11875e-06,
|
85 |
+
"loss": 0.2349,
|
86 |
+
"step": 6500
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"epoch": 0.44,
|
90 |
+
"learning_rate": 8.74375e-06,
|
91 |
+
"loss": 0.2328,
|
92 |
+
"step": 7000
|
93 |
+
},
|
94 |
+
{
|
95 |
+
"epoch": 0.47,
|
96 |
+
"learning_rate": 9.3675e-06,
|
97 |
+
"loss": 0.2738,
|
98 |
+
"step": 7500
|
99 |
+
},
|
100 |
+
{
|
101 |
+
"epoch": 0.5,
|
102 |
+
"learning_rate": 9.992500000000001e-06,
|
103 |
+
"loss": 0.2504,
|
104 |
+
"step": 8000
|
105 |
+
},
|
106 |
+
{
|
107 |
+
"epoch": 0.53,
|
108 |
+
"learning_rate": 9.9675e-06,
|
109 |
+
"loss": 0.246,
|
110 |
+
"step": 8500
|
111 |
+
},
|
112 |
+
{
|
113 |
+
"epoch": 0.56,
|
114 |
+
"learning_rate": 9.934605263157895e-06,
|
115 |
+
"loss": 0.2218,
|
116 |
+
"step": 9000
|
117 |
+
},
|
118 |
+
{
|
119 |
+
"epoch": 0.59,
|
120 |
+
"learning_rate": 9.901776315789475e-06,
|
121 |
+
"loss": 0.2868,
|
122 |
+
"step": 9500
|
123 |
+
},
|
124 |
+
{
|
125 |
+
"epoch": 0.62,
|
126 |
+
"learning_rate": 9.86888157894737e-06,
|
127 |
+
"loss": 0.2406,
|
128 |
+
"step": 10000
|
129 |
+
},
|
130 |
+
{
|
131 |
+
"epoch": 0.66,
|
132 |
+
"learning_rate": 9.835986842105264e-06,
|
133 |
+
"loss": 0.2783,
|
134 |
+
"step": 10500
|
135 |
+
},
|
136 |
+
{
|
137 |
+
"epoch": 0.69,
|
138 |
+
"learning_rate": 9.803092105263159e-06,
|
139 |
+
"loss": 0.2784,
|
140 |
+
"step": 11000
|
141 |
+
},
|
142 |
+
{
|
143 |
+
"epoch": 0.72,
|
144 |
+
"learning_rate": 9.770197368421053e-06,
|
145 |
+
"loss": 0.2379,
|
146 |
+
"step": 11500
|
147 |
+
},
|
148 |
+
{
|
149 |
+
"epoch": 0.75,
|
150 |
+
"learning_rate": 9.737302631578948e-06,
|
151 |
+
"loss": 0.2887,
|
152 |
+
"step": 12000
|
153 |
+
},
|
154 |
+
{
|
155 |
+
"epoch": 0.78,
|
156 |
+
"learning_rate": 9.704473684210527e-06,
|
157 |
+
"loss": 0.2569,
|
158 |
+
"step": 12500
|
159 |
+
},
|
160 |
+
{
|
161 |
+
"epoch": 0.81,
|
162 |
+
"learning_rate": 9.671578947368422e-06,
|
163 |
+
"loss": 0.2794,
|
164 |
+
"step": 13000
|
165 |
+
},
|
166 |
+
{
|
167 |
+
"epoch": 0.84,
|
168 |
+
"learning_rate": 9.638684210526316e-06,
|
169 |
+
"loss": 0.2573,
|
170 |
+
"step": 13500
|
171 |
+
},
|
172 |
+
{
|
173 |
+
"epoch": 0.88,
|
174 |
+
"learning_rate": 9.605789473684211e-06,
|
175 |
+
"loss": 0.251,
|
176 |
+
"step": 14000
|
177 |
+
},
|
178 |
+
{
|
179 |
+
"epoch": 0.91,
|
180 |
+
"learning_rate": 9.572894736842107e-06,
|
181 |
+
"loss": 0.268,
|
182 |
+
"step": 14500
|
183 |
+
},
|
184 |
+
{
|
185 |
+
"epoch": 0.94,
|
186 |
+
"learning_rate": 9.54e-06,
|
187 |
+
"loss": 0.2304,
|
188 |
+
"step": 15000
|
189 |
+
},
|
190 |
+
{
|
191 |
+
"epoch": 0.97,
|
192 |
+
"learning_rate": 9.507105263157895e-06,
|
193 |
+
"loss": 0.2631,
|
194 |
+
"step": 15500
|
195 |
+
},
|
196 |
+
{
|
197 |
+
"epoch": 1.0,
|
198 |
+
"learning_rate": 9.474210526315791e-06,
|
199 |
+
"loss": 0.2674,
|
200 |
+
"step": 16000
|
201 |
+
},
|
202 |
+
{
|
203 |
+
"epoch": 1.0,
|
204 |
+
"eval_BLEU": 73.83414614372862,
|
205 |
+
"eval_BLEU-Bigram-Precision": 79.1290558672847,
|
206 |
+
"eval_BLEU-Trigram-Precision": 71.86590940573487,
|
207 |
+
"eval_BLEU-Unigram-Precision": 87.71472059143292,
|
208 |
+
"eval_ROUGE-2": 72.64315140484014,
|
209 |
+
"eval_ROUGE-L": 88.44220304691733,
|
210 |
+
"eval_Sacre-Bigram-Precision": 79.870557261957,
|
211 |
+
"eval_Sacre-Trigram-Precision": 73.81098685019049,
|
212 |
+
"eval_Sacre-Unigram-Precision": 87.78173190984579,
|
213 |
+
"eval_SacreBLEU": 75.40013818024555,
|
214 |
+
"eval_loss": 0.32742100954055786,
|
215 |
+
"eval_runtime": 88.0501,
|
216 |
+
"eval_samples_per_second": 11.357,
|
217 |
+
"eval_steps_per_second": 11.357,
|
218 |
+
"step": 16000
|
219 |
+
},
|
220 |
+
{
|
221 |
+
"epoch": 1.03,
|
222 |
+
"learning_rate": 9.441315789473686e-06,
|
223 |
+
"loss": 0.1756,
|
224 |
+
"step": 16500
|
225 |
+
},
|
226 |
+
{
|
227 |
+
"epoch": 1.06,
|
228 |
+
"learning_rate": 9.408486842105265e-06,
|
229 |
+
"loss": 0.277,
|
230 |
+
"step": 17000
|
231 |
+
},
|
232 |
+
{
|
233 |
+
"epoch": 1.09,
|
234 |
+
"learning_rate": 9.375592105263158e-06,
|
235 |
+
"loss": 0.2313,
|
236 |
+
"step": 17500
|
237 |
+
},
|
238 |
+
{
|
239 |
+
"epoch": 1.12,
|
240 |
+
"learning_rate": 9.342697368421053e-06,
|
241 |
+
"loss": 0.2596,
|
242 |
+
"step": 18000
|
243 |
+
},
|
244 |
+
{
|
245 |
+
"epoch": 1.16,
|
246 |
+
"learning_rate": 9.309802631578949e-06,
|
247 |
+
"loss": 0.2473,
|
248 |
+
"step": 18500
|
249 |
+
},
|
250 |
+
{
|
251 |
+
"epoch": 1.19,
|
252 |
+
"learning_rate": 9.276907894736843e-06,
|
253 |
+
"loss": 0.2274,
|
254 |
+
"step": 19000
|
255 |
+
},
|
256 |
+
{
|
257 |
+
"epoch": 1.22,
|
258 |
+
"learning_rate": 9.244144736842106e-06,
|
259 |
+
"loss": 0.2314,
|
260 |
+
"step": 19500
|
261 |
+
},
|
262 |
+
{
|
263 |
+
"epoch": 1.25,
|
264 |
+
"learning_rate": 9.211250000000001e-06,
|
265 |
+
"loss": 0.1981,
|
266 |
+
"step": 20000
|
267 |
+
},
|
268 |
+
{
|
269 |
+
"epoch": 1.28,
|
270 |
+
"learning_rate": 9.178355263157896e-06,
|
271 |
+
"loss": 0.2544,
|
272 |
+
"step": 20500
|
273 |
+
},
|
274 |
+
{
|
275 |
+
"epoch": 1.31,
|
276 |
+
"learning_rate": 9.14546052631579e-06,
|
277 |
+
"loss": 0.2123,
|
278 |
+
"step": 21000
|
279 |
+
},
|
280 |
+
{
|
281 |
+
"epoch": 1.34,
|
282 |
+
"learning_rate": 9.112565789473685e-06,
|
283 |
+
"loss": 0.2215,
|
284 |
+
"step": 21500
|
285 |
+
},
|
286 |
+
{
|
287 |
+
"epoch": 1.38,
|
288 |
+
"learning_rate": 9.079671052631581e-06,
|
289 |
+
"loss": 0.2134,
|
290 |
+
"step": 22000
|
291 |
+
},
|
292 |
+
{
|
293 |
+
"epoch": 1.41,
|
294 |
+
"learning_rate": 9.046776315789474e-06,
|
295 |
+
"loss": 0.2684,
|
296 |
+
"step": 22500
|
297 |
+
},
|
298 |
+
{
|
299 |
+
"epoch": 1.44,
|
300 |
+
"learning_rate": 9.013881578947368e-06,
|
301 |
+
"loss": 0.2485,
|
302 |
+
"step": 23000
|
303 |
+
},
|
304 |
+
{
|
305 |
+
"epoch": 1.47,
|
306 |
+
"learning_rate": 8.981052631578948e-06,
|
307 |
+
"loss": 0.1944,
|
308 |
+
"step": 23500
|
309 |
+
},
|
310 |
+
{
|
311 |
+
"epoch": 1.5,
|
312 |
+
"learning_rate": 8.948157894736843e-06,
|
313 |
+
"loss": 0.2126,
|
314 |
+
"step": 24000
|
315 |
+
},
|
316 |
+
{
|
317 |
+
"epoch": 1.53,
|
318 |
+
"learning_rate": 8.915263157894739e-06,
|
319 |
+
"loss": 0.2315,
|
320 |
+
"step": 24500
|
321 |
+
},
|
322 |
+
{
|
323 |
+
"epoch": 1.56,
|
324 |
+
"learning_rate": 8.882368421052632e-06,
|
325 |
+
"loss": 0.224,
|
326 |
+
"step": 25000
|
327 |
+
},
|
328 |
+
{
|
329 |
+
"epoch": 1.59,
|
330 |
+
"learning_rate": 8.849473684210526e-06,
|
331 |
+
"loss": 0.2295,
|
332 |
+
"step": 25500
|
333 |
+
},
|
334 |
+
{
|
335 |
+
"epoch": 1.62,
|
336 |
+
"learning_rate": 8.81657894736842e-06,
|
337 |
+
"loss": 0.1894,
|
338 |
+
"step": 26000
|
339 |
+
},
|
340 |
+
{
|
341 |
+
"epoch": 1.66,
|
342 |
+
"learning_rate": 8.783684210526317e-06,
|
343 |
+
"loss": 0.2191,
|
344 |
+
"step": 26500
|
345 |
+
},
|
346 |
+
{
|
347 |
+
"epoch": 1.69,
|
348 |
+
"learning_rate": 8.750855263157895e-06,
|
349 |
+
"loss": 0.1989,
|
350 |
+
"step": 27000
|
351 |
+
},
|
352 |
+
{
|
353 |
+
"epoch": 1.72,
|
354 |
+
"learning_rate": 8.717960526315791e-06,
|
355 |
+
"loss": 0.1923,
|
356 |
+
"step": 27500
|
357 |
+
},
|
358 |
+
{
|
359 |
+
"epoch": 1.75,
|
360 |
+
"learning_rate": 8.685065789473684e-06,
|
361 |
+
"loss": 0.1979,
|
362 |
+
"step": 28000
|
363 |
+
},
|
364 |
+
{
|
365 |
+
"epoch": 1.78,
|
366 |
+
"learning_rate": 8.652171052631579e-06,
|
367 |
+
"loss": 0.2166,
|
368 |
+
"step": 28500
|
369 |
+
},
|
370 |
+
{
|
371 |
+
"epoch": 1.81,
|
372 |
+
"learning_rate": 8.619342105263158e-06,
|
373 |
+
"loss": 0.234,
|
374 |
+
"step": 29000
|
375 |
+
},
|
376 |
+
{
|
377 |
+
"epoch": 1.84,
|
378 |
+
"learning_rate": 8.586447368421053e-06,
|
379 |
+
"loss": 0.2352,
|
380 |
+
"step": 29500
|
381 |
+
},
|
382 |
+
{
|
383 |
+
"epoch": 1.88,
|
384 |
+
"learning_rate": 8.553552631578949e-06,
|
385 |
+
"loss": 0.1886,
|
386 |
+
"step": 30000
|
387 |
+
},
|
388 |
+
{
|
389 |
+
"epoch": 1.91,
|
390 |
+
"learning_rate": 8.520657894736842e-06,
|
391 |
+
"loss": 0.2233,
|
392 |
+
"step": 30500
|
393 |
+
},
|
394 |
+
{
|
395 |
+
"epoch": 1.94,
|
396 |
+
"learning_rate": 8.487763157894737e-06,
|
397 |
+
"loss": 0.2737,
|
398 |
+
"step": 31000
|
399 |
+
},
|
400 |
+
{
|
401 |
+
"epoch": 1.97,
|
402 |
+
"learning_rate": 8.454868421052633e-06,
|
403 |
+
"loss": 0.1909,
|
404 |
+
"step": 31500
|
405 |
+
},
|
406 |
+
{
|
407 |
+
"epoch": 2.0,
|
408 |
+
"learning_rate": 8.421973684210527e-06,
|
409 |
+
"loss": 0.1936,
|
410 |
+
"step": 32000
|
411 |
+
},
|
412 |
+
{
|
413 |
+
"epoch": 2.0,
|
414 |
+
"eval_BLEU": 75.36161100581221,
|
415 |
+
"eval_BLEU-Bigram-Precision": 80.48572125945815,
|
416 |
+
"eval_BLEU-Trigram-Precision": 73.76299376299377,
|
417 |
+
"eval_BLEU-Unigram-Precision": 88.22057863824233,
|
418 |
+
"eval_ROUGE-2": 74.09506184806267,
|
419 |
+
"eval_ROUGE-L": 89.05035697782122,
|
420 |
+
"eval_Sacre-Bigram-Precision": 81.32291437376183,
|
421 |
+
"eval_Sacre-Trigram-Precision": 75.74935241149623,
|
422 |
+
"eval_Sacre-Unigram-Precision": 88.4195915129883,
|
423 |
+
"eval_SacreBLEU": 76.75621822222277,
|
424 |
+
"eval_loss": 0.3107452392578125,
|
425 |
+
"eval_runtime": 88.8932,
|
426 |
+
"eval_samples_per_second": 11.249,
|
427 |
+
"eval_steps_per_second": 11.249,
|
428 |
+
"step": 32000
|
429 |
+
},
|
430 |
+
{
|
431 |
+
"epoch": 2.03,
|
432 |
+
"learning_rate": 8.389078947368422e-06,
|
433 |
+
"loss": 0.1905,
|
434 |
+
"step": 32500
|
435 |
+
},
|
436 |
+
{
|
437 |
+
"epoch": 2.06,
|
438 |
+
"learning_rate": 8.356184210526316e-06,
|
439 |
+
"loss": 0.1765,
|
440 |
+
"step": 33000
|
441 |
+
},
|
442 |
+
{
|
443 |
+
"epoch": 2.09,
|
444 |
+
"learning_rate": 8.323355263157894e-06,
|
445 |
+
"loss": 0.1643,
|
446 |
+
"step": 33500
|
447 |
+
},
|
448 |
+
{
|
449 |
+
"epoch": 2.12,
|
450 |
+
"learning_rate": 8.29046052631579e-06,
|
451 |
+
"loss": 0.1843,
|
452 |
+
"step": 34000
|
453 |
+
},
|
454 |
+
{
|
455 |
+
"epoch": 2.16,
|
456 |
+
"learning_rate": 8.257565789473685e-06,
|
457 |
+
"loss": 0.1825,
|
458 |
+
"step": 34500
|
459 |
+
},
|
460 |
+
{
|
461 |
+
"epoch": 2.19,
|
462 |
+
"learning_rate": 8.224736842105265e-06,
|
463 |
+
"loss": 0.1374,
|
464 |
+
"step": 35000
|
465 |
+
},
|
466 |
+
{
|
467 |
+
"epoch": 2.22,
|
468 |
+
"learning_rate": 8.191842105263158e-06,
|
469 |
+
"loss": 0.2312,
|
470 |
+
"step": 35500
|
471 |
+
},
|
472 |
+
{
|
473 |
+
"epoch": 2.25,
|
474 |
+
"learning_rate": 8.158947368421052e-06,
|
475 |
+
"loss": 0.217,
|
476 |
+
"step": 36000
|
477 |
+
},
|
478 |
+
{
|
479 |
+
"epoch": 2.28,
|
480 |
+
"learning_rate": 8.126052631578949e-06,
|
481 |
+
"loss": 0.174,
|
482 |
+
"step": 36500
|
483 |
+
},
|
484 |
+
{
|
485 |
+
"epoch": 2.31,
|
486 |
+
"learning_rate": 8.093157894736843e-06,
|
487 |
+
"loss": 0.1485,
|
488 |
+
"step": 37000
|
489 |
+
},
|
490 |
+
{
|
491 |
+
"epoch": 2.34,
|
492 |
+
"learning_rate": 8.060263157894738e-06,
|
493 |
+
"loss": 0.1364,
|
494 |
+
"step": 37500
|
495 |
+
},
|
496 |
+
{
|
497 |
+
"epoch": 2.38,
|
498 |
+
"learning_rate": 8.027434210526317e-06,
|
499 |
+
"loss": 0.1894,
|
500 |
+
"step": 38000
|
501 |
+
},
|
502 |
+
{
|
503 |
+
"epoch": 2.41,
|
504 |
+
"learning_rate": 7.99453947368421e-06,
|
505 |
+
"loss": 0.1658,
|
506 |
+
"step": 38500
|
507 |
+
},
|
508 |
+
{
|
509 |
+
"epoch": 2.44,
|
510 |
+
"learning_rate": 7.961644736842106e-06,
|
511 |
+
"loss": 0.2059,
|
512 |
+
"step": 39000
|
513 |
+
},
|
514 |
+
{
|
515 |
+
"epoch": 2.47,
|
516 |
+
"learning_rate": 7.928750000000001e-06,
|
517 |
+
"loss": 0.2102,
|
518 |
+
"step": 39500
|
519 |
+
},
|
520 |
+
{
|
521 |
+
"epoch": 2.5,
|
522 |
+
"learning_rate": 7.89592105263158e-06,
|
523 |
+
"loss": 0.2032,
|
524 |
+
"step": 40000
|
525 |
+
},
|
526 |
+
{
|
527 |
+
"epoch": 2.53,
|
528 |
+
"learning_rate": 7.863026315789475e-06,
|
529 |
+
"loss": 0.2062,
|
530 |
+
"step": 40500
|
531 |
+
},
|
532 |
+
{
|
533 |
+
"epoch": 2.56,
|
534 |
+
"learning_rate": 7.830131578947368e-06,
|
535 |
+
"loss": 0.1848,
|
536 |
+
"step": 41000
|
537 |
+
},
|
538 |
+
{
|
539 |
+
"epoch": 2.59,
|
540 |
+
"learning_rate": 7.797236842105264e-06,
|
541 |
+
"loss": 0.2161,
|
542 |
+
"step": 41500
|
543 |
+
},
|
544 |
+
{
|
545 |
+
"epoch": 2.62,
|
546 |
+
"learning_rate": 7.764342105263159e-06,
|
547 |
+
"loss": 0.1746,
|
548 |
+
"step": 42000
|
549 |
+
},
|
550 |
+
{
|
551 |
+
"epoch": 2.66,
|
552 |
+
"learning_rate": 7.731447368421053e-06,
|
553 |
+
"loss": 0.1979,
|
554 |
+
"step": 42500
|
555 |
+
},
|
556 |
+
{
|
557 |
+
"epoch": 2.69,
|
558 |
+
"learning_rate": 7.698618421052633e-06,
|
559 |
+
"loss": 0.1569,
|
560 |
+
"step": 43000
|
561 |
+
},
|
562 |
+
{
|
563 |
+
"epoch": 2.72,
|
564 |
+
"learning_rate": 7.665723684210526e-06,
|
565 |
+
"loss": 0.2154,
|
566 |
+
"step": 43500
|
567 |
+
},
|
568 |
+
{
|
569 |
+
"epoch": 2.75,
|
570 |
+
"learning_rate": 7.632828947368422e-06,
|
571 |
+
"loss": 0.1723,
|
572 |
+
"step": 44000
|
573 |
+
},
|
574 |
+
{
|
575 |
+
"epoch": 2.78,
|
576 |
+
"learning_rate": 7.599934210526317e-06,
|
577 |
+
"loss": 0.1751,
|
578 |
+
"step": 44500
|
579 |
+
},
|
580 |
+
{
|
581 |
+
"epoch": 2.81,
|
582 |
+
"learning_rate": 7.5671052631578955e-06,
|
583 |
+
"loss": 0.1828,
|
584 |
+
"step": 45000
|
585 |
+
},
|
586 |
+
{
|
587 |
+
"epoch": 2.84,
|
588 |
+
"learning_rate": 7.534210526315791e-06,
|
589 |
+
"loss": 0.2034,
|
590 |
+
"step": 45500
|
591 |
+
},
|
592 |
+
{
|
593 |
+
"epoch": 2.88,
|
594 |
+
"learning_rate": 7.501315789473685e-06,
|
595 |
+
"loss": 0.1736,
|
596 |
+
"step": 46000
|
597 |
+
},
|
598 |
+
{
|
599 |
+
"epoch": 2.91,
|
600 |
+
"learning_rate": 7.468421052631579e-06,
|
601 |
+
"loss": 0.1858,
|
602 |
+
"step": 46500
|
603 |
+
},
|
604 |
+
{
|
605 |
+
"epoch": 2.94,
|
606 |
+
"learning_rate": 7.435526315789474e-06,
|
607 |
+
"loss": 0.19,
|
608 |
+
"step": 47000
|
609 |
+
},
|
610 |
+
{
|
611 |
+
"epoch": 2.97,
|
612 |
+
"learning_rate": 7.402697368421053e-06,
|
613 |
+
"loss": 0.176,
|
614 |
+
"step": 47500
|
615 |
+
},
|
616 |
+
{
|
617 |
+
"epoch": 3.0,
|
618 |
+
"learning_rate": 7.369802631578949e-06,
|
619 |
+
"loss": 0.17,
|
620 |
+
"step": 48000
|
621 |
+
},
|
622 |
+
{
|
623 |
+
"epoch": 3.0,
|
624 |
+
"eval_BLEU": 76.96135367983078,
|
625 |
+
"eval_BLEU-Bigram-Precision": 80.3268909568122,
|
626 |
+
"eval_BLEU-Trigram-Precision": 73.89894623074844,
|
627 |
+
"eval_BLEU-Unigram-Precision": 88.08356427201022,
|
628 |
+
"eval_ROUGE-2": 74.80911471749707,
|
629 |
+
"eval_ROUGE-L": 89.60895451818533,
|
630 |
+
"eval_Sacre-Bigram-Precision": 81.12129380053908,
|
631 |
+
"eval_Sacre-Trigram-Precision": 75.68414707655214,
|
632 |
+
"eval_Sacre-Unigram-Precision": 88.19464720194647,
|
633 |
+
"eval_SacreBLEU": 78.11560799454091,
|
634 |
+
"eval_loss": 0.3022772967815399,
|
635 |
+
"eval_runtime": 90.1953,
|
636 |
+
"eval_samples_per_second": 11.087,
|
637 |
+
"eval_steps_per_second": 11.087,
|
638 |
+
"step": 48000
|
639 |
+
},
|
640 |
+
{
|
641 |
+
"epoch": 3.03,
|
642 |
+
"learning_rate": 7.3369078947368425e-06,
|
643 |
+
"loss": 0.1881,
|
644 |
+
"step": 48500
|
645 |
+
},
|
646 |
+
{
|
647 |
+
"epoch": 3.06,
|
648 |
+
"learning_rate": 7.304013157894737e-06,
|
649 |
+
"loss": 0.148,
|
650 |
+
"step": 49000
|
651 |
+
},
|
652 |
+
{
|
653 |
+
"epoch": 3.09,
|
654 |
+
"learning_rate": 7.271118421052632e-06,
|
655 |
+
"loss": 0.1596,
|
656 |
+
"step": 49500
|
657 |
+
},
|
658 |
+
{
|
659 |
+
"epoch": 3.12,
|
660 |
+
"learning_rate": 7.238223684210527e-06,
|
661 |
+
"loss": 0.1553,
|
662 |
+
"step": 50000
|
663 |
+
},
|
664 |
+
{
|
665 |
+
"epoch": 3.16,
|
666 |
+
"learning_rate": 7.205328947368422e-06,
|
667 |
+
"loss": 0.1953,
|
668 |
+
"step": 50500
|
669 |
+
},
|
670 |
+
{
|
671 |
+
"epoch": 3.19,
|
672 |
+
"learning_rate": 7.172434210526317e-06,
|
673 |
+
"loss": 0.1691,
|
674 |
+
"step": 51000
|
675 |
+
},
|
676 |
+
{
|
677 |
+
"epoch": 3.22,
|
678 |
+
"learning_rate": 7.1395394736842115e-06,
|
679 |
+
"loss": 0.1448,
|
680 |
+
"step": 51500
|
681 |
+
},
|
682 |
+
{
|
683 |
+
"epoch": 3.25,
|
684 |
+
"learning_rate": 7.1067105263157895e-06,
|
685 |
+
"loss": 0.1379,
|
686 |
+
"step": 52000
|
687 |
+
},
|
688 |
+
{
|
689 |
+
"epoch": 3.28,
|
690 |
+
"learning_rate": 7.073881578947369e-06,
|
691 |
+
"loss": 0.1322,
|
692 |
+
"step": 52500
|
693 |
+
},
|
694 |
+
{
|
695 |
+
"epoch": 3.31,
|
696 |
+
"learning_rate": 7.040986842105264e-06,
|
697 |
+
"loss": 0.1439,
|
698 |
+
"step": 53000
|
699 |
+
},
|
700 |
+
{
|
701 |
+
"epoch": 3.34,
|
702 |
+
"learning_rate": 7.008092105263159e-06,
|
703 |
+
"loss": 0.1838,
|
704 |
+
"step": 53500
|
705 |
+
},
|
706 |
+
{
|
707 |
+
"epoch": 3.38,
|
708 |
+
"learning_rate": 6.975197368421053e-06,
|
709 |
+
"loss": 0.1548,
|
710 |
+
"step": 54000
|
711 |
+
},
|
712 |
+
{
|
713 |
+
"epoch": 3.41,
|
714 |
+
"learning_rate": 6.9423684210526324e-06,
|
715 |
+
"loss": 0.1375,
|
716 |
+
"step": 54500
|
717 |
+
},
|
718 |
+
{
|
719 |
+
"epoch": 3.44,
|
720 |
+
"learning_rate": 6.909473684210527e-06,
|
721 |
+
"loss": 0.1658,
|
722 |
+
"step": 55000
|
723 |
+
},
|
724 |
+
{
|
725 |
+
"epoch": 3.47,
|
726 |
+
"learning_rate": 6.876644736842107e-06,
|
727 |
+
"loss": 0.1514,
|
728 |
+
"step": 55500
|
729 |
+
},
|
730 |
+
{
|
731 |
+
"epoch": 3.5,
|
732 |
+
"learning_rate": 6.84375e-06,
|
733 |
+
"loss": 0.1835,
|
734 |
+
"step": 56000
|
735 |
+
},
|
736 |
+
{
|
737 |
+
"epoch": 3.53,
|
738 |
+
"learning_rate": 6.810855263157895e-06,
|
739 |
+
"loss": 0.1397,
|
740 |
+
"step": 56500
|
741 |
+
},
|
742 |
+
{
|
743 |
+
"epoch": 3.56,
|
744 |
+
"learning_rate": 6.77796052631579e-06,
|
745 |
+
"loss": 0.1324,
|
746 |
+
"step": 57000
|
747 |
+
},
|
748 |
+
{
|
749 |
+
"epoch": 3.59,
|
750 |
+
"learning_rate": 6.745065789473685e-06,
|
751 |
+
"loss": 0.1426,
|
752 |
+
"step": 57500
|
753 |
+
},
|
754 |
+
{
|
755 |
+
"epoch": 3.62,
|
756 |
+
"learning_rate": 6.7121710526315794e-06,
|
757 |
+
"loss": 0.1932,
|
758 |
+
"step": 58000
|
759 |
+
},
|
760 |
+
{
|
761 |
+
"epoch": 3.66,
|
762 |
+
"learning_rate": 6.679276315789475e-06,
|
763 |
+
"loss": 0.1643,
|
764 |
+
"step": 58500
|
765 |
+
},
|
766 |
+
{
|
767 |
+
"epoch": 3.69,
|
768 |
+
"learning_rate": 6.6463815789473685e-06,
|
769 |
+
"loss": 0.1606,
|
770 |
+
"step": 59000
|
771 |
+
},
|
772 |
+
{
|
773 |
+
"epoch": 3.72,
|
774 |
+
"learning_rate": 6.613486842105263e-06,
|
775 |
+
"loss": 0.1627,
|
776 |
+
"step": 59500
|
777 |
+
},
|
778 |
+
{
|
779 |
+
"epoch": 3.75,
|
780 |
+
"learning_rate": 6.5805921052631585e-06,
|
781 |
+
"loss": 0.1643,
|
782 |
+
"step": 60000
|
783 |
+
},
|
784 |
+
{
|
785 |
+
"epoch": 3.78,
|
786 |
+
"learning_rate": 6.547697368421053e-06,
|
787 |
+
"loss": 0.1321,
|
788 |
+
"step": 60500
|
789 |
+
},
|
790 |
+
{
|
791 |
+
"epoch": 3.81,
|
792 |
+
"learning_rate": 6.5148026315789485e-06,
|
793 |
+
"loss": 0.1282,
|
794 |
+
"step": 61000
|
795 |
+
},
|
796 |
+
{
|
797 |
+
"epoch": 3.84,
|
798 |
+
"learning_rate": 6.481907894736843e-06,
|
799 |
+
"loss": 0.1495,
|
800 |
+
"step": 61500
|
801 |
+
},
|
802 |
+
{
|
803 |
+
"epoch": 3.88,
|
804 |
+
"learning_rate": 6.449078947368421e-06,
|
805 |
+
"loss": 0.1518,
|
806 |
+
"step": 62000
|
807 |
+
},
|
808 |
+
{
|
809 |
+
"epoch": 3.91,
|
810 |
+
"learning_rate": 6.416184210526316e-06,
|
811 |
+
"loss": 0.1508,
|
812 |
+
"step": 62500
|
813 |
+
},
|
814 |
+
{
|
815 |
+
"epoch": 3.94,
|
816 |
+
"learning_rate": 6.383289473684211e-06,
|
817 |
+
"loss": 0.1487,
|
818 |
+
"step": 63000
|
819 |
+
},
|
820 |
+
{
|
821 |
+
"epoch": 3.97,
|
822 |
+
"learning_rate": 6.350394736842106e-06,
|
823 |
+
"loss": 0.1368,
|
824 |
+
"step": 63500
|
825 |
+
},
|
826 |
+
{
|
827 |
+
"epoch": 4.0,
|
828 |
+
"learning_rate": 6.317500000000001e-06,
|
829 |
+
"loss": 0.1371,
|
830 |
+
"step": 64000
|
831 |
+
},
|
832 |
+
{
|
833 |
+
"epoch": 4.0,
|
834 |
+
"eval_BLEU": 76.97562999548838,
|
835 |
+
"eval_BLEU-Bigram-Precision": 80.0071106897369,
|
836 |
+
"eval_BLEU-Trigram-Precision": 73.54518637704479,
|
837 |
+
"eval_BLEU-Unigram-Precision": 87.63509218054672,
|
838 |
+
"eval_ROUGE-2": 75.31771486560173,
|
839 |
+
"eval_ROUGE-L": 89.81535115722117,
|
840 |
+
"eval_Sacre-Bigram-Precision": 80.88565621991657,
|
841 |
+
"eval_Sacre-Trigram-Precision": 75.51678814673198,
|
842 |
+
"eval_Sacre-Unigram-Precision": 87.88288723548169,
|
843 |
+
"eval_SacreBLEU": 78.47888708880886,
|
844 |
+
"eval_loss": 0.2903847098350525,
|
845 |
+
"eval_runtime": 90.0073,
|
846 |
+
"eval_samples_per_second": 11.11,
|
847 |
+
"eval_steps_per_second": 11.11,
|
848 |
+
"step": 64000
|
849 |
+
},
|
850 |
+
{
|
851 |
+
"epoch": 4.03,
|
852 |
+
"learning_rate": 6.2846052631578955e-06,
|
853 |
+
"loss": 0.1406,
|
854 |
+
"step": 64500
|
855 |
+
},
|
856 |
+
{
|
857 |
+
"epoch": 4.06,
|
858 |
+
"learning_rate": 6.251710526315789e-06,
|
859 |
+
"loss": 0.1134,
|
860 |
+
"step": 65000
|
861 |
+
},
|
862 |
+
{
|
863 |
+
"epoch": 4.09,
|
864 |
+
"learning_rate": 6.218815789473685e-06,
|
865 |
+
"loss": 0.126,
|
866 |
+
"step": 65500
|
867 |
+
},
|
868 |
+
{
|
869 |
+
"epoch": 4.12,
|
870 |
+
"learning_rate": 6.1860526315789485e-06,
|
871 |
+
"loss": 0.1274,
|
872 |
+
"step": 66000
|
873 |
+
},
|
874 |
+
{
|
875 |
+
"epoch": 4.16,
|
876 |
+
"learning_rate": 6.153157894736843e-06,
|
877 |
+
"loss": 0.134,
|
878 |
+
"step": 66500
|
879 |
+
},
|
880 |
+
{
|
881 |
+
"epoch": 4.19,
|
882 |
+
"learning_rate": 6.120263157894737e-06,
|
883 |
+
"loss": 0.1462,
|
884 |
+
"step": 67000
|
885 |
+
},
|
886 |
+
{
|
887 |
+
"epoch": 4.22,
|
888 |
+
"learning_rate": 6.087368421052632e-06,
|
889 |
+
"loss": 0.1203,
|
890 |
+
"step": 67500
|
891 |
+
},
|
892 |
+
{
|
893 |
+
"epoch": 4.25,
|
894 |
+
"learning_rate": 6.054539473684211e-06,
|
895 |
+
"loss": 0.1602,
|
896 |
+
"step": 68000
|
897 |
+
},
|
898 |
+
{
|
899 |
+
"epoch": 4.28,
|
900 |
+
"learning_rate": 6.021644736842106e-06,
|
901 |
+
"loss": 0.1367,
|
902 |
+
"step": 68500
|
903 |
+
},
|
904 |
+
{
|
905 |
+
"epoch": 4.31,
|
906 |
+
"learning_rate": 5.988750000000001e-06,
|
907 |
+
"loss": 0.1087,
|
908 |
+
"step": 69000
|
909 |
+
},
|
910 |
+
{
|
911 |
+
"epoch": 4.34,
|
912 |
+
"learning_rate": 5.955921052631579e-06,
|
913 |
+
"loss": 0.1203,
|
914 |
+
"step": 69500
|
915 |
+
},
|
916 |
+
{
|
917 |
+
"epoch": 4.38,
|
918 |
+
"learning_rate": 5.923026315789474e-06,
|
919 |
+
"loss": 0.1199,
|
920 |
+
"step": 70000
|
921 |
+
},
|
922 |
+
{
|
923 |
+
"epoch": 4.41,
|
924 |
+
"learning_rate": 5.890131578947369e-06,
|
925 |
+
"loss": 0.1183,
|
926 |
+
"step": 70500
|
927 |
+
},
|
928 |
+
{
|
929 |
+
"epoch": 4.44,
|
930 |
+
"learning_rate": 5.857236842105264e-06,
|
931 |
+
"loss": 0.1366,
|
932 |
+
"step": 71000
|
933 |
+
},
|
934 |
+
{
|
935 |
+
"epoch": 4.47,
|
936 |
+
"learning_rate": 5.824407894736842e-06,
|
937 |
+
"loss": 0.1205,
|
938 |
+
"step": 71500
|
939 |
+
},
|
940 |
+
{
|
941 |
+
"epoch": 4.5,
|
942 |
+
"learning_rate": 5.791513157894737e-06,
|
943 |
+
"loss": 0.1537,
|
944 |
+
"step": 72000
|
945 |
+
},
|
946 |
+
{
|
947 |
+
"epoch": 4.53,
|
948 |
+
"learning_rate": 5.758618421052632e-06,
|
949 |
+
"loss": 0.1386,
|
950 |
+
"step": 72500
|
951 |
+
},
|
952 |
+
{
|
953 |
+
"epoch": 4.56,
|
954 |
+
"learning_rate": 5.725723684210527e-06,
|
955 |
+
"loss": 0.1634,
|
956 |
+
"step": 73000
|
957 |
+
},
|
958 |
+
{
|
959 |
+
"epoch": 4.59,
|
960 |
+
"learning_rate": 5.692828947368422e-06,
|
961 |
+
"loss": 0.1005,
|
962 |
+
"step": 73500
|
963 |
+
},
|
964 |
+
{
|
965 |
+
"epoch": 4.62,
|
966 |
+
"learning_rate": 5.659934210526317e-06,
|
967 |
+
"loss": 0.1546,
|
968 |
+
"step": 74000
|
969 |
+
},
|
970 |
+
{
|
971 |
+
"epoch": 4.66,
|
972 |
+
"learning_rate": 5.62703947368421e-06,
|
973 |
+
"loss": 0.1212,
|
974 |
+
"step": 74500
|
975 |
+
},
|
976 |
+
{
|
977 |
+
"epoch": 4.69,
|
978 |
+
"learning_rate": 5.594144736842106e-06,
|
979 |
+
"loss": 0.1446,
|
980 |
+
"step": 75000
|
981 |
+
},
|
982 |
+
{
|
983 |
+
"epoch": 4.72,
|
984 |
+
"learning_rate": 5.5613157894736846e-06,
|
985 |
+
"loss": 0.1339,
|
986 |
+
"step": 75500
|
987 |
+
},
|
988 |
+
{
|
989 |
+
"epoch": 4.75,
|
990 |
+
"learning_rate": 5.52842105263158e-06,
|
991 |
+
"loss": 0.1353,
|
992 |
+
"step": 76000
|
993 |
+
},
|
994 |
+
{
|
995 |
+
"epoch": 4.78,
|
996 |
+
"learning_rate": 5.4955263157894745e-06,
|
997 |
+
"loss": 0.1512,
|
998 |
+
"step": 76500
|
999 |
+
},
|
1000 |
+
{
|
1001 |
+
"epoch": 4.81,
|
1002 |
+
"learning_rate": 5.462631578947369e-06,
|
1003 |
+
"loss": 0.1217,
|
1004 |
+
"step": 77000
|
1005 |
+
},
|
1006 |
+
{
|
1007 |
+
"epoch": 4.84,
|
1008 |
+
"learning_rate": 5.429736842105263e-06,
|
1009 |
+
"loss": 0.1288,
|
1010 |
+
"step": 77500
|
1011 |
+
},
|
1012 |
+
{
|
1013 |
+
"epoch": 4.88,
|
1014 |
+
"learning_rate": 5.3969078947368424e-06,
|
1015 |
+
"loss": 0.155,
|
1016 |
+
"step": 78000
|
1017 |
+
},
|
1018 |
+
{
|
1019 |
+
"epoch": 4.91,
|
1020 |
+
"learning_rate": 5.364013157894738e-06,
|
1021 |
+
"loss": 0.128,
|
1022 |
+
"step": 78500
|
1023 |
+
},
|
1024 |
+
{
|
1025 |
+
"epoch": 4.94,
|
1026 |
+
"learning_rate": 5.331118421052632e-06,
|
1027 |
+
"loss": 0.1224,
|
1028 |
+
"step": 79000
|
1029 |
+
},
|
1030 |
+
{
|
1031 |
+
"epoch": 4.97,
|
1032 |
+
"learning_rate": 5.298223684210527e-06,
|
1033 |
+
"loss": 0.1245,
|
1034 |
+
"step": 79500
|
1035 |
+
},
|
1036 |
+
{
|
1037 |
+
"epoch": 5.0,
|
1038 |
+
"learning_rate": 5.265394736842106e-06,
|
1039 |
+
"loss": 0.1314,
|
1040 |
+
"step": 80000
|
1041 |
+
},
|
1042 |
+
{
|
1043 |
+
"epoch": 5.0,
|
1044 |
+
"eval_BLEU": 77.77478989310802,
|
1045 |
+
"eval_BLEU-Bigram-Precision": 82.58159149248259,
|
1046 |
+
"eval_BLEU-Trigram-Precision": 76.65601999722261,
|
1047 |
+
"eval_BLEU-Unigram-Precision": 89.58719093780634,
|
1048 |
+
"eval_ROUGE-2": 76.21694739487536,
|
1049 |
+
"eval_ROUGE-L": 90.30321591632153,
|
1050 |
+
"eval_Sacre-Bigram-Precision": 83.30402286216751,
|
1051 |
+
"eval_Sacre-Trigram-Precision": 78.39369302783938,
|
1052 |
+
"eval_Sacre-Unigram-Precision": 89.64151317092494,
|
1053 |
+
"eval_SacreBLEU": 79.14676248093514,
|
1054 |
+
"eval_loss": 0.2857072055339813,
|
1055 |
+
"eval_runtime": 88.6134,
|
1056 |
+
"eval_samples_per_second": 11.285,
|
1057 |
+
"eval_steps_per_second": 11.285,
|
1058 |
+
"step": 80000
|
1059 |
+
},
|
1060 |
+
{
|
1061 |
+
"epoch": 5.03,
|
1062 |
+
"learning_rate": 5.2325e-06,
|
1063 |
+
"loss": 0.0962,
|
1064 |
+
"step": 80500
|
1065 |
+
},
|
1066 |
+
{
|
1067 |
+
"epoch": 5.06,
|
1068 |
+
"learning_rate": 5.199605263157895e-06,
|
1069 |
+
"loss": 0.1223,
|
1070 |
+
"step": 81000
|
1071 |
+
},
|
1072 |
+
{
|
1073 |
+
"epoch": 5.09,
|
1074 |
+
"learning_rate": 5.1667763157894745e-06,
|
1075 |
+
"loss": 0.1234,
|
1076 |
+
"step": 81500
|
1077 |
+
},
|
1078 |
+
{
|
1079 |
+
"epoch": 5.12,
|
1080 |
+
"learning_rate": 5.133881578947368e-06,
|
1081 |
+
"loss": 0.0942,
|
1082 |
+
"step": 82000
|
1083 |
+
},
|
1084 |
+
{
|
1085 |
+
"epoch": 5.16,
|
1086 |
+
"learning_rate": 5.100986842105264e-06,
|
1087 |
+
"loss": 0.088,
|
1088 |
+
"step": 82500
|
1089 |
+
},
|
1090 |
+
{
|
1091 |
+
"epoch": 5.19,
|
1092 |
+
"learning_rate": 5.068092105263158e-06,
|
1093 |
+
"loss": 0.1013,
|
1094 |
+
"step": 83000
|
1095 |
+
},
|
1096 |
+
{
|
1097 |
+
"epoch": 5.22,
|
1098 |
+
"learning_rate": 5.035197368421053e-06,
|
1099 |
+
"loss": 0.1243,
|
1100 |
+
"step": 83500
|
1101 |
+
},
|
1102 |
+
{
|
1103 |
+
"epoch": 5.25,
|
1104 |
+
"learning_rate": 5.002302631578948e-06,
|
1105 |
+
"loss": 0.1097,
|
1106 |
+
"step": 84000
|
1107 |
+
},
|
1108 |
+
{
|
1109 |
+
"epoch": 5.28,
|
1110 |
+
"learning_rate": 4.969407894736843e-06,
|
1111 |
+
"loss": 0.1122,
|
1112 |
+
"step": 84500
|
1113 |
+
},
|
1114 |
+
{
|
1115 |
+
"epoch": 5.31,
|
1116 |
+
"learning_rate": 4.936513157894737e-06,
|
1117 |
+
"loss": 0.1474,
|
1118 |
+
"step": 85000
|
1119 |
+
},
|
1120 |
+
{
|
1121 |
+
"epoch": 5.34,
|
1122 |
+
"learning_rate": 4.903618421052632e-06,
|
1123 |
+
"loss": 0.1107,
|
1124 |
+
"step": 85500
|
1125 |
+
},
|
1126 |
+
{
|
1127 |
+
"epoch": 5.38,
|
1128 |
+
"learning_rate": 4.870723684210526e-06,
|
1129 |
+
"loss": 0.119,
|
1130 |
+
"step": 86000
|
1131 |
+
},
|
1132 |
+
{
|
1133 |
+
"epoch": 5.41,
|
1134 |
+
"learning_rate": 4.837894736842106e-06,
|
1135 |
+
"loss": 0.0859,
|
1136 |
+
"step": 86500
|
1137 |
+
},
|
1138 |
+
{
|
1139 |
+
"epoch": 5.44,
|
1140 |
+
"learning_rate": 4.805000000000001e-06,
|
1141 |
+
"loss": 0.1172,
|
1142 |
+
"step": 87000
|
1143 |
+
},
|
1144 |
+
{
|
1145 |
+
"epoch": 5.47,
|
1146 |
+
"learning_rate": 4.772171052631579e-06,
|
1147 |
+
"loss": 0.1017,
|
1148 |
+
"step": 87500
|
1149 |
+
},
|
1150 |
+
{
|
1151 |
+
"epoch": 5.5,
|
1152 |
+
"learning_rate": 4.739276315789474e-06,
|
1153 |
+
"loss": 0.0847,
|
1154 |
+
"step": 88000
|
1155 |
+
},
|
1156 |
+
{
|
1157 |
+
"epoch": 5.53,
|
1158 |
+
"learning_rate": 4.7063815789473685e-06,
|
1159 |
+
"loss": 0.1437,
|
1160 |
+
"step": 88500
|
1161 |
+
},
|
1162 |
+
{
|
1163 |
+
"epoch": 5.56,
|
1164 |
+
"learning_rate": 4.673486842105264e-06,
|
1165 |
+
"loss": 0.1294,
|
1166 |
+
"step": 89000
|
1167 |
+
},
|
1168 |
+
{
|
1169 |
+
"epoch": 5.59,
|
1170 |
+
"learning_rate": 4.6405921052631585e-06,
|
1171 |
+
"loss": 0.1037,
|
1172 |
+
"step": 89500
|
1173 |
+
},
|
1174 |
+
{
|
1175 |
+
"epoch": 5.62,
|
1176 |
+
"learning_rate": 4.607697368421053e-06,
|
1177 |
+
"loss": 0.1108,
|
1178 |
+
"step": 90000
|
1179 |
+
},
|
1180 |
+
{
|
1181 |
+
"epoch": 5.66,
|
1182 |
+
"learning_rate": 4.574868421052632e-06,
|
1183 |
+
"loss": 0.1186,
|
1184 |
+
"step": 90500
|
1185 |
+
},
|
1186 |
+
{
|
1187 |
+
"epoch": 5.69,
|
1188 |
+
"learning_rate": 4.541973684210526e-06,
|
1189 |
+
"loss": 0.1252,
|
1190 |
+
"step": 91000
|
1191 |
+
},
|
1192 |
+
{
|
1193 |
+
"epoch": 5.72,
|
1194 |
+
"learning_rate": 4.509078947368422e-06,
|
1195 |
+
"loss": 0.1202,
|
1196 |
+
"step": 91500
|
1197 |
+
},
|
1198 |
+
{
|
1199 |
+
"epoch": 5.75,
|
1200 |
+
"learning_rate": 4.476184210526316e-06,
|
1201 |
+
"loss": 0.122,
|
1202 |
+
"step": 92000
|
1203 |
+
},
|
1204 |
+
{
|
1205 |
+
"epoch": 5.78,
|
1206 |
+
"learning_rate": 4.443289473684211e-06,
|
1207 |
+
"loss": 0.136,
|
1208 |
+
"step": 92500
|
1209 |
+
},
|
1210 |
+
{
|
1211 |
+
"epoch": 5.81,
|
1212 |
+
"learning_rate": 4.4103947368421055e-06,
|
1213 |
+
"loss": 0.1213,
|
1214 |
+
"step": 93000
|
1215 |
+
},
|
1216 |
+
{
|
1217 |
+
"epoch": 5.84,
|
1218 |
+
"learning_rate": 4.3775e-06,
|
1219 |
+
"loss": 0.1041,
|
1220 |
+
"step": 93500
|
1221 |
+
},
|
1222 |
+
{
|
1223 |
+
"epoch": 5.88,
|
1224 |
+
"learning_rate": 4.344605263157895e-06,
|
1225 |
+
"loss": 0.1339,
|
1226 |
+
"step": 94000
|
1227 |
+
},
|
1228 |
+
{
|
1229 |
+
"epoch": 5.91,
|
1230 |
+
"learning_rate": 4.31171052631579e-06,
|
1231 |
+
"loss": 0.0929,
|
1232 |
+
"step": 94500
|
1233 |
+
},
|
1234 |
+
{
|
1235 |
+
"epoch": 5.94,
|
1236 |
+
"learning_rate": 4.2788157894736845e-06,
|
1237 |
+
"loss": 0.1185,
|
1238 |
+
"step": 95000
|
1239 |
+
},
|
1240 |
+
{
|
1241 |
+
"epoch": 5.97,
|
1242 |
+
"learning_rate": 4.245986842105263e-06,
|
1243 |
+
"loss": 0.1242,
|
1244 |
+
"step": 95500
|
1245 |
+
},
|
1246 |
+
{
|
1247 |
+
"epoch": 6.0,
|
1248 |
+
"learning_rate": 4.213092105263159e-06,
|
1249 |
+
"loss": 0.1,
|
1250 |
+
"step": 96000
|
1251 |
+
},
|
1252 |
+
{
|
1253 |
+
"epoch": 6.0,
|
1254 |
+
"eval_BLEU": 79.11019971744633,
|
1255 |
+
"eval_BLEU-Bigram-Precision": 85.00372116100223,
|
1256 |
+
"eval_BLEU-Trigram-Precision": 79.31375317706862,
|
1257 |
+
"eval_BLEU-Unigram-Precision": 91.3153829176782,
|
1258 |
+
"eval_ROUGE-2": 76.72218981179273,
|
1259 |
+
"eval_ROUGE-L": 90.74286437693775,
|
1260 |
+
"eval_Sacre-Bigram-Precision": 85.59587813620071,
|
1261 |
+
"eval_Sacre-Trigram-Precision": 81.08958228485153,
|
1262 |
+
"eval_Sacre-Unigram-Precision": 91.41821112006447,
|
1263 |
+
"eval_SacreBLEU": 80.09298309615393,
|
1264 |
+
"eval_loss": 0.2855425179004669,
|
1265 |
+
"eval_runtime": 87.7278,
|
1266 |
+
"eval_samples_per_second": 11.399,
|
1267 |
+
"eval_steps_per_second": 11.399,
|
1268 |
+
"step": 96000
|
1269 |
+
},
|
1270 |
+
{
|
1271 |
+
"epoch": 6.03,
|
1272 |
+
"learning_rate": 4.1801973684210525e-06,
|
1273 |
+
"loss": 0.0992,
|
1274 |
+
"step": 96500
|
1275 |
+
},
|
1276 |
+
{
|
1277 |
+
"epoch": 6.06,
|
1278 |
+
"learning_rate": 4.147302631578948e-06,
|
1279 |
+
"loss": 0.0906,
|
1280 |
+
"step": 97000
|
1281 |
+
},
|
1282 |
+
{
|
1283 |
+
"epoch": 6.09,
|
1284 |
+
"learning_rate": 4.114407894736842e-06,
|
1285 |
+
"loss": 0.114,
|
1286 |
+
"step": 97500
|
1287 |
+
},
|
1288 |
+
{
|
1289 |
+
"epoch": 6.12,
|
1290 |
+
"learning_rate": 4.081578947368421e-06,
|
1291 |
+
"loss": 0.0868,
|
1292 |
+
"step": 98000
|
1293 |
+
},
|
1294 |
+
{
|
1295 |
+
"epoch": 6.16,
|
1296 |
+
"learning_rate": 4.048684210526317e-06,
|
1297 |
+
"loss": 0.0837,
|
1298 |
+
"step": 98500
|
1299 |
+
},
|
1300 |
+
{
|
1301 |
+
"epoch": 6.19,
|
1302 |
+
"learning_rate": 4.01578947368421e-06,
|
1303 |
+
"loss": 0.1157,
|
1304 |
+
"step": 99000
|
1305 |
+
},
|
1306 |
+
{
|
1307 |
+
"epoch": 6.22,
|
1308 |
+
"learning_rate": 3.982894736842106e-06,
|
1309 |
+
"loss": 0.0993,
|
1310 |
+
"step": 99500
|
1311 |
+
},
|
1312 |
+
{
|
1313 |
+
"epoch": 6.25,
|
1314 |
+
"learning_rate": 3.95e-06,
|
1315 |
+
"loss": 0.1214,
|
1316 |
+
"step": 100000
|
1317 |
+
},
|
1318 |
+
{
|
1319 |
+
"epoch": 6.28,
|
1320 |
+
"learning_rate": 3.917171052631579e-06,
|
1321 |
+
"loss": 0.1167,
|
1322 |
+
"step": 100500
|
1323 |
+
},
|
1324 |
+
{
|
1325 |
+
"epoch": 6.31,
|
1326 |
+
"learning_rate": 3.884342105263158e-06,
|
1327 |
+
"loss": 0.1021,
|
1328 |
+
"step": 101000
|
1329 |
+
},
|
1330 |
+
{
|
1331 |
+
"epoch": 6.34,
|
1332 |
+
"learning_rate": 3.851447368421053e-06,
|
1333 |
+
"loss": 0.0963,
|
1334 |
+
"step": 101500
|
1335 |
+
},
|
1336 |
+
{
|
1337 |
+
"epoch": 6.38,
|
1338 |
+
"learning_rate": 3.818552631578948e-06,
|
1339 |
+
"loss": 0.1014,
|
1340 |
+
"step": 102000
|
1341 |
+
},
|
1342 |
+
{
|
1343 |
+
"epoch": 6.41,
|
1344 |
+
"learning_rate": 3.7856578947368424e-06,
|
1345 |
+
"loss": 0.096,
|
1346 |
+
"step": 102500
|
1347 |
+
},
|
1348 |
+
{
|
1349 |
+
"epoch": 6.44,
|
1350 |
+
"learning_rate": 3.752763157894737e-06,
|
1351 |
+
"loss": 0.105,
|
1352 |
+
"step": 103000
|
1353 |
+
},
|
1354 |
+
{
|
1355 |
+
"epoch": 6.47,
|
1356 |
+
"learning_rate": 3.719868421052632e-06,
|
1357 |
+
"loss": 0.095,
|
1358 |
+
"step": 103500
|
1359 |
+
},
|
1360 |
+
{
|
1361 |
+
"epoch": 6.5,
|
1362 |
+
"learning_rate": 3.6870394736842107e-06,
|
1363 |
+
"loss": 0.1049,
|
1364 |
+
"step": 104000
|
1365 |
+
},
|
1366 |
+
{
|
1367 |
+
"epoch": 6.53,
|
1368 |
+
"learning_rate": 3.6541447368421057e-06,
|
1369 |
+
"loss": 0.1037,
|
1370 |
+
"step": 104500
|
1371 |
+
},
|
1372 |
+
{
|
1373 |
+
"epoch": 6.56,
|
1374 |
+
"learning_rate": 3.62125e-06,
|
1375 |
+
"loss": 0.0754,
|
1376 |
+
"step": 105000
|
1377 |
+
},
|
1378 |
+
{
|
1379 |
+
"epoch": 6.59,
|
1380 |
+
"learning_rate": 3.588355263157895e-06,
|
1381 |
+
"loss": 0.0996,
|
1382 |
+
"step": 105500
|
1383 |
+
},
|
1384 |
+
{
|
1385 |
+
"epoch": 6.62,
|
1386 |
+
"learning_rate": 3.55546052631579e-06,
|
1387 |
+
"loss": 0.1024,
|
1388 |
+
"step": 106000
|
1389 |
+
},
|
1390 |
+
{
|
1391 |
+
"epoch": 6.66,
|
1392 |
+
"learning_rate": 3.522565789473685e-06,
|
1393 |
+
"loss": 0.0926,
|
1394 |
+
"step": 106500
|
1395 |
+
},
|
1396 |
+
{
|
1397 |
+
"epoch": 6.69,
|
1398 |
+
"learning_rate": 3.489671052631579e-06,
|
1399 |
+
"loss": 0.0782,
|
1400 |
+
"step": 107000
|
1401 |
+
},
|
1402 |
+
{
|
1403 |
+
"epoch": 6.72,
|
1404 |
+
"learning_rate": 3.456776315789474e-06,
|
1405 |
+
"loss": 0.1045,
|
1406 |
+
"step": 107500
|
1407 |
+
},
|
1408 |
+
{
|
1409 |
+
"epoch": 6.75,
|
1410 |
+
"learning_rate": 3.423881578947369e-06,
|
1411 |
+
"loss": 0.1079,
|
1412 |
+
"step": 108000
|
1413 |
+
},
|
1414 |
+
{
|
1415 |
+
"epoch": 6.78,
|
1416 |
+
"learning_rate": 3.3910526315789477e-06,
|
1417 |
+
"loss": 0.0924,
|
1418 |
+
"step": 108500
|
1419 |
+
},
|
1420 |
+
{
|
1421 |
+
"epoch": 6.81,
|
1422 |
+
"learning_rate": 3.3582236842105265e-06,
|
1423 |
+
"loss": 0.1352,
|
1424 |
+
"step": 109000
|
1425 |
+
},
|
1426 |
+
{
|
1427 |
+
"epoch": 6.84,
|
1428 |
+
"learning_rate": 3.3253289473684215e-06,
|
1429 |
+
"loss": 0.0865,
|
1430 |
+
"step": 109500
|
1431 |
+
},
|
1432 |
+
{
|
1433 |
+
"epoch": 6.88,
|
1434 |
+
"learning_rate": 3.2924342105263164e-06,
|
1435 |
+
"loss": 0.0924,
|
1436 |
+
"step": 110000
|
1437 |
+
},
|
1438 |
+
{
|
1439 |
+
"epoch": 6.91,
|
1440 |
+
"learning_rate": 3.2595394736842106e-06,
|
1441 |
+
"loss": 0.0812,
|
1442 |
+
"step": 110500
|
1443 |
+
},
|
1444 |
+
{
|
1445 |
+
"epoch": 6.94,
|
1446 |
+
"learning_rate": 3.2266447368421056e-06,
|
1447 |
+
"loss": 0.1081,
|
1448 |
+
"step": 111000
|
1449 |
+
},
|
1450 |
+
{
|
1451 |
+
"epoch": 6.97,
|
1452 |
+
"learning_rate": 3.1937500000000006e-06,
|
1453 |
+
"loss": 0.0872,
|
1454 |
+
"step": 111500
|
1455 |
+
},
|
1456 |
+
{
|
1457 |
+
"epoch": 7.0,
|
1458 |
+
"learning_rate": 3.1608552631578947e-06,
|
1459 |
+
"loss": 0.0855,
|
1460 |
+
"step": 112000
|
1461 |
+
},
|
1462 |
+
{
|
1463 |
+
"epoch": 7.0,
|
1464 |
+
"eval_BLEU": 79.18243013411383,
|
1465 |
+
"eval_BLEU-Bigram-Precision": 83.65829880575188,
|
1466 |
+
"eval_BLEU-Trigram-Precision": 78.10683642402437,
|
1467 |
+
"eval_BLEU-Unigram-Precision": 90.08255485552901,
|
1468 |
+
"eval_ROUGE-2": 76.92605201616105,
|
1469 |
+
"eval_ROUGE-L": 90.80400601001202,
|
1470 |
+
"eval_Sacre-Bigram-Precision": 84.62469733656174,
|
1471 |
+
"eval_Sacre-Trigram-Precision": 80.1505057981742,
|
1472 |
+
"eval_Sacre-Unigram-Precision": 90.4322823716042,
|
1473 |
+
"eval_SacreBLEU": 80.51163956701332,
|
1474 |
+
"eval_loss": 0.2782886326313019,
|
1475 |
+
"eval_runtime": 88.5286,
|
1476 |
+
"eval_samples_per_second": 11.296,
|
1477 |
+
"eval_steps_per_second": 11.296,
|
1478 |
+
"step": 112000
|
1479 |
+
},
|
1480 |
+
{
|
1481 |
+
"epoch": 7.03,
|
1482 |
+
"learning_rate": 3.1279605263157897e-06,
|
1483 |
+
"loss": 0.0686,
|
1484 |
+
"step": 112500
|
1485 |
+
},
|
1486 |
+
{
|
1487 |
+
"epoch": 7.06,
|
1488 |
+
"learning_rate": 3.0951315789473685e-06,
|
1489 |
+
"loss": 0.1035,
|
1490 |
+
"step": 113000
|
1491 |
+
},
|
1492 |
+
{
|
1493 |
+
"epoch": 7.09,
|
1494 |
+
"learning_rate": 3.0623026315789477e-06,
|
1495 |
+
"loss": 0.0822,
|
1496 |
+
"step": 113500
|
1497 |
+
},
|
1498 |
+
{
|
1499 |
+
"epoch": 7.12,
|
1500 |
+
"learning_rate": 3.0294078947368422e-06,
|
1501 |
+
"loss": 0.074,
|
1502 |
+
"step": 114000
|
1503 |
+
},
|
1504 |
+
{
|
1505 |
+
"epoch": 7.16,
|
1506 |
+
"learning_rate": 2.996513157894737e-06,
|
1507 |
+
"loss": 0.0931,
|
1508 |
+
"step": 114500
|
1509 |
+
},
|
1510 |
+
{
|
1511 |
+
"epoch": 7.19,
|
1512 |
+
"learning_rate": 2.9636184210526318e-06,
|
1513 |
+
"loss": 0.0849,
|
1514 |
+
"step": 115000
|
1515 |
+
},
|
1516 |
+
{
|
1517 |
+
"epoch": 7.22,
|
1518 |
+
"learning_rate": 2.9307236842105263e-06,
|
1519 |
+
"loss": 0.1084,
|
1520 |
+
"step": 115500
|
1521 |
+
},
|
1522 |
+
{
|
1523 |
+
"epoch": 7.25,
|
1524 |
+
"learning_rate": 2.8978289473684213e-06,
|
1525 |
+
"loss": 0.0754,
|
1526 |
+
"step": 116000
|
1527 |
+
},
|
1528 |
+
{
|
1529 |
+
"epoch": 7.28,
|
1530 |
+
"learning_rate": 2.8649342105263163e-06,
|
1531 |
+
"loss": 0.0711,
|
1532 |
+
"step": 116500
|
1533 |
+
},
|
1534 |
+
{
|
1535 |
+
"epoch": 7.31,
|
1536 |
+
"learning_rate": 2.8320394736842104e-06,
|
1537 |
+
"loss": 0.0965,
|
1538 |
+
"step": 117000
|
1539 |
+
},
|
1540 |
+
{
|
1541 |
+
"epoch": 7.34,
|
1542 |
+
"learning_rate": 2.7992105263157896e-06,
|
1543 |
+
"loss": 0.097,
|
1544 |
+
"step": 117500
|
1545 |
+
},
|
1546 |
+
{
|
1547 |
+
"epoch": 7.38,
|
1548 |
+
"learning_rate": 2.766315789473684e-06,
|
1549 |
+
"loss": 0.0852,
|
1550 |
+
"step": 118000
|
1551 |
+
},
|
1552 |
+
{
|
1553 |
+
"epoch": 7.41,
|
1554 |
+
"learning_rate": 2.733421052631579e-06,
|
1555 |
+
"loss": 0.0847,
|
1556 |
+
"step": 118500
|
1557 |
+
},
|
1558 |
+
{
|
1559 |
+
"epoch": 7.44,
|
1560 |
+
"learning_rate": 2.700526315789474e-06,
|
1561 |
+
"loss": 0.0935,
|
1562 |
+
"step": 119000
|
1563 |
+
},
|
1564 |
+
{
|
1565 |
+
"epoch": 7.47,
|
1566 |
+
"learning_rate": 2.6676315789473687e-06,
|
1567 |
+
"loss": 0.0728,
|
1568 |
+
"step": 119500
|
1569 |
+
},
|
1570 |
+
{
|
1571 |
+
"epoch": 7.5,
|
1572 |
+
"learning_rate": 2.6347368421052633e-06,
|
1573 |
+
"loss": 0.0912,
|
1574 |
+
"step": 120000
|
1575 |
+
},
|
1576 |
+
{
|
1577 |
+
"epoch": 7.53,
|
1578 |
+
"learning_rate": 2.6018421052631583e-06,
|
1579 |
+
"loss": 0.0769,
|
1580 |
+
"step": 120500
|
1581 |
+
},
|
1582 |
+
{
|
1583 |
+
"epoch": 7.56,
|
1584 |
+
"learning_rate": 2.5689473684210533e-06,
|
1585 |
+
"loss": 0.0874,
|
1586 |
+
"step": 121000
|
1587 |
+
},
|
1588 |
+
{
|
1589 |
+
"epoch": 7.59,
|
1590 |
+
"learning_rate": 2.5360526315789474e-06,
|
1591 |
+
"loss": 0.0841,
|
1592 |
+
"step": 121500
|
1593 |
+
},
|
1594 |
+
{
|
1595 |
+
"epoch": 7.62,
|
1596 |
+
"learning_rate": 2.5031578947368424e-06,
|
1597 |
+
"loss": 0.0785,
|
1598 |
+
"step": 122000
|
1599 |
+
},
|
1600 |
+
{
|
1601 |
+
"epoch": 7.66,
|
1602 |
+
"learning_rate": 2.470328947368421e-06,
|
1603 |
+
"loss": 0.0729,
|
1604 |
+
"step": 122500
|
1605 |
+
},
|
1606 |
+
{
|
1607 |
+
"epoch": 7.69,
|
1608 |
+
"learning_rate": 2.437434210526316e-06,
|
1609 |
+
"loss": 0.0871,
|
1610 |
+
"step": 123000
|
1611 |
+
},
|
1612 |
+
{
|
1613 |
+
"epoch": 7.72,
|
1614 |
+
"learning_rate": 2.4045394736842107e-06,
|
1615 |
+
"loss": 0.1076,
|
1616 |
+
"step": 123500
|
1617 |
+
},
|
1618 |
+
{
|
1619 |
+
"epoch": 7.75,
|
1620 |
+
"learning_rate": 2.3716447368421057e-06,
|
1621 |
+
"loss": 0.1002,
|
1622 |
+
"step": 124000
|
1623 |
+
},
|
1624 |
+
{
|
1625 |
+
"epoch": 7.78,
|
1626 |
+
"learning_rate": 2.3388157894736845e-06,
|
1627 |
+
"loss": 0.0812,
|
1628 |
+
"step": 124500
|
1629 |
+
},
|
1630 |
+
{
|
1631 |
+
"epoch": 7.81,
|
1632 |
+
"learning_rate": 2.305921052631579e-06,
|
1633 |
+
"loss": 0.087,
|
1634 |
+
"step": 125000
|
1635 |
+
},
|
1636 |
+
{
|
1637 |
+
"epoch": 7.84,
|
1638 |
+
"learning_rate": 2.273026315789474e-06,
|
1639 |
+
"loss": 0.0767,
|
1640 |
+
"step": 125500
|
1641 |
+
},
|
1642 |
+
{
|
1643 |
+
"epoch": 7.88,
|
1644 |
+
"learning_rate": 2.2401315789473686e-06,
|
1645 |
+
"loss": 0.1071,
|
1646 |
+
"step": 126000
|
1647 |
+
},
|
1648 |
+
{
|
1649 |
+
"epoch": 7.91,
|
1650 |
+
"learning_rate": 2.2072368421052636e-06,
|
1651 |
+
"loss": 0.1095,
|
1652 |
+
"step": 126500
|
1653 |
+
},
|
1654 |
+
{
|
1655 |
+
"epoch": 7.94,
|
1656 |
+
"learning_rate": 2.174342105263158e-06,
|
1657 |
+
"loss": 0.0983,
|
1658 |
+
"step": 127000
|
1659 |
+
},
|
1660 |
+
{
|
1661 |
+
"epoch": 7.97,
|
1662 |
+
"learning_rate": 2.141447368421053e-06,
|
1663 |
+
"loss": 0.0786,
|
1664 |
+
"step": 127500
|
1665 |
+
},
|
1666 |
+
{
|
1667 |
+
"epoch": 8.0,
|
1668 |
+
"learning_rate": 2.1085526315789477e-06,
|
1669 |
+
"loss": 0.0941,
|
1670 |
+
"step": 128000
|
1671 |
+
},
|
1672 |
+
{
|
1673 |
+
"epoch": 8.0,
|
1674 |
+
"eval_BLEU": 79.82458025693062,
|
1675 |
+
"eval_BLEU-Bigram-Precision": 83.85884065001213,
|
1676 |
+
"eval_BLEU-Trigram-Precision": 78.5439031103771,
|
1677 |
+
"eval_BLEU-Unigram-Precision": 90.06056673155959,
|
1678 |
+
"eval_ROUGE-2": 77.16039909105272,
|
1679 |
+
"eval_ROUGE-L": 90.85908984738971,
|
1680 |
+
"eval_Sacre-Bigram-Precision": 84.34089917066783,
|
1681 |
+
"eval_Sacre-Trigram-Precision": 80.05865102639297,
|
1682 |
+
"eval_Sacre-Unigram-Precision": 89.97441951987406,
|
1683 |
+
"eval_SacreBLEU": 80.93271666051959,
|
1684 |
+
"eval_loss": 0.2738938629627228,
|
1685 |
+
"eval_runtime": 88.7035,
|
1686 |
+
"eval_samples_per_second": 11.274,
|
1687 |
+
"eval_steps_per_second": 11.274,
|
1688 |
+
"step": 128000
|
1689 |
+
},
|
1690 |
+
{
|
1691 |
+
"epoch": 8.03,
|
1692 |
+
"learning_rate": 2.0757236842105265e-06,
|
1693 |
+
"loss": 0.085,
|
1694 |
+
"step": 128500
|
1695 |
+
},
|
1696 |
+
{
|
1697 |
+
"epoch": 8.06,
|
1698 |
+
"learning_rate": 2.0428947368421053e-06,
|
1699 |
+
"loss": 0.099,
|
1700 |
+
"step": 129000
|
1701 |
+
},
|
1702 |
+
{
|
1703 |
+
"epoch": 8.09,
|
1704 |
+
"learning_rate": 2.0100000000000002e-06,
|
1705 |
+
"loss": 0.0742,
|
1706 |
+
"step": 129500
|
1707 |
+
},
|
1708 |
+
{
|
1709 |
+
"epoch": 8.12,
|
1710 |
+
"learning_rate": 1.977105263157895e-06,
|
1711 |
+
"loss": 0.0918,
|
1712 |
+
"step": 130000
|
1713 |
+
},
|
1714 |
+
{
|
1715 |
+
"epoch": 8.16,
|
1716 |
+
"learning_rate": 1.9442105263157894e-06,
|
1717 |
+
"loss": 0.0821,
|
1718 |
+
"step": 130500
|
1719 |
+
},
|
1720 |
+
{
|
1721 |
+
"epoch": 8.19,
|
1722 |
+
"learning_rate": 1.9113157894736843e-06,
|
1723 |
+
"loss": 0.0724,
|
1724 |
+
"step": 131000
|
1725 |
+
},
|
1726 |
+
{
|
1727 |
+
"epoch": 8.22,
|
1728 |
+
"learning_rate": 1.8784210526315791e-06,
|
1729 |
+
"loss": 0.0654,
|
1730 |
+
"step": 131500
|
1731 |
+
},
|
1732 |
+
{
|
1733 |
+
"epoch": 8.25,
|
1734 |
+
"learning_rate": 1.8455263157894737e-06,
|
1735 |
+
"loss": 0.0906,
|
1736 |
+
"step": 132000
|
1737 |
+
},
|
1738 |
+
{
|
1739 |
+
"epoch": 8.28,
|
1740 |
+
"learning_rate": 1.8126315789473687e-06,
|
1741 |
+
"loss": 0.1159,
|
1742 |
+
"step": 132500
|
1743 |
+
},
|
1744 |
+
{
|
1745 |
+
"epoch": 8.31,
|
1746 |
+
"learning_rate": 1.7797368421052632e-06,
|
1747 |
+
"loss": 0.0841,
|
1748 |
+
"step": 133000
|
1749 |
+
},
|
1750 |
+
{
|
1751 |
+
"epoch": 8.34,
|
1752 |
+
"learning_rate": 1.7468421052631582e-06,
|
1753 |
+
"loss": 0.0626,
|
1754 |
+
"step": 133500
|
1755 |
+
},
|
1756 |
+
{
|
1757 |
+
"epoch": 8.38,
|
1758 |
+
"learning_rate": 1.7139473684210528e-06,
|
1759 |
+
"loss": 0.0721,
|
1760 |
+
"step": 134000
|
1761 |
+
},
|
1762 |
+
{
|
1763 |
+
"epoch": 8.41,
|
1764 |
+
"learning_rate": 1.6810526315789473e-06,
|
1765 |
+
"loss": 0.0775,
|
1766 |
+
"step": 134500
|
1767 |
+
},
|
1768 |
+
{
|
1769 |
+
"epoch": 8.44,
|
1770 |
+
"learning_rate": 1.6481578947368423e-06,
|
1771 |
+
"loss": 0.0756,
|
1772 |
+
"step": 135000
|
1773 |
+
},
|
1774 |
+
{
|
1775 |
+
"epoch": 8.47,
|
1776 |
+
"learning_rate": 1.615328947368421e-06,
|
1777 |
+
"loss": 0.0736,
|
1778 |
+
"step": 135500
|
1779 |
+
},
|
1780 |
+
{
|
1781 |
+
"epoch": 8.5,
|
1782 |
+
"learning_rate": 1.5825e-06,
|
1783 |
+
"loss": 0.086,
|
1784 |
+
"step": 136000
|
1785 |
+
},
|
1786 |
+
{
|
1787 |
+
"epoch": 8.53,
|
1788 |
+
"learning_rate": 1.5496052631578949e-06,
|
1789 |
+
"loss": 0.0776,
|
1790 |
+
"step": 136500
|
1791 |
+
},
|
1792 |
+
{
|
1793 |
+
"epoch": 8.56,
|
1794 |
+
"learning_rate": 1.5167105263157896e-06,
|
1795 |
+
"loss": 0.0785,
|
1796 |
+
"step": 137000
|
1797 |
+
},
|
1798 |
+
{
|
1799 |
+
"epoch": 8.59,
|
1800 |
+
"learning_rate": 1.4838157894736844e-06,
|
1801 |
+
"loss": 0.0761,
|
1802 |
+
"step": 137500
|
1803 |
+
},
|
1804 |
+
{
|
1805 |
+
"epoch": 8.62,
|
1806 |
+
"learning_rate": 1.450921052631579e-06,
|
1807 |
+
"loss": 0.0919,
|
1808 |
+
"step": 138000
|
1809 |
+
},
|
1810 |
+
{
|
1811 |
+
"epoch": 8.66,
|
1812 |
+
"learning_rate": 1.418092105263158e-06,
|
1813 |
+
"loss": 0.0963,
|
1814 |
+
"step": 138500
|
1815 |
+
},
|
1816 |
+
{
|
1817 |
+
"epoch": 8.69,
|
1818 |
+
"learning_rate": 1.3851973684210525e-06,
|
1819 |
+
"loss": 0.0682,
|
1820 |
+
"step": 139000
|
1821 |
+
},
|
1822 |
+
{
|
1823 |
+
"epoch": 8.72,
|
1824 |
+
"learning_rate": 1.3523026315789475e-06,
|
1825 |
+
"loss": 0.0701,
|
1826 |
+
"step": 139500
|
1827 |
+
},
|
1828 |
+
{
|
1829 |
+
"epoch": 8.75,
|
1830 |
+
"learning_rate": 1.319407894736842e-06,
|
1831 |
+
"loss": 0.0873,
|
1832 |
+
"step": 140000
|
1833 |
+
},
|
1834 |
+
{
|
1835 |
+
"epoch": 8.78,
|
1836 |
+
"learning_rate": 1.286513157894737e-06,
|
1837 |
+
"loss": 0.0778,
|
1838 |
+
"step": 140500
|
1839 |
+
},
|
1840 |
+
{
|
1841 |
+
"epoch": 8.81,
|
1842 |
+
"learning_rate": 1.2536184210526316e-06,
|
1843 |
+
"loss": 0.0854,
|
1844 |
+
"step": 141000
|
1845 |
+
},
|
1846 |
+
{
|
1847 |
+
"epoch": 8.84,
|
1848 |
+
"learning_rate": 1.2207236842105264e-06,
|
1849 |
+
"loss": 0.0727,
|
1850 |
+
"step": 141500
|
1851 |
+
},
|
1852 |
+
{
|
1853 |
+
"epoch": 8.88,
|
1854 |
+
"learning_rate": 1.1878289473684212e-06,
|
1855 |
+
"loss": 0.0798,
|
1856 |
+
"step": 142000
|
1857 |
+
},
|
1858 |
+
{
|
1859 |
+
"epoch": 8.91,
|
1860 |
+
"learning_rate": 1.1550657894736842e-06,
|
1861 |
+
"loss": 0.0629,
|
1862 |
+
"step": 142500
|
1863 |
+
},
|
1864 |
+
{
|
1865 |
+
"epoch": 8.94,
|
1866 |
+
"learning_rate": 1.122171052631579e-06,
|
1867 |
+
"loss": 0.0746,
|
1868 |
+
"step": 143000
|
1869 |
+
},
|
1870 |
+
{
|
1871 |
+
"epoch": 8.97,
|
1872 |
+
"learning_rate": 1.0892763157894737e-06,
|
1873 |
+
"loss": 0.0775,
|
1874 |
+
"step": 143500
|
1875 |
+
},
|
1876 |
+
{
|
1877 |
+
"epoch": 9.0,
|
1878 |
+
"learning_rate": 1.0563815789473685e-06,
|
1879 |
+
"loss": 0.0825,
|
1880 |
+
"step": 144000
|
1881 |
+
},
|
1882 |
+
{
|
1883 |
+
"epoch": 9.0,
|
1884 |
+
"eval_BLEU": 79.76894087868382,
|
1885 |
+
"eval_BLEU-Bigram-Precision": 82.89615522817104,
|
1886 |
+
"eval_BLEU-Trigram-Precision": 77.52747998371557,
|
1887 |
+
"eval_BLEU-Unigram-Precision": 89.2715798481121,
|
1888 |
+
"eval_ROUGE-2": 77.13688197598398,
|
1889 |
+
"eval_ROUGE-L": 90.87326567997422,
|
1890 |
+
"eval_Sacre-Bigram-Precision": 83.55085751267393,
|
1891 |
+
"eval_Sacre-Trigram-Precision": 79.18224580870823,
|
1892 |
+
"eval_Sacre-Unigram-Precision": 89.34865154317983,
|
1893 |
+
"eval_SacreBLEU": 80.98475876485695,
|
1894 |
+
"eval_loss": 0.2726329565048218,
|
1895 |
+
"eval_runtime": 89.7408,
|
1896 |
+
"eval_samples_per_second": 11.143,
|
1897 |
+
"eval_steps_per_second": 11.143,
|
1898 |
+
"step": 144000
|
1899 |
+
},
|
1900 |
+
{
|
1901 |
+
"epoch": 9.03,
|
1902 |
+
"learning_rate": 1.0234868421052633e-06,
|
1903 |
+
"loss": 0.0772,
|
1904 |
+
"step": 144500
|
1905 |
+
},
|
1906 |
+
{
|
1907 |
+
"epoch": 9.06,
|
1908 |
+
"learning_rate": 9.90592105263158e-07,
|
1909 |
+
"loss": 0.075,
|
1910 |
+
"step": 145000
|
1911 |
+
},
|
1912 |
+
{
|
1913 |
+
"epoch": 9.09,
|
1914 |
+
"learning_rate": 9.577631578947368e-07,
|
1915 |
+
"loss": 0.0837,
|
1916 |
+
"step": 145500
|
1917 |
+
},
|
1918 |
+
{
|
1919 |
+
"epoch": 9.12,
|
1920 |
+
"learning_rate": 9.248684210526317e-07,
|
1921 |
+
"loss": 0.0809,
|
1922 |
+
"step": 146000
|
1923 |
+
},
|
1924 |
+
{
|
1925 |
+
"epoch": 9.16,
|
1926 |
+
"learning_rate": 8.919736842105265e-07,
|
1927 |
+
"loss": 0.0698,
|
1928 |
+
"step": 146500
|
1929 |
+
},
|
1930 |
+
{
|
1931 |
+
"epoch": 9.19,
|
1932 |
+
"learning_rate": 8.591447368421054e-07,
|
1933 |
+
"loss": 0.0851,
|
1934 |
+
"step": 147000
|
1935 |
+
},
|
1936 |
+
{
|
1937 |
+
"epoch": 9.22,
|
1938 |
+
"learning_rate": 8.262500000000001e-07,
|
1939 |
+
"loss": 0.0698,
|
1940 |
+
"step": 147500
|
1941 |
+
},
|
1942 |
+
{
|
1943 |
+
"epoch": 9.25,
|
1944 |
+
"learning_rate": 7.933552631578947e-07,
|
1945 |
+
"loss": 0.0822,
|
1946 |
+
"step": 148000
|
1947 |
+
},
|
1948 |
+
{
|
1949 |
+
"epoch": 9.28,
|
1950 |
+
"learning_rate": 7.604605263157895e-07,
|
1951 |
+
"loss": 0.0786,
|
1952 |
+
"step": 148500
|
1953 |
+
},
|
1954 |
+
{
|
1955 |
+
"epoch": 9.31,
|
1956 |
+
"learning_rate": 7.275657894736842e-07,
|
1957 |
+
"loss": 0.078,
|
1958 |
+
"step": 149000
|
1959 |
+
},
|
1960 |
+
{
|
1961 |
+
"epoch": 9.34,
|
1962 |
+
"learning_rate": 6.94671052631579e-07,
|
1963 |
+
"loss": 0.0762,
|
1964 |
+
"step": 149500
|
1965 |
+
},
|
1966 |
+
{
|
1967 |
+
"epoch": 9.38,
|
1968 |
+
"learning_rate": 6.617763157894737e-07,
|
1969 |
+
"loss": 0.071,
|
1970 |
+
"step": 150000
|
1971 |
+
},
|
1972 |
+
{
|
1973 |
+
"epoch": 9.41,
|
1974 |
+
"learning_rate": 6.288815789473685e-07,
|
1975 |
+
"loss": 0.0742,
|
1976 |
+
"step": 150500
|
1977 |
+
},
|
1978 |
+
{
|
1979 |
+
"epoch": 9.44,
|
1980 |
+
"learning_rate": 5.959868421052632e-07,
|
1981 |
+
"loss": 0.0716,
|
1982 |
+
"step": 151000
|
1983 |
+
},
|
1984 |
+
{
|
1985 |
+
"epoch": 9.47,
|
1986 |
+
"learning_rate": 5.630921052631579e-07,
|
1987 |
+
"loss": 0.0602,
|
1988 |
+
"step": 151500
|
1989 |
+
},
|
1990 |
+
{
|
1991 |
+
"epoch": 9.5,
|
1992 |
+
"learning_rate": 5.302631578947369e-07,
|
1993 |
+
"loss": 0.0978,
|
1994 |
+
"step": 152000
|
1995 |
+
},
|
1996 |
+
{
|
1997 |
+
"epoch": 9.53,
|
1998 |
+
"learning_rate": 4.973684210526316e-07,
|
1999 |
+
"loss": 0.0731,
|
2000 |
+
"step": 152500
|
2001 |
+
},
|
2002 |
+
{
|
2003 |
+
"epoch": 9.56,
|
2004 |
+
"learning_rate": 4.6453947368421055e-07,
|
2005 |
+
"loss": 0.0887,
|
2006 |
+
"step": 153000
|
2007 |
+
},
|
2008 |
+
{
|
2009 |
+
"epoch": 9.59,
|
2010 |
+
"learning_rate": 4.316447368421053e-07,
|
2011 |
+
"loss": 0.0895,
|
2012 |
+
"step": 153500
|
2013 |
+
},
|
2014 |
+
{
|
2015 |
+
"epoch": 9.62,
|
2016 |
+
"learning_rate": 3.9875000000000005e-07,
|
2017 |
+
"loss": 0.0756,
|
2018 |
+
"step": 154000
|
2019 |
+
},
|
2020 |
+
{
|
2021 |
+
"epoch": 9.66,
|
2022 |
+
"learning_rate": 3.6585526315789477e-07,
|
2023 |
+
"loss": 0.0795,
|
2024 |
+
"step": 154500
|
2025 |
+
},
|
2026 |
+
{
|
2027 |
+
"epoch": 9.69,
|
2028 |
+
"learning_rate": 3.329605263157895e-07,
|
2029 |
+
"loss": 0.0836,
|
2030 |
+
"step": 155000
|
2031 |
+
},
|
2032 |
+
{
|
2033 |
+
"epoch": 9.72,
|
2034 |
+
"learning_rate": 3.0006578947368426e-07,
|
2035 |
+
"loss": 0.08,
|
2036 |
+
"step": 155500
|
2037 |
+
},
|
2038 |
+
{
|
2039 |
+
"epoch": 9.75,
|
2040 |
+
"learning_rate": 2.67171052631579e-07,
|
2041 |
+
"loss": 0.0676,
|
2042 |
+
"step": 156000
|
2043 |
+
},
|
2044 |
+
{
|
2045 |
+
"epoch": 9.78,
|
2046 |
+
"learning_rate": 2.3434210526315792e-07,
|
2047 |
+
"loss": 0.0931,
|
2048 |
+
"step": 156500
|
2049 |
+
},
|
2050 |
+
{
|
2051 |
+
"epoch": 9.81,
|
2052 |
+
"learning_rate": 2.0144736842105264e-07,
|
2053 |
+
"loss": 0.0717,
|
2054 |
+
"step": 157000
|
2055 |
+
},
|
2056 |
+
{
|
2057 |
+
"epoch": 9.84,
|
2058 |
+
"learning_rate": 1.685526315789474e-07,
|
2059 |
+
"loss": 0.078,
|
2060 |
+
"step": 157500
|
2061 |
+
},
|
2062 |
+
{
|
2063 |
+
"epoch": 9.88,
|
2064 |
+
"learning_rate": 1.356578947368421e-07,
|
2065 |
+
"loss": 0.0618,
|
2066 |
+
"step": 158000
|
2067 |
+
},
|
2068 |
+
{
|
2069 |
+
"epoch": 9.91,
|
2070 |
+
"learning_rate": 1.0276315789473684e-07,
|
2071 |
+
"loss": 0.0783,
|
2072 |
+
"step": 158500
|
2073 |
+
},
|
2074 |
+
{
|
2075 |
+
"epoch": 9.94,
|
2076 |
+
"learning_rate": 6.986842105263158e-08,
|
2077 |
+
"loss": 0.0823,
|
2078 |
+
"step": 159000
|
2079 |
+
},
|
2080 |
+
{
|
2081 |
+
"epoch": 9.97,
|
2082 |
+
"learning_rate": 3.6973684210526316e-08,
|
2083 |
+
"loss": 0.0558,
|
2084 |
+
"step": 159500
|
2085 |
+
},
|
2086 |
+
{
|
2087 |
+
"epoch": 10.0,
|
2088 |
+
"learning_rate": 4.078947368421053e-09,
|
2089 |
+
"loss": 0.0776,
|
2090 |
+
"step": 160000
|
2091 |
+
},
|
2092 |
+
{
|
2093 |
+
"epoch": 10.0,
|
2094 |
+
"eval_BLEU": 80.25661524924499,
|
2095 |
+
"eval_BLEU-Bigram-Precision": 83.93569442765623,
|
2096 |
+
"eval_BLEU-Trigram-Precision": 78.80159056629645,
|
2097 |
+
"eval_BLEU-Unigram-Precision": 90.10029116790682,
|
2098 |
+
"eval_ROUGE-2": 77.49770887608805,
|
2099 |
+
"eval_ROUGE-L": 91.11406002685167,
|
2100 |
+
"eval_Sacre-Bigram-Precision": 84.69510199629104,
|
2101 |
+
"eval_Sacre-Trigram-Precision": 80.59118114083303,
|
2102 |
+
"eval_Sacre-Unigram-Precision": 90.23310711124225,
|
2103 |
+
"eval_SacreBLEU": 81.40117848493372,
|
2104 |
+
"eval_loss": 0.27461713552474976,
|
2105 |
+
"eval_runtime": 88.6539,
|
2106 |
+
"eval_samples_per_second": 11.28,
|
2107 |
+
"eval_steps_per_second": 11.28,
|
2108 |
+
"step": 160000
|
2109 |
+
},
|
2110 |
+
{
|
2111 |
+
"epoch": 10.0,
|
2112 |
+
"step": 160000,
|
2113 |
+
"total_flos": 2111609241600000.0,
|
2114 |
+
"train_loss": 0.13924457960128783,
|
2115 |
+
"train_runtime": 13035.4538,
|
2116 |
+
"train_samples_per_second": 12.274,
|
2117 |
+
"train_steps_per_second": 12.274
|
2118 |
+
}
|
2119 |
+
],
|
2120 |
+
"max_steps": 160000,
|
2121 |
+
"num_train_epochs": 10,
|
2122 |
+
"total_flos": 2111609241600000.0,
|
2123 |
+
"trial_name": null,
|
2124 |
+
"trial_params": null
|
2125 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:40537487b54f70332a229e1f2b953cb8f37a8d29ed148eab4458c441213583e5
|
3 |
+
size 3567
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|