Skip to content

Instantly share code, notes, and snippets.

View psykzz's full-sized avatar

Matt psykzz

View GitHub Profile
@psykzz
psykzz / evtc_parser.py
Created March 7, 2017 00:21
Example parsing the evtc from arcdps gw2
import struct
class Parser(object):
def __init__(self, filepath):
with open(filepath, 'rb') as fh:
self.parse(fh)
def parse(self, fh):
fh.read(4) # skip random EVTC tag
version = fh.read(8)

Keybase proof

I hereby claim:

  • I am psykzz on github.
  • I am msmith (https://keybase.io/msmith) on keybase.
  • I have a public key ASD1sQiexYogAFHBW9faAYYc8LG96uNqjwxmk41kVRzOUwo

To claim this, I am signing this object:

@psykzz
psykzz / parse.py
Created January 30, 2017 17:56
Parse some output from gw2
import csv
STATE = {
"BOSS":0,
"HEADER":1,
"DATA":2,
}
def main():
@psykzz
psykzz / build.md
Last active April 30, 2016 18:09
Script to backup Dark souls 3 saves every 5 mins

Building the EXE yourself

Requirements

  • Python 2.7
  • pyinstaller - pip install pyinstaller

Once everything is installed configure the script and use pyinstaller -F --clean --noupx --win-private-assemblies ds3_save_backup.py.

Your executeable is in ./dist

import time
import json
import datetime
from slackclient import SlackClient
class SlackBot(object):
"""Simplified bot responder for slack"""
def __init__(self, api_key, bot_name='Bat Bot'):
super(SlackBot, self).__init__()
self._api_key = api_key
@psykzz
psykzz / pirc.py
Created January 15, 2015 00:13
IRC bot
import socket
import sys
class IRC:
socket = socket.socket()
read_buffer = ''
def __init__(self):

Keybase proof

I hereby claim:

  • I am psykzz on github.
  • I am msmith (https://keybase.io/msmith) on keybase.
  • I have a public key whose fingerprint is D215 3CC8 AF95 EBB6 94E6 BF40 10C2 F175 E0B3 6B55

To claim this, I am signing this object:

"""Speeds up helper to promote 3rd parties"""
from __future__ import print_function
""" JSON replacement
Load order:
> ujson
> yajl
> simplejson
@psykzz
psykzz / filecombiner.py
Last active August 29, 2015 13:57
Combining a set of files together ( unfinished )
##
class FileCombiner:
""" File combiner class """
# Mock functions
def _starts(self,a,b):
#print 'start',a,b,a.startswith(b)
return a.startswith(b)
def _ends(self,a,b):
#print 'end',a,b,a.endswith(b)
@psykzz
psykzz / monitor.py
Last active December 17, 2015 00:10
file monitor
import os
import sys
import time
class LogReader():
def __init__(self):
self.defaultPath = os.path.join(os.environ['USERPROFILE'],"Documents","EVE","logs","Gamelogs")
self._fp = None # File Handle
self.lastFile = None
self.open()