|
1 | 1 | #### GS Lab
|
2 |
| - - How will you sort result of student whose marks are unknown to |
3 |
| - you based on their roll numbers? |
4 |
| - Using bubble sort. |
| 2 | + - How will you sort result of student whose marks are unknown to you based on their roll numbers? |
| 3 | + Using bubble sort. |
5 | 4 |
|
6 | 5 | #### Webonise labs
|
7 | 6 |
|
|
413 | 412 | - AWS::Lambda::Function is the Cloudformation syntax to define a Lambda function.
|
414 | 413 | - AWS::Serverless::Function is the AWS SAM syntax to define a Lambda function which internally creates a Lambda function in Cloudformation (AWS::Lambda::Function) and related resources by convention when executing AWS SAM.
|
415 | 414 | - How will you create security groups in AWS?
|
| 415 | + |
416 | 416 | - How to create key pairs?
|
417 | 417 |
|
418 | 418 | ---
|
|
505 | 505 | - numpy
|
506 | 506 | - pandas
|
507 | 507 | - scipy
|
508 |
| - - Using REST API, fetch image as requested by user. |
509 | 508 | ---
|
510 | 509 | ### Afour
|
511 | 510 | - Python
|
|
548 | 547 |
|
549 | 548 | *Method 2*:
|
550 | 549 | one liner
|
| 550 | + |
| 551 | + |
| 552 | +Q.26. How would you display a file’s contents in reversed order? |
| 553 | + |
| 554 | +Let’s first get to the Desktop. We use the chdir() function/method form the os module for this. |
| 555 | + |
| 556 | + import os |
| 557 | + os.chdir('C:\\Users\\lifei\\Desktop') |
| 558 | + |
| 559 | +The file we’ll use for this is Today.txt, and it has the following contents: |
| 560 | + |
| 561 | +OS, DBMS, DS, ADA |
| 562 | + |
| 563 | +HTML, CSS, jQuery, JavaScript |
| 564 | + |
| 565 | +Python, C++, Java |
| 566 | + |
| 567 | +This sem’s subjects |
| 568 | + |
| 569 | +Debugger |
| 570 | + |
| 571 | +itertools |
| 572 | + |
| 573 | +container |
| 574 | + |
| 575 | +Let’s read the contents into a list, and then call reversed() on it: |
| 576 | + for line in reversed(list(open('Today.txt'))) |
| 577 | + print(line.rstrip()) |
| 578 | + |
| 579 | +container |
| 580 | + |
| 581 | +itertools |
| 582 | + |
| 583 | +Debugger |
| 584 | + |
| 585 | +This sem’s subjects |
| 586 | + |
| 587 | +Python, C++, Java |
| 588 | + |
| 589 | +HTML, CSS, jQuery, JavaScript |
| 590 | + |
| 591 | +OS, DBMS, DS, ADA |
| 592 | + |
| 593 | +Without the rstrip(), we would get blank lines between the output. |
551 | 594 |
|
552 |
| - - What is use of serialization? |
553 |
| - - |
| 595 | +- What is use of serialization? |
| 596 | + |
554 | 597 |
|
555 | 598 | - Openstack
|
556 | 599 | - What are storage types?
|
557 | 600 | Block, Object, File, Tape.
|
| 601 | + |
558 | 602 | ---
|
559 | 603 | ### Accion Labs
|
560 | 604 | - AWS
|
|
0 commit comments