with npx @docusaurus/init@latest init website classic
i18n: {
defaultLocale: 'en',
locales: ['en', 'it'],
localeConfigs: {
en: {
| from pytube import YouTube | |
| YouTube('https://youtu.be/dQw4w9WgXcQ').streams.first().download() |
In this tutorial, I will be going over to how to deploy a Django app from start to finish using AWS and EC2. Recently, my partner Tu and I launched our app Hygge Homes (a vacation home rental app for searching and booking vacation homes based off Airbnb) and we wanted to share with other developers some of the lessons we learned along the way.
Following this tutorial, you will have an application that has:
A simple hook to create a "lazy request" hook using swr.
! This isn't perfect !
The problem with the example below is that you need to know your variables when you call useLazyRequest. This might not work in all situations, for instance, if your component is getting the variables from state that might change. This could be fixed by putting the call to useLazyRequest within a child component that receives those variables as props.
See the typescript example below.
Not fully tested, I just wrote this on the fly. If you have any suggestions, please add them in a comment!
9f92971b-cd2e-4feb-9053-0b14d53ac4f5| """TypedEnum : type preserving enumeration metaclass.""" | |
| class TypedEnum(type): | |
| """This metaclass creates an enumeration that preserves isinstance(element, type).""" | |
| def __new__(mcs, cls, bases, classdict): | |
| """Discover the enum members by removing all intrinsics and specials.""" | |
| object_attrs = set(dir(type(cls, (object,), {}))) | |
| member_names = set(classdict.keys()) - object_attrs | |
| member_names = member_names - set(name for name in member_names if name.startswith("_") and name.endswith("_")) |
| import { useReducer, useEffect } from 'react'; | |
| type LoadingAction = { | |
| type: 'LOADING'; | |
| }; | |
| type SuccessAction<T> = { | |
| type: 'SUCCESS'; | |
| data: T; | |
| }; |
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Here we write upgrading notes for brands. It's a team effort to make them as