This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class X: | |
@staticmethod | |
@classmethod | |
__init__ | |
@property | |
methods | |
subclassed methods | |
__magic_methods__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
public class HelloWorld{ | |
public static String randomString(int i) | |
{ | |
Random ran = new Random(i); | |
StringBuilder sb = new StringBuilder(); | |
while (true) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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"); |
OlderNewer