Skip to content

Instantly share code, notes, and snippets.

@SafeteeWoW
SafeteeWoW / crc32.lua
Last active May 3, 2019
Pure Lua CRC32 without dependency
View crc32.lua
local LibDeflate = {}
local string_byte = string.byte
-- Calculate xor for two unsigned 8bit numbers (0 <= a,b <= 255)
local function Xor8(a, b)
local ret = 0
local fact = 128
while fact > a and fact > b do
fact = fact / 2
end
@SafeteeWoW
SafeteeWoW / mkl_signed_int8_conv_test.cpp
Created Jan 3, 2019
Try to test signed int8 convolution on Intel MKL.
View mkl_signed_int8_conv_test.cpp
#include <iostream>
#include <cstdint>
#include <numeric>
#include "mkldnn.hpp"
using namespace mkldnn;
using namespace std;
std::vector<int32_t> run_int8_conv(memory::data_type src_data_type) {
auto cpu_engine = engine(engine::cpu, 0);
View RCLootCouncil.lua
RCLootCouncilDB = {
["namespaces"] = {
["EPGP"] = {
["global"] = {
["tocVersion"] = "2.2.2",
["version"] = "2.2.2",
["testTocVersion"] = "",
},
["profiles"] = {
View gist:73fcc52a141376c200acab0606555c75
local libS = LibStub:GetLibrary("AceSerializer-3.0")
local libR = LibStub:GetLibrary("RCSerializer-3.0")
local libC = LibStub:GetLibrary("LibCompress")
local libCE = libC:GetAddonEncodeTable()
local t = RCLootCouncil.db.profile
local s1 = libS:Serialize(t)
local c1 = libCE:Encode(libC:Compress(s1))
print("AceSerializer", s1:len())
View gist:7a4a63770870af06717830d871619242
local requestTime = {}
local frame = _G.TestGetItemInfo or CreateFrame("Frame", "TestGetItemInfo")
frame:RegisterEvent("GET_ITEM_INFO_RECEIVED")
frame:SetScript("OnEvent", function(self, event, id)
if requestTime[id] then
print(format("%d", (GetTime()-requestTime[id])*1000) .. " ms", " ", id) --Time between request and receive"
end
end)
View gist:dc023fb68582df5a0275b2b6f69d71e8
local id = 0
while not GetItemInfoInstant(id) do
id = math.random(1, 200000)
end
local frame = _G.TestGetItemInfo or CreateFrame("Frame", "TestGetItemInfo")
frame:RegisterEvent("GET_ITEM_INFO_RECEIVED")
frame:SetScript("OnEvent", function(self, event, id)
print(GetTime(), event, id)
print("-----")
View gist:ccfa4e6f3fef81d36f9e69b9ed5fb7bb
local NH_1st_boss_links = {
[1]="|cffa335ee|Hitem:140840::::::::110:103::5:1:3524:::|h[Chittering Mandible]|h|r",
[2]="|cffa335ee|Hitem:140815::::::::110:103::5:1:3524:::|h[Infused Chitin Fragment]|h|r",
[3]="|cffa335ee|Hitem:140827::::::::110:103::5:1:3524:::|h[Manatoxin Gland]|h|r",
[4]="|cffa335ee|Hitem:140901::::::::110:103::5:1:3524:::|h[Vintage Suramar Nobility Hat]|h|r",
[5]="|cffa335ee|Hitem:140898::::::::110:103::5:1:3524:::|h[Radiant String of Scorpid Eyes]|h|r",
[6]="|cffa335ee|Hitem:140875::::::::110:103::5:1:3524:::|h[Arcanochitin Hauberk]|h|r",
[7]="|cffa335ee|Hitem:140902::::::::110:103::5:1:3524:::|h[Jagged Carapace Wristclamps]|h|r",
[8]="|cffa335ee|Hitem:140876::::::::110:103::5:1:3524:::|h[Stinger Resistant Bracers]|h|r",
[9]="|cffa335ee|Hitem:140888::::::::110:103::5:1:3524:::|h[Scorpid Handler's Gloves]|h|r",
View gist:e442117c9aa9ab074165d38a4eaad29d
local manyLinks = {
"|cffa335ee|Hitem:152816::::::::110:264::3:1:3524:::|h[Antoran Charhound]|h|r",
"|cffa335ee|Hitem:152035::::::::110:264::3:1:3524:::|h[Blazing Dreadsteed Horseshoe]|h|r",
"|cffa335ee|Hitem:155853::::::::110:264::3:1:3524:::|h[Conch of the Thunderer]|h|r",
"|cffa335ee|Hitem:155848::::::::110:264::3:1:3524:::|h[Condensed Blight Orb]|h|r",
"|cffa335ee|Hitem:152056::::::::110:264::3:1:3524:::|h[Corrupting Dewclaw]|h|r",
"|cffa335ee|Hitem:152046::::::::110:264::3:1:3524:::|h[Coven Prayer Bead]|h|r",
"|cffa335ee|Hitem:152057::::::::110:264::3:1:3524:::|h[Crepuscular Skitterer Egg]|h|r",
"|cffa335ee|Hitem:155847::::::::110:264::3:1:3524:::|h[Cruor of the Avenger]|h|r",
"|cffa335ee|Hitem:152048::::::::110:264::3:1:3524:::|h[Decimator Crankshaft]|h|r",
View gist:12c27729a4cbf1618aeb1c446afd5b19
RCLootCouncilDB = {
["namespaces"] = {
["EPGP"] = {
["global"] = {
["tocVersion"] = "2.2.1",
["version"] = "2.2.1",
["testTocVersion"] = "",
},
["profiles"] = {
You can’t perform that action at this time.