Skip to content

Instantly share code, notes, and snippets.

Andrew Bannerman flare9x

  • USA
Block or report user

Report or block flare9x

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@flare9x
flare9x / HUD_fair_market_rents.R
Last active Aug 17, 2019
Historical HUD fair market rent study in relation to average annual CPI % change
View HUD_fair_market_rents.R
# Fair market rents - HUD
# Source: https://www.huduser.gov/portal/datasets/fmr.html#history
library(fredr)
library(lubridate)
library(scales)
library(ggplot2)
data = read.csv("C:/Users/Andrew.Bannerman/Desktop/Real Estate/Rental Property Research and Deals/FMR_All_1983_2019_rev.csv",stringsAsFactors = FALSE, header=T)
@flare9x
flare9x / gosection8_prospect_list.r
Created Aug 13, 2019
Extract prospect list from gosection8.com (copy and paste as excel .csv) sep=","
View gosection8_prospect_list.r
# gosection8.com Prospects
# Andrew Bannerman - 8/13/2019
# Read files
data_dir <- "C:/Users/Andrew.Bannerman/Desktop/Real Estate/Real Estate Portfolio/Galveston section8 prospects/p"
data_list = list()
i=1
for (i in 1:5) {
temp = read.csv(paste0(data_dir,i,".csv"),stringsAsFactors = FALSE, header=F)
str(temp)
@flare9x
flare9x / gosection8_listing_scrape.R
Last active Aug 13, 2019
Scrape Gosection8.com listings
View gosection8_listing_scrape.R
library(rvest)
library(stringr)
# Add selector gadget for CSS
# https://chrome.google.com/webstore/detail/selectorgadget/mhjhnkcfbdhnjickkkdbjoemdmbfginb/related?hl=en
# email results
#https://medium.com/airbnb-engineering/using-googlesheets-and-mailr-packages-in-r-to-automate-reporting-c09579e0377f
i = 9
@flare9x
flare9x / cnn.py
Created May 1, 2019 — forked from Alescontrela/cnn.py
A multi-layer convolutional neural network created from scratch with NumPy
View cnn.py
'''
Description: A multi-layer convolutional neural network created from scratch with NumPy
Author: Alejandro Escontrela
Version: 1.1
License: MIT
'''
import numpy as np
import matplotlib.pyplot as plt
import pickle
@flare9x
flare9x / first_pass_tmin.jl
Last active May 5, 2019
First Pass B31.3 Pressure Tmin and API 574 Structural Tmin Assessment
View first_pass_tmin.jl
# Step 1 - Calculate B31.3 Pressure Tmin
# Step 2 - Obtain API 574 Structural Tmin From Table 7
# Step 3 - Calculate remaining wall thickness at the area of interest
# Step 4 - Check that the remaining wall thickness is above pressure and/or structural tmin
# Step 5 - Assess how much corrosion allowance has been lost / how much remains
# Step 1 - Calculate B31.3 Pressure Tmin
# ASME B31.3 - 304.1.2 Straight Pipe Under Internal Pressure
P = 2220 # Shell specification D, Design Pressure 2220psig @ 100F
D = 2.375 # Outside Diameter
@flare9x
flare9x / rectangle_vessel_one_stay_plate.R
Last active Feb 6, 2019
# Rectangle Vessels With Stay Plate - ASME VIII # Figure 13-2(a) - Sketch (7)
View rectangle_vessel_one_stay_plate.R
# Rectangle Vessels With Stay Plates
# Figure 13-2(a) - Sketch (7)
# 13-9 STAYED VESSELS OF RECTANGULAR CROSS SECTION
# [FIGURE 13-2(A) SKETCHES (7) AND (8)]
#--- Begin single Script
# Material SA-516 Gr 70 (S)
S = 20000
@flare9x
flare9x / rectangle_vessel_stresses_tmin.R
Last active Feb 4, 2019
ASME Section VIII – Division 1 - Appendix 13
View rectangle_vessel_stresses_tmin.R
# ASME VIII 2017
# 13-4 DESIGN OF VESSELS OF NONCIRCULAR CROSS SECTION
# Figure 13-2(a) Vessels of Rectangular Cross Section
# Selection = Sketch (1)
#--- Begin single script - validate calculations against example problem
# ASME PTB-4-2013 - Example Problem - Header Box Data
# Material = SA516, Grade 70 (S)
@flare9x
flare9x / abs_tmin.jl
Last active Jan 31, 2019
ABS Piping Tmin + Tnominal Calculation
View abs_tmin.jl
# ABS Tmin
# 5.1.1 Pipes Subject to Internal Pressure (2002)
ID = 4.0
OD = 4.5
ratio = OD / ID
ratio = 1.125
# Check tmin applies:
View FDA.Event.Study.rbind.weeks.prior.FDA.R
# Scrape Historical FDA events
# Clean Data - Extract Date from text
# Clean up Catalyst Column - remove date, white space
# Sort by ascending date order
# Note 2x non ticker symbols, these are removed
require(XML)
require(dplyr)
require(PerformanceAnalytics)
require(data.table)
@flare9x
flare9x / nasdaq_etf_list.R
Created Jan 24, 2019
Obtain List of ETFS From nasdaq.com
View nasdaq_etf_list.R
# Obtain List of ETFS From nasdaq.com
# Andrew Bannerman 10.4.2017
library(data.table)
# Read ETF list csv file from nasdaq.com
# Use fread() from data.table package
# install.packages("data.table")
read.data <- fread("http://www.nasdaq.com/investing/etfs/etf-finder-results.aspx?download=Yes")
You can’t perform that action at this time.