This file contains 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
#!/usr/bin/python | |
# Copywritght 2013-Present, Scott Cagno (BSD LICENSE) | |
# basic python program for linux to enable speech to text | |
# this is the first hack, could use more improvement | |
import sys, alsaaudio, wave, numpy, os, threading, time, commands, json | |
arl = [] | |
run = 1 |
This file contains 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 | |
sox -q -r 16000 -b 16 -c 1 -d a.flac silence 1 0.3 1% 1 0.5 1% 2>/dev/null | |
curl -s --data-binary @a.flac --header 'Content-Type: audio/x-flac; rate=16000' 'https://www.google.com/speech-api/v1/recognize?client=chromium&lang="en-us"' | cut -d"," -f3 | sed 's/^.*utterance\":\"\(.*\)\"$/\1/g' | |
rm a.flac |
This file contains 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 | |
# install requirements if need be | |
if [ ! -x git ]; then | |
sudo apt-get install git | |
fi | |
# grab, install, and stage plugin for vim snippets, aka: snipmate | |
cd ~/Downloads | |
git clone https://github.com/msanders/snipmate.vim |
This file contains 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
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set number | |
syntax on | |
set backspace=2 | |
set nocompatible |
This file contains 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
#!/usr/bin/env python | |
# Copyright (c) 2008 Carnegie Mellon University. | |
# | |
# You may modify and redistribute this file under the same terms as | |
# the CMU Sphinx system. See | |
# http://cmusphinx.sourceforge.net/html/LICENSE for more information. | |
import pygtk | |
pygtk.require('2.0') |
This file contains 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
// * | |
// * Copyright 2013, Scott Cagno, All rights reserved. | |
// * BSD Licensed - sites.google.com/site/bsdc3license | |
// * NARDb :: Not A Relational Database | |
// * | |
package main | |
import ( | |
"encoding/json" |
This file contains 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
package main | |
import ( | |
"archive/tar" | |
"encoding/json" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
) |
This file contains 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 bisect | |
import itertools | |
import operator | |
class _BNode(object): | |
__slots__ = ["tree", "contents", "children"] | |
def __init__(self, tree, contents=None, children=None): | |
self.tree = tree |
This file contains 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 | |
# File: crawl.sh | |
# Desc: Package designed to provide an API to help automate web testing | |
# Dependencies: curl, getopts | |
# Copyright 2014, Scott Cagno, All rights reserved. | |
# usage function | |
function usage() { | |
echo -e "usage: $0 <opts> -h [host-uri]" | |
echo -e " opts:" |
This file contains 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 | |
sudo echo "Need to be root, please authenticate..." | |
echo "Downloading spring source..." | |
curl -o sts.tar.gz http://download.springsource.com/release/STS/3.4.0/dist/e4.3/spring-tool-suite-3.4.0.RELEASE-e4.3.1-linux-gtk-x86_64.tar.gz | |
echo "Extracting..." | |
tar -xf sts*.tar.gz | |
echo "Staging..." | |
sudo mv springsource /opt | |
echo "Creating symbolic links..." | |
sudo ln -s /opt/springsource/sts*/STS /usr/local/bin/sts |
OlderNewer