Skip to content

Instantly share code, notes, and snippets.

@Jaa-c
Jaa-c / ci_main.py
Last active January 12, 2020 20:55
Event based async jobs with dependencies
import asyncio
from enum import Enum
import queue
import time
import json
from random import seed
from random import random
traced_events = []
script_start = time.time()
@Jaa-c
Jaa-c / transform.py
Last active February 27, 2019 18:40
Fixing compilation output for UECompileTimesVisualizer
import sys
log_file = "log.txt" if len(sys.argv) < 2 else sys.argv[1]
result = list() # this is the result file
insertPosition = dict()
currentBlock = list() # current text that will be moved as soon as we encounter next time()
parseBlock = False # true if inside the section that should be moved
with open(log_file, 'r') as file:
virtual bool eventFilter(QObject *obj, QEvent *event);
bool GLWidget::eventFilter(QObject *, QEvent *event) {
switch(event->type()) {
case QEvent::MouseMove:
{
QMouseEvent *e = (QMouseEvent *) event;
controlls->mousePositionChanged(e->x(), e->y());
break;
@Jaa-c
Jaa-c / gist:5456278
Created April 24, 2013 22:59
*Basic* idea how to use custom camera preview in android.
package com.jaa.camera;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.ImageFormat;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.YuvImage;