This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! ExecuteCurrentLine() | |
let l:line = getline('.') | |
if l:line[0] != '#' | |
echoerr "Current line must start with #" | |
return | |
endif | |
let l:replace_result = ReplaceInputBlock(l:line[1:]) | |
let l:replaced = l:replace_result[0] | |
let l:command = l:replace_result[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
05-30 09:14:16.841 6290 6315 I NativeActivity: [wgpu trace]: Instance::new: backend Vulkan not requested | |
05-30 09:14:16.841 6290 6315 I NativeActivity: [wgpu debug]: Client extensions: [ | |
05-30 09:14:16.841 6290 6315 I NativeActivity: "EGL_EXT_client_extensions", | |
05-30 09:14:16.841 6290 6315 I NativeActivity: "EGL_KHR_platform_android", | |
05-30 09:14:16.841 6290 6315 I NativeActivity: "EGL_ANGLE_platform_angle", | |
05-30 09:14:16.841 6290 6315 I NativeActivity: "EGL_ANDROID_GLES_layers", | |
05-30 09:14:16.841 6290 6315 I NativeActivity: ] | |
05-30 09:14:16.841 6290 6315 I NativeActivity: [wgpu debug]: Loading X11 library to get the current display | |
05-30 09:14:16.843 6290 6315 I NativeActivity: [wgpu warn]: EGL_MESA_platform_surfaceless not available. Using default platform | |
05-30 09:14:16.843 6290 6315 I NativeActivity: [wgpu debug]: Display vendor "Android", version (1, 4) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const Error = std.mem.Allocator.Error; | |
pub const Allocator = struct { | |
const Self = @This(); | |
end_index: usize, | |
buffer: []u8, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl https://github.com/rsepassi.keys | tail -n 1 >> ~/.ssh/authorized_keys && sudo systemctl restart ssh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imdb = tfds.builder("imdb_reviews/subwords8k") | |
# Get the TextEncoder from DatasetInfo | |
encoder = imdb.info.features["text"].encoder | |
assert isinstance(encoder, tfds.features.text.SubwordTextEncoder) | |
# Encode, decode | |
ids = encoder.encode("Hello world") | |
assert encoder.decode(ids) == "Hello world" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See the built-in configs | |
configs = tfds.text.IMDBReviews.builder_configs | |
assert "bytes" in configs | |
# Address a built-in config with tfds.builder | |
imdb = tfds.builder("imdb_reviews/bytes") | |
# or when constructing the builder directly | |
imdb = tfds.text.IMDBReviews(config="bytes") | |
# or use your own custom configuration | |
my_encoder = tfds.features.text.ByteTextEncoder(additional_tokens=['hello']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow_datasets as tfds | |
datasets = tfds.load("mnist") | |
train_dataset, test_dataset = datasets["train"], datasets["test"] | |
assert isinstance(train_dataset, tf.data.Dataset) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow_datasets as tfds | |
# Fetch the dataset directly | |
mnist = tfds.image.MNIST() | |
# or by string name | |
mnist = tfds.builder('mnist') | |
# Describe the dataset with DatasetInfo | |
assert mnist.info.features['image'].shape == (28, 28, 1) | |
assert mnist.info.features['label'].num_classes == 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install: pip install tensorflow-datasets | |
import tensorflow_datasets as tfds | |
mnist_data = tfds.load("mnist") | |
mnist_train, mnist_test = mnist_data["train"], mnist_data["test"] | |
assert isinstance(mnist_train, tf.data.Dataset) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow_datasets as tfds | |
# Download the dataset and create a tf.data.Dataset | |
ds, info = tfds.load("mnist", split="train", with_info=True) | |
# Access relevant metadata with DatasetInfo | |
print(info.splits["train"].num_examples) | |
print(info.features["label"].num_classes) | |
# Build your input pipeline |
NewerOlder