init
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,35 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="E501" />
|
||||
<option value="E305" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyShadowingBuiltinsInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="ignoredNames">
|
||||
<list>
|
||||
<option value="help" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyStubPackagesAdvertiser" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredPackages">
|
||||
<list>
|
||||
<option value="PyQt5-stubs==5.15.6.0" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyUnreachableCodeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredIdentifiers">
|
||||
<list>
|
||||
<option value="telebot.TeleBot.*" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (Regex - 3)" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/Regex - 3.iml" filepath="$PROJECT_DIR$/.idea/Regex - 3.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,79 @@
|
||||
import random
|
||||
import re
|
||||
|
||||
|
||||
def generateEmojiByISU(isu):
|
||||
eyes = [":", ";", "X", "8", "="]
|
||||
nose = ["-", "<", "-{", "<{"]
|
||||
month = ["(", ")", "O", "|", "\\", "/", "P"]
|
||||
return eyes[isu % 5] + nose[isu % 4] + month[isu % 7]
|
||||
|
||||
|
||||
def generateTestEmojiStr():
|
||||
list = ["hello", "world", "kotlin", "is", "cool", "and", "fun", "---", "I", "like", "it", "a", "lot"]
|
||||
count = random.randrange(start=2, stop=6)
|
||||
print("Emoji count expected = " + str(count))
|
||||
print("emoji = " + "\"" + generateEmojiByISU(isu) + "\"")
|
||||
for i in range(count):
|
||||
list.append(generateEmojiByISU(isu))
|
||||
random.shuffle(list)
|
||||
teststr = ' '.join(list)
|
||||
print("Autotest str: \"", teststr, "\"", sep="")
|
||||
countEmoji(teststr)
|
||||
|
||||
|
||||
def countEmoji(emojistring):
|
||||
print("Emoji count = " + re
|
||||
.findall(generateEmojiByISU(isu), emojistring).__len__().__str__())
|
||||
|
||||
|
||||
print("1 task\n")
|
||||
print("ISU Number: ", end="")
|
||||
isu = int(input())
|
||||
generateTestEmojiStr()
|
||||
|
||||
print("\ndop task 1")
|
||||
print("Variant №" + str(isu % 6) + " //isu number doesn't matter")
|
||||
|
||||
|
||||
def generateVT():
|
||||
return random.choice(["ВТ - лучшая кафедра ИТМО", "ВТ - ван лав ИТМО", "ВТ плюс ИТМО = ♥"])
|
||||
|
||||
|
||||
def generateText(log=False):
|
||||
list = ["Университет", "Привет", "Другие, ", "ВТ вообще не очень хорошая кафедра ИТМО, но в в принципе ок",
|
||||
"Слова, ", "Текст", "Студент", "Осмысленность.", "вф", ":):):)", "Ректор", "qowei@niuitmo.tu"]
|
||||
count = random.randrange(start=1, stop=2)
|
||||
if log:
|
||||
print("Count expected = " + str(count))
|
||||
for i in range(count):
|
||||
list.append(generateVT())
|
||||
random.shuffle(list)
|
||||
teststr = ' '.join(list)
|
||||
if log:
|
||||
print("Autotest str: \"", teststr, "\"", sep="")
|
||||
return teststr
|
||||
|
||||
|
||||
def countVT():
|
||||
print("Count = " + re.findall(r"ВТ(\s*?\S*?\s*?){1,4}ИТМО", generateText(True)).__len__().__str__())
|
||||
print((re.findall(r"ВТ(?:\s*?\S*?\s*?){1,4}ИТМО", generateText())[0]))
|
||||
|
||||
|
||||
countVT()
|
||||
|
||||
print("\ndop task 2")
|
||||
print("Variant №" + str(isu % 4) + " //isu number doesn't matter")
|
||||
|
||||
|
||||
def generateExpr():
|
||||
return str(random.randint(0, 100)) + " + " + str(random.randint(0, 100)) + " = " + str(random.randint(0, 100))
|
||||
|
||||
def expr():
|
||||
exp = generateExpr()
|
||||
print("Autotest str: " + exp)
|
||||
find = re.findall(r"\d+", exp)
|
||||
result = str(3*int(find[0])**2 + 5) + " + " + str(3*int(find[1])**2 + 5) + " = " + str(3*int(find[2])**2 + 5)
|
||||
print(result)
|
||||
|
||||
expr()
|
||||
Reference in New Issue
Block a user