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 numpy as np | |
import pymc | |
import pdb | |
def unconditionalProbability(Ptrans): | |
"""Compute the unconditional probability for the states of a | |
Markov chain.""" | |
m = Ptrans.shape[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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Spectrogram</title> | |
<style type="text/css"> | |
.visualizer { | |
display: block; | |
background-color: black; | |
} |
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 boto | |
import boto.exception | |
import boto.sns | |
import pprint | |
import re | |
def send_push(device_id, body): | |
region = [r for r in boto.sns.regions() if r.name==u'eu-west-1'][0] | |
sns = boto.sns.SNSConnection( |
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 | |
NVIDIA_DRIVER_VERSION=352.63 | |
NVIDIA_CUDA_VERSION=7.5 | |
NVIDIA_CUDA_FULL_VERSION=7.5.18 | |
sudo yum update -y | |
sudo yum groupinstall -y "Development tools" | |
sudo yum install kernel-devel-`uname -r` |
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
[ | |
{ | |
owner: 'bcoe', | |
repo: 'top-npm-users', | |
description: ':star: Generate a list of top npm users by based on monthly downloads.', | |
language: 'JavaScript', | |
isFork: false, | |
stargazers: 27, | |
watchers: 27 | |
} |
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
from vowpalwabbit import pyvw | |
def to_vw(clf, text, str_labels): | |
vw_example = str('{} |f {} '.format(str_labels, text)) | |
return clf.example(vw_example) | |
clf = vw = pyvw.vw( | |
loss_function='logistic', oaa=2, | |
link='logistic', raw_predictions='output.txt' | |
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Taken from https://forums.aws.amazon.com/thread.jspa?messageID=332091 | |
sudo su - | |
cd /usr/local/bin | |
mkdir ffmpeg | |
cd ffmpeg | |
wget http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.latest.tar.gz | |
tar -xzf ffmpeg.static.64bit.latest.tar.gz |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from bs4 import BeautifulSoup | |
from markdown import markdown | |
import re | |
def markdown_to_text(markdown_string): | |
""" Converts a markdown string to plaintext """ | |
# md -> html -> text since BeautifulSoup can extract text cleanly | |
html = markdown(markdown_string) |
OlderNewer