Skip to content

Instantly share code, notes, and snippets.

View mavieth's full-sized avatar

Michael Vieth mavieth

View GitHub Profile
@mavieth
mavieth / PresenterCard.swift
Created April 1, 2019 00:12
PresenterCard
import UIKit
import Material
class ViewController: UIViewController {
fileprivate var card: PresenterCard!
/// Conent area.
fileprivate var presenterView: UIImageView!
fileprivate var contentView: UILabel!
@mavieth
mavieth / SwipeGestureRecognizer.swift
Created March 31, 2019 23:52
Swipe Gesture Recognizer
class PurpleViewController: UIViewController {
fileprivate var label = UILabel()
open override func viewDidLoad() {
super.viewDidLoad()
prepareView()
prepareSwipe()
}
}
@mavieth
mavieth / Stock-Ticker.markdown
Created July 25, 2014 19:52
A Pen by Michael Abraham Vieth.
@mavieth
mavieth / install-ffmpeg.sh
Created March 13, 2017 03:42
Install FFMPEG Library on EC2 Server
#!/bin/sh
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
fi
cat > /etc/yum.repos.d/centos.repo<<EOF
@mavieth
mavieth / paint-polygon.js
Created July 25, 2018 10:09
Paint open layers polygon.
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import Draw from '../src/ol/interaction/Draw.js';
import Modify from '../src/ol/interaction/Modify.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Stroke, Style, Fill, Circle} from '../src/ol/style.js';
import {GeoJSON} from '../src/ol/format.js';
let features = [];
@mavieth
mavieth / CreateExcelFileFromOutlookVBA.vba
Last active June 12, 2018 21:08
Create Excel File From Outlook VBA
Sub CreateExcelFileFromOutlookVBA()
' Excel Application, workbook, and sheet object
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Object
' Filename
Dim fileDoesExist As Boolean
Dim FileName As String
@mavieth
mavieth / README-opencv-3.1-raspberry-pi-installation.md
Created November 19, 2016 02:00 — forked from willprice/README-opencv-3.1-raspberry-pi-installation.md
How to install OpenCV 3.1 on Raspbian Jessie (Lite)

Installing OpenCV 3.1 on Raspbian Jessie

Prerequisites

  • Keep your system up to date:
    • $ sudo apt-get update
    • $ sudo apt-get upgrade
    • $ sudo reboot
  • Make sure you've got an internet connection.
  • Make sure you've got
  • wget
-------------------michael------------------
1. Dez Bryant WR DAL 9.3 $ 6900
2. Jared Goff QB LAR 16.7 $ 6700
3. Carlos Hyde RB SF 11.5 $ 6300
4. Evan Engram TE NYG 9.0 $ 6200
5. Devonta Freeman RB ATL 12.5 $ 6000
6. Sterling Shepard WR NYG 8.3 $ 5500
7. Lamar Miller RB HOU 10.7 $ 5200
8. Marquise Goodwin WR SF 6.0 $ 3800
9. Giants DST NYG 8.2 $ 3200
from __future__ import division
from collections import Counter, OrderedDict, defaultdict
from itertools import chain, combinations
from copy import deepcopy
from random import getrandbits, uniform
from pulp import LpProblem, LpMaximize, LpVariable, LpInteger, lpSum
from .exceptions import LineupOptimizerException, LineupOptimizerIncorrectTeamName, LineupOptimizerIncorrectPositionName
from .settings import BaseSettings
from .player import Player
from .lineup import Lineup
echo 'export NVM_DIR="$HOME/.nvm"' > ~/.bash_profile
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' > ~/.bash_profile
. ~/.bash_profile