This file contains hidden or 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
class AsyncIterator { | |
constructor(callback, endCallback, items) { | |
this.currentItem = -1; | |
this.items = items; | |
this._callback = callback; | |
this._endCallback = endCallback; | |
} |
This file contains hidden or 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
import requests | |
import urllib.parse as urlparse | |
import validators | |
import bs4 | |
def meta_redirect(content): | |
soup = bs4.BeautifulSoup(content, 'html.parser') | |
result = soup.find("meta", attrs={"http-equiv": "Refresh"}) |
This file contains hidden or 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
import argparse | |
from io import BytesIO | |
import requests | |
import uuid | |
import exifread as ef | |
import json | |
class bcolors: | |
HEADER = '\033[95m' |
This file contains hidden or 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
https://api.ellibs.com/v1.3/json/patronAuth/app12480 | |
https://api.ellibs.com/v1.3/json/listCollections/app12480 | |
Auth: Basic (app12480:ZWXqi30gc78ifBcrTf9uSasw6dSWwFt7itsYPkbwa3Lq) | |
Login POST: | |
id: library id | |
patron_id: library card number | |
password: pin-code or password |
This file contains hidden or 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
import requests | |
import requests.utils | |
import os.path | |
"""Filename""" | |
filename = "sanavarasto.txt" | |
abittiUsername = "" | |
abittiPassword = "" |
This file contains hidden or 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
https://www.amica.fi/api/restaurant/menu/recipe?language=fi&recipeId=7088 |
This file contains hidden or 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
API for finding "Kitchens": | |
https://fi.jamix.cloud/apps/menuservice/rest/haku/public | |
API for reading the table: | |
http://fi.jamix.cloud/apps/menuservice/rest/haku/menu/<customerID>/<kitchenID>?lang=fi | |
GET Params: | |
lang, language (fi, or en). Default = en. | |
type, json or table. Default = json. |
This file contains hidden or 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
'use strict'; | |
parameters = function() { | |
/** @type {(Array<string>|null)} */ | |
var o = document.location.toString().match(/docview\/(\d+)\/(\d+)/i); | |
/** @type {string} */ | |
var hasBaseRule = o[2]; | |
/** @type {string} */ | |
var onetype = o[1]; | |
/** @type {number} */ | |
var ex = Math.round((Date.now() + (new Date).getTimezoneOffset()) / 1000) + 24 * 60 * 60; |