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
# Utility to extract image and sound assets from Zombie Wars game (also known as Halloween Harry 2) | |
# takes some inspiration from Wombat https://www.szevvy.com/ | |
# Pratik Anand 2021 (twitter : @pratikone) | |
# Blog post : https://pratikone.github.io/gaming/2021/09/02/reverse-engineer-zombiewars.html | |
# Running : | |
# Download DEARK from https://entropymine.com/deark/ and keep it somewhere and modify DEARK_PATH_WIN to point to deark.exe | |
# set GAME_FOLDER_PATH to point to folder containing game assets like GFX.SB0, SFX.SB0 | |
# run the script (install binario using pip). You don't need to provide any args. | |
# folders will be created for each .SB0 like gfx. If the extracted assets contain RAW files deark convert it to png and store | |
# it in converted folder within the parent folder like gfx. |
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 os | |
import re | |
import time | |
from collections import namedtuple | |
import codecs | |
import tweepy | |
import json | |
from datetime import datetime | |
from requests.exceptions import Timeout, ConnectionError | |
from requests.packages.urllib3.exceptions import ReadTimeoutError, ProtocolError |
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
########################################################################################################### | |
# Created by : | |
# PRATIK ANAND | |
# github.com/pratikone | |
# It splits a large SQL dump file into smaller files. | |
# It preservers queries by only splitting at ; | |
# It launches a new thread for write I/O operation | |
# Tested on SQL dump of size 170 GB | |
# It is resumable by filename as it creates filename with lines | |
# For example, if a file contains lines from 501 - 2000 , the filename will be 500-2000 |
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 string | |
import sys | |
from sets import Set | |
class Node : | |
def __init__(self, word) : | |
self.value = word | |
self.neighbors = [] | |
self.weight = sys.maxint |
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
2 3 | |
4 | |
0 1 | |
0 2 | |
1 2 | |
1 1 | |
8 | |
R | |
R | |
D |
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 time | |
from subprocess import * | |
PATH = "/home/pratikone/Documents/git/redis/src/redis-cli" | |
string = "zadd sortie " | |
for i in xrange(1,1000001) : | |
string = string + str(i) + " richa" + str(i) + " " | |
if (i % 1000) == 0 : | |
print i |
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
########################## | |
# Author : Pratik Anand # | |
########################## | |
from tabulate import tabulate | |
import copy | |
IS_LOCAL_ALIGNMENT = False | |
USE_BLOSUM = False | |
match = 1 | |
mismatch = -1 |
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
########################## | |
# Author : Pratik Anand # | |
########################## | |
from tabulate import tabulate | |
import copy | |
class Obj : | |
data = 0 | |
x = 0 | |
y = 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
########################## | |
# Author : Pratik Anand # | |
########################## | |
from sets import Set | |
from math import log | |
from decimal import * | |
from tabulate import tabulate | |
import copy |
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
// The code is based on needle.c for Needleman-Wunsch algorithm at | |
// https://github.com/vtsynergy/OpenDwarfs/blob/master/dynamic-programming/nw/needle.c | |
#define LIMIT -999 | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
#include "needle.h" | |
#include <sys/time.h> |
NewerOlder