This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## AWS | |
| # from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories | |
| http://169.254.169.254/latest/user-data | |
| http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME] | |
| http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME] | |
| http://169.254.169.254/latest/meta-data/ami-id | |
| http://169.254.169.254/latest/meta-data/reservation-id | |
| http://169.254.169.254/latest/meta-data/hostname | |
| http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #3.7.4 | |
| s = '10011100' | |
| a = str(s) | |
| L = 0 | |
| m = 8 | |
| while m > 1: | |
| m = m // 2 | |
| l = str(a[:m]) | |
| r = str(a[m:]) | |
| b = bin(int(l, 2) ^ int(r, 2))[2:] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a = - 1 | |
| q = 751 | |
| def not_equal(x1,y1,x2,y2): | |
| l = l = (((y2-y1) % q) * ((x2-x1)%q) ** 749) % q | |
| x3 = (l**2 - x1 - x2) % q | |
| y3 = (l*(x1-x3) - y1) % q | |
| return x3, y3 | |
| def equal(x1,y1): | |
| l = (((3*x1**2 + a) % q) * ((2*y1)%q) ** 749) % q |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SQL> alter table cars | |
| 2 add num number; | |
| Table altered. | |
| SQL> update cars set num = mod(rownum + 7 + 33, 17); | |
| 5 rows updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def task_1(s, size): | |
| try: | |
| if (len(s) % int(size) == 0 ): | |
| s += chr(int(size))*int(size) | |
| return s | |
| else: | |
| s += chr(int(size) - len(s) % int(size))*(int(size) - len(s) % int(size)) | |
| return s | |
| except: | |
| return "Некорректные параметры" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def task_1_1(str1): | |
| if len(str1)%2 != 0: | |
| return 'Входные данные некорректны' | |
| suf = '' | |
| bin_view = '' | |
| for l in range(len(str1)): | |
| try: | |
| bin_view += '{0:04b}'.format(int(str1[l],16)) | |
| except Exception: | |
| return 'Входные данные некорректны' |