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
openapi: 3.0.3 | |
info: | |
title: Bookify API | |
description: | | |
Welcome to the official API documentation for Bookify! This guide provides everything you need to integrate our comprehensive appointment booking and resource management system into your applications. | |
## Overview | |
Bookify provides a powerful, flexible API for managing: | |
- **Resources**: The people (employees) and things (assets like rooms or equipment) that can be booked. | |
- **Services**: The specific offerings that your customers can book, each with its own rules, duration, and price. |
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
// Design a book management system for a library | |
// Patterns used: | |
// 1) Singleton- LibraryDIServiceProvider and PaymentProcessorFactory | |
// 2) Factory- PaymentProcessorFactory generates UPIPaymentProcessor or CashPaymentProcessor- returns as IPaymentProcessor | |
// 3) Dependency Injection / Inversion- All dependencies are injected by LibraryDIServiceProvider- no tight coupling. | |
// 4) Higher level classes do not depend on lower level classes directly- they depend on their abstractions | |
// 5) Adapter: IDBAdapter, SQLiteDBAdapter (no tight coupling to specific implementation) | |
// Enums |
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
user@ubuntuserver:~/open-webui$ sudo docker-compose logs cloudflared | |
Attaching to cloudflared | |
cloudflared | 2024-08-05T06:56:45Z INF Starting tunnel tunnelID=eb47579d-e4e0-4083-a31f-4fc0db55a7fd | |
cloudflared | 2024-08-05T06:56:45Z INF Version 2024.6.1 | |
cloudflared | 2024-08-05T06:56:45Z INF GOOS: linux, GOVersion: go1.22.2-devel-cf, GoArch: amd64 | |
cloudflared | 2024-08-05T06:56:45Z INF Settings: map[no-autoupdate:true] | |
cloudflared | 2024-08-05T06:56:45Z INF Environmental variables map[TUNNEL_TOKEN:*****] | |
cloudflared | 2024-08-05T06:56:45Z INF Generated Connector ID: 0daaf0d0-1f79-4ede-b8e6-907be76b8c37 | |
cloudflared | 2024-08-05T06:56:45Z INF Initial protocol quic | |
cloudflared | 2024-08-05T06:56:45Z INF ICMP proxy will use 172.19.0.4 as source for IPv4 |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
// Create some sample notifications for testing | |
var list1 = new List<IGlobalNotification> |
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
def best_hand(hand): | |
"From a 7-card hand, return the best 5 card hand." | |
combos = itertools.combinations(hand, 5) | |
return max(combos, key=hand_rank) | |
def best_wild_hand(hand): | |
"Try all values for jokers in all 5-card selections." | |
black_suit, red_suit, ranks = ['C', 'S'], ['H', 'D'], ['2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A'] | |
wild_dict = {'?B': [rank+suit for suit in black_suit for rank in ranks], | |
'?R': [rank+suit for suit in red_suit for rank in ranks]} |