Skip to content

Instantly share code, notes, and snippets.

View daspecster's full-sized avatar
🏠
Working remote

Thomas Schultz daspecster

🏠
Working remote
View GitHub Profile
[
"Aleutians East",
"Aleutians West (CA)",
"Anchorage Municipality",
"Bethel Census Area",
"Bristol Bay",
"Denali",
"Dillingham (CA)",
"Fairbanks North Star",
"Haines",
def generate_path(self):
min_char = 8
max_char = 12
max_lookups = 100
character_choices = string.ascii_letters
for _ in range(max_lookups):
url_path = (
"".join(choice(character_choices) for x
in range(randint(min_char, max_char))))
@daspecster
daspecster / set_screenshot_location.sh
Last active January 10, 2019 21:16
Set MacOS/OSX screenshot location.
mkdir ~/Desktop/ScreenShots
defaults write com.apple.screencapture location ~/Desktop/ScreenShots/
killall SystemUIServer
@daspecster
daspecster / gist:b050a79c3eab2eca805867bde2bddb73
Created October 2, 2017 20:54
Install Docker Composer to Debian
curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
@daspecster
daspecster / gist:dbac8ed7e3a3c3755b5acce2a74fcc51
Last active October 2, 2017 20:38
Install Docker Community Edition (docker-ce) on debian
apt-get update;
apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable"
apt-get update
apt-get install -y docker-ce
@daspecster
daspecster / ziptastic-multi-example.js
Created June 8, 2017 22:14
Multiple form example
<script type="text/javascript">
(function($) {
$(function() {
// API key and country can go here.
var options = {
"key": "your-api-key-here",
"country": "US"
}
var duration = 500;
# non-ternary; fails coverage
def _make_image_properties_from_pb(image_properties):
"""Create ``ImageProperties`` object from a protobuf response.
:type image_properties: :class:`~google.cloud.grpc.vision.v1.\
image_annotator_pb2.ImagePropertiesAnnotation`
:param image_properties: Protobuf instance of
``ImagePropertiesAnnotation``.
:rtype: list
@daspecster
daspecster / speech-release-notes.md
Created November 14, 2016 21:11
Speech Release Notes

Cloud Speech API

The Google Cloud Speech API allows you to convert audio to text by applying powerful neural network models in an easy to use API.

Speech methods:

  • sync_recognize()
  • async_recognize()
  • streaming_recognize()
diff --git a/core/google/cloud/operation.py b/core/google/cloud/operation.py
index 1562127..6036e02 100644
--- a/core/google/cloud/operation.py
+++ b/core/google/cloud/operation.py
@@ -74,6 +74,7 @@ class Operation(object):
"""
target = None
+ results = None
"""Instance assocated with the operations: callers may set."""