Skip to content

Instantly share code, notes, and snippets.

@jaeseokan94
jaeseokan94 / gist:23b1017f108e67dd0f55ece425bc0253
Created July 23, 2019 16:38
output for seats_case_normal_and_entrance.js
[ { category: '104', availableGroups: 1 },
{ category: '105', availableGroups: 0 },
{ category: '106', availableGroups: 0 },
{ category: '204', availableGroups: 0 },
{ category: '206', availableGroups: 1 },
{ category: '207', availableGroups: 1 },
{ category: '208', availableGroups: 3 },
{ category: '209', availableGroups: 2 },
{ category: '210', availableGroups: 1 },
{ category: '211', availableGroups: 1 },
[ { category: 'Ebene 1', availableGroups: 5 },
{ category: 'Ebene 2', availableGroups: 4 },
{ category: 'Ebene 3', availableGroups: 4 },
{ category: 'Ebene 4', availableGroups: 1 } ]
@jaeseokan94
jaeseokan94 / gist:d7e9c03827fd0a3b4915db2c0e4672de
Created July 23, 2019 16:39
output for seats with letters
[ { category: 'Platea Destra', availableGroups: 30 },
{ category: 'Platea Sinistra', availableGroups: 26 },
{ category: 'Palco I ord. Des.', availableGroups: 6 },
{ category: 'Palco I ord. Sin.', availableGroups: 8 },
{ category: 'Palco II ord. Des.', availableGroups: 12 },
{ category: 'Palco II ord. Sin.', availableGroups: 12 },
{ category: 'Palco III ord. Des.', availableGroups: 8 },
{ category: 'Palco III ord. Sin.', availableGroups: 11 },
{ category: 'Palco IV ord. Des.', availableGroups: 1 },
{ category: 'Palco IV ord. Sin.', availableGroups: 4 },
output for seats_case_normal_entrance
[ { category: '104', availableGroups: 0 },
{ category: '105', availableGroups: 0 },
{ category: '106', availableGroups: 0 },
{ category: '204', availableGroups: 0 },
{ category: '206', availableGroups: 0 },
{ category: '207', availableGroups: 0 },
{ category: '208', availableGroups: 0 },
@jaeseokan94
jaeseokan94 / log.py
Created August 20, 2019 10:18 — forked from nguyenkims/log.py
Basic example on how setup a Python logger
import logging
import sys
from logging.handlers import TimedRotatingFileHandler
FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
LOG_FILE = "my_app.log"
def get_console_handler():
console_handler = logging.StreamHandler(sys.stdout)
console_handler.setFormatter(FORMATTER)
raw
https://www.airbnb.co.uk/api/v3?locale=en-GB&currency=GBP&operationName=ExploreSearch&variables=%7B%22request%22%3A%7B%22metadataOnly%22%3Afalse%2C%22version%22%3A%221.7.5%22%2C%22itemsPerGrid%22%3A20%2C%22tabId%22%3A%22home_tab%22%2C%22refinementPaths%22%3A%5B%22%2Fhomes%22%5D%2C%22source%22%3A%22structured_search_input_header%22%2C%22searchType%22%3A%22unknown%22%2C%22checkin%22%3A%222020-05-16%22%2C%22checkout%22%3A%222020-05-18%22%2C%22neLat%22%3A%2251.30192289230549%22%2C%22neLng%22%3A%22-1.5031825370876106%22%2C%22swLat%22%3A%2251.05915749554505%22%2C%22swLng%22%3A%22-2.1843348808376106%22%2C%22searchByMap%22%3Atrue%2C%22query%22%3A%22Warminster%2C%20United%20Kingdom%22%2C%22cdnCacheSafe%22%3Afalse%2C%22simpleSearchTreatment%22%3A%22simple_search_only%22%2C%22treatmentFlags%22%3A%5B%5D%2C%22screenSize%22%3A%22large%22%7D%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%22e1e26d9e1e9f243a25403004b402659bd03288115d90a3922b5ddf22e4725045%22%7D%7D
parsed variables
loca
@jaeseokan94
jaeseokan94 / airbnb-calculator.js
Created August 29, 2020 16:41
Airbtics Airbnb calculator - v1
function calculateRev(values){
let valuesLen = Object.keys(values).length;
if (valuesLen < 13){
console.log("not enough filled ", valuesLen)
return false
}
for (var key in values) {
values[key] = Number(values[key])
}
'<!doctype html>\n<html lang=en>\n<head>\n <title>Beautifully Restored Barn; Combining Original Features &amp; high tech for comfort - Marlborough</title>\n <meta charset="utf-8"/>\n <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">\n\n <meta name="referrer" content="no-referrer-when-downgrade">\n\n <meta name="description" content="Restored Barn in Aldbourne, Nr. Marlborough - Beautiful Views, With 10 minute walk to village and within an hour of Oxford, Bath, Stonehenge and Avebury - $161 avg/night - Marlborough - Amenities include: Internet, TV, Satellite or cable, Parking, No Smoking, Heater \xe2\x9c\x93 Bedrooms: 2 \xe2\x9c\x93 Sleeps: 4 \xe2\x9c\x93 Minimum stay from 1 night(s) \xe2\x9c\x93 Bookable directly online - Book vacation rental 8120154 with Vrbo.">\n\n\n\n <link rel="preconnect" href="https://csvcus.homeaway.com" crossorigin>\n <link rel="preconnect" href="https://odis.homeaway.com">\n <link rel="preconnect" href="https://www.goo
listingID crawled_on prices calendar_avail
44492053 2021-01-13 ['85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '85', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115', '115'
{'content-type': 'application/json', 'x-airbnb-api-key': 'd306zoyjsyarp7ifhu67rjxn52tv0t20', 'x-airbnb-graphql-platform': 'web', 'x-csrf-without-token': '1', 'cookie': 'bev=1601633722_ZmY2OTg4YzM1YzRh; tzo=540; _ga=GA1.2.1749302054.1601633724; fbm_138566025676=base_domain=.airbnb.com; __ssid=a859795071a58952103dba93d47a504; _gcl_au=1.1.1446021098.1601633725; affiliates_bev=1601633726_esqEwZAL7EcP3rt1; sdid=; abb_fa2=%7B%22user_id%22%3A%2243%7C1%7CmdCdm%2FFE%2BvXJPwaOJC0Yw3AnuC4ZpSx32pZWX%2F7EccrcXz%2F9FvV1xQ%3D%3D%22%7D; har=1; cdn_exp_b1b38777d5c7a308a=initializers; hli=1; cdn_exp_283a19eb11edcad71=treatment; sticky_locale=en; cdn_exp_140d70271b981c913=treatment; cdn_exp_24332663b5ca816ee=treatment; cdn_exp_ccb7b37b3b52596ae=treatment; cdn_exp_34332663b5ca816ee=treatment; cdn_exp_da1663c66e2988797=treatment_2; country=KR; OptanonAlertBoxClosed=NR; amplitude_id_cb82620a40fd4087c9928deaa540a3d0airbnb.com=eyJkZXZpY2VJZCI6ImYzZjRjYmNjLTIyMTUtNDdmZC04ZWU1LTg5YzA0OTFiZmE2M1IiLCJ1c2VySWQiOm51bGwsIm9wdE91dCI6ZmFsc2U