- Docker inserts iptables rules when it's started by default
- buster uses nftables by default
- let's make Docker use nftables instead
- PROFIT
Install Docker CE and nftables:
| package main | |
| import "fmt" | |
| type Indicable interface { | |
| Len() int | |
| Idx(i int) any | |
| } | |
| type AnySlice []any |
| package main | |
| import "fmt" | |
| func Map[T any](arr []T, fn func(T) T) []T { | |
| newArr := make([]T, len(arr)) | |
| for i := 0; i < len(arr); i++ { | |
| newArr[i] = fn(arr[i]) | |
| } | |
| return newArr |
| #!/usr/bin/env bash | |
| DEST_NET="192.168.111.0/24" | |
| NEXT_HOPS="2" | |
| NEXT_HOP_1="192.168.126.202" | |
| NEXT_HOP_2="192.168.126.203" | |
| NEXT_HOP_1_TABLE="202" |
Install Docker CE and nftables:
| import torch | |
| import logging | |
| from pytorch_transformers import BertModel, BertTokenizer | |
| from pytorch_transformers import * | |
| from typing import List | |
| CLS_TOKEN = "[CLS]" | |
| SEP_TOKEN = "[SEP]" | |
| logger = logging.getLogger(__name__) |
| SELECT | |
| *, | |
| pg_size_pretty(table_bytes) AS table, | |
| pg_size_pretty(index_bytes) AS index, | |
| pg_size_pretty(total_bytes) AS total | |
| FROM ( | |
| SELECT | |
| *, total_bytes - index_bytes - COALESCE(toast_bytes, 0) AS table_bytes | |
| FROM ( | |
| SELECT |
vuejs is beautiful and works extremely well with R, since vuejs does not require and all-in contract to use it. I have played quite a bit with R htmltools and vuejs, but until today, I have not explored Shiny with vuejs. This earlier gist R Shiny and Vue Simple Example offers a very simple illustration of how Shiny and vuejs can be best friends. Now, let's build from that example and get a TreeView of a Shiny plot brush.
library(shiny)Shiny Shiny.shinyapp.$inputValues acts like a store of state. I thought it would be fun to let vuejs react to changes in Shiny input values. This example is intentionally very simple to hopefully self-explain.
I have assembled vueR package, like d3r and reactR, to offer helpers for vuejs. For this example please install vueR, or just add tags$script(src = "https://unpkg.com/[email protected]") to the tagList().
devtools::install_github("timelyportfolio/vueR")`
Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target| ### An example of building a TensorFlow model from R using rPython ### | |
| # For this script you need to | |
| # 1. Have python 2.7 installed. | |
| # 2. Install the rPython package in R. | |
| # 3. Install Google's TensorFlow library as per these instructions: | |
| # http://www.tensorflow.org/get_started/os_setup.md#binary_installation | |
| ### Here is how to setup and run a trivial TensorFlow model ### | |
| # Load TensorFlow (I couldn't get this to work without setting sys.argv... ) |