Skip to content

Instantly share code, notes, and snippets.

View ZeldaZach's full-sized avatar
💭
The inner machinations of my mind are an enigma

Zach H ZeldaZach

💭
The inner machinations of my mind are an enigma
  • Google
  • Multiverse
View GitHub Profile
import json
import pathlib
if __name__ == "__main__":
custom_order = {"mythic": 0, "rare": 1, "uncommon": 2, "none": 3}
path = pathlib.Path("mtgjson-website/docs/.vuepress/public/resources/supporters.json")
with path.open() as f:
content = json.load(f)
import numpy
import pandas
def trend_line(index, data, order=1):
coefficients = numpy.polyfit(index, list(data), order)
slope = coefficients[-2]
return float(slope)
package org.mage.test.utils;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.Effect;
import mage.cards.*;
#!/usr/bin/env python3
import json
import sqlite3
import time
JSON_FILE = "AllSets-x.json" #Set Name
DB_FILE = "Magic " + str(time.time()) + ".db"
# Get the value of the card, return None if NULL
def getVal(data, field):
#!/usr/bin/env python3
import json
import sqlite3
import time
JSON_FILE = "SOI-x.json" #Set Name
DB_FILE = "Magic " + str(time.time()) + ".db"
traffic = json.load(open(JSON_FILE))["cards"]
conn = sqlite3.connect(DB_FILE)
#!/usr/bin/env python3
import json
import sqlite3
import time
JSON_FILE = "SOI.json" #Set Name
DB_FILE = "Magic " + str(time.time()) + ".db"
traffic = json.load(open(JSON_FILE))["cards"]
conn = sqlite3.connect(DB_FILE)
.
├── appicon.ico
├── cardback.svg
├── cockatrice.svg
├── config
│   ├── appearance.svg
│   ├── deckeditor.svg
│   ├── general.svg
│   ├── interface.svg
│   ├── messages.svg
@ZeldaZach
ZeldaZach / Buildfile.sh
Last active September 23, 2015 07:48
Quick Build mac
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
brew install qt5
cd ~/Desktop;
git clone https://github.com/Cockatrice/Cockatrice.git;
cd Cockatrice;
mkdir -p build;
cd build;
cmake .. -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.5.0/;
#!/bin/bash
#This is used to update main version of Cockatrice
set -e
log_date=$(date "+%b_%d_%Y_%H.%M.%S")
openOracle=0
while getopts ":o" opt; do
case $opt in
o) openOracle=1;;
#!/bin/bash
#This is used to test PRs
set -e
cd ~/Desktop/Stuff/cockatrice
debug=0
server=0
openOracle=0