Skip to content

Instantly share code, notes, and snippets.

View crorella's full-sized avatar

Cristian Orellana crorella

  • OpenAI
  • SFO Bay Area
View GitHub Profile
@crorella
crorella / airflow.cnf
Created May 31, 2017 16:55
Airflow config file
# The home folder for airflow, default is ~/airflow
airflow_home = /home/ubuntu/airflow
# The folder where your airflow pipelines live, most likely a
# subfolder in a code repository
# This path must be absolute
dags_folder = /home/ubuntu/etl
# The folder where airflow should store its log files
# This path must be absolute
import os
import requests
url = 'http://54.202.193.48/upload'
headers = {}
for root, dirs, files in os.walk("PATH TO YOUR REPLAY FOLDER", topdown=False):
for name in files:
if name.endswith('StormReplay'):
path = os.path.join(root, name)

Now we can run the regression tool:

pit-devvm-opswiseagent1:tests:cristiano (EDW-30134)$ python ~/cobras-rt/cobras-rt.py
2014-12-30 21:51:07,568 - INFO: Running /usr/local/bin/python -m zombie_runner run /home/cristiano/repo/etl/ordersv2/merge_hive/billings/regression_test/cleanup
2014-12-30 21:51:50,421 - INFO: Run complete, execution time: 42.850837 seconds
2014-12-30 21:51:50,424 - INFO: Running /usr/local/bin/python -m zombie_runner run /home/cristiano/repo/etl/templates/hivemerge --config_file=/home/cristiano/repo/etl/ordersv2/merge_hive/billings/regression_test/config/config.yml
2014-12-30 22:03:39,267 - INFO: Run complete, execution time: 708.842582 seconds
2014-12-30 22:03:39,268 - INFO: Running /usr/local/bin/python -m zombie_runner run /home/cristiano/repo/etl/ordersv2/merge_hive/billings/regression_test/tests
2014-12-30 22:06:34,092 - INFO: Run complete, execution time: 174.823381 seconds
{
"_eventid": 11,
"_event": "NNet.Replay.Tracker.SScoreResultEvent",
"_gameloop": 0,
"_bits": 60432,
"m_instanceList": [
{
"m_values": [
[
{
@crorella
crorella / a.json
Last active January 10, 2016 03:21
[
{
"position": "1",
"hero": "Chen",
"games": "123",
"winrate": "55%"
},
{
"position": "2",
"hero": "E.T.C.",
{"_eventid": 27, "m_unitGroup": null, "_event": "NNet.Game.SCmdEvent", "m_abil": {"m_abilLink": 423, "m_abilCmdIndex": 0, "m_abilCmdData": null}, "_gameloop": 1069, "_bits": 264, "m_data": {"TargetUnit": {"m_snapshotControlPlayerId": 12, "m_snapshotPoint": {"y": 632957, "x": 542501, "z": 32368}, "m_snapshotUpkeepPlayerId": 12, "m_timer": 0, "m_targetUnitFlags": 111, "m_snapshotUnitLink": 426, "m_tag": 26476546}}, "_userid": {"m_userId": 0}, "m_cmdFlags": 256, "m_sequence": 21, "m_otherUnit": null}
@crorella
crorella / Team1
Last active August 29, 2015 14:19
[
[0, 0],
[1, 0],
[2, 0],
[3, 0],
[4, 0],
[5, 0],
[6, 0],
[7, 0],
[8, 0],
@crorella
crorella / data
Created April 26, 2015 01:05
data
[
{1:0, 2: 0},
{1:0, 2: 0},
{1:0, 2: 0},
{1:0, 2: 0},
{1:0, 2: 0},
{1:0, 2: 0},
{1:0, 2: 0},
{1:0, 2: 0},
{1:0, 2: 0},
{"5505025": {"Name": "TownCannonTowerL3", "createdAt": 0}, "12320769": {"Name": "TownCannonTowerL3", "createdAt": 0}, "42205185": {"Name": "TownCannonTowerL2Standalone", "createdAt": 0}, "37224449": {"Name": "StormGameStartPathingBlockerDiagonal", "createdAt": 0}, "3932161": {"Name": "TownWallRadial17L2", "createdAt": 0}, "32243713": {"Name": "StormGameStartPathingBlockerDiagonal", "createdAt": 0}, "4194305": {"Name": "TownMoonwellL2", "createdAt": 0}, "27262977": {"Name": "StormGameStartPathingBlocker", "createdAt": 0}, "12845057": {"Name": "TownCannonTowerL3", "createdAt": 0}, "4718593": {"Name": "TownCannonTowerL2", "createdAt": 0}, "2359297": {"Name": "TownTownHallL2", "createdAt": 0}, "39059457": {"Name": "StormGameStartPathingBlockerDiagonal", "createdAt": 0}, "13369345": {"Name": "TownTownHallL2", "createdAt": 0}, "34078721": {"Name": "TownGateL3BLURTLVisionBlocked", "createdAt": 0}, "524289": {"Name": "TownCannonTowerL2", "createdAt": 0}, "29097985": {"Name": "StormGameStartPathingBlocker", "createdAt
__author__ = 'cristiano'
# Update addons from curseforge
from bs4 import BeautifulSoup
import urllib2
import urllib
import tempfile
from os import path, makedirs
from shutil import move, rmtree
import zipfile