code stringlengths 3 6.57k |
|---|
np.random.exponential(1.5) |
bd_sim.simulate_tree() |
extract_tree_statistics(tree) |
self.assertTrue(all(np.isclose(x, results[0][0]) |
self.assertTrue(all(x > 1 for x in results[0]) |
self.assertEqual(results[1], 8) |
self.assertTrue(results[2]) |
bd_sim.simulate_tree() |
extract_tree_statistics(tree) |
self.assertTrue(np.isclose(i, 1) |
self.assertEqual(results[1], 3) |
self.assertTrue(results[2]) |
test_nonconstant_yule_with_predictable_fitness(self) |
check_fitness_values_as_expected(tree: nx.DiGraph) |
tree.copy() |
nx.dfs_edges(tree, source="0") |
tree.out_degree(n) |
np.random.exponential(scale) |
bd_sim.simulate_tree() |
extract_tree_statistics(tree) |
self.assertTrue(all(np.isclose(x, results[0][0]) |
self.assertEqual(results[1], 8) |
self.assertTrue(results[2]) |
check_fitness_values_as_expected(tree.get_tree_topology() |
bd_sim.simulate_tree() |
extract_tree_statistics(tree) |
self.assertTrue(np.isclose(i, 0.6) |
self.assertTrue(results[2]) |
check_fitness_values_as_expected(tree.get_tree_topology() |
test_nonconstant_birth_death_with_variable_fitness(self) |
np.random.exponential(scale) |
np.random.exponential(0.6) |
np.random.uniform() |
np.random.uniform(-1, 1) |
bd_sim.simulate_tree() |
extract_tree_statistics(tree) |
self.assertTrue(all(np.isclose(x, results[0][0]) |
self.assertEqual(results[1], 8) |
self.assertTrue(results[2]) |
self.assertNotIn(2, tree.nodes) |
self.assertNotIn(3, tree.nodes) |
bd_sim.simulate_tree() |
extract_tree_statistics(tree) |
self.assertTrue(np.isclose(i, 3) |
self.assertTrue(results[2]) |
self.assertNotIn(2, tree.nodes) |
self.assertNotIn(3, tree.nodes) |
unittest.main() |
Copyright (c) |
Copyright (c) |
TestConvertToParlaiFormat(unittest.TestCase) |
test_convert(self) |
testing_utils.tempdir() |
os.path.join(tmpdir, 'parlai.txt') |
open(fn) |
f.readline() |
f.readline() |
f.readline() |
f.readline() |
f.readline() |
f.readline() |
f.readline() |
f.readline() |
f.readline() |
f.readline() |
TestVerifyData(unittest.TestCase) |
test_verify_data(self) |
VerifyData.main(task='integration_tests') |
TestVacuum(unittest.TestCase) |
test_vacuum(self) |
testing_utils.tempdir() |
os.path.join(tmpdir, 'model') |
os.stat(model_file) |
Vacuum.main(model_file=model_file) |
os.stat(model_file) |
os.path.exists(model_file + '.unvacuumed') |
TestDetectOffensive(unittest.TestCase) |
test_offensive(self) |
TestParty(unittest.TestCase) |
test_party(self) |
Party.main(seconds=0.01) |
TestDataStats(unittest.TestCase) |
test_simple(self) |
DataStats.main(task='integration_tests') |
TestProfileTrain(unittest.TestCase) |
test_cprofile(self) |
testing_utils.tempdir() |
os.path.join(tmpdir, 'model') |
test_torch(self) |
testing_utils.tempdir() |
os.path.join(tmpdir, 'model') |
test_torch_cuda(self) |
testing_utils.tempdir() |
os.path.join(tmpdir, 'model') |
TestTokenStats(unittest.TestCase) |
test_token_stats(self) |
dict_report(TokenStats.main(task='integration_tests:multiturn') |
Copyright (c) |
files (the "Software") |
f_to_c(deg_f) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.