Best Python code snippet using tempest_python
testLambdaAndWinnersTree.py
Source:testLambdaAndWinnersTree.py
...14 rows, _ = c.cache.shape15 for h in range(rows):16 p = c.parent_of(h)17 assert p == c.parent_of(c.paired_with(h))18def test_basic_scenario():19 k = 13120 n = 1021 L = rand(k, n)22 t = randn(k) / 523 c = LambdaAndWinnersTree(L, t)24 #pdb.set_trace()25 lam1, win1 = c.lambda_and_winners()26 print lam127 print (t - L.T).T28 assert allclose(lam1, (t - L.T).T.max(0))29 for j in range(k):30 all_but_j = [j_ for j_ in range(k) if j_ != j]31 lam2, win2 = c.lambda_and_winners_all_but(j)32 print "lam2: " + str(lam2)...
TestCapsLayer.py
Source:TestCapsLayer.py
...6import tensorflow as tf7from CapsuleLayer import *8class TestCapsLayer(unittest.TestCase):9 10 def test_basic_scenario(self):11 x = tf.placeholder(tf.float32, [2, 8, 3])12 caps_layer = CapsLayer(x, 7, 5)13 weights_shape = caps_layer.W.get_shape().as_list()...
test_main_scenario_todomvc_refactor.py
Source:test_main_scenario_todomvc_refactor.py
1from testing_scenario_todomvc.helpers import app2def test_basic_scenario():3 app.open_app()4 app.add('a', 'b', 'c')5 app.assert_todos('a', 'b', 'c')6 app.edit('c', ' edited')7 app.complete('c edited')8 app.clear_completed()9 app.assert_todos('a', 'b')10 app.cancel_editing('b', ' to cancel editing')11 app.delete('b')...
Check out the latest blogs from LambdaTest on this topic:
People love to watch, read and interact with quality content — especially video content. Whether it is sports, news, TV shows, or videos captured on smartphones, people crave digital content. The emergence of OTT platforms has already shaped the way people consume content. Viewers can now enjoy their favorite shows whenever they want rather than at pre-set times. Thus, the OTT platform’s concept of viewing anything, anytime, anywhere has hit the right chord.
Building a website is all about keeping the user experience in mind. Ultimately, it’s about providing visitors with a mind-blowing experience so they’ll keep coming back. One way to ensure visitors have a great time on your site is to add some eye-catching text or image animations.
When it comes to UI components, there are two versatile methods that we can use to build it for your website: either we can use prebuilt components from a well-known library or framework, or we can develop our UI components from scratch.
Agile software development stems from a philosophy that being agile means creating and responding to change swiftly. Agile means having the ability to adapt and respond to change without dissolving into chaos. Being Agile involves teamwork built on diverse capabilities, skills, and talents. Team members include both the business and software development sides working together to produce working software that meets or exceeds customer expectations continuously.
The holidays are just around the corner, and with Christmas and New Year celebrations coming up, everyone is busy preparing for the festivities! And during this busy time of year, LambdaTest also prepped something special for our beloved developers and testers – #LambdaTestYourBusiness
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!