- Create a Fast.ai machine from public templates w/ P4000 and public IP
- $ source deactivate fastai
- $ pip install virtualenv
const { InMemoryLRUCache } = require("apollo-server-caching"); | |
class SQLCache { | |
constructor(cache = new InMemoryLRUCache()) { | |
this.cache = cache; | |
} | |
async knexPlugin(knexThen, ctx, args) { | |
const isSelectStatement = ctx._method === "select"; |
const { InMemoryLRUCache } = require("apollo-server-caching"); | |
const DataLoader = require("dataloader"); | |
class SQLCache { | |
constructor(cache = new InMemoryLRUCache(), knex) { | |
this.cache = cache; | |
this.loader = new DataLoader(queries => | |
Promise.all(queries.map(query => knexInstance.raw(query))) | |
); | |
} |
""" | |
Train a neural network to implement the discrete Fourier transform | |
""" | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from tensorflow.keras.layers import Dense | |
from tensorflow.keras.models import Sequential | |
N = 32 | |
batch = 10000 |
[@bs.val] [@bs.scope ("module")] | |
external isHotEnabled : bool = "hot"; | |
[@bs.val] [@bs.scope ("module", "hot")] external hotAccept : unit => unit = "accept"; | |
ReactDOMRe.renderToElementWithId(<App />, "root"); | |
if (isHotEnabled) { | |
hotAccept(); | |
} |
const Bundler = require('parcel-bundler'); | |
const childProcess = require('child_process'); | |
const file = 'index.js'; | |
const options = {}; | |
const bundler = new Bundler(file, options); | |
const runBundle = process.argv.includes('run'); | |
let bundle = null; |
Steps to publish a npm package to beta that won't be available via latest and won't auto install on ncu updates etc
npm run dist
etc"version": "0.1.120-beta.1"
where beta.x is the number of those betasnpm publish --tag beta
There are two options for install:
npm install packagename@beta
npm install [email protected]
// I'm suggesting we add a new "adopt X from <Y />" syntax to the JSX language | |
// it would de-sugar to render prop children, but look and read better than | |
// what we currently have. For example: | |
// 1. | |
// this sugar | |
function MyComponent(props) { | |
adopt foo from <Bar />; | |
return <div>{foo}</div>; | |
} |
First of all, please note that token expiration and revoking are two different things.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC: