This is a set of instructions to setup a Django Nginx Gunicorn MySQL/Postgres stack on a single Amazon EC2 instance.
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
const { CredentialProviderChain } = require('aws-sdk'); | |
const AWS = require('aws-sdk'); | |
const accountProvider = require('./account-provider'); | |
let getEnv = function(accountId) { | |
// TODO: insert logic to get your desired profile name | |
return profileName; | |
}; | |
let getProvider = async (accountId, mode) => { |
- Related Setup: https://gist.github.com/hofmannsven/6814278
- Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
- Interactive Beginners Tutorial: http://try.github.io/
- Git Cheatsheet by GitHub: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
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 | |
import subprocess | |
import argparse | |
import os | |
import sys | |
def yesno(message_type, default = 'y'): | |
if message_type == 'DELETE_FILES_IN_FOLDER': | |
question = 'The folder is not empty. Do you want to delete the files in it?' |
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 | |
echo "" | |
echo "==========================================================================" | |
echo "= Pentest Attack Machine Setup =" | |
echo "= Based on the setup from The Hacker Playbook =" | |
echo "==========================================================================" | |
echo "" | |
# Prepare tools folder |
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
// Source: http://www.census.gov/geo/www/ansi/countylookup.html | |
var countyToFIPS = { | |
'Alabama': { | |
'Autauga County': '01001', | |
'Baldwin County': '01003', | |
'Barbour County': '01005', | |
'Bibb County': '01007', | |
'Blount County': '01009', | |
'Bullock County': '01011', |
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
# Decision Tree Classifier | |
from sklearn import datasets | |
from sklearn import metrics | |
from sklearn.tree import DecisionTreeClassifier | |
# load the iris datasets | |
dataset = datasets.load_iris() | |
# fit a CART model to the data | |
model = DecisionTreeClassifier() | |
model.fit(dataset.data, dataset.target) |
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
# Thanks to John Maindonald | |
library(WDI) | |
indnams <- c("fertility.rate", "life.expectancy", | |
"population", "GDP.per.capita.Current.USD", | |
"15.to.25.yr.female.literacy") | |
inds <- c('SP.DYN.TFRT.IN','SP.DYN.LE00.IN', | |
'SP.POP.TOTL','NY.GDP.PCAP.CD', | |
'SE.ADT.1524.LT.FE.ZS') | |
wdiData <- WDI(country="all", indicator=inds, | |
start=1960, end=format(Sys.Date(), "%Y"), |