I hereby claim:
- I am hackedd on github.
- I am hackedd (https://keybase.io/hackedd) on keybase.
- I have a public key ASBd8xeF9XUEbzHpdCIJLOL4_24SemCL7LkyFey7m_ZSwwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
from rest_framework.filters import BaseFilterBackend | |
class BulkFilter(BaseFilterBackend): | |
def filter_queryset(self, request, queryset, view): | |
if request.method in ("PUT", "PATCH") and isinstance(request.DATA, list): | |
ids = [obj.get("id") for obj in request.DATA] | |
queryset = queryset.filter(pk__in=ids) | |
return queryset |
import gtk | |
try: | |
import globalhotkeys | |
except ImportError: | |
import guake.globalhotkeys | |
def log(message, *args): | |
log.counter = getattr(log, "counter", 0) + 1 |
import threading | |
def map_async(func, iterable, num_threads=None): | |
"""Apply the function to each of the elements of the iterable, and return | |
the results. The function is run in multiple threads at the same time, the | |
number of which can be specified (and defaults to the length of the | |
iterable, so that each thread runs the function once). | |
The ordering of the results should be considered arbitrary. | |
""" |
import sys | |
source = "/usr/bin/cinnamon-screensaver" | |
time_format = "%l:%M %p" | |
date_format = "%A, %B %e" | |
nul = "\x00" | |
def patch(data, orig, new): |
def etree_parse(fp): | |
from xml.etree.cElementTree import iterparse | |
parser = iterparse(fp, events=('start', 'end')) | |
for action, element in parser: | |
pass | |
def sax_parse(fp): | |
from xml.sax import make_parser, xmlreader, SAXParseException |
diff -r fc1958b32b6a dex-tools/src/main/resources/com/googlecode/dex2jar/bin_gen/sh_template | |
--- a/dex-tools/src/main/resources/com/googlecode/dex2jar/bin_gen/sh_template Mon May 27 11:23:44 2013 +0800 | |
+++ b/dex-tools/src/main/resources/com/googlecode/dex2jar/bin_gen/sh_template Wed May 29 00:28:35 2013 +0200 | |
@@ -37,4 +37,4 @@ | |
do | |
_classpath="${_classpath}:${k}" | |
done | |
-java -Xms512m -Xmx1024m -classpath "${_classpath}" "__@class_name@__" $@ | |
+java -Xms512m -Xmx1024m -classpath "${_classpath}" "__@class_name@__" "$@" |