Skip to content

Instantly share code, notes, and snippets.

View fullmetalsheep's full-sized avatar
:octocat:
Always grateful to be standing on the shoulders of giants.

Dash fullmetalsheep

:octocat:
Always grateful to be standing on the shoulders of giants.
View GitHub Profile
@bschwartz757
bschwartz757 / async.js
Last active November 15, 2023 03:23
Async/await function to fetch data from multiple URLs in parallel
/* Client side, works in Chrome 55 and Firefox 52 without transpilation */
//https://blogs.msdn.microsoft.com/typescript/2016/11/08/typescript-2-1-rc-better-inference-async-functions-and-more/
async function fetchURLs() {
try {
// Promise.all() lets us coalesce multiple promises into a single super-promise
var data = await Promise.all([
/* Alternatively store each in an array */
// var [x, y, z] = await Promise.all([
// parse results as json; fetch data response has several reader methods available:
//.arrayBuffer()
@Hellowlol
Hellowlol / IMDb top 250
Last active January 18, 2019 19:03
top250
from plexapi.server import PlexServer
from imdbpie import Imdb
baseurl = 'http://10.0.0.97:32400'
token = ''
plex = PlexServer(baseurl, token)
imdb = Imdb()
top = imdb.top_250()