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
@daspecster
daspecster / blarg.sh
Created October 27, 2016 17:33
Process for getting right version of core?
# With fresh venv
cd google-cloud-python
rm -rf .tox
rm -rf ./**/.tox
pip install tox
tox -e py27 --recreate --notest
cd core
../.tox/py27/bin/python setup.py install
cd ..
cd speech
@daspecster
daspecster / raw_gapic.py
Created October 3, 2016 17:38
Speech Stream Recognize
import time
from google.cloud.gapic.speech.v1beta1 import enums
from google.cloud.gapic.speech.v1beta1 import speech_api
from google.cloud.grpc.speech.v1beta1 import cloud_speech_pb2
# point this at an audio sample for your project
INPUT_URI = 'gs://ferrous-arena-my-test-bucket/hello.flac'
@snippet
def udf_inline(client, _):
"""Inline UDF."""
from google.cloud.bigquery.job import UDFResource
UDF_QUERY = ('SELECT upper_name FROM upperCaseName('
'[bigquery-public-data:usa_names.usa_1910_2013]) '
'WHERE state = "TX"')
INLINE_UDF_CODE = """
function upperCaseName(r, emit) {
emit({upper_name: r.name.toUpperCase(),

Keybase proof

I hereby claim:

  • I am daspecster on github.
  • I am daspecster (https://keybase.io/daspecster) on keybase.
  • I have a public key whose fingerprint is 6637 03BC FDEF 0448 E6CF CF0C 3979 261C E270 F888

To claim this, I am signing this object:

@daspecster
daspecster / install-docker-compose.sh
Last active October 11, 2018 06:52
Centos 7 docker compose install from scratch
#!/bin/bash
sudo yum update -y
sudo yum install -y netstat git rubygems gcc kernel-devel make perl
sudo yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel maven
sudo gem install sass
cd /tmp
@daspecster
daspecster / BFT.java
Created March 26, 2016 00:58
Working on BFT adjacent matrix with bfranco
import java.util.Scanner;
import java.io.*;
import java.util.LinkedList;
import java.util.Queue;
public class BFT {
public static boolean[]avail = new boolean [48]; // tells me whether or not a state has been used yet
public static int[][] dataSet = new int[48][48]; // prefilled adjacency matrix
public static String[] statesList = new String[48]; // prefilled list of states
@daspecster
daspecster / ziptastic.js
Created February 2, 2016 02:44
Ziptastic jQuery example
$.ajax({
type: "GET",
beforeSend: function(request) {
request.setRequestHeader("x-key", "123examplekey456");
},
url: "//zip.getziptastic.com/v3/US/48867",
success: function(data) {
console.log(data[0].city);
console.log(data[0].state);
console.log(data)
@daspecster
daspecster / after.sh
Last active January 8, 2016 22:22 — forked from justincampbell/after.sh
Jenkins + GitHub Commit Status API
if [[ $BUILD_STATUS == "success" ]]
then
export STATUS="success"
else
export STATUS="failure"
fi
curl "https://api.github.com/repos/<user/org>/<my_repo>/statuses/$GIT_COMMIT?access_token=<token>" \
-H "Content-Type: application/json" \
-X POST \
@daspecster
daspecster / ziptastic-curl.sh
Created December 28, 2015 03:03
Ziptastic cURL Example
curl https://zip.getziptastic.com/v3/US/48867 " -H "x-key: 123examplekey456"
@daspecster
daspecster / php-list-email.txt
Created December 21, 2015 21:18
PHP List Email Example
Hello all you awesome subscribers!
Here's the best things I've found in the world of PHP this week!
- thing one
- thing two
- thing three
If you like this list, you can help it continue by using this link when you shop at Amazon.com!