<form class="form-login login" method="POST" action="{% url 'login' %}">
{% csrf_token %}
<div class="form__input">
<div class="form__input_gr">
<input type="text" name="username" id="username" placeholder="Login" required>
<i class="fas fa-user"></i>
</div>
</div>
<div class="form__input" >
<div class="form__input_gr">
<input type="password" name="password" id="password" placeholder="Password" required>
<i class="fas fa-lock"></i>
</div>
</div>
<div class="form__input">
<input type="submit" value="Войти">
</div>
</form>
requests.post("http://127.0.0.1:9000/attack/start", data=json.dumps(params))
# или с версии 2.4.2
requests.post("http://127.0.0.1:9000/attack/start", json=params)
Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Zero Based Compressed Oops mode in which the Java heap is
# placed in the first 32GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 32GB virtual address.
import re
def to_seconds(instr: str) -> int:
FORMAT = {
'\D?(\d+)s': lambda x: x,
'\D?(\d+)m': lambda x: 60 * x,
'\D?(\d+)h': lambda x: 60 * 60 * x,
'\D?(\d+)d': lambda x: 24 * 60 * 60 * x,
'\D?(\d+)w': lambda x: 7 * 24 * 60 * 60 * x,
}
outstr = 0
for key in FORMAT:
if re.search(key, instr):
outstr += FORMAT[key](int(re.search(key, instr).group(1)))
return outstr
str1 = "3w3d12h12m40s"
print(to_seconds(str1))