Skip to content

Instantly share code, notes, and snippets.


Aman Roy aman-roy

View GitHub Profile
#!/usr/bin/env python
import sys
import matplotlib.pyplot as plt
from matplotlib.pyplot import xticks, yticks
# marks to band conversion for listening
def get_band_listening(marks):
if marks>=39: return 9.0
elif marks >= 37: return 8.5
aman-roy /
Last active Dec 30, 2019
upload files via terminal using API
# Upload file via terminal using
# Author : Aman Roy (
upload () { if [ $# = 1 -o $# = 2 ];then if [ -f "$1" ];then if [ $# = 1 ];then curl -F "file=@$1" ;else if [[ "$2" =~ ^[1-9]+[wmy]$ ]];then curl -F "file=@$1"\?expires=$2;else echo $'Wrong expiration format.\neg. 1(w/m/y), etc.';fi;fi;else echo "file doesn't exist";fi;else echo $'usage: upload file_name.ext [expiration]\nexpiration format: 1-9(w/m/y) # (w)eeks, m(onths), (y)ear';fi }

Keybase proof

I hereby claim:

  • I am aman-roy on github.
  • I am amanroy ( on keybase.
  • I have a public key whose fingerprint is 3D47 9FD4 E127 528A C5ED 599A 3E0F 4707 D0DD 596E

To claim this, I am signing this object: