Tired of writing console.log when debugging React? Want to use a debugger with breakpoints, stopping React and taking the time to analyze variables?
Welcome to adding a debugger for frontend development:)
| # Verify at https://github.com/Andrew-Chen-Wang/factory-boy-django-async | |
| import inspect | |
| import factory | |
| from asgiref.sync import sync_to_async | |
| from django.db import IntegrityError | |
| from factory import errors | |
| from factory.builder import BuildStep, StepBuilder, parse_declarations |
When I first set up Listmonk it was to use with Amazon SES. At the time Amazon would give you free 62,000 emails/mo if you sent them from an EC2 instance. So EC2 was the best server to use. In mid 2023 Amazon ended that, so now you can use whatever server you like, which makes things much easier. It shouldn't be too hard to convert these directions to another server host of your choice.
I used Hetzner with another build, and once my free EC2 year ended the AWS t2.micro cost me $14/mo. Hetzner has better specs and costs me $5/mo, so I added an nginx vhost and moved listmonk to the same server. Here's a $20 credit for Hetzner.
There is also the possibility to use the 1-click installers for their featured hosts: https://listmonk.app/ - listed under "Hosting providers". I'm not familiar with any of them but there are lots of new guides
| from bs4 import BeautifulSoup | |
| # remove all attributes | |
| def _remove_all_attrs(soup): | |
| for tag in soup.find_all(True): | |
| tag.attrs = {} | |
| return soup | |
| # remove all attributes except some tags | |
| def _remove_all_attrs_except(soup): |
| """ | |
| Created by: @Andrew-Chen-Wang | |
| Parallel calling OpenAI with rate limit handling. | |
| Required packages: | |
| - openai | |
| - tenacity (optional if you remove the decorators. Useful for 500 errors) | |
| Usage: | |
| You must call with with_raw_response to get rate limit headers like: |
This script fetches all of the files from the currently deployed version of a Firebase Hosting site. You must be signed in via the Firebase CLI and have "Site Viewer" permission on the site in question to be able to properly run the script.
npx https://gist.github.com/mbleigh/9c8680cf319ace2f506f57380da66e7d <site_name>
| import { SelectQueryBuilder } from "kysely"; | |
| import { DB } from "db"; | |
| /* | |
| // From kysely-codegen | |
| export type Generated<T> = T extends ColumnType<infer S, infer I, infer U> | |
| ? ColumnType<S, I | undefined, U> | |
| : ColumnType<T, T | undefined, T>; | |
| export type Int8 = ColumnType<string, bigint | number | string, bigint | number | string>; |
| import uuid | |
| import random | |
| from datetime import datetime, UTC | |
| def encode_time_fields(dt: datetime) -> int: | |
| year = dt.year | |
| month = dt.month | |
| hour = dt.hour | |
| minute = dt.minute | |
| millisecond = dt.microsecond // 1000 |
| abandoned | |
| able | |
| absolute | |
| adorable | |
| adventurous | |
| academic | |
| acceptable | |
| acclaimed | |
| accomplished | |
| accurate |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare git@github.com:usi-systems/easytrace.git