Skip to content

Instantly share code, notes, and snippets.

View Aayush-N's full-sized avatar
👋
Available!

Aayush Nandkeolyar Aayush-N

👋
Available!
  • Bangalore,India
View GitHub Profile
var jwt = require('jsonwebtoken');
var request = require('request');
var token = jwt.sign(
{
jti: "d8661a14-4b7c-5fda-2227-9b055fcf5b10",
iss: "API KEY",
sub: "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
exp: Math.floor(Date.now() / 1000) + (60 * 10)
}
@Aayush-N
Aayush-N / luck_search.py
Last active February 8, 2018 12:23
Opens multiple tabs with top Google Search links for the given text
#! python3
# luckySearch.py - Opens several google search results
import requests, sys, webbrowser, bs4
search = input("Enter the text to be searched: ")
print('Googling...')
res = requests.get('http://google.com/search?q=' + ' '.join(search))
res.raise_for_status()
print('downloaded')
@Aayush-N
Aayush-N / weather.py
Created February 8, 2018 12:17
Quick Weather Data
#! python3
# quickWeather.py - Prints the weather for a location from the command line
import json, requests
location = input("Enter the location")
#Download the JSON data
url = 'http://api.openweathermap.org/data/2.5/forecast/daily?q=%s&cnt=3&APPID=<GET YOUR OWN API ID>' % (location)
response = requests.get(url)