Skip to content

Instantly share code, notes, and snippets.

View CameronVetter's full-sized avatar

Cameron Vetter CameronVetter

View GitHub Profile
{"defaultProfile":"{7e110037-3c10-4af1-a44d-6f14f98a1fe4}","initialRows":30,"initialCols":120,"alwaysShowTabs":true,"showTerminalTitleInTitlebar":true,"experimental_showTabsInTitlebar":true,"profiles":[{"startingDirectory":"%USERPROFILE%","guid":"{7e110037-3c10-4af1-a44d-6f14f98a1fe4}","name":"PowerShell","background":"#012456","colorscheme":"Campbell","historySize":9001,"snapOnInput":true,"cursorColor":"#FFFFFF","cursorShape":"bar","commandline":"powershell.exe","fontFace":"Courier New","fontSize":14,"acrylicOpacity":0.5,"useAcrylic":false,"closeOnExit":true,"padding":"0, 0, 0, 0"},{"startingDirectory":"%USERPROFILE%","guid":"{54e6282e-3246-4dbf-878c-2e69f8b28f88}","name":"Command Prompt","colorscheme":"Solarized Dark","historySize":9001,"snapOnInput":true,"cursorColor":"#00FF00","cursorShape":"bar","commandline":"cmd.exe","fontFace":"Consolas","fontSize":16,"acrylicOpacity":0.75,"useAcrylic":true,"closeOnExit":true,"padding":"0, 0, 0, 0"},{"startingDirectory":"%USERPROFILE%","guid":"{88e99110-e69f-4de7-9632
@CameronVetter
CameronVetter / web.config
Created October 20, 2018 19:33
web.config for CNTK running with Python 3.5.4 in Azure
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="WSGI_ALT_VIRTUALENV_HANDLER" value="main.app" />
<add key="WSGI_ALT_VIRTUALENV_ACTIVATE_THIS"
value="d:\home\python354x64\python.exe" />
<add key="WSGI_HANDLER"
value="ptvs_virtualenv_proxy.get_venv_handler()" />
<add key="PYTHONPATH" value="D:\home\site\wwwroot" />
</appSettings>
@CameronVetter
CameronVetter / reqs.txt
Created October 20, 2018 19:14
example requirements file for cntk and keras
numpy==1.11.3
scikit-learn==0.18.1
click==6.7
Flask==0.12.2
itsdangerous==0.24
Jinja2==2.9.6
MarkupSafe==1.0
Werkzeug==0.12.2
cntk-gpu==2.6
scipy==1.0.0
@CameronVetter
CameronVetter / ann.py
Last active October 11, 2018 18:29
Starter file for Sales Win Loss Lab Work
# Lab 2 - Loading data into a dataframe
# Lab 3 - Data Processing and finding data correlations
# Lab 4 - Encoding and scaling the data
# Lab 5 - Creationg the ANN
# Lab 6 - Model training and Visualization
@CameronVetter
CameronVetter / gputest.py
Created July 8, 2018 03:40
Tensorflow GPU Test
from theano import function, config, shared, tensor
import numpy
import time
vlen = 10 * 30 * 768 # 10 x #cores x # threads per core
iters = 1000
rng = numpy.random.RandomState(22)
x = shared(numpy.asarray(rng.rand(vlen), config.floatX))
f = function([], tensor.exp(x))
@CameronVetter
CameronVetter / nomoregmail.js
Last active July 13, 2018 00:14
TamperMonkey / GreaseMonkey script to convert gmail links to go to inbox
// ==UserScript==
// @name Convert Gmail to Inbox
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Take the link to gmail and convert it into a link to inbox
// @author Cameron Vetter
// @match https://*.google.com/*
// @match http://*.google.com/*
// @grant none
// ==/UserScript==
@CameronVetter
CameronVetter / batchit.ps1
Last active June 13, 2018 19:13
Batch AI Powershell to create job
az account set --subscription <MYSUBSCRIPTIONID>
az batchai job create --config job.json --name CatOrDog-$(Get-Date -UFormat "%Y_%m_%d-%H_%M_%S") --cluster-name <MYCLUSTERNAME> --resource-group <MYCLUSTERRESOURCEGROUP> --location <MYCLUSTERLOCATION>
@CameronVetter
CameronVetter / job.json
Created June 13, 2018 18:51
Batch AI Job
{
"properties": {
"nodeCount": 1,
"tensorFlowSettings": {
"pythonScriptFilePath": "$AZ_BATCHAI_MOUNT_ROOT/afs/CatOrDog/catordog.py",
"masterCommandLineArgs": "-p"
},
"stdOutErrPathPrefix": "$AZ_BATCHAI_MOUNT_ROOT/afs/CatOrDog",
"inputDirectories": [
{
az batchai cluster create --name neuralnetwork --image UbuntuDSVM --vm-size Standrd_NC6 --min 0 --max 1 --afs-name data --user-name <MyUsername> --password <MyPassword> -c clusterconfig.json --resource-group tensorflow2 --location westus2 --storage-account-name tensorflowdata --storage-account-key <MyStorageAccountKey>
@CameronVetter
CameronVetter / gist:deab548614e231a8cdb4fbc6f7b0dfd6
Last active May 23, 2018 16:03
Configure a Web App to not respond to traffic unless it is through the WAF or a Traffic Manager Probe
<system.webServer>
<security>
<ipSecurity allowUnlisted="false" denyAction="Forbidden">
<add ipAddress="52.162.XXX.XXX" allowed="true" />
<add ipAddress="40.124.XXX.XXX" allowed="true" />
<add ipAddress="40.68.30.66" allowed="true" />
<add ipAddress="40.68.31.178" allowed="true" />
<add ipAddress="137.135.80.149" allowed="true" />
<add ipAddress="137.135.82.249" allowed="true" />
<add ipAddress="23.96.236.252" allowed="true" />