This file contains 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
package twopee; | |
class LeagueListingUpdateJob { | |
def concurrent = false | |
def leagueListingService | |
static triggers = { | |
simple name:'leagueListingUpdateTrigger', startDelay: 1000, repeatInterval: 60000 * 60 |
This file contains 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
package twopee | |
import grails.transaction.Transactional | |
import org.hibernate.Session | |
@Transactional | |
class PatchService { | |
String getPatch(Mtch match) { | |
return getPatch(match.matchId) |
This file contains 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
A = 0.5 | |
B = 1 - A | |
import random | |
def boX(X, a_chance, adv=0): | |
""" | |
Given two teams where team A has an `a_chance` to win and an `adv` | |
game advantage, this simulations one best-of-`X` game. | |
""" |
This file contains 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
final static double K_WEIGHTING = 64.0 | |
final static double MEAN_RATING = 1000.0 | |
def newRadElo = calculateElo(radElo, direElo, (winner == "Radiant")) | |
def newDireElo = calculateElo(direElo, radElo, (winner == "Dire")) | |
double calculateElo(Elo thisTeam, Elo otherTeam, boolean win) { | |
double diff = (win ? 1.0 : -1.0) * (thisTeam.rating - otherTeam.rating) / 400.00 | |
double _d = 1.0 / (1.0 + Math.pow(10.0, diff)) |
This file contains 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
Hey I only saw this now, but I think it's still reasonable to comment. | |
In short, I agree with the conclusion of your article - Newbee absolutely don't deserve an invite - just not some of the intermediate steps. | |
Winrate is, on it's own, not a good indicator of performance. If Newbee had a 40% winrate against just Vici, iG and LGD with a large sample- then they would legitimately be one of the top teams in the world and worthy of an invite. It matters *who* you're winning and losing to as much as it does how much you're winning or losing by. | |
KDA can be also be misleading. Sure - the very top teams generally have a very high KDA because they have so few deaths, but around the middle it's heavily dependent on who you play against; and what style of game you play. At The Summit 3 for example, a lot of the games are finishing *very* early - this creates highly polarised KDA's compared to longer games that we've seen in 6.84. Also, even if all teams are playing a similar style: to have a lower KDA when playing |
This file contains 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
dota_embers 0 | |
dota_toggle_asssisted_camera 1 |
This file contains 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/python | |
import sys | |
import requests | |
import time | |
def get_votes(m_id): | |
if len(sys.argv) <= 1: | |
print "You need to add an API key as a sys arg" | |
return | |
url = "https://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/V001/?match_id={}&key={}".format(m_id, sys.argv[1]) |
This file contains 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
def oneMonthAgo = new Date(System.currentTimeMillis() - 1L * 30 * 24 * 60 * 60 * 1000) | |
def teams = Team.list() | |
.findAll { ((it.lastPlayed > oneMonthAgo) && (((it.wins + it.loses) > 50) || (it.rating > 1200))) } | |
.sort { -it.rating } |
This file contains 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/python | |
from itertools import permutations | |
from math import e, ceil | |
cutoff = int(ceil(5. / e)) # for verbosity - it's 2 | |
def solve(left, best): | |
for remaining in left: | |
if remaining < best: | |
return remaining |
This file contains 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
static class Glicko2 { | |
double _MU | |
double _SIGMA | |
double _PHI | |
double _TAU | |
double _EPSILON | |
Glicko2(Double mu, Double sigma, Double phi, Double tau, Double epsilon) { |