Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
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
use crate::protocol::Int; | |
use crate::protocol::ProtocolTypeInfo; | |
use crate::protocol::Struct; | |
use std::cmp::min; | |
use std::collections::HashMap; | |
use std::str; | |
use serde::Serialize; |
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
(async () => { | |
const fs = require('fs').promises; | |
const { execSync } = require('child_process'); | |
const CSS_PATH = '_next/static/css'; | |
const OUTPUT_DIR = 'deploy'; | |
const BUCKET = 'qnt.gg'; | |
const generatedFiles = await fs.readdir('out'); | |
const staticHtmlFiles = generatedFiles.filter((name) => ( | |
name.slice(-5) === '.html' && name !== '404.html' |
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
import React, { useContext, useState, useEffect } from 'react'; | |
import { useSelector } from 'react-redux'; | |
import { useFetch } from '../../hooks'; | |
import UrlContext from '../../index'; | |
import ReplaySummary from './ReplaySummary'; | |
import ReplayTimeline from './ReplayTimeline'; | |
import LoadingState from '../shared/LoadingState'; | |
const TimelineArea = ({ replay }) => { | |
const urlPrefix = useContext(UrlContext); |
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
import { useState } from 'react'; | |
const useLoadingState = () => { | |
const [loadingState, _setLoadingState] = useState(null); | |
const allowedStates = [ | |
'inProgress', | |
'success', | |
'error', | |
'notFound', | |
]; |
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
import React, { useRef } from 'react'; | |
import DefaultResponse from './DefaultResponse'; | |
import LoadingAnimation from './LoadingAnimation'; | |
const LoadingState = ({ | |
defer, | |
noLoad, | |
spinner, | |
state, | |
initial, |
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
from pathlib import Path | |
from zephyrus_sc2_parser import parse_replay | |
# change this to match the directory you're using | |
replays = Path('replays') | |
# change these to desired cutoff times | |
BUILDING_SECONDS_INTO_GAME = 0 | |
UPGRADE_SECONDS_INTO_GAME = 0 |
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
from pathlib import Path | |
from multiprocessing import Pool | |
from sc2_tournament_analysis import recursive_parse | |
from zephyrus_sc2_parser import parse_replay | |
def handle_replay(path, player_names, identifiers): | |
replay = parse_replay(path) | |
# do stuff and then return the data you want | |
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
from pathlib import Path | |
from zephyrus_sc2_parser import parse_replay | |
# change this to match the directory you're using | |
replays = Path('replays') | |
def recurse(dir_path): | |
""" | |
Recursively searches directories to parse replay files |
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
import uuid | |
import json | |
from pathlib import Path, PurePath | |
from sc2_tournament_analysis import recursive_parse, json_to_csv | |
from multiprocessing import Pool | |
from fuzzywuzzy import fuzz | |
from zephyrus_sc2_parser import parse_replay | |
from sc2_tournament_analysis.defaults import ( | |
standard_ignore_units, standard_merge_units, standard_player_match | |
) |
NewerOlder