diff --git a/practice1/ChernyshevAA b/practice1/ChernyshevAA
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/EltyshevAS b/practice1/EltyshevAS
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/FedorinVA.txt b/practice1/FedorinVA.txt
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/IlinSV b/practice1/IlinSV
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/KalininaAN b/practice1/KalininaAN
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/KrasilnikovaOV b/practice1/KrasilnikovaOV
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/KrygovoiEA b/practice1/KrygovoiEA
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/MelnikovAE b/practice1/MelnikovAE
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/MelnikovDV.txt b/practice1/MelnikovDV.txt
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/NetsvetaevaKM b/practice1/NetsvetaevaKM
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/ProkhorovIV b/practice1/ProkhorovIV
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/SeminRS.txt b/practice1/SeminRS.txt
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/SergeevaEO b/practice1/SergeevaEO
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/ShelgachevaAS b/practice1/ShelgachevaAS
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/SuraevaEV b/practice1/SuraevaEV
new file mode 100644
index 0000000..e69de29
diff --git a/practice1/ZykovaTV b/practice1/ZykovaTV
new file mode 100644
index 0000000..e69de29
diff --git a/practice2/ChernyshevAA b/practice2/ChernyshevAA
new file mode 100644
index 0000000..7e5c8cb
--- /dev/null
+++ b/practice2/ChernyshevAA
@@ -0,0 +1,5 @@
+Описать функцию IntFileSize(S) целого типа, возвращающую коли-
+чество элементов в файле целых чисел с именем S. Если файл не существу-
+ет, то функция возвращает –1. С помощью этой функции найти количество
+элементов в трех файлах с данными именами.
+
diff --git a/practice2/EltyshevAS/practice2.py b/practice2/EltyshevAS/practice2.py
new file mode 100644
index 0000000..90ff01a
--- /dev/null
+++ b/practice2/EltyshevAS/practice2.py
@@ -0,0 +1,33 @@
+# coding: utf-8
+
+def main(args):
+ if len(args)> 3:
+ script_name, input_file_name, output_file_name = args
+ else:
+ input_file_name, output_file_name = "input.txt", "output.txt"
+ input_file = open(input_file_name)
+ output_file = open(output_file_name, 'w')
+
+ string = "1 2 3 4 5 6 7 8 9 10"
+ encoded_content = ""
+
+ for line in input_file:
+ for i in range(len(line)):
+ if ord(line[i])> 191 and ord(line[i]) < 256: + offset = 0; + if line[i].islower(): + offset = 32 + if ord(line[i]) + int(string.split(' ')[i%len(string.split(' '))])> 223+offset:
+ encoded_content += chr(191+offset+(ord(line[i]) + int(string.split(' ')[i%len(string.split(' '))]))%(223+offset))
+ else:
+ encoded_content += chr(ord(line[i]) + int(string.split(' ')[i%len(string.split(' '))]))
+ else:
+ encoded_content += line[i]
+ output_file.write(encoded_content)
+ input_file.close()
+ output_file.close()
+
+
+if __name__ == '__main__':
+ from sys import argv
+ main(argv)
diff --git a/practice2/EltyshevAS~HEAD b/practice2/EltyshevAS~HEAD
new file mode 100644
index 0000000..9d1dd82
--- /dev/null
+++ b/practice2/EltyshevAS~HEAD
@@ -0,0 +1,7 @@
+Дана строка S, состоящая из 10 цифр, и файл с русским текстом. За-
+шифровать файл, выполнив циклическую замену каждой русской буквы,
+стоящей на K-й позиции строки, на букву того же регистра, расположен-
+ную в алфавите на SK-м месте после шифруемой буквы (для K = 11 снова
+используется смещение S1 и т. д.). Букву «ё» в алфавите не учитывать, зна-
+ки препинания и пробелы не изменять.
+
diff --git a/practice2/FedorinVA.txt b/practice2/FedorinVA.txt
new file mode 100644
index 0000000..5fab688
--- /dev/null
+++ b/practice2/FedorinVA.txt
@@ -0,0 +1,7 @@
+Дано целое число K и текстовый файл. Создать строковый файл и запи-
+сать в него все слова длины K из исходного файла. Словом считать набор
+символов, не содержащий пробелов, знаков препинания и ограниченный
+пробелами, знаками препинания или началом/концом строки. Если исход-
+ный файл не содержит слов длины K, то оставить результирующий файл
+пустым.
+
diff --git a/practice2/IlinSV/file1.txt b/practice2/IlinSV/file1.txt
new file mode 100644
index 0000000..1961a87
--- /dev/null
+++ b/practice2/IlinSV/file1.txt
@@ -0,0 +1,4 @@
+asdfadsfa
+dsf
+ads
+f
diff --git a/practice2/IlinSV/file2.txt b/practice2/IlinSV/file2.txt
new file mode 100644
index 0000000..b291393
--- /dev/null
+++ b/practice2/IlinSV/file2.txt
@@ -0,0 +1 @@
+sadfadsfadfasd
diff --git a/practice2/IlinSV/file3.txt b/practice2/IlinSV/file3.txt
new file mode 100644
index 0000000..fa072c6
--- /dev/null
+++ b/practice2/IlinSV/file3.txt
@@ -0,0 +1,4 @@
+adsfadsfasd
+fads
+f
+f
diff --git a/practice2/IlinSV/practice2.py b/practice2/IlinSV/practice2.py
new file mode 100644
index 0000000..3c13281
--- /dev/null
+++ b/practice2/IlinSV/practice2.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+#-*- coding: utf-8 -*-
+def LineCount(S):
+
+ try:
+ lines = (open(S,"r").readlines())
+ return len(lines)
+ except:
+ return -1
+
+def main(args):
+ files = ["file1.txt", "file2.txt", "file3.txt"]
+ count = 0;
+ for i in range(3):
+ if (LineCount(files[i]) != -1):
+ count += LineCount(files[i])
+ else:
+ print "ERROR (no such file: " + files[i] + ")"
+ exit(0)
+ print count
+
+if __name__ == '__main__':
+ import sys
+ main(sys.argv[:])
+
diff --git a/practice2/IlinSV~HEAD b/practice2/IlinSV~HEAD
new file mode 100644
index 0000000..a2a1608
--- /dev/null
+++ b/practice2/IlinSV~HEAD
@@ -0,0 +1,5 @@
+Описать функцию LineCount(S) целого типа, возвращающую количе-
+ство строк в текстовом файле с именем S. Если файл не существует, то
+функция возвращает –1. С помощью этой функции найти количество строк
+в трех файлах с данными именами.
+
diff --git a/practice2/KalininaAN b/practice2/KalininaAN
new file mode 100644
index 0000000..90d0143
--- /dev/null
+++ b/practice2/KalininaAN
@@ -0,0 +1,7 @@
+
+Дан текст. Если первый символ текста не является малой
+латинской буквой, то оставить его без изменения. Если же это малая
+латинская буква, но за начальной группой малых латинских букв не
+следует цифра, то также оставить текст без изменения. Иначе каждую
+цифру, принадлежащую группе цифр, следующей за начальной груп-
+пой малых латинских букв, заменить символом введенным пользователем.
diff --git a/practice2/KrasilnikovaOV b/practice2/KrasilnikovaOV
new file mode 100644
index 0000000..b5f271e
--- /dev/null
+++ b/practice2/KrasilnikovaOV
@@ -0,0 +1,6 @@
+Дан текстовый файл. Подсчитать число появлений в нем каждой
+строчной (то есть маленькой) русской буквы и создать строковый файл,
+элементы которого имеют вид «<буква>–<число ее появлений>» (напри-
+мер, «а–25»). Буквы, отсутствующие в тексте, в файл не включать. Строки
+упорядочить по возрастанию кодов букв.
+
diff --git a/practice2/KrygovoiEA b/practice2/KrygovoiEA
new file mode 100644
index 0000000..7d5d1e0
--- /dev/null
+++ b/practice2/KrygovoiEA
@@ -0,0 +1,7 @@
+Даны вещественные числа A, B и целое число N. Создать текстовый
+файл, содержащий таблицу значений функции sqrt(x) на промежутке [A, B]
+с шагом (B – A)/N. Таблица состоит из двух столбцов: с аргументами x
+(10 позиций, из них 4 под дробную часть) и со значениями sqrt(x) (15 пози-
+ций, из них 8 под дробную часть). Столбцы выравниваются по правому
+краю.
+
diff --git a/practice2/KrygovoiEA_practice2.py b/practice2/KrygovoiEA_practice2.py
new file mode 100644
index 0000000..408f509
--- /dev/null
+++ b/practice2/KrygovoiEA_practice2.py
@@ -0,0 +1,34 @@
+# coding=utf8
+"""
+ Даны вещественные числа A, B и целое число N. Создать текстовый
+файл, содержащий таблицу значений функции sqrt(x) на промежутке [A, B]
+с шагом (B – A)/N. Таблица состоит из двух столбцов: с аргументами x
+(10 позиций, из них 4 под дробную часть) и со значениями sqrt(x) (15 пози-
+ций, из них 8 под дробную часть). Столбцы выравниваются по правому
+краю.
+
+"""
+from math import sqrt # подключение для квадратного корня
+filename = "result.txt"
+f1 = open(filename, "w") # открытие файла для записи
+a=float(input(u"Введите A: ")) #ввод данных
+b=float(input(u"Введите B: "))
+n=int(input(u"Введите N: "))
+s = (b-a)/n #расчет шага
+
+while a<=b: #цикл по записи чисел в файл + + print str(a), str(sqrt(a)) #вывод в консоль + + #запись для чисел с + #определенным форматом и выравниванием по кравому краю + #если надо по левому, то ставить знак "-", перед форматом + + f1.write('%10.4f ' % (a)), f1.write('%15.8f\n' % (sqrt(a))) + + a=a+s # увеличение значения на шаг + +f1.close() + + + diff --git a/practice2/MelnikovAE/Practica1/Practica1.py b/practice2/MelnikovAE/Practica1/Practica1.py new file mode 100644 index 0000000..11e3d1f --- /dev/null +++ b/practice2/MelnikovAE/Practica1/Practica1.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python +# coding: utf-8 +import string + +def main(args): + ''' Задаем файлы для работы ''' + textFile1 = "textFile1" + textFile2 = "textFile2" + outputFile = "outputFile" + + ''' Считываем числа из файлов в списки ''' + list1 = getListNumbers(textFile1) + list2 = getListNumbers(textFile2) + + ''' Создаем таблицу и пишем ее в файл ''' + createTable(outputFile, list1, list2) + +''' Создает таблицу с числами из двух списков ''' +def createTable(nameFile, list1, list2): + out = open(nameFile, "w") + + for i in range(len(list1)): + line = "|" + + for j in range(30 - len(list1[i])): + line += " " + line += list1[i] + + for j in range(30 - len(list2[i])): + line += " " + line += list2[i] + + line += "|\n" + out.write(line) + + out.close() + +''' Считываем числа из файла ''' +def getListNumbers(nameFile): + f = open(nameFile, "r") + list1 = list() + for str in f.readlines(): + list1.extend(str.split()) + f.close() + return list1 + +if __name__ == '__main__': + import sys + main(sys.argv[:]) diff --git a/practice2/MelnikovAE/Practica1/outputFile b/practice2/MelnikovAE/Practica1/outputFile new file mode 100644 index 0000000..c52b5ff --- /dev/null +++ b/practice2/MelnikovAE/Practica1/outputFile @@ -0,0 +1,10 @@ +| 1 0| +| 22 95| +| 3333 8432| +| 4 7| +| 5890 6432| +| 6 5| +| 7473843934 44638| +| 8 3| +| 92222 2543| +| 0 1| diff --git a/practice2/MelnikovAE/Practica1/textFile1 b/practice2/MelnikovAE/Practica1/textFile1 new file mode 100644 index 0000000..0d191d5 --- /dev/null +++ b/practice2/MelnikovAE/Practica1/textFile1 @@ -0,0 +1 @@ + 1 22 3333 4 5890 6 7473843934 8 92222 0 \ No newline at end of file diff --git a/practice2/MelnikovAE/Practica1/textFile2 b/practice2/MelnikovAE/Practica1/textFile2 new file mode 100644 index 0000000..b1172cc --- /dev/null +++ b/practice2/MelnikovAE/Practica1/textFile2 @@ -0,0 +1 @@ +0 95 8432 7 6432 5 44638 3 2543 1 \ No newline at end of file diff --git a/practice2/MelnikovDV.txt b/practice2/MelnikovDV.txt new file mode 100644 index 0000000..04b267d --- /dev/null +++ b/practice2/MelnikovDV.txt @@ -0,0 +1,8 @@ +Дан символ C — строчная (маленькая) русская буква и текстовый +файл. Создать строковый файл и записать в него все слова из исходного +файла, содержащие хотя бы одну букву C (прописную или строчную). Сло- +вом считать набор символов, не содержащий пробелов, знаков препинания +и ограниченный пробелами, знаками препинания или началом/концом +строки. Если исходный файл не содержит подходящих слов, то оставить +результирующий файл пустым. + diff --git a/practice2/NetsvetaevaKM b/practice2/NetsvetaevaKM new file mode 100644 index 0000000..b9293c3 --- /dev/null +++ b/practice2/NetsvetaevaKM @@ -0,0 +1,6 @@ +Дан текстовый файл, каждая строка которого содержит изображения +нескольких чисел, разделенные пробелами (вещественные числа имеют +ненулевую дробную часть). Создать файл вещественных чисел, содержа- +щий (в том же порядке) все числа из исходного файла, имеющие ненуле- +вую дробную часть. + diff --git a/practice2/NetsvetaevaKM_practice2.py b/practice2/NetsvetaevaKM_practice2.py new file mode 100644 index 0000000..53707cf --- /dev/null +++ b/practice2/NetsvetaevaKM_practice2.py @@ -0,0 +1,31 @@ +# coding=utf8 +""" + Дан текстовый файл, каждая строка которого содержит изображения нескольких + чисел, разделенных пробелами (вещественные числа имеют ненулевую дробную + часть). Создать файл вещественных чисел, содержащий (в том же порядке) все + числа из исходного файла, имеющие ненулевую дробную часть. + +""" + + +filename = "myFile.txt" +filename2 = "myFile2.txt" + +f1 = open(filename, "r")# открываем файл для чтения +f2 = open(filename2, "w")# открываем файл для записи + +for substr in f1.read().split(): + s = substr.split('.')# разбиваем все элементы по точке + if len(s) == 2:# если число элементов равно двум + if s[0] != '' and s[1] != '':# проверяем что оба элемента не пустые + print s + # проверяем, чтобы в обоих элементах были числа + if s[1]>='0' and s[1]<='9' and s[0]>='0' and s[0]<='9': + # если второй элемент ненулевой + if float(s[1])!=0: + # запись в файл, сливаем оба элемента в вещественное число + f2.write("%s " % ".".join(s)) + + +f1.close() +f2.close()# закрываем файлы diff --git a/practice2/Olya.py b/practice2/Olya.py new file mode 100644 index 0000000..08c7493 --- /dev/null +++ b/practice2/Olya.py @@ -0,0 +1,17 @@ +FileText = open("Text.txt") +FileCount = open("Count.txt", "w") +Str = FileText.read() +#print Str +abc = "���������������������������������" +for letter in abc: + #print letter + Count = Str.count(letter) + #print letter + "-" + str(Count) + "\n" + if Count != 0: + FileCount.write(letter + "-" + str(Count) + "\n") + #print letter + "-" + str(Count) +FileText.close() +FileCount.close() + + + diff --git a/practice2/ProkhorovIV.txt b/practice2/ProkhorovIV.txt new file mode 100644 index 0000000..9dcf1ce --- /dev/null +++ b/practice2/ProkhorovIV.txt @@ -0,0 +1,5 @@ +Дан текстовый файл. Создать символьный файл, содержащий все сим- +волы, встретившиеся в тексте, включая пробел и знаки препинания (без +повторений). Символы располагать в порядке их первого появления в тек- +сте. + diff --git a/practice2/ProkhorovIV/practice2/.project b/practice2/ProkhorovIV/practice2/.project new file mode 100644 index 0000000..6de7b5b --- /dev/null +++ b/practice2/ProkhorovIV/practice2/.project @@ -0,0 +1,17 @@ +
+
+ practice2
+
+
+
+
+
+ org.python.pydev.PyDevBuilder
+
+
+
+
+
+ org.python.pydev.pythonNature
+
+
diff --git a/practice2/ProkhorovIV/practice2/.pydevproject b/practice2/ProkhorovIV/practice2/.pydevproject
new file mode 100644
index 0000000..41c44ce
--- /dev/null
+++ b/practice2/ProkhorovIV/practice2/.pydevproject
@@ -0,0 +1,10 @@
+
+
+
+
+Default
+python 2.7
+
+/practice2/src
+
+
diff --git a/practice2/ProkhorovIV/practice2/.settings/org.eclipse.core.resources.prefs b/practice2/ProkhorovIV/practice2/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..c3f750b
--- /dev/null
+++ b/practice2/ProkhorovIV/practice2/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon May 02 00:15:42 YEKST 2011
+eclipse.preferences.version=1
+encoding//src/pkg/__init__.py=utf-8
diff --git a/practice2/ProkhorovIV/practice2/src/pkg/__init__.py b/practice2/ProkhorovIV/practice2/src/pkg/__init__.py
new file mode 100644
index 0000000..1b75449
--- /dev/null
+++ b/practice2/ProkhorovIV/practice2/src/pkg/__init__.py
@@ -0,0 +1,25 @@
+# coding: utf-8
+
+filename = "text_src.txt"
+filename2 = "text_dst.txt"
+charsList = list()
+
+def main(args):
+ f1 = open(filename, "r")
+ f2 = open(filename2, "w")
+
+ for char in f1.read():
+ if checkRepeat(char) == False:
+ charsList.append(char)
+ f2.write(char)
+
+def checkRepeat(char):
+ found = False
+ for c in charsList:
+ if c == char:
+ found = True
+ return found
+
+if __name__ == '__main__':
+ import sys
+ main(sys.argv[:])
diff --git a/practice2/ProkhorovIV/practice2/src/pkg/text_dst.txt b/practice2/ProkhorovIV/practice2/src/pkg/text_dst.txt
new file mode 100644
index 0000000..ecfc001
--- /dev/null
+++ b/practice2/ProkhorovIV/practice2/src/pkg/text_dst.txt
@@ -0,0 +1,2 @@
+��������� Python
+�����������?�GAEDjagpiefrmwk���������31��,�0.��542x()��-�RubzdvI:/���!��Ul�H"��[+s>]�;{}J����ONSQLc�
\ No newline at end of file
diff --git a/practice2/ProkhorovIV/practice2/src/pkg/text_src.txt b/practice2/ProkhorovIV/practice2/src/pkg/text_src.txt
new file mode 100644
index 0000000..badfa36
--- /dev/null
+++ b/practice2/ProkhorovIV/practice2/src/pkg/text_src.txt
@@ -0,0 +1,59 @@
+���������� � Python
+
+����������
+������ Python ��� �����?
+��� ����� Python?
+��� ����� GAE?
+������� � Django
+AppEngine framework ��� ������ �� GAE
+����������
+������ Python ��� �����?
+��������� 31 ������ �������� � ����������� Python �������������, ������� ������ � ����� 30 ������. ������� �������� ����� ����� ������. �� ������ �������.
+
+����� 5 ��� � ��������� ����������� ������ �� php. ������� � php4, ������ ���� �� php5.2.x (�� php5.3 �� ����� ����). ������, ��� ��������������� �������� ���������� � ��������� �������� Python �������������. � ��� ��� ������� ������ ������� ���� ����� ��� ���� ���� ���������������� - Python.
+
+����� � � ����, ��� ����� �� GAE (���� � ������� ������ ����), �� ������� ����� ��������� ����� ������ �� Python. ��� � ����� �������� �������� ������ Python. � �� Ruby (��������� ���������� ��� ��������, ������ ��� zend ����������������� ����������).
+
+������� ������ �� ������� ���������� ���������� ���, ����� � ����� � �������� Python �� ����� Dive Into Python (���� http://diveintopython.org). ����� �������� �� ����������, ���� � ���� ������ ������ �� �������. ������, ����� ����������, ���� ��� �� ������ ����� �������. � ��� ������� �����!
+��� ����� Python?
+����, �� ������ ������ � ������. ����� �������� ��� Python ������ �������� � �������. ������ �� ����� - ���������� �� Ubuntu linux, � ������� � ��� ����� � ���������� ���������. � ������� �������� ������� ����� ��� ������������, ���� ������� �������� ����������. ���� ������� �������.
+
+����� �� � ������ ���� �����. ��� ����� - ��� ������ ����. � ��� ��� ��������� �� �����������, ������ ������ ��������� � PHP (��, � php5 ���� ����������. �� ��� �� ��� ��� ������������ ������ �� ����� ���������). �������� ������������ ��� - �������� ����������, ������� ����� "��������". ����� ������.
+
+� ��������� if ������ ������ ������������. ��� ��, ����������� ������� ������ ��� ����� �� ���������. ������� ������ ������������, � ��� � if ���������� ��������. ������ ������ �������, ������ ��� ��������� ����� ����������� ����� �����������. ������� ���� ���������� ������, ��� ��� ������.
+
+������ ������� �� ��������� ������ [x+y for x, y in values if x+y> 20]. ������������ �����������, ����� ������ � �������� ��������. ������ ����������� - ������� ";" � ����� ������ ������ � ������� "{ ... }" ��� ���������� ������. ��� ����������� �� ����� �������� ������, �������������� �� �� �� ���������� � ������.
+
+���������� ����� �� ������ �����, ��� �������� � PHP. ����� �� ���������� ������. ��������� ��� � Java. ������, �� ��������� ���������� ������. �������� "from blog import models", ��� ������� �� ������ ������ ������. � ����� � ��� "from blog import models as mymodels" ��� ������� ������ ��� ������ ��� ������ (������ � ��� ����� �� ��������).
+
+��� �������� ���������� � ���������� ����. �������� ���������� ����� ����� 3 ��������, � ��� ����� ������� ��������. � ��� ������ ����� �������� ����� �������� �����, ��� ������ ���������.
+��� ����� GAE?
+GAE (Google AppEngine) - ��� ������ � ������������� Python. ��������� ��������������� ����� � 5 ��� ����������� � ����� � 500 �� ��������� ������������. ����� ��������� ������ ����� ����� ��� �����������.
+
+�� �������� ����������� ��������� ������� � �������������� �����. ���� ��� ���� ����� �� ����� - ��� ������ ������ �� ��������, ����� ��� ������� �� ����� �� �����. �� �� ����� ����������� � � ������� ���������� (���� �� ���������� ��������), �� � ������� ��������. ��� � ����� �������� ��������� ������ � ������. ���������� �������� ���������������, �� ��� ������� � ����������� �������. ���������� GAE ����������� ��� �� ���� ������ - ��� ���� ��������� �������� �� Google. � � ��� ���� ��������.
+
+��� ���� ����������� GAE ����������� � ���, ��� � ���� ��������� ������ ����������� �� ����������� ���� ������, � ����� ��������� �������� ����� Python. ��� ����������� ����������� �� ���������� �������� (��������, ������ ������ JOIN ��� � SQL). ��� ������� ����� ������� ����� ������ ����� ������������� ����������. ��������� ����� �� ����� ����������� ������� � ������� ��������� ������.
+
+��������� �� GAE ������� �� �������� Google AppEngine � Google AppEngine Getting Start.
+������� � Django
+Django - ���� �� ����� ������ � �������� �����������, ���������� �� Python. ���������� �������������� ��� ���������� �������, � ����� ���� ������ ������� �������� ��� ����������� �����. ��������� ����� ��� ����� �������� �� ��� - �����, ��� ��� ���� ���.
+
+����������� ����� ���������� � ���, ��� ������ ������� �� ���������� (applications). ������ ���������� ����� ������������ � ������ ������� ��� ���������. �� ������ ������ �������� ���� ����������, � ����� �������, � ������������ ��� � ������ ����� ��������.
+
+������ ����������� - ����� ��������� ��������� ��� ������ ����������� �������, ������ ������ �������� ��� �������������� ��������� � ������ ������. � ��� ����� ������ - ������� ������������� ������������ �������. ��� ��� �� ��� ��������� - ������� ����� ������ ������ ���� �������� �� ��������������. ��� ��������� ������� �� ��� Django.
+AppEngine framework ��� ������ �� GAE
+����� � ������� �������� Google AppEngine � �����, ��� Django �� �������������� � ������ �������. ���� � ���, ��� Django �������� � ������������ ������ ������, � Google AppEngine ����� ������ �������� ��� �������� ������. ��� ��������������� ��������� ���� ������ ������. ����� �� ������� ��������� ���������� app-engine-path, ������� ��������� ��������� �������, ��� � AppEngine. ������ �������� ��� �� ������ ���������.
+
+������ � ������� ���������� � ������ ������ ������� ��� ��, ��� �������� �� Google AppEngine ��� �������, � ��� �� �������� ���� ������� ���������� � ����� Django. ��� ������� ����� ������ ��� ��������� AppEngine framework. ��������� ���� �������� ��� "����� ��� ���������, ���� � ��� ��� ���� �����������". ������ ������� � ����� ������, ��� � �� ��������� ���������, � ���� ��������� ������ ����������������� ���� ������� � ������ ������� �������, ��������� ������������ ��� Google AppEngine.
+
+����� ����, � ����� �������� ��������� ������� Django, � ���� ��� ���������. ����� ��� ��� ��������� ��������� ����� �������� ������ � ��������� ����� ������� �������, ��� �����-���� �����.
+
+� ��������� ����, ��� ������ ����������� ��� ����� Python � ��� �� ��� ����� ������� ����������� ��� ����������. �������, �� ���������� ��������� ���, ��� �������� Donation (�������� �������������).
+����������
+���� ���� � Python ����� 2 ������, � ��� ������ ���������, �� ������ ������� ������. ����� ����, � ������� ����� ������������ �� ����, ��� ��� ���������� ��������� ��� ���� �����, ��� � ���� ������ ��������� � ��� ��� ���� �� ��������� �������. � ��� ��� �������� ��, ��� Python ����� ����� �������� ��������� � �������� ����� ������� ���������� ������.
+
+��� ���� �������, ��� Python ������ � �������� Linux �� ���������, ��� ��� �� ��� ������� ��������� ����������� ��������. ����� ����� ��������� ��� ��������� ���������� �� �������. � ����� ������ � ��� �����. � ��� ��� - �� �����, ������� � ���������� �������� ����� ����������������. Python ����� ������� ������������, � ����� ����� �����������, ������� ��� �����. � ��� ������!
+
+���������, ��� ��������� ���� ����, ������� � ������ � ����� ������� ����������� �� PHP ���������� ������ ����������� �� Python. � ������� ������ ������������ ��� �� �������� ����������, ��� � �� ����, ��� ������ ���� ��������� ���������� ���� ���� � ����������.
+
+���������� ����������� Python � ��� ������ ���������� � ��������. � �������, �� �������� ��� ���� ����� ���.
\ No newline at end of file
diff --git a/practice2/README b/practice2/README
index f2095cb..3b157dd 100644
--- a/practice2/README
+++ b/practice2/README
@@ -1,2 +1,8 @@
Написать программу на яп Python. Подробное описание программы находится в файле с ФамилиейИО студента.
ЗАДАНИЕ НА 2ю ПРАКТИКУ БУДЕТ ВЫЛОЖЕННО ПОСЛЕ ВЫПОЛНЕНИЯ ПЕРВОЙ ПРАКТИКИ!!!
+
+1 - Сделать pull из основного репозитария с практиками в свой форкнутый
+2 - Добавить в свой репозитарий в папке practice2 папку с именем типа ФамилияИО
+(название папки должно написанно в транслите)
+3 - Добавить в свою папку программу
+4 - Отправить pull request в основной репозитарий
diff --git a/practice2/SeminRS.txt b/practice2/SeminRS.txt
new file mode 100644
index 0000000..b0c7c3a
--- /dev/null
+++ b/practice2/SeminRS.txt
@@ -0,0 +1,6 @@
+Дана строка и файл с русским текстом, зашифрованным по правилу,
+описанному в задании у EltyshevAS. Данная строка представляет собой первую
+расшифрованную строку текста. Расшифровать остальные строки и заме-
+нить в файле зашифрованный текст на расшифрованный. Если информа-
+ции для расшифровки недостаточно, то исходный файл не изменять.
+
diff --git a/practice2/SeminRS/README.txt b/practice2/SeminRS/README.txt
new file mode 100644
index 0000000..079ef0e
--- /dev/null
+++ b/practice2/SeminRS/README.txt
@@ -0,0 +1,2 @@
+программа запускается ->>>> имя программы "путь к файлу" "расшифрованная строка"
+расшифрованная строка ----> ололо! все работает:)
diff --git a/practice2/SeminRS/decryptor.py b/practice2/SeminRS/decryptor.py
new file mode 100644
index 0000000..83dbc44
--- /dev/null
+++ b/practice2/SeminRS/decryptor.py
@@ -0,0 +1,110 @@
+#!/usr/bin/env python
+#-*- coding: utf-8 -*-
+alphabet = u'абвгдежзийклмнопрстуфхцчшщъыьэюя'
+key = [0,0,0,0,0,0,0,0,0,0]
+
+def findKey(codingString, decodingString): #фун-ия для нахождения ключа
+
+ codingString = codingString.lower()
+ decodingString = decodingString.lower()
+ seek = 0;
+ count = 0
+ while count < 10 and seek < len(decodingString): #находим ключ пока не закончится раскодированная строка или не найдем полностью ключ + + if (alphabet.find(decodingString[seek]) != -1): #ищем символ раскодированной строки + decodingSym = alphabet.index(decodingString[seek]) + + elif (decodingString[seek] == codingString[seek]): #если не нашли символ в алфавите проверяем равен ли он символу в закодированной строке + seek += 1 + continue + + else: #если символ не равен значит неправильная раскодированная строка т.к. при кодировки мы не трогаем знаки препинания + print "ERROR: incorrect decoding string" + exit(0) + + if (alphabet.find(codingString[seek]) != -1): #ищем символ раскодированной строки + codingSym = alphabet.index(codingString[seek]) + key[count] = codingSym - decodingSym #находим элемент ключа + + if key[count] < 0: + key[count] = (len(alphabet) - 1) + key[count] + + count += 1 + seek += 1 + + else: #если не нашли то значит неправильная раскодированная строка + print "ERROR: incorrect decoding string" + exit(0) + + if count < 10: #если нашли не все элементы ключа значит не достаточно данных + print "ERROR: insufficient data" + exit(1) + + +def decoding(key, lines): + + newStr = "" + count = 0 + keyCount = 0 + fileStr = "" + while count < len(lines): #перебираем все строки файла + newStr = "" + for sym in lines[count].decode('utf-8'): + if keyCount == 10: + keyCount = 0 + + if (alphabet.find(sym.lower()) != -1): #если не найден в алфавите то пропускаем символ + newSym = alphabet.index(sym.lower()) - key[keyCount] + if (newSym < 0): + newSym += (len(alphabet) - 1) + + newSym = alphabet[newSym] + + if (sym.isupper()): #если закодированный символ был в верхнем регистре то раскодированный делаем тоже в верхнем + newSym = newSym.upper() + + newStr += newSym + keyCount += 1 + + else: + newStr += sym + + fileStr += newStr + count += 1 + return fileStr + + + +def main(args): + + pathFile = args[1].decode('utf-8') + decodingString = args[2].decode('utf-8') + lines = open(pathFile,"r").readlines() + findKey(lines[0].decode('utf-8'), decodingString) + fileStr = decoding(key, lines) + print "key: ",key + f = open( pathFile, 'w') + f.write(fileStr.encode('utf-8')) + f.close() + print "DONE" + +if __name__ == '__main__': + import sys + main(sys.argv[:]) + + + + + + + + + + + + + + + + + diff --git a/practice2/SeminRS/file b/practice2/SeminRS/file new file mode 100644 index 0000000..25fb521 --- /dev/null +++ b/practice2/SeminRS/file @@ -0,0 +1 @@ +уРцСс! жто рбжуъжиц !!!!!!:) diff --git a/practice2/SergeevaEO b/practice2/SergeevaEO new file mode 100644 index 0000000..cb56acf --- /dev/null +++ b/practice2/SergeevaEO @@ -0,0 +1,7 @@ +Дан текстовый файл, содержащий таблицу из трех столбцов целых чи- +сел. В начале и в конце каждой строки таблицы, а также между ее столб- +цами располагается символ-разделитель. Ширина столбцов таблицы, спо- +соб их выравнивания и вид символа-разделителя являются произвольными. +Создать файл целых чисел, содержащий сумму чисел из каждой строки ис- +ходной таблицы. + diff --git a/practice2/ShelgachevaAS b/practice2/ShelgachevaAS new file mode 100644 index 0000000..31b5720 --- /dev/null +++ b/practice2/ShelgachevaAS @@ -0,0 +1,7 @@ +Шахматную доску будем представлять символьной +матрицей размера 8х8. Даны натуральные числа n и m +( 1 ≤ n ≤ 8,1 ≤ m ≤ 8 ) - номера вертикали и горизонтали, определяющие +местоположение ферзя. Соответствующий элемент матрицы надо +положить равным символу ф. Поля, находящиеся под угрозой ферзя, +надо положить равными символу *, а остальные поля- символу 0. +Решить аналогичную задачу для коня. Вывести доску на экран. diff --git a/practice2/SuraevaEV b/practice2/SuraevaEV new file mode 100644 index 0000000..c720461 --- /dev/null +++ b/practice2/SuraevaEV @@ -0,0 +1,6 @@ +Описать процедуру InvertIntFile(S), меняющую порядок следования +элементов файла целого типа с именем S на противоположный. Если файл +не существует или содержит менее двух элементов, то процедура не вы- +полняет никаких действий. Обработать с помощью этой процедуры три +файла с данными именами. + diff --git a/practice2/ZykovaTV b/practice2/ZykovaTV new file mode 100644 index 0000000..b2264e9 --- /dev/null +++ b/practice2/ZykovaTV @@ -0,0 +1,6 @@ +Дан текстовый файл, содержащий таблицу из трех столбцов вещест- +венных чисел. Ширина столбцов таблицы и способ их выравнивания явля- +ются произвольными, специальных символов-разделителей таблица не со- +держит. Создать три файла вещественных чисел, каждый из которых со- +держит числа из соответствующего столбца таблицы (в том же порядке). + diff --git a/practice2/myFile.txt b/practice2/myFile.txt new file mode 100644 index 0000000..c63dfa1 --- /dev/null +++ b/practice2/myFile.txt @@ -0,0 +1,6 @@ +dgf 0 345 345.345 .345 +345 45 fhgh |||| | + +rtrt +er 56 ^ dfgdf fdgfd ���� + �� 5.6 7.7.8 456. 00 fds.432 3214.0 533.000 423.fdf 54325.0005 \ No newline at end of file diff --git a/practice2/myFile2.txt b/practice2/myFile2.txt new file mode 100644 index 0000000..ab51b34 --- /dev/null +++ b/practice2/myFile2.txt @@ -0,0 +1 @@ +345.345 5.6 54325.0005 \ No newline at end of file diff --git a/practice2/vladimir89_practice2.py b/practice2/vladimir89_practice2.py new file mode 100644 index 0000000..648c7df --- /dev/null +++ b/practice2/vladimir89_practice2.py @@ -0,0 +1,46 @@ + +# coding: utf-8 + + +filename1 = "file1.txt" +filename2 = "file2.txt" + +# dsfsdf + + +def main(args): + ''' главная функция + принимает 1 аргумент''' + count_i = 0 #Счетчик + count_k = 3 #Длинна слова, которое будет записано в фаил''' + + + print "Start the programm" + + f1 = open (filename1, "r") + f2 = open (filename2, "w") + + for line in f1: + print "Current line", line + slovo = line.split() + print "Current slovo: ", slovo + a = len(slovo) + print "Current count slov", a + for count_i in range(a): + + if slovo[count_i].isalpha() and len(slovo[count_i]) == count_k: + print slovo[count_i] + f2.write(slovo[count_i]+'\n') + + count_i = count_i + 1 + + f2.close() + + + + + +if __name__ == '__main__': + import sys + main(sys.argv[:]) + diff --git a/practice3/Krygovoi_EA/laba2.py b/practice3/Krygovoi_EA/laba2.py new file mode 100644 index 0000000..0af9ff3 --- /dev/null +++ b/practice3/Krygovoi_EA/laba2.py @@ -0,0 +1,22 @@ +# coding=utf8 + +from math import sqrt +filename = "result.txt" +f1 = open(filename, "w") +a=float(input(u"Enter A: ")) +b=float(input(u"Enter B: ")) +n=int(input(u"Enter N: ")) +s = (b-a)/n + +while a<=b: + + print('%-10.4f ' % (a)), str(sqrt(a)) + + f1.write('%10.4f ' % (a)), f1.write('%15.8f\n' % (sqrt(a))) + + a=a+s + +f1.close() + + + diff --git a/practice3/Krygovoi_EA/pic1.jpg b/practice3/Krygovoi_EA/pic1.jpg new file mode 100644 index 0000000..e0e31d5 Binary files /dev/null and b/practice3/Krygovoi_EA/pic1.jpg differ diff --git a/practice3/Krygovoi_EA/pic2.jpg b/practice3/Krygovoi_EA/pic2.jpg new file mode 100644 index 0000000..01c1d9e Binary files /dev/null and b/practice3/Krygovoi_EA/pic2.jpg differ diff --git a/practice3/Krygovoi_EA/pic3.jpeg b/practice3/Krygovoi_EA/pic3.jpeg new file mode 100644 index 0000000..6333b4d Binary files /dev/null and b/practice3/Krygovoi_EA/pic3.jpeg differ diff --git a/practice3/Krygovoi_EA/practice.html b/practice3/Krygovoi_EA/practice.html new file mode 100644 index 0000000..4e333e4 --- /dev/null +++ b/practice3/Krygovoi_EA/practice.html @@ -0,0 +1,79 @@ +
+
+ Practice2
+
+
+
+
+ HELLO WORLD!!!
+
+ !������ � �������!
+
+
+
+
������� �� �������� �2
+
+
���� ������������ ����� A,B � ����� ����� N. ������� ��������� ����,
+ ���������� ������� �������� ������� sqrt(x) �� ���������� [A,B] � ����� (B - A)/N. �������
+ ������� �� ���� ��������: � ����������� x (10 �������, �� ��� 4 ��� ������� �����) � �� ���������
+ sqrt(x) (15 �������, �� ��� 8 ��� ������� �����). ������� ������������� �� ������� ����.
+
+
+ ������� ���������
+
+
+
+
+
+
+ from math import sqrt # ����������� ��� ������� ����������� �����
+ filename = "result.txt"
+
+ f1 = open (filename, "w" ) # �������� ����� ��� ������
+
+ a = float (input (u"������� A: " )) #���� ������
+ b = float (input (u"������� B: " ))
+
+ n = int (input (u"������� N: " ))
+ s = (b-a)/n #������ ����
+
+ while a<=b: #���� �� ������ ����� � ����
+
+ print str(a), str(sqrt(a)) #����� � �������
+
+ #������ ��� ����� �
+ #������������ �������� � ������������� �� ������� ����
+ #���� ���� �� ������, �� ������� ���� "-", ����� ��������
+
+ f1.write('%10.4f ' % (a)), f1.write('%15.8f\n' % (sqrt(a)))
+
+ a=a+s # ���������� �������� �� ���
+
+ f1.close()
+
+
+
+ ��������� ���������� ���������
+
+
������������� ���������, ��������� � �������
+
������������� ���������, ��������� � �������
+
+
+
���������, ���������� � ����
+
���������, ���������� � ����
+
+ ������:
+
+
+ ���� ���������
+
+ ����, � ������� ���������� ����������
+
+
+
+
\ No newline at end of file
diff --git a/practice3/Krygovoi_EA/result.txt b/practice3/Krygovoi_EA/result.txt
new file mode 100644
index 0000000..cdd20a5
--- /dev/null
+++ b/practice3/Krygovoi_EA/result.txt
@@ -0,0 +1,10 @@
+ 54.1230 7.35683356
+ 148.7560 12.19655689
+ 243.3890 15.60092946
+ 338.0220 18.38537462
+ 432.6550 20.80036057
+ 527.2880 22.96275245
+ 621.9210 24.93834397
+ 716.5540 26.76852629
+ 811.1870 28.48134477
+ 905.8200 30.09684369
diff --git a/practice3/Krygovoi_EA/style.css b/practice3/Krygovoi_EA/style.css
new file mode 100644
index 0000000..df7399a
--- /dev/null
+++ b/practice3/Krygovoi_EA/style.css
@@ -0,0 +1,32 @@
+h1
+ {
+ text-decoration: underline;
+ }
+
+#p2
+ {
+ color: red;
+ font-style:italic;
+ }
+
+#p3
+ {
+ color: #409000;
+ }
+
+span.orange
+ {
+ color:ff7920;
+ }
+span.comments
+ {
+ color: red;
+ }
+span.green
+ {
+ color: #409000;
+ }
+span.special
+ {
+ color:#8800b4;
+ }
\ No newline at end of file
diff --git a/practice3/NetsvetaevaKM/Rainbow.html b/practice3/NetsvetaevaKM/Rainbow.html
new file mode 100644
index 0000000..6ef3764
--- /dev/null
+++ b/practice3/NetsvetaevaKM/Rainbow.html
@@ -0,0 +1,62 @@
+
+
+
+ My first page
+
+
+
+
+
+ Python
+ ������������ ������ 2
+ ������� ������: ��� ��������� ����, ������ ������ �������� �������� ����������� ����������
+ �����, ����������� ��������� (������������ ����� ����� ��������� �������
+ �����). ������� ���� ������������ �����, ���������� (� ��� �� �������) ���
+ ����� �� ��������� �����, ������� ��������� ������� �����.
+
+ ������� ���������:
+
+filename = "myFile.txt"
+filename2 = "myFile2.txt"
+
+f1 = open (filename, "r" )# ��������� ���� ��� ������
+f2 = open (filename2, "w" )# ��������� ���� ��� ������
+
+for substr in f1.read().split():
+ s = substr.split('.' )# ��������� ��� �������� �� �����
+ if len (s) == 2:# ���� ����� ��������� ����� ����
+ if s[0] != '' and s[1] != '' :# ��������� ��� ��� �������� �� ������
+ print s
+ # ���������, ����� � ����� ��������� ���� �����
+ if s[1]>='0' and s[1]<='9' and s[0]>='0' and s[0]<='9' :
+ # ���� ������ ������� ���������
+ if float (s[1])!=0:
+ # ������ � ����, ������� ��� �������� � ������������ �����
+ f2.write("%s " % "." .join(s))
+
+
+f1.close()
+f2.close()# ��������� �����
+
+ ������� ���������� ������
+
+ ���������� ������
+ 1 ���� (������� ����) 2 ���� (�������� ����)
+
+
+
dgf 0 345 345.345 .345
+345 45 fhgh |||| |
+
+rtrt
+er 56 ^ dfgdf fdgfd fdsg
+ as 5.6 7.7.8 456. 00 fds.432 3214.0 533.000 423.fdf 54325.0005
+ 345.345 5.6 54325.0005
+
+
+
���������� ��������:
+ 1.
������ ������� �� html
+
+ 2.
������ ������� �� css
+
+
+
\ No newline at end of file
diff --git a/practice3/NetsvetaevaKM/Rainbow.~html b/practice3/NetsvetaevaKM/Rainbow.~html
new file mode 100644
index 0000000..adca45d
--- /dev/null
+++ b/practice3/NetsvetaevaKM/Rainbow.~html
@@ -0,0 +1,43 @@
+
+
+
+
My first page
+
+
+
+
+
Hurrah! This is my first page.
+
������������ ������ 2
+
������� ������: ��� ��������� ����, ������ ������ �������� �������� ����������� ����������
+ �����, ����������� ��������� (������������ ����� ����� ��������� �������
+ �����). ������� ���� ������������ �����, ���������� (� ��� �� �������) ���
+ ����� �� ��������� �����, ������� ��������� ������� �����.
+
������� ���������:
+
+filename = "myFile.txt"
+filename2 = "myFile2.txt"
+
+f1 = open(filename, "r")# ��������� ���� ��� ������
+f2 = open(filename2, "w")# ��������� ���� ��� ������
+
+for substr in f1.read().split():
+ s = substr.split('.')# ��������� ��� �������� �� �����
+ if len(s) == 2:# ���� ����� ��������� ����� ����
+ if s[0] != '' and s[1] != '':# ��������� ��� ��� �������� �� ������
+ print s
+ # ���������, ����� � ����� ��������� ���� �����
+ if s[1]>='0' and s[1]<='9' and s[0]>='0' and s[0]<='9': + # ���� ������ ������� ��������� + if float(s[1])!=0: + # ������ � ����, ������� ��� �������� � ������������ ����� + f2.write("%s " % ".".join(s)) + + +f1.close() +f2.close()# ��������� ����� +
+
���������� ��������:
+ 1.
+
+
+
\ No newline at end of file
diff --git a/practice3/NetsvetaevaKM/grass1.jpg b/practice3/NetsvetaevaKM/grass1.jpg
new file mode 100644
index 0000000..a6a22dd
Binary files /dev/null and b/practice3/NetsvetaevaKM/grass1.jpg differ
diff --git a/practice3/NetsvetaevaKM/pic2.png b/practice3/NetsvetaevaKM/pic2.png
new file mode 100644
index 0000000..2dea56a
Binary files /dev/null and b/practice3/NetsvetaevaKM/pic2.png differ
diff --git a/practice3/NetsvetaevaKM/style.css b/practice3/NetsvetaevaKM/style.css
new file mode 100644
index 0000000..dc15a25
--- /dev/null
+++ b/practice3/NetsvetaevaKM/style.css
@@ -0,0 +1,46 @@
+#p1
+{
+ font-style:italic;
+}
+
+#p2
+{
+ font-style:italic;
+ color:gray;
+}
+
+#p3
+{
+
+ color:#ff7920;
+}
+
+tr.one
+{
+ background-color:#b2ff80;
+}
+
+tr.two
+{
+ background-color:#dddddd;
+}
+
+span.green
+{
+ color:#79ff20;
+}
+
+span.red
+{
+ color:red;
+}
+
+span.spec
+{
+ color:#de80ff;
+}
+
+span.orange
+{
+ color:#ff7920;
+}
\ No newline at end of file
diff --git a/practice3/ProkhorovIV/Untitled-1.html b/practice3/ProkhorovIV/Untitled-1.html
new file mode 100644
index 0000000..e62fa51
--- /dev/null
+++ b/practice3/ProkhorovIV/Untitled-1.html
@@ -0,0 +1,51 @@
+
+
+
+
+Practice3
+
+
+
+
Task
+
Дан текстовый файл. Создать символьный файл, содержащий все сим-
+волы, встретившиеся в тексте, включая пробел и знаки препинания (без
+повторений). Символы располагать в порядке их первого появления в тексте.
+
+
Source
+
# coding: utf-8
+
+filename = "text_src.txt"
+filename2 = "text_dst.txt"
+charsList = list()
+
+def main(args):
+ f1 = open(filename, "r")
+ f2 = open(filename2, "w")
+
+ for char in f1.read():
+ if checkRepeat(char) == False:
+ charsList.append(char)
+ f2.write(char)
+
+def checkRepeat(char):
+ found = False
+ for c in charsList:
+ if c == char:
+ found = True
+ return found
+
+if __name__ == '__main__':
+ import sys
+ main(sys.argv[:])
+
+
+
Result
+
Text_dst.txt:
+ Знакомств Python
+Оглеипчухрш?жGAEDjagpiefrmwkдябызюПБь31фц,К0.йН542x()Иэ-ЭRubzdvI:/РщС!ЧЛUlВH"ХМ[+s>]Д;{}JАЕТъONSQLcЯ
+
+
+
+
+
+
diff --git a/practice3/ProkhorovIV/Untitled-2.css b/practice3/ProkhorovIV/Untitled-2.css
new file mode 100644
index 0000000..f4a91a6
--- /dev/null
+++ b/practice3/ProkhorovIV/Untitled-2.css
@@ -0,0 +1,30 @@
+@charset "utf-8";
+/* CSS Document */
+
+H1{color:#03C; font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif}
+
+body{background-image:url(back.jpeg)}
+
+div#Task{color:#609; background-color:#CCC; max-width:600px;
+filter:alpha(opacity=40);
+opacity:0.4
+}
+
+div#Source{color:#060; background-color:#CCC; max-width:600px;
+filter:alpha(opacity=60);
+opacity:0.6
+}
+
+div#Result{background-color:#FF6; max-width:600px;
+filter:alpha(opacity=40);
+opacity:0.4;
+}
+
+div#Task:hover { color:green ; text-decoration:none; }
+div#Task:active {color: blue; text-decoration:none;}
+
+div#Source:hover { color:blue ; text-decoration:none; }
+div#Source:active {color: red; text-decoration:none;}
+
+div#Result:hover { color:red ; text-decoration:none; }
+div#Result:active {color: green; text-decoration:none;}
\ No newline at end of file
diff --git a/practice3/ProkhorovIV/back.jpeg b/practice3/ProkhorovIV/back.jpeg
new file mode 100644
index 0000000..767513c
Binary files /dev/null and b/practice3/ProkhorovIV/back.jpeg differ
diff --git a/practice3/README b/practice3/README
new file mode 100644
index 0000000..1c03613
--- /dev/null
+++ b/practice3/README
@@ -0,0 +1,5 @@
+Написать простой статический сайт с использованием css.
+
+1 - Сделать pull из основного репозитария с практиками в свой форкнутый
+2 - Добавить в свою папку программу
+3 - Отправить pull request в основной репозитарий
diff --git a/practice3/SeminRS/code.html b/practice3/SeminRS/code.html
new file mode 100644
index 0000000..7f1c60e
--- /dev/null
+++ b/practice3/SeminRS/code.html
@@ -0,0 +1,119 @@
+
+
+
+
+
+
+ ПРАКТИКА 3
+
+
+
+
+
+
Код Программы
+
вернуться к главной
+
+
+ #!/usr/bin/env python
+ #-*- coding: utf-8 -*-
+ alphabet = u'абвгдежзийклмнопрстуфхцчшщъыьэюя'
+ key = [0,0,0,0,0,0,0,0,0,0]
+
+ def findKey(codingString, decodingString):
+
+ codingString = codingString.lower()
+ decodingString = decodingString.lower()
+ seek = 0;
+ count = 0
+ while count < 10 and seek < len(decodingString): + + if (alphabet.find(decodingString[seek]) != -1): + decodingSym = alphabet.index(decodingString[seek]) + + elif (decodingString[seek] == codingString[seek]): + seek += 1 + continue + + else: + print "ERROR: incorrect decoding string" + exit(0) + + if (alphabet.find(codingString[seek]) != -1): + codingSym = alphabet.index(codingString[seek]) + key[count] = codingSym - decodingSym + + if key[count] < 0: + key[count] = (len(alphabet) - 1) + key[count] + + count += 1 + seek += 1 + + else: + print "ERROR: incorrect decoding string" + exit(0) + + if count < 10: + print "ERROR: insufficient data" + exit(1) + + + def decoding(key, lines): + + newStr = "" + count = 0 + keyCount = 0 + fileStr = "" + while count < len(lines): + newStr = "" + for sym in lines[count].decode('utf-8'): + if keyCount == 10: + keyCount = 0 + + if (alphabet.find(sym.lower()) != -1): + newSym = alphabet.index(sym.lower()) - key[keyCount] + if (newSym < 0): + newSym += (len(alphabet) - 1) + + newSym = alphabet[newSym] + + if (sym.isupper()): + newSym = newSym.upper() + + newStr += newSym + keyCount += 1 + + else: + newStr += sym + + fileStr += newStr + count += 1 + return fileStr + + + + def main(args): + + pathFile = args[1].decode('utf-8') + decodingString = args[2].decode('utf-8') + lines = open(pathFile,"r").readlines() + findKey(lines[0].decode('utf-8'), decodingString) + fileStr = decoding(key, lines) + print "key: ",key + f = open( pathFile, 'w') + f.write(fileStr.encode('utf-8')) + f.close() + print "DONE" + + if __name__ == '__main__': + import sys + main(sys.argv[:]) +
+
+
+
+
+
+
diff --git a/practice3/SeminRS/images/background.jpg b/practice3/SeminRS/images/background.jpg
new file mode 100644
index 0000000..738816d
Binary files /dev/null and b/practice3/SeminRS/images/background.jpg differ
diff --git a/practice3/SeminRS/images/backgroundBody.jpg b/practice3/SeminRS/images/backgroundBody.jpg
new file mode 100644
index 0000000..cbe2459
Binary files /dev/null and b/practice3/SeminRS/images/backgroundBody.jpg differ
diff --git a/practice3/SeminRS/images/resStartProgramm.png b/practice3/SeminRS/images/resStartProgramm.png
new file mode 100644
index 0000000..02d1f18
Binary files /dev/null and b/practice3/SeminRS/images/resStartProgramm.png differ
diff --git a/practice3/SeminRS/images/resultFile1.png b/practice3/SeminRS/images/resultFile1.png
new file mode 100644
index 0000000..b4ea730
Binary files /dev/null and b/practice3/SeminRS/images/resultFile1.png differ
diff --git a/practice3/SeminRS/images/resultFile2.png b/practice3/SeminRS/images/resultFile2.png
new file mode 100644
index 0000000..3fd85f4
Binary files /dev/null and b/practice3/SeminRS/images/resultFile2.png differ
diff --git a/practice3/SeminRS/images/startProgramm.png b/practice3/SeminRS/images/startProgramm.png
new file mode 100644
index 0000000..8195f1a
Binary files /dev/null and b/practice3/SeminRS/images/startProgramm.png differ
diff --git a/practice3/SeminRS/index.html b/practice3/SeminRS/index.html
new file mode 100644
index 0000000..4de524c
--- /dev/null
+++ b/practice3/SeminRS/index.html
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+ ПРАКТИКА 3
+
+
+
+
+
+
+
+
+
Код программы
+
Запуск программы
+
Результат
+
+
+
+
+
Задание
+
+ Дана строка и файл с русским текстом, зашифрованным по правилу,
+ описанному в задании у EltyshevAS. Данная строка представляет собой первую
+ расшифрованную строку текста. Расшифровать остальные строки и заме-
+ нить в файле зашифрованный текст на расшифрованный. Если информа-
+ ции для расшифровки недостаточно, то исходный файл не изменять.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/practice3/SeminRS/result.html b/practice3/SeminRS/result.html
new file mode 100644
index 0000000..2473313
--- /dev/null
+++ b/practice3/SeminRS/result.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+ ПРАКТИКА 3
+
+
+
+
+
+
Результат выполнения программы
+
вернуться к главной
+
+ Дан файл с закодированым сообщением, и 1 раскодированная строка.
+ В данном случае раскодированная строка: "ололо! все работает".
+
+
+ Запускаем программу как показано на рисунке ниже:
+
+
+ Программа сначала находит ключ по которому зашифрован данный файл, потом по этому ключу расшифровывает сообщение и записывает его в файл.
+
+ Результат:
+
+
+
+
+
+
+
diff --git a/practice3/SeminRS/startProgramm.html b/practice3/SeminRS/startProgramm.html
new file mode 100644
index 0000000..df0e838
--- /dev/null
+++ b/practice3/SeminRS/startProgramm.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+ ПРАКТИКА 3
+
+
+
+
+
+
Запуск программы
+
вернуться к главной
+
+
+
+
+
+
+
+
+
diff --git a/practice3/SeminRS/style.css b/practice3/SeminRS/style.css
new file mode 100644
index 0000000..b57fad5
--- /dev/null
+++ b/practice3/SeminRS/style.css
@@ -0,0 +1,51 @@
+#header h1
+{
+ font-size:30px;
+ color:red;
+}
+#header
+{
+ width:100%;
+ text-align:center;
+}
+#body
+{
+ background-image: url('images/background.jpg');
+ width:100%;
+}
+#body a
+{
+ color:red;
+}
+#body h1
+{
+ font-size:20px;
+ color:red;
+}
+#img
+{
+ width:100%;
+ text-align:center;
+}
+/*index.html*/
+#tableInBody
+{
+ width:100%;
+}
+#tableMenu
+{
+ width:30%;
+ text-align:center;
+}
+
+#tableBody
+{
+ padding:5px 5px 5px 5px;
+ vertical-align:top;
+ width:70%;
+}
+#task
+{
+ padding:5px 5px 5px 5px;
+}
+
diff --git a/practice3/web/ex3.html b/practice3/web/ex3.html
new file mode 100644
index 0000000..349e518
--- /dev/null
+++ b/practice3/web/ex3.html
@@ -0,0 +1,63 @@
+
+
+
+
+ Моя вторая веб-страница
+
+
+
+ Практическое задание по web-программированию
+
+
+
Дано целое число K и текстовый файл. Создать строковый файл и запи-
+сать в него все слова длины K из исходного файла. Словом считать набор
+символов, не содержащий пробелов, знаков препинания и ограниченный
+пробелами, знаками препинания или началом/концом строки. Если исход-
+ный файл не содержит слов длины K, то оставить результирующий файл
+пустым.
+
+
+
Листинг программы
+
# coding: utf-8
+filename1 = "file1.txt"
+filename2 = "file2.txt"
+def main(args):
+ ''' главная функция
+ принимает 1 аргумент'''
+ count_i = 0 #Счетчик
+ count_k = 3 #Длинна слова, которое будет записано в фаил'''
+
+ print "Start the programm"
+
+ f1 = open (filename1, "r")
+ f2 = open (filename2, "w")
+
+ for line in f1:
+ print "Current line", line
+ slovo = line.split()
+ print "Current slovo: ", slovo
+ a = len(slovo)
+ print "Current count slov", a
+ for count_i in range(a):
+
+ if slovo[count_i].isalpha() and len(slovo[count_i]) == count_k:
+ print slovo[count_i]
+ f2.write(slovo[count_i]+'\n')
+
+ count_i = count_i + 1
+
+ f2.close()
+if __name__ == '__main__':
+ import sys
+ main(sys.argv[:])
+
Результат работы программы
+
Для чтения, программе предлагался файл вида:
+
Файл для чтения
+
После выполнения программы создавался фаил со словами, удовлетворяющими условию отбора:
+
Результат работы программы
+
+
+
+
+
+
\ No newline at end of file
diff --git a/practice3/web/my.css b/practice3/web/my.css
new file mode 100644
index 0000000..41e556f
--- /dev/null
+++ b/practice3/web/my.css
@@ -0,0 +1,53 @@
+/*.layer1{
+ position: absolute;
+ left: 50px;
+ background: #FDFDFD
+ margin: 20px;
+} */
+
+.layer1{
+ position: absolute;
+ left: 300px;
+ height: 444px;
+ width: 674px;
+ background: url('my2.png');
+
+}
+.layer2{
+ position: relative;
+ top: 50px;
+ margin: 50px;
+ font-size: 18pt;
+ font-style:italic;
+}
+.layer3{
+ position: absolute;
+ top: 550px;
+ height: 1060px;
+ width: 650px;
+ left: 300px;
+ background-color: #ECECEC
+}
+
+.p1{
+ text-align: center;
+ font-size: 20pt;
+ font-style:italic;
+ color: #FF136A;
+}
+.p2{
+ text-align: left;
+ padding-left: 20px;
+}
+.p3{
+ text-align: center;
+}
+body{
+ background-color: #CCCCCC
+}
+h1{
+ text-align: center;
+ font-size: 30pt;
+ text-shadow: black 2px 2px 3px, red 0 0 1em;
+ color: 6262FF;
+}
diff --git a/practice3/web/my2.png b/practice3/web/my2.png
new file mode 100644
index 0000000..1445f4c
Binary files /dev/null and b/practice3/web/my2.png differ
diff --git a/practice3/web/my3.png b/practice3/web/my3.png
new file mode 100644
index 0000000..2d90860
Binary files /dev/null and b/practice3/web/my3.png differ
diff --git a/practice3/web/my4.png b/practice3/web/my4.png
new file mode 100644
index 0000000..673cc75
Binary files /dev/null and b/practice3/web/my4.png differ