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
| public interface IAPIProvider | |
| { | |
| void SearchHotels(); | |
| void GetHotelDetails(); | |
| void GetRoomDetails(); | |
| void GetCancellationPolicies(); | |
| void GetExtraGuestChargeDetails(); | |
| void BlockRoom(); | |
| void BookRoom(); | |
| void GetBookingDetails(); |
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
| (function(node, body){ | |
| node.style.display = 'inline-block'; | |
| node.style.position = 'absolute'; | |
| node.style.height = '0'; | |
| node.style.overflow = 'scroll'; | |
| body.appendChild(node); | |
| body.style.setProperty('--scrollbar', node.offsetWidth + 'px'); | |
| body.removeChild(node); | |
| })(document.createElement('scrollbartester'), document.body); |
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
| // FP Lenses | |
| const lens = get => set => ({ get, set }); | |
| const view = lens => obj => lens.get(obj); | |
| const set = lens => val => obj => lens.set(val)(obj); | |
| const over = lens => fn => obj => set(lens)(fn(view(lens)(obj)))(obj); | |
| const lensProp = key => lens(prop(key))(assoc(key)); |
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 {Component} from '@nestjs/common'; | |
| import {InjectRepository} from '@nestjs/typeorm'; | |
| import {ILabelService} from './ILabelService'; | |
| import {Repository} from 'typeorm'; | |
| import {Label} from '../Models/Label'; | |
| @Component() | |
| export class LabelsService implements ILabelService { |
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
| // dev: andrewroberts.net | |
| // Replace this with ID of your template document. | |
| var TEMPLATE_ID = '' | |
| // var TEMPLATE_ID = '1wtGEp27HNEVwImeh2as7bRNw-tO4HkwPGcAsTrSNTPc' // Demo template | |
| // Demo script - http://bit.ly/createPDF | |
| // You can specify a name for the new PDF file here, or leave empty to use the | |
| // name of the template. Placeholders can also be placed in here. |
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
| /* | |
| * Abstraction.js 2020 Edition | |
| * | |
| * Copyright (c) 2020 "Cowboy" Ben Alman | |
| * Licensed under the MIT license. | |
| * http://benalman.com/about/license/ | |
| */ | |
| let $elseif, $else, $if = state => state ? ( | |
| $elseif = () => () => {}, |
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
| #lang rosette/safe | |
| (require rosette/lib/angelic | |
| (only-in racket/base syntax->datum)) | |
| (define-syntax-rule (define-distinct v x ...) | |
| (begin | |
| (define x v) ... | |
| (assert (distinct? x ...)))) | |
| (define-syntax-rule (list-choices x ... sol) | |
| (list (list (evaluate x sol) (syntax->datum #'x)) ...)) |
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
| library(raster) | |
| library(rayshader) | |
| #Load QGIS georeference image (see https://www.qgistutorials.com/en/docs/3/georeferencing_basics.html) | |
| testindia = raster::stack("1870_southern-india_modified.tif") | |
| #Set bounding box for final map (cut off edges without data, introduced via reprojection) | |
| india_bb = raster::extent(c(68,92,1,20)) | |
| cropped_india = raster::crop(testindia, india_bb) | |
| #Convert to RGB array |
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
| library(deSolve) | |
| library(rayrender) | |
| parameters = c(a = 0.2, b = 4, c = 8, d = 1) | |
| state = c(X = 1, Y = 0, Z = 1) | |
| Lorenz = function(t, state, parameters) { | |
| with(as.list(c(state, parameters)), { | |
| dX = -Y^2 - Z^2 - a*X + a*c | |
| dY = X * Y - b * X * Z - Y + d | |
| dZ = b * X * Y + X * Z - Z |
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 * as fs from 'fs'; | |
| import * as path from 'path'; | |
| import * as cdk from '@aws-cdk/core'; | |
| import * as lambda from '@aws-cdk/aws-lambda-nodejs'; | |
| import * as kms from '@aws-cdk/aws-kms'; | |
| import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; | |
| import * as acm from '@aws-cdk/aws-certificatemanager'; | |
| import * as alias from '@aws-cdk/aws-route53-targets'; | |
| import * as iam from '@aws-cdk/aws-iam'; | |
| import * as api from '@aws-cdk/aws-apigatewayv2'; |