Skip to content

Instantly share code, notes, and snippets.

View dsvensson's full-sized avatar
🖖
if the scatman can do it then so can you

Daniel Svensson dsvensson

🖖
if the scatman can do it then so can you
View GitHub Profile
from ast import Bytes
import pandas as pd
import numpy as np
import json
from io import StringIO, BytesIO
import gzip
import base64
demo = "tight2"
flagstats comes from parsing broadcasted svc_print's reaching all clients, checking [c]goose in
final3.mvd first3.mvd checks out, but the output from the combined is skewed, scroll to bottom here.
An interesting observation here is that there is increased drift between the demos:
first3 - final3 | drift
start: 198.493 - 198.354 = 0.139
end: 1194.130 - 1193.610 = 0.520
first3.qwd in FTE
wall match diff
2 2 0
4 5 -1
200 194 6
201 195 6
203 197 6
204 198 6
206 200 6
ts red blue
0 0.000 0.000
5 1.000 0.000
10 1.000 0.000
15 1.000 0.000
20 0.000 1.000
25 0.939 0.061
30 0.920 0.080
35 0.940 0.060
40 0.968 0.032
gl_font graybugs
cl_truelightning 1
r_drawviewmodel 0
fov 110
cl_yieldcpu 1
gamma 0.7
contrast 1.1
r_lightflicker 0
@dsvensson
dsvensson / fbedit16.zip.b64
Last active May 5, 2022 08:47
fbedit16.zip.b64
UEsDBBQAAgAIALC70iQN2R9pUvEAAACGAgAKAAAAZmJlZGl0LmV4ZexaC3RURZr+bz/S3XmQzgsS
iNAkIURIQl5AgAi3bzohYJCERAadjJPupPOQzsNOozArkiGM9p5BjQ4zsuq40ZGFg4/REQV30JOz
y7p6FjUqs8cHavYMOgFxjRo9QZHev+qvTt8bOqCzRHfPmQt/VX3//R/1/KvqdtZc2wt6ADAgBQIA
h4AeGS7+dCNNmfXPU+CA5eXZh6TKl2fXtrR22Tq9Hc1eZ5utwdne3uGzudw276Z2W2u7zbG2xtbW
0ejOjYmJzBA2qsoAKiUjzHjn7xcG7Q7CFClKMiTCch3AZuLtTMHEyhR0VDtW1lG9JYjgOSkTs/aM
jr0mJas6H8vo6dVBFsv7dGCICNPIJ3Swbz5860dGpzbMj92lg0elieVyfe7NPswfLtFRhZaLxqge
tFOf2+j0ObE8VCTazhql6LQ+AfpzW0mwwkJtgkjMHefJybneLm8DG+8IajOYMb8qnJzb04GCr+dS
H0Ae5uvPk1O25bxWqO7PNTXrlfVrFublOior4W/P//knmk8AelLelMGI+NQ7tPo/fYfw7ccJ7zpO
eN4g4fxBwi8LfEzgG08Q3nqC8GUfEM74gPALQ4RfHiLcdpKw7yThyI8Jx31M+DGBDwi8+lPC1Z8S
/ljgEYGPfkb4DcwlxNd9Tvw9XxD/0S8I7/2S8ONfEo4/QzjlDOHnBD4icNpZwpefFe0W+JjABQHC
sqlite> select date, map, team, sum(ctf_caps), sum(ctf_pickups), round(sum(ctf_caps) / (1.0 * sum(ctf_pickups)), 2), sum(stats_frags) from match inner join player on player.demo_id = match.demo_id group by match.demo_id, team order by date
date map team caps takes ratio frags
2022-02-17 19:47:42 +0000 e2m2 blue 5 17 0.29 176
2022-02-17 19:47:42 +0000 e2m2 red 6 14 0.43 232
2022-02-17 20:01:13 +0000 ctf8 blue 5 19 0.26 207
2022-02-17 20:01:13 +0000 ctf8 red 3 13 0.23 158
2022-02-17 20:12:41 +0000 ctf8 blue 7 16 0.44 277
2022-02-17 20:12:41 +0000 ctf8 red 2 12 0.17 104
2022-02-17 20:25:37 +0000 ctf8 blue 10 16 0.63 352
2022-02-17 20:25:37 +0000 ctf8 red 3 15 0.2 147
{
"version": 3,
"date": "2022-03-22 20:49:19 +0000",
"map": "e2m2",
"hostname": "london.badplace.eu:28503",
"ip": "127.0.1.1",
"port": 28503,
"mode": "ctf",
"tl": 10,
"dm": 3,
@dsvensson
dsvensson / foo.hs
Last active November 26, 2017 21:14
lens fiddling
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
import Control.Applicative
import Control.Lens
import Control.Lens.Prism
import Control.Monad
import Data.Aeson
import Data.Aeson.Types
@dsvensson
dsvensson / pyavr.py
Last active July 16, 2017 09:47
generate register stuff from Atmel Studio XML files
import xml.etree.ElementTree as ET
import argparse
import math
def bits(n):
while n:
b = n & (~n+1)
yield int(round(math.log(b, 2)))
n ^= b