Skip to content

Instantly share code, notes, and snippets.

View aman-roy's full-sized avatar
:octocat:
Building

Aman Roy aman-roy

:octocat:
Building
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
aman-roy / upload.sh
Last active December 30, 2019 17:23
upload files via terminal using file.io API
# Upload file via terminal using file.io
# Author : Aman Roy (https://github.com/aman-roy)
upload () { if [ $# = 1 -o $# = 2 ];then if [ -f "$1" ];then if [ $# = 1 ];then curl -F "file=@$1" https://file.io/ ;else if [[ "$2" =~ ^[1-9]+[wmy]$ ]];then curl -F "file=@$1" https://file.io/\?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 (https://keybase.io/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: