This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! 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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! 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) |