Skip to content

Instantly share code, notes, and snippets.

Avatar

Kostia Balytskyi ikostia

View GitHub Profile
@ikostia
ikostia / traverse_deps.py
Created Mar 29, 2018
C/C++ dependency traverser
View traverse_deps.py
from __future__ import print_function
import os
import sys
import argparse
import re
from collections import defaultdict
sourceexts = ['.c', '.cpp', '.h', '.hpp', '.cc']
View ExternalSort.py
#! /usr/bin/python
import os, sys
import heapq
class ExternalSorter(object):
CHUNK_SIZE = 10*1000*1000
CHUNK_FILE_NAME = "chunks/chunk.%.5i.txt"
@ikostia
ikostia / 1.html
Last active Dec 19, 2015
HTML page for comparison of Safari performance on sorting native arrays and jQuery sets.
View 1.html
<html>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
function compare(a, b) {
if (a.text() < b.text()) return -1;
if (a.text() > b.text()) return 1;
return 0;
}
function sortArray(a) {