Skip to content

Instantly share code, notes, and snippets.

View saber-solooki's full-sized avatar

saber solooki saber-solooki

  • Adjust.com
  • Berlin/Germany
View GitHub Profile
@saber-solooki
saber-solooki / gist:468f300187e8302bad08edc48ff69d43
Created September 5, 2025 08:57
Sync/Async performance comparison
import structlog
import time
import asyncio
import multiprocessing
from config import settings
log = structlog.get_logger()
async def sync_worker_coroutine(worker_id: int, process_id: int, iterations: int = 100):
@saber-solooki
saber-solooki / SimpleRecyclerView.java
Created July 7, 2018 18:40
Sticky Header RecyclerView
package com.saber.customstickyheader;
import android.graphics.Color;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
@saber-solooki
saber-solooki / MyRxRecyclerView
Created April 26, 2018 11:06
Detect when the RecyclerView reaches the bottom in Observable manner
package com.saber.ekip.views.rxRecyclerView;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import io.reactivex.Observable;
import static com.saber.ekip.views.rxRecyclerView.Preconditions.checkNotNull;