Skip to content

Instantly share code, notes, and snippets.

View shoffing's full-sized avatar
🛒
get it? it's a "shoffing cart"

shoffing

🛒
get it? it's a "shoffing cart"
View GitHub Profile
const demofile = require('demofile');
const fs = require('fs');
const _ = require('lodash');
// Replace with your own demo files
const INFERNO_DEMOS = [
'/Users/shoffing/inferno-demos/astralis-vs-liquid-inferno.dem',
'/Users/shoffing/inferno-demos/fnatic-vs-complexity-inferno.dem',
'/Users/shoffing/inferno-demos/g2-vs-cloud9-inferno.dem',
'/Users/shoffing/inferno-demos/g2-vs-mibr-inferno.dem',
@shoffing
shoffing / agent.py
Last active January 6, 2019 00:46
Bot to play codenames as an agent
import numpy as np
# Distance function
dist = lambda a, b: np.linalg.norm(a - b)
# Load word2vec data file (gl0ve)
w2v = {}
with open("glove/glove.6B.50d.txt", "r", encoding="utf-8") as w2v_file:
for word_enc in w2v_file:
word = word_enc[:word_enc.index(" ")]
import pygame
import random
class Node:
def __init__(self, x, y, air=0.0, wall=False):
self.x = x
self.y = y
self.air = air
self.wall = wall
@shoffing
shoffing / make_h265.py
Last active August 23, 2022 18:37
Converts all video files to H265, deleting the sources as well.
import pathlib
import subprocess
import re
VIDEO_TYPES = [
'.mp4',
'.avi',
'.mkv',
'.mov',
'.webm',