Skip to content

Instantly share code, notes, and snippets.

View BOOtak's full-sized avatar

Kirill Leyfer BOOtak

View GitHub Profile
import sys
from PyQt5.QtCore import Qt, QEvent
from PyQt5.QtWidgets import QWidget, QApplication
class TransparentWidget(QWidget):
def __init__(self):
super(TransparentWidget, self).__init__()
def changeEvent(self, e):
class X:
@staticmethod
@classmethod
__init__
@property
methods
subclassed methods
__magic_methods__
private boolean okToShow(ActivityRecord r) {
return r.userId == mCurrentUser
|| (r.info.flags & ActivityInfo.FLAG_SHOW_ON_LOCK_SCREEN) != 0;
}
....
mService.mWindowManager.addAppToken(addPos, r.userId, r.appToken,
r.task.taskId, r.info.screenOrientation, r.fullscreen,
(r.info.flags & ActivityInfo.FLAG_SHOW_ON_LOCK_SCREEN) != 0);
@BOOtak
BOOtak / amps_parity.py
Last active August 29, 2015 14:23
AMPS parity
#!/usr/bin/python3
import sys
def update_crc(data, crc):
temp = data
for i in range(0, 12):
crc = crc << 1
if temp & 0x800 != 0:
import java.util.Random;
public class HelloWorld{
public static String randomString(int i)
{
Random ran = new Random(i);
StringBuilder sb = new StringBuilder();
while (true)
{
db = connect("localhost:27017/thesis");
deviceIds = db.gestures.distinct("deviceId");
// new Date(ISODate().getTime() - 1000 * 60 * 18) - 18 minutes ago
one_finger_touches = db.gestures.aggregate(
[
{"$match": {
"deviceId": deviceIds[0],
"timestamp": {"$gte": new ISODate("2016-01-10T00:00:00Z")}
#!/bin/sh
# get your audio device name by
# pactl list | grep -A2 'Source' | grep input
# command
gst-launch-1.0 -e \
ximagesrc startx=0 use-damage=0\
! 'video/x-raw,framerate=30/1'\
! queue\
! mix. \
public static void hackyLog(String msg) {
try {
throw new Exception("hack :-)");
}
catch(Exception exception0) {
String[] array_string = exception0.getStackTrace()[1].getClassName().split("\\.");
Log.d("paranoid.me_" + array_string[array_string.length - 1], "[" + exception0.getStackTrace()[
1].getMethodName() + ":" + exception0.getStackTrace()[1].getLineNumber() + "] " +
msg);
return;
int __fastcall sub_B000(char *a1)
{
int i; // r3@1
int v2; // r3@2
char *v3; // r0@9
int v4; // r1@9
int v5; // t1@9
int v6; // r3@9
int v7; // t1@11
int v8; // t1@14
#include <stdio.h>
typedef void (*greet_name)(char* name);
void greet_gracefully(char* name) {
printf("Hello, good sir %s\n", name);
}
void greet_ilya(greet_name callback) {
callback("Ilya");