Skip to content

Instantly share code, notes, and snippets.

View sparfenyuk's full-sized avatar

Sergey Parfenyuk sparfenyuk

  • Munich, Germany
View GitHub Profile
@sparfenyuk
sparfenyuk / joinsrc.py
Last active January 25, 2025 08:25
Concats all the source files in the given git repository (written by Claude)
#!/usr/bin/env python3
import os
import subprocess
import sys
from datetime import datetime
import fnmatch
from pathlib import Path
import argparse
def get_git_status(repo_path):
@sparfenyuk
sparfenyuk / setup.sh
Created March 29, 2017 12:16
Configuring make of 'gettext' sources for iOS target
#! /bin/bash
export MINVER="8.0" # the minimum supported OS version
export SDKVER="10.2" # SDK version
export PREFIX="$HOME/built-for-ios" # where the library goes
export DEVROOT="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain"
export SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS${SDKVER}.sdk"
export PKG_CONFIG_LIBDIR="${PREFIX}/lib/pkgconfig:${SDKROOT}/usr/lib/pkgconfig"
export COMMON_FLAGS="-arch arm64 -isysroot ${SDKROOT}"
#include <iostream>
#include <iterator>
#include <deque>
#include <vector>
#include <algorithm>
#include <cassert>
#include <cmath>
using namespace std;
#include <iostream>
#include <iterator>
#include <set>
#include <vector>
#include <algorithm>
#include <cassert>
#include <cmath>
using namespace std;
#include <iostream>
#include <iterator>
#include <set>
#include <vector>
#include <algorithm>
#include <cassert>
#include <cmath>
using namespace std;
#include <vector>
#include <deque>
#include <iostream>
#include <cassert>
using namespace std;
typedef long long input_type;
typedef vector<input_type> container;
typedef deque<container> queue;
#include <vector>
#include <iostream>
#include <iterator>
using namespace std;
typedef long long input_type;
typedef vector<input_type> container;
input_type get_parent_index(input_type i)
@sparfenyuk
sparfenyuk / union_set.cpp
Created October 13, 2014 14:03
Operations on sets
#include <iostream>
#include <iterator>
#include <deque>
#include <vector>
#include <algorithm>
#include <cassert>
#include <cmath>
using namespace std;
@sparfenyuk
sparfenyuk / segement_tree.cpp
Created October 13, 2014 08:32
Find min in segment tree
#include <iostream>
#include <iterator>
#include <deque>
#include <vector>
#include <algorithm>
#include <cassert>
#include <cmath>
using namespace std;
@sparfenyuk
sparfenyuk / heap.cpp
Created October 11, 2014 20:37
Heap: insert integer and extract maximum
#include <iostream>
#include <iterator>
#include <deque>
#include <vector>
#include <algorithm>
#include <cassert>
using namespace std;
typedef unsigned long long input_type;