import re
def is_password_valid(password):
return bool(re.search('(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[+\-*\/])', password))
print(is_password_valid("&"))
print(is_password_valid("shsgddg+-/*GGH"))
print(is_password_valid("Aa1+"))
import re
def is_val(pas):
is_ok1 = bool(re.search("[a-z]",pas))
is_ok2 = bool(re.search("[A-Z]",pas))
is_ok3 = bool(re.search("[0-9]",pas))
is_ok4 = bool(re.search("[+\-*\/]",pas))
return is_ok1 and is_ok2 and is_ok3 and is_ok4
print(is_val("asd"))
print(is_val("shsgddg+-/*GGH"))
print(is_val("1Aa1+"))
print(is_val("sh12sgddg+-/*GGH"))
class Person:
def setName(self, name):
self.name = name
return self ## this is what makes this work
def setAge(self, age):
self.age = age;
return self;
def setSSN(self, ssn):
self.ssn = ssn
return self
p = Person()
p.setName("Hunter")
.setAge(24)
.setSSN("111-22-3333")
import re
import json
string ='''<script>
window.settings ={"feedPrefix":"dnevnik","rootUrl":"https://kundelik.kz","apiUrl":"https://kundelik.kz/api","environmentPrefix":"kz"};
</script>'''
r = re.search("window.settings =(.*);", string)
if r:
dic = json.loads(r.groups()[0])
print(dic["feedPrefix"])
from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
x = sc.fit_transform(x)
y = sc.fit_transform(y)