Skip to content

Instantly share code, notes, and snippets.

Brandon Slaght BrandonSlaght

Block or report user

Report or block BrandonSlaght

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
@BrandonSlaght
BrandonSlaght / addSubview.swift
Created Oct 31, 2017
Add a subview to a parent container view and resize the parent to wrap the child
View addSubview.swift
func addSubview(subView:UIView, toView parentView:UIView) {
parentView.addSubview(subView)
var viewBindingsDict = [String: AnyObject]()
viewBindingsDict["subView"] = subView
parentView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[subView]|", options: [], metrics: nil, views: viewBindingsDict))
parentView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|[subView]|", options: [], metrics: nil, views: viewBindingsDict))
}
View analyzer.py
import json
from textblob import TextBlob
linenum = 0
sentiment = []
Apple= []
AmericanExpress= []
BankofAmerica = []
Caterpillar = []
You can’t perform that action at this time.