This file contains hidden or 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
/*the pvalue10.7 below is where you change the number of decimal places you want.*/ | |
/*the default value here will give you 10 digits to the 7th decimal place.*/ | |
ods path sasuser.templat(update) sashelp.tmplmst(read); | |
proc template; | |
edit Common.PValue; | |
notes "Default p-value column"; | |
just = r; | |
format = pvalue10.7; | |
end; |
This file contains hidden or 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
libname data "your-data-location"; | |
proc export data=data.dataset | |
outfile="your-data-location\filename.csv" | |
dbms=csv; | |
run; |
This file contains hidden or 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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"##Logistic Regression - Python Demonstration\n", | |
"**This script will run a logistic regression on our demo dataset. The goal is to predict whether a customer will buy a subscription to a magazine based on a number of factors.**\n", | |
"\n", | |
"###Steps:\n", |
This file contains hidden or 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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"##K-Nearest Neighbors - Python Demonstration\n", | |
"**This script will run a k-Nearest Neighbors algorithm on our demo dataset. The goal is to classify a `Favorable` or `Unfavorable` response based on a customer's `Age` and `Sales` variables.**\n", | |
"\n", | |
"###Steps:\n", |
This file contains hidden or 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 flask import Flask | |
import os | |
app = Flask(__name__) | |
@app.route("/hello", methods=['POST']) | |
def hello(): | |
return "Hello World!" | |
if __name__ == '__main__': |
This file contains hidden or 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 flask import Flask, request, make_response | |
import json | |
import os | |
app = Flask(__name__) | |
@app.route("/hello", methods=['POST']) | |
def hello(): | |
# grab the post request |
This file contains hidden or 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 sklearn.metrics import f1_score, make_scorer | |
scorer = make_scorer(f1_score, labels=[-1, 1], average='macro') | |
# use like: | |
cv = cross_val_score(model, X, Y, scoring=scorer) |
This file contains hidden or 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/sh | |
# /etc/init.d/vncboot | |
### BEGIN INIT INFO | |
# Provides: vncboot | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start VNC Server at boot time |
This file contains hidden or 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
sudo aptitude update | |
sudo aptitude upgrade | |
sudo apt-get install tightvncserver | |
sudo su | |
wget https://gist.githubusercontent.com/pmbaumgartner/b897116f50cc9f73430f636523021d48/raw/52113a87979e7b012c4d79e9e1afda068de455b5/vncboot -O /etc/init.d/vncboot | |
chmod 755 /etc/init.d/vncboot |
This file contains hidden or 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
JOBS=`lscpu | awk ' /CPU\(s\):/ {print $2}' | head -n1` # Sets the amount of jobs when compiling to the detected amount of cores | |
echo "Now downloading OpenCV from github..." | |
git clone https://github.com/Itseez/opencv.git | |
git clone https://github.com/Itseez/opencv_contrib.git | |
cd opencv | |
mkdir build | |
cd build | |
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_TBB=ON -D BUILD_TBB=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules .. |
OlderNewer