add hash function to xonshrc
This commit is contained in:
parent
b84d0ff2c5
commit
2b65967dd1
1 changed files with 8 additions and 0 deletions
8
.xonshrc
8
.xonshrc
|
@ -74,3 +74,11 @@ def plot(f, a:float=0.0, b:float=10.0, n:int=300):
|
||||||
plt.plot(x, list(map(f, x)))
|
plt.plot(x, list(map(f, x)))
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
|
import hashlib
|
||||||
|
|
||||||
|
def md5(val:str=None)->str:
|
||||||
|
if val is None:
|
||||||
|
val = input("Value: ")
|
||||||
|
val = val.encode()
|
||||||
|
return hashlib.md5(val).hexdigest()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue