I hereby claim:
- I am mattdodge on github.
- I am mattdodge (https://keybase.io/mattdodge) on keybase.
- I have a public key whose fingerprint is 4E10 1C96 3077 8865 8293 3F28 9947 BDF9 6192 D7D9
To claim this, I am signing this object:
<?php | |
$the_file = "file.txt"; | |
if (isset($_POST['content'])) { | |
$content = stripslashes($_POST['content']); | |
$fp = fopen($the_file,"w") or die ("Error opening file in write mode!"); | |
fputs($fp,$content); | |
fclose($fp) or die ("Error closing file!"); | |
} |
''' | |
Created on Mar 18, 2013 | |
@author: Matt Dodge | |
''' | |
''' | |
You can put your own probabilities here. It is a dict where the key is the lower seed | |
(lower by number, not by rank) followed by the higher seed, separated by comma, no space. |
''' | |
Created on Mar 18, 2013 | |
@author: Matt Dodge | |
''' | |
from bs4 import BeautifulSoup as BS | |
from httplib2 import Http | |
from urllib import urlencode | |
import json |
def solve(n, nums, solveStr='x'): | |
''' Solve the game 24 for any solution target and any numbers | |
n = The target number (e.g. 24) | |
nums = Array of numbers (floating point ok) to use | |
solveStr = A helper string for this recursive method that returns a formula | |
This method will return the first (not exhaustive!) possible solution to the game, or False if none exists | |
Example: For the 24 game 1,3,4,6 call it the following way: | |
solve(24, [1,3,4,6]) |
def solve(n, nums, solveStr='x'): | |
''' Play 24 with nums 1,3,4,6 like so: | |
>>> solve(24, [1,3,4,6]) | |
(6/(1-(3/4))) ''' | |
n = float(n) | |
solved = False | |
if len(nums) == 1: | |
return (solveStr.replace('x', str(int(n))) if n == float(nums[0]) else False) |
function timeAgo(num_seconds) { | |
function numberEnding (number) { | |
return (number > 1) ? 's ago' : ' ago'; | |
} | |
if (num_seconds <= 0) { | |
return 'just now!'; | |
} | |
var years = Math.floor(num_seconds / 31536000); | |
if (years) { | |
return years + ' yr' + numberEnding(years); |
I hereby claim:
To claim this, I am signing this object:
Target (originally 24) | Number of Solutions |
---|---|
2 | 479 |
3 | 469 |
6 | 462 |
1 | 462 |
5 | 459 |
4 | 457 |
7 | 454 |
9 | 448 |
Pick | Team | McShay | Kiper | Actual |
---|---|---|---|---|
1 | Kansas City | Eric Fisher (OT - Central Michigan) | Eric Fisher (OT - Central Michigan) | Eric Fisher (OT - Central Michigan) |
2 | Jacksonville | Dion Jordan (DE - Oregon) | Luke Joeckel (OT - Texas A&M) | Luke Joeckel (OT - Texas A&M) |
3 | Oakland | Sharrif Floyd (DT - Florida) | Sharrif Floyd (DT - Florida) | Dion Jordan (DE - Oregon) |
4 | Philadelphia | Lane Johnson (OT - Oklahoma) | Lane Johnson (OT - Oklahoma) | Lane Johnson (OT - Oklahoma) |
5 | Detroit | Ezekiel Ansah (DE - BYU) | Ezekiel Ansah (DE - BYU) | Ezekiel Ansah (DE - BYU) |
6 | Cleveland | Geno Smith (QB - WVU) | Dee Milliner (CB - Alabama) | Barkevious Mingo (DE - LSU) |
7 | Arizona | Jonathan Cooper (G - UNC) | Dion Jordan (DE - Oregon) | Jonathan Cooper (G - UNC) |
8 | Buffalo | Ryan Nassib (QB - Syracuse) | Jonathan Cooper (G - UNC) | Tavon Austin (WR - WVU) |
kubectl get svc -o json | jq -r '.items[] | select (.spec.clusterIP!="None")' | jq '.spec.clusterIP = "None"' | kubectl replace --force -f - |