prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
@registry.register_hparams("a") def my_hparams_set(): pass @registry.register_ranged_hparams("a") def my_hparams_range(_): pass self.assertTrue(registry.hparams("a") is my_hparams_set) self.assertTrue(registry.ranged_hparams("a") is my_hparams_range)
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
with self.assertRaisesRegexp(LookupError, "never registered"): registry.hparams("not_registered") with self.assertRaisesRegexp(LookupError, "never registered"): registry.ranged_hparams("not_registered")
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
@registry.register_hparams def hp1(): pass with self.assertRaisesRegexp(LookupError, "already registered"): @registry.register_hparams("hp1") def hp2(): pass @registry.register_ranged_hparams def rhp1(_): pass with self.assertRaisesRegexp(LookupError, "already...
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
@registry.register_hparams def hp1(): pass @registry.register_hparams("hp2_named") def hp2(): pass @registry.register_ranged_hparams def rhp1(_): pass @registry.register_ranged_hparams("rhp2_named") def rhp2(_): pass self.assertSetEqual(set(["hp1", "hp2_na...
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
with self.assertRaisesRegexp(ValueError, "must take a single argument"): @registry.register_ranged_hparams def rhp_bad(): pass with self.assertRaisesRegexp(ValueError, "must take a single argument"): @registry.register_ranged_hparams def rhp_bad2(a, b): # pylint: disable=unus...
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
def setUp(self): registry._reset() def testModalityRegistration(self): @registry.register_symbol_modality class MySymbolModality(modality.Modality): pass @registry.register_audio_modality class MyAudioModality(modality.Modality): pass @registry.register_image_modality cla...
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
registry._reset()
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
@registry.register_symbol_modality class MySymbolModality(modality.Modality): pass @registry.register_audio_modality class MyAudioModality(modality.Modality): pass @registry.register_image_modality class MyImageModality(modality.Modality): pass @registry.register_class_l...
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
@registry.register_symbol_modality("default") class MyDefaultModality(modality.Modality): pass self.assertTrue(registry.symbol_modality() is MyDefaultModality)
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
@registry.register_symbol_modality class MySymbolModality(modality.Modality): pass @registry.register_audio_modality class MyAudioModality(modality.Modality): pass @registry.register_image_modality class MyImageModality(modality.Modality): pass @registry.register_class_l...
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
pass
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
tf.test.main()
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
setUp
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testT2TModelRegistration
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testNamedRegistration
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testNonT2TModelRegistration
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
model_fn
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testUnknownModel
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testDuplicateRegistration
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
m1
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
m2
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testListModels
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
m1
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
m2
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testSnakeCase
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
setUp
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testHParamSet
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
my_hparams_set
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
my_hparams_range
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testNamedRegistration
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
my_hparams_set
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
my_hparams_range
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testUnknownHparams
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testDuplicateRegistration
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
hp1
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
hp2
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
rhp1
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
rhp2
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testListHparams
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
hp1
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
hp2
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
rhp1
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
rhp2
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testRangeSignatureCheck
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
rhp_bad
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
rhp_bad2
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
setUp
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testModalityRegistration
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testDefaultNameLookup
<|file_name|>registry_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
testList
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True,<|fim▁hole|> screen = self.get_screen() se...
skip_taskbar_hint=True, ) self.set_title('Pylsner')
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): <|fim_middle|> class Widget: def __init__(self, name='default', metric={'plugin': 'time'}, ...
def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=True, ) self.set_title('Pylsner') screen = self.get_screen() self.width = screen.get_width() self.height = screen...
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): <|fim_middle|> def refresh(self, force=False): self.refresh_cnt += 1 if self.refresh_c...
super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=True, ) self.set_title('Pylsner') screen = self.get_screen() self.width = screen.get_width() self.height = screen.get_height() se...
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
self.refresh_cnt += 1 if self.refresh_cnt >= 60000: self.refresh_cnt = 0 redraw_required = False for wid in self.widgets: if (self.refresh_cnt % wid.metric.refresh_rate == 0) or force: wid.refresh() redraw_required = True if...
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
ctx.set_antialias(cairo.ANTIALIAS_SUBPIXEL) for wid in self.widgets: wid.redraw(ctx)
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
def __init__(self, name='default', metric={'plugin': 'time'}, indicator={'plugin': 'arc'}, fill={'plugin': 'rgba_255'}, ): self.name = name MetricPlugin = plugin.load_plugin('metrics', metric['plugin']) self....
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
self.name = name MetricPlugin = plugin.load_plugin('metrics', metric['plugin']) self.metric = MetricPlugin(**metric) IndicatorPlugin = plugin.load_plugin('indicators', indicator['plugin']) self.indicator = IndicatorPlugin(**indicator) FillPlugin = plugin.load_plugin('fill...
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
self.metric.refresh() self.fill.refresh(self.metric.value)
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
ctx.set_source(self.fill.pattern) self.indicator.redraw(ctx, self.metric.value)
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
self.refresh_cnt = 0
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
wid.refresh() redraw_required = True
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
self.queue_draw()
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def <|fim_middle|>(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_h...
__init__
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
refresh
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
redraw
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
__init__
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
refresh
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>import cairo from gi.repository import Gtk from gi.repository import Gdk from pylsner import plugin class Window(Gtk.Window): def __init__(self): super(Window, self).__init__(skip_pager_hint=True, skip_taskbar_hint=Tr...
redraw
<|file_name|>0003_auto_20170313_0117.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-13 01:17 from __future__ import unicode_literals from django.db import migrations, models import uuid class Migration(migrations.Migration): <|fim▁hole|> ('dash', '0002_remove_p...
dependencies = [
<|file_name|>0003_auto_20170313_0117.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-13 01:17 from __future__ import unicode_literals from django.db import migrations, models import uuid class Migration(migrations.Migration): <|fim_middle|> <|fim▁end|>
dependencies = [ ('dash', '0002_remove_post_origin'), ] operations = [ migrations.AlterField( model_name='comment', name='id', field=models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False), ), ]
<|file_name|>included_urls2.py<|end_file_name|><|fim▁begin|>""" These URL patterns are included in two different ways in the main urls.py, with an extra argument present in one case. Thus, there are two different ways for each name to resolve and Django must distinguish the possibilities based on the argument list....
from .views import empty_view urlpatterns = [
<|file_name|>sci_bdt_electron_DecisionTree.py<|end_file_name|><|fim▁begin|>from array import array import numpy as np import matplotlib.pyplot as plt from sklearn import datasets from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import AdaBoostClassifier from sklearn.metrics import classification_...
if doFit:
<|file_name|>sci_bdt_electron_DecisionTree.py<|end_file_name|><|fim▁begin|>from array import array import numpy as np import matplotlib.pyplot as plt from sklearn import datasets from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import AdaBoostClassifier from sklearn.metrics import classification_...
print "Performing DecisionTree fit..." dt.fit(X_train, y_train) import cPickle with open('electrons_toTMVA.pkl', 'wb') as fid: cPickle.dump(dt, fid)
<|file_name|>sci_bdt_electron_DecisionTree.py<|end_file_name|><|fim▁begin|>from array import array import numpy as np import matplotlib.pyplot as plt from sklearn import datasets from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import AdaBoostClassifier from sklearn.metrics import classification_...
print "Loading DecisionTree..." # load it again with open('electrons_toTMVA.pkl', 'rb') as fid: dt = cPickle.load(fid)
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for example_site project. Generated by 'django-admin startproject' using Django 1.8.dev20150302062936. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values...
GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY", GOOGLE_API_KEY) # Database # https://docs.djangoproject.com/en/dev/ref/settings/#databases
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.utils.html import format_html<|fim▁hole|>from sno.models import Sno class SnoGalleries(models.Model): class Meta: verbose_name = 'Фотография в галереи СНО' verbose_name_plural = 'Фотографии в галереи СНО' ...
from sorl.thumbnail import get_thumbnail from sorl.thumbnail.fields import ImageField
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.utils.html import format_html from sorl.thumbnail import get_thumbnail from sorl.thumbnail.fields import ImageField from sno.models import Sno class SnoGalleries(models.Model): <|fim_middle|> <|fim▁end|>
class Meta: verbose_name = 'Фотография в галереи СНО' verbose_name_plural = 'Фотографии в галереи СНО' name = models.CharField('Название фото', max_length=255, blank=True, null=True) photo = ImageField(verbose_name='Фото', max_length=255) description = models.TextField('Описание', blank...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.utils.html import format_html from sorl.thumbnail import get_thumbnail from sorl.thumbnail.fields import ImageField from sno.models import Sno class SnoGalleries(models.Model): class Meta: <|fim_middle|> то', max_...
verbose_name = 'Фотография в галереи СНО' verbose_name_plural = 'Фотографии в галереи СНО' name = models.CharField('Название фо