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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy | |
import pandas | |
import matplotlib.pyplot as plt | |
import matplotlib.dates as mdates | |
# Scikit's LinearRegression model | |
from sklearn.linear_model import LinearRegression | |
from scipy import stats | |
import math |
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
<<<<<<< master | |
############################## | |
#GET OPEN ORDER(S) | |
############################## | |
def get_open_orders(self): | |
""" | |
Returns all currently open (cancellable) orders. | |
If not orders are currently open, `None` is returned. |
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
// | |
// TabController.swift | |
// School For Me | |
// | |
// Created by Jamone Alexander Kelly on 2/14/16. | |
// Copyright © 2016 Jamone Kelly. All rights reserved. | |
// | |
import UIKit | |
import FontAwesomeKit |
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
postfix operator ++ {} | |
postfix func ++(inout value: Int) -> Int { | |
value += 1 | |
return value | |
} | |
postfix operator -- {} | |
postfix func --(inout value: Int) -> Int { | |
value -= 1 | |
return value |
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 fixed formula | |
struct Global { | |
static var schoolID: Int? // Work around for passing the selected location ID | |
static var userCoord: CLLocationCoordinate2D? | |
func computeDistance() -> Double { | |
// User coordinate | |
let uLat: Double = 35.6603676639829 | |
let uLng: Double = -80.4443005566303 | |
// School coordinate |
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
// I know this is horrible lol I needed a quick hacky way to create the blurred view with data | |
// lil bit of number magic :o | |
// definitely a better way to do this lol I'll come back to it as well | |
schoolNameLabel.frame = CGRect(x: sX*0.22, y: sY * 0.1, width: 15, height: 20) | |
schoolNameLabel.sizeToFit() | |
schoolNameLabel.textColor = UIColor.grayColor() | |
specialView.addSubview(schoolNameLabel) | |
schoolNameLabelContent.frame = CGRect(x: sX*0.4, y: sY*0.1, width: 15, height: 20) | |
schoolNameLabelContent.sizeToFit() |
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
import UIKit | |
extension String { | |
func toAttributedString(font font:UIFont!, kerning: CGFloat!, color:UIColor!) -> NSAttributedString { | |
return NSAttributedString(string: self as String, font: font, kerning: kerning, color: color)! | |
} | |
} |
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
import UIKit | |
extension UIViewController { | |
func alert(title: String = "", message: String, actionTitle:String = "OK") { | |
let alertController = UIAlertController(title: title, message: message, preferredStyle: .Alert) | |
let OKAction = UIAlertAction(title: actionTitle, style: .Default, handler: nil) | |
alertController.addAction(OKAction) | |
self.presentViewController(alertController, animated: true, completion: nil) | |
} | |
} |
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
extension String { | |
var chomp : String { | |
mutating get { | |
self.removeAtIndex(self.startIndex) | |
return self | |
} | |
} | |
} | |
var test : String = "Chomp" |
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
dispatch_async(dispatch_get_main_queue()) { | |
if((self.defaults.valueForKey(self.facilityBoolKeyConstant) as Bool) != false) { | |
self.getCloseLocations("fc") | |
} | |
if((self.defaults.valueForKey(self.medicareBoolKeyConstant) as Bool) != false) { | |
self.getCloseLocations("md") | |
} | |
if((self.defaults.valueForKey(self.vaHospitalBoolKeyConstant) as Bool) != false) { | |
self.getCloseLocations("vh") | |
} |
NewerOlder