code
stringlengths
3
6.57k
env.write_transaction()
env.write()
os.listdir(os.getcwd()
tty.die(msg)
spack.config.set('config:checksum', False, scope='command_line')
spack.config.set('config:deprecated', True, scope='command_line')
update_kwargs_from_args(args, kwargs)
spack.cmd.parse_specs(args.spec)
get_tests(abstract_specs)
tty.debug(e)
reporter.concretization_report(e.message)
open(file, 'r')
spack.spec.Spec.from_yaml(f)
s.concretized()
concretized.dag_hash()
s.dag_hash()
tty.warn(msg.format(file)
abstract_specs.append(s)
specs.append(concretized)
len(specs)
tty.die('The `spack install` command requires a spec to install.')
default_log_file(specs[0])
reporter('build')
map(spack.store.db.query_one, specs)
spack.cmd.display_specs(installed, **display_args)
spack.cmd.display_specs(not_installed, **display_args)
tty.die('Reinstallation aborted.')
spec.dag_hash()
monitor.new_configuration(specs)
install_specs(args, kwargs, zip(abstract_specs, specs)
logging.getLogger('pycountry.db')
quiet.setLevel(logging.ERROR)
TestMake_solr_document(TestCase)
Intl (SYD)
Intl (AKL)
Intl (SYD)
Intl (AKL)
Intl (SYD)
Intl (AKL)
Intl (SYD)
Intl (AKL)
patch('serene_metadata.config.SereneConfig')
setUp(self, mock_config)
mk_error_counter()
importlib.import_module('serene_index.modules.module_flight')
getattr(module, 'record_builder', None)
generate_example_metadata()
json.dumps(generated_metadata, indent=1)
self.meta.update(generated_metadata)
self.result.update(generated_metadata)
make_solr_document(r=self.record, builder=self.builder, base=self.meta, debug=False, error_counter=self.error_counter)
tearDown(self)
test_make_solr_document(self)
self.assertDictEqual(self.result, self.solr_doc)
json.dumps(self.solr_doc, indent=1, sort_keys=True)
json.dumps(self.result, indent=1, sort_keys=True)
test_json_correct(self)
json.dumps(self.solr_doc)
self.assertTrue(json.loads(rec)
BatchNormalization(Base)
export()
_batchnorm_test_mode(x, s, bias, mean, var, epsilon=1e-5)
len(x.shape)
s.reshape(-1, *dim_ones)
bias.reshape(-1, *dim_ones)
mean.reshape(-1, *dim_ones)
var.reshape(-1, *dim_ones)
np.sqrt(var + epsilon)
np.array([[[[-1, 0, 1]], [[2, 3, 4]]]])
astype(np.float32)
np.array([1.0, 1.5])
astype(np.float32)
np.array([0, 1])
astype(np.float32)
np.array([0, 3])
astype(np.float32)
np.array([1, 1.5])
astype(np.float32)
_batchnorm_test_mode(x, s, bias, mean, var)
astype(np.float32)
np.random.randn(2, 3, 4, 5)
astype(np.float32)
np.random.randn(3)
astype(np.float32)
np.random.randn(3)
astype(np.float32)
np.random.randn(3)
astype(np.float32)
np.random.rand(3)
astype(np.float32)
_batchnorm_test_mode(x, s, bias, mean, var, epsilon)
astype(np.float32)
print(f'version: {cmakepybind11.__version__}')
print(f'Foo: {dir(pyFoo.Foo)
pyFoo.free_function(2147483647)
pyFoo.free_function(2147483647+1)
pyFoo.Foo()
print(f'class Foo: {dir(f)
f.static_function(1)
f.static_function(2147483647)