Skip to content

Instantly share code, notes, and snippets.

👩‍💻
🐶☕️

Rebecca Taylor beccasaurus

👩‍💻
🐶☕️
Block or report user

Report or block beccasaurus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Playing with syswrite.md

Playing with syswrite

Run screen.rb

Run client.rb

Try it out

write "Hello"
View $ sample-composer .md

ℹ️ This is no longer the canonical location for sample-composer. This code is out-of-date.


$ sample-composer

sample-composer [*.yaml] [-o output/] [-r region_tag]
@beccasaurus
beccasaurus / $ gapicify-samples .md
Last active Jun 27, 2019
$ gapicify-samples (polyfill to support samples in separate files)
View $ gapicify-samples .md

$ gapicify-samples

Polyfill to support authoring samples in separate files (not in the _gapic config)

This feature is currently in development – this script lets you try it out today!

See also: include_samples polyfill for running sample tests for library repos

@beccasaurus
beccasaurus / prepare_samples.rb
Last active May 31, 2019
Sample Configurations in Separate Files :: POLYFILL
View prepare_samples.rb
#! /usr/bin/env ruby
# Script for my local code sample development.
#
# Merged individual samples into speech_gapic.yaml
#
# Shim for upcoming change (samples will be in separate files)
#
# Note: the exact formatting of the individual files is subject to change
@beccasaurus
beccasaurus / $ include_samples .md
Last active Jun 13, 2019
$ include_samples=True (polyfill to support synth + samples with tests)
View $ include_samples .md

include_samples=True

SynthTool PR: Add include_samples=True #263


Polyfill to support generating samples with tests w/ SynthTool

This feature is currently in development – this script lets you try it out today!

@beccasaurus
beccasaurus / . Allowing Standalone Samples to be defined in separate YAML files (GAPIC Generator Monolith) .md
Last active May 10, 2019
Allowing Standalone Samples to be defined in separate YAML files (GAPIC Generator Monolith)
View . Allowing Standalone Samples to be defined in separate YAML files (GAPIC Generator Monolith) .md

The GAPIC-generator "monolith" should support loading samples for generation from multiple YAML files.

Ideally we can simplify the YAML a little tiny bit when we do this.

Here are my thoughts.

Current Sample Config (v1) .yaml

and

@beccasaurus
beccasaurus / . tl;dr - pom generator.md
Last active Jul 29, 2019
Generating Java code samples and sample-tester manifest and running sample-tester - pom generator
View . tl;dr - pom generator.md

tl;dr

# clone Java google cloud client libraries repo and cd into the google cloud language library folder
git clone https://github.com/googleapis/google-cloud-java.git
cd google-cloud-java/
cd google-cloud-clients/google-cloud/language/

# update synth.py so it generates samples/v1/ directory
https://gist.githubusercontent.com/beccasaurus/487a6b089d0bfc97c8b48f77c45f5c2e/raw/2e3da0eaff96921adf6b1f6d38af9a0bd10e11f1/synth.py
@beccasaurus
beccasaurus / # 🚀 GAPIC Code Samples (syntax v2) .md
Last active Apr 1, 2019
🚀 GAPIC Code Samples (syntax v2) .yaml
View # 🚀 GAPIC Code Samples (syntax v2) .md
@beccasaurus
beccasaurus / Code Sample with Declarative Test .yaml
Last active Apr 1, 2019
Code Sample with Declarative Test .yaml
View Code Sample with Declarative Test .yaml
samples:
- sample_id: transcribe_audio_file
description: Transcribe an audio file
type: SINGLE_RPC
api_method:
full_rpc: google.cloud.speech.v1.Speech.Recognize
api_request:
fields:
config:
You can’t perform that action at this time.