Skip to content

Instantly share code, notes, and snippets.

View Kannanravindran's full-sized avatar
🐼
Digital Nomad

Kannan Ravindran Kannanravindran

🐼
Digital Nomad
  • Arizona state University
  • Phoenix, Arizona
View GitHub Profile
@Kannanravindran
Kannanravindran / procasti_nation.sh
Last active January 10, 2019 11:11
Bit bar plugin to monitor how much time we got left
#!/bin/sh
# add this to your bitbar directory
# don't forget to chmod +x
# Enter your age here for life percentage
dob="0"
# width and characters for the progress bars
# feel free to configure these
width=30
import requests
url = 'http://ES_search_demo.com/document/record/_search?pretty=true'
data = '{"query":{"bool":{"must":[{"text":{"record.document":"SOME_JOURNAL"}},{"text":{"record.articleTitle":"farmers"}}],"must_not":[],"should":[]}},"from":0,"size":50,"sort":[],"facets":{}}'
response = requests.get(url, data=data)
response = request.post(url , data)
def slackpush(data):
# print data
global bufferflush
global datalist
global eof
if eof == '':
pass
else:
data = data.partition(eof)[2]
print data