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
| import socket | |
| fr = open ("access.log", "r") | |
| fw = open ("output.txt","w") | |
| c = 0 | |
| l = fr.readlines() | |
| for i in l: | |
| a = i.split() | |
| try: |
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
| fin = open("input.xml", "r") | |
| a = fin.readline() | |
| l = "" | |
| kk = False | |
| while len(a)!=0: | |
| a = fin.readline() | |
| if a.find("<kernel>")!=-1 and kk==False: | |
| p = a.find("<kernel>") | |
| for i in range(0,p): | |
| l+= " " |
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
| fin = open("input.xml", "r") | |
| fout = open("output.xml","w") | |
| a = fin.readlines() | |
| for i in a: | |
| if i.find("<type")!=-1 and i.find("<boot")==-1: | |
| fout.write(i) | |
| fout.write("<boot dev='hd'/>\n") | |
| elif i.find("<kernel>")==-1 and i.find("<initrd>")==-1 and i.find("<cmdline>")==-1: |
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
| #include <iostream> //Подключение библиотеки ввода-вывода | |
| #include <math.h> //Подключение доп.библиотеки с мат. функциями (для вызова fabs() - взятия модуля числа. | |
| using namespace std; | |
| int main() // функция, основная часть программы, где {} - тело функции | |
| { | |
| int a,b,s,max=0,ii; // объявление вспомогательных переменных типа int | |
| // где а и б хранят промежуточные значения, s - хранит сумму цифр текущего элемента массива | |
| // max -- хранит максимальную сумму цифр |
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
| fr = open('input.txt','r') | |
| fw = open('output.txt','w') | |
| line = fr.readline() | |
| a = [] | |
| i=0 | |
| while len(line)!=0: | |
| line = fr.readline() | |
| i+=1 | |
| line = line.split() | |
| if len(line)!=0: |
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
| #include <iostream> | |
| #include <fstream> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| using namespace std; | |
| int main () | |
| { | |
| char buff[300]; | |
| unsigned int res=0; |
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
| #include <iostream> | |
| using namespace std; | |
| class A | |
| { | |
| public: | |
| float num; | |
| int num_to_int; | |
| A operator*(A a); | |
| void to_int(A a); | |
| }; |
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
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOHVL4B91yGfIb7P5f5jLNbNk4vnxEDkfhM8GGsEzzaqnVk2OszILpnIppbFFp/HKkDB+2yWGrWU+MP549Wb1vuxgSMFcVG8nPO9kTyzMDIJ0LW2m2kmVHgRGPCLVYRnMyQuNo2ntVLTHhBi28W01zmxlF5wY4DePHXYYCC97qBQnUVv1fh5JP+M9lpi+F2bf3bnfTPJALI/LDh4/7IDmChiuTU/jJuws2oDebWPSxpRQgoaLQl/6FoPmspttg92+7Ae6q37AoKVdHl6o6QXglZGIQnwkf0ADP74GpC0p/i2KcCudxWlF+XwTbr4qec41OWar5YHbHsXzOLat5qW8p [email protected] |
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
| #include <iostream> | |
| #include<vector> | |
| #include<math.h> | |
| using namespace std; | |
| int sum(int a,int b) | |
| { | |
| int mas[2][2]={{0,1},{1,1}}; | |
| int aplusb; |
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
| #encoding: utf-8 | |
| # задаем вспомогательные функции | |
| # функция с таблицами для сложения | |
| def sum(len,a,b) | |
| if len == 2 | |
| asb = [[0,1],[1,1]] | |
| elsif len == 3 | |
| asb = [[0,1,2],[1,1,1],[2,1,2]] | |
| elsif len == 5 |