This is my implementation of tanh for CUDA:
#include <iostream>
#include <math.h>
#include <cuComplex.h>
#include <complex>
typedef double rtype;
#include <vector> | |
#include <iostream> | |
using namespace std; | |
typedef float T; | |
int main() | |
{ | |
int data_size = 512; | |
vector<T *> data; |
void setup() | |
{ | |
pboIds = new GLuint[2]; | |
pboIds[0] = 0; pboIds[1] = 0; | |
const int DATA_SIZE = screenWidth * screenHeight * 4; | |
const int PBO_COUNT = 2; | |
glGenBuffersARB(PBO_COUNT, pboIds); | |
glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, pboIds[0]); | |
glBufferDataARB(GL_PIXEL_PACK_BUFFER_ARB, DATA_SIZE, 0, GL_STREAM_READ_ARB); |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install libvorbis --universal libsndfile --universal libogg --universal flac --universal | |
curl -O http://code.soundsoftware.ac.uk/attachments/download/690/vamp-plugin-sdk-2.5.tar.gz | |
tar -xvf vamp-plugin-sdk-2.5.tar.gz | |
cd vamp-plugin-sdk-2.5 | |
make -f build/Makefile.osx |
<style> | |
html { | |
font-size: 62.5% !important; } | |
body { | |
font-size: 1.5em !important; /* currently ems cause chrome bug misinterpreting rems on body element */ | |
line-height: 1.6 !important; | |
font-weight: 400 !important; | |
font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif !important; | |
color: #222 !important; } |
This is my implementation of tanh for CUDA:
#include <iostream>
#include <math.h>
#include <cuComplex.h>
#include <complex>
typedef double rtype;
#!/bin/bash | |
youtube-dl --playlist-end 10 -o '%(playlist_index)s.%(ext)s' https://www.youtube.com/channel/UCF0pVplsI8R5kcAqgtoRqoA/videos?view=10&flow=list&live_view=10 | |
for i in `ls *.mp4`; do `ffmpeg -i $i -vn -y "$i".wav`; done | |
youtube-dl -J --playlist-end 10 https://www.youtube.com/channel/UCF0pVplsI8R5kcAqgtoRqoA/videos?view=10 | json_reformat > titles.json | |
#output=$(youtube-dl -J --playlist-end 10 https://www.youtube.com/channel/UCF0pVplsI8R5kcAqgtoRqoA/videos?view=10 <&3) | |
#echo $output > titles.json |
//from http://www.visiondummy.com/wp-content/uploads/2014/04/error_ellipse.cpp | |
#include <iostream> | |
#include <cmath> | |
//You need OpenCV for this demo | |
#include <opencv2\core\core.hpp> | |
#include <opencv2\highgui\highgui.hpp> | |
cv::RotatedRect getErrorEllipse(double chisquare_val, cv::Point2f mean, cv::Mat covmat); |
# Example using Decision Trees | |
import numpy as np | |
import matplotlib.pylab as plt | |
%matplotlib inline | |
all_data = [] | |
with open("data.txt") as input_file: | |
for line in input_file: | |
all_data.append([item.replace('\r\n', '') for item in line.split('\t')[1:]]) | |
X = np.vstack(all_data[1:11]).astype(float).transpose() # inputs |