On every machine in the cluster install openmpi and mlx-lm:
conda install conda-forge::openmpi
pip install -U mlx-lmNext download the pipeline parallel run script. Download it to the same path on every machine:
On every machine in the cluster install openmpi and mlx-lm:
conda install conda-forge::openmpi
pip install -U mlx-lmNext download the pipeline parallel run script. Download it to the same path on every machine:
| <?php declare(strict_types = 1); | |
| namespace App\Tests; | |
| use Closure; | |
| use PHPUnit\Framework\Assert; | |
| use ReflectionClass; | |
| use ReflectionFiber; | |
| use ReflectionFunction; | |
| use ReflectionGenerator; |
| script:pre-request { | |
| const { login } = require('./utils') | |
| await login(req) | |
| } | |
See the new site: https://postgresisenough.dev
| # Alpine image is smaller but Prisma is broken on M1 https://github.com/prisma/prisma/issues/8478 | |
| # FROM node:18-alpine AS builder | |
| # RUN apk update | |
| # RUN apk add --no-cache openssl | |
| FROM node:18-slim AS runner | |
| RUN apt-get update \ | |
| && apt-get install -y openssl | |
| ENV NODE_ENV production | |
| ENV NEXT_TELEMETRY_DISABLED 1 |
Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.
You use Next.js router like normally, but don't define getStaticProps and such. Instead you do client-only fetching with swr, react-query, or similar methods.
You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)
Don't like Next? Here's how to do the same in Gatsby.
| // Regular expression patterns for testing content-type response headers. | |
| var RE_CONTENT_TYPE_JSON = new RegExp( "^application/(x-)?json", "i" ); | |
| var RE_CONTENT_TYPE_TEXT = new RegExp( "^text/", "i" ); | |
| // Static strings. | |
| var UNEXPECTED_ERROR_MESSAGE = "An unexpected error occurred while processing your request."; | |
| export class ApiClient { | |
| /** | |
| * I initialize the API client. |
| import { captureException, flush } from '@sentry/nextjs'; | |
| import NextErrorComponent from 'next/error'; | |
| import type { ErrorProps } from 'next/error'; | |
| import type { NextPage } from 'next'; | |
| interface AppErrorProps extends ErrorProps { | |
| err?: Error; | |
| hasGetInitialPropsRun?: boolean; | |
| } |
| /* | |
| * MIT License | |
| * | |
| * Copyright (c) 2023-2024 Fabio Lima | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |