To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
import { | |
GetSecretValueCommand, | |
SecretsManagerClient, | |
} from '@aws-sdk/client-secrets-manager'; | |
import fs from 'fs'; | |
import path from 'path'; | |
// usage npx tsx taskdef-to-env.ts path/to/ecs/task-definition.json | |
// outputs: /path/to/ecs/.env.local | |
// expects aws to be configured (see aws-vault) |
import argparse | |
import numpy as np | |
import torch | |
import torch.nn as nn | |
import coremltools as ct | |
from transformers import AutoTokenizer, AutoModelForCausalLM | |
# When using float16, all predicted logits are 0. To be debugged. | |
compute_precision = ct.precision.FLOAT32 | |
compute_units = ct.ComputeUnit.CPU_ONLY |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
import streamlit as st | |
import concurrent.futures # We'll do computations in separate processes! | |
import mymodule # This is where you'll do the computation | |
# Your st calls must go inside this IF block. | |
if __name__ == '__main__': | |
st.write("Starting a long computation on another process") | |
# Pick max number of concurrent processes. Depends on how heavy your computation is, and how | |
# powerful your machine is. |
I have spent quite a bit of time figuring out automounts of NFS shares in OS X...
Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:
/etc/auto_master (see last line):
#
# Automounter master map
#
+auto_master # Use directory service
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
#!/usr/bin/env bash | |
if [ "$EUID" -ne 0 ] && groups | grep -qwv 'i2c' && getent group i2c &> /dev/null | |
then | |
echo "Insuficient permissions, run as root ou join $USER to i2c group." | |
exit 1 | |
fi | |
case "$1" in |
# $ apt install rdiff | |
# $ rdiff --help | |
# Usage: rdiff [OPTIONS] signature [BASIS [SIGNATURE]] | |
# [OPTIONS] delta SIGNATURE [NEWFILE [DELTA]] | |
# [OPTIONS] patch BASIS [DELTA [NEWFILE]] | |
# Options: | |
# -v, --verbose Trace internal processing | |
# -V, --version Show program version | |
# -?, --help Show this help message |
以下転載: