View gist:381835576664894019a8
"""Fixer that replaces / with div() function"""
from ..fixer_base import BaseFix
from ..fixer_util import Call, Name, Node, Comma
class FixDivision(BaseFix):
PATTERN = "term< any+ '/' any+ >"
def transform(self, node, results):
View find_text_opens
from redbaron import RedBaron
import os
import sys
import io
def is_bad_open(node):
# must be function invocation (not method invocation)
if node.parent.type != 'atomtrailers':
return False
View find_cmp_sorts
from redbaron import RedBaron
import os
import sys
import io
def is_bad_sort(node):
# must be .method invocation
if node.parent.type != 'atomtrailers':
return False
View gist:cee3f476a6f9c7535c34
test_BitSTring (tests.test_asn1.ASN1TestCase) ... ok
test_Integer (tests.test_asn1.ASN1TestCase) ... ok
test_Object (tests.test_asn1.ASN1TestCase) ... ok
test_String (tests.test_asn1.ASN1TestCase) ... DEBUG:__init__:data = None
DEBUG:__init__:data = None
View gist:09d5c00e67fd0aa13cfc
diff -ur libxml2-2.9.2.old/python/setup.py libxml2-2.9.2/python/setup.py
--- libxml2-2.9.2.old/python/setup.py 2014-10-16 09:35:22.000000000 +0100
+++ libxml2-2.9.2/python/setup.py 2015-01-22 12:23:18.804795900 +0000
@@ -123,7 +123,7 @@
with_xslt=0
if missing("libxslt-py.c") or missing("libxslt.py"):
- if missing("xsltgenerator.py") or missing("libxslt-api.xml"):
+ if missing("xsltgenerator.py") or missing("libxslt-python-api.xml"):
print("libxslt stub generator not found, libxslt not built")
View gist:ae657bdbf0f25b81e52b
diff -ur libxslt-1.1.28.old/libxslt/xsltlocale.h libxslt-1.1.28/libxslt/xsltlocale.h
--- libxslt-1.1.28.old/libxslt/xsltlocale.h 2012-09-04 16:26:24.000000000 +0100
+++ libxslt-1.1.28/libxslt/xsltlocale.h 2015-01-22 15:57:16.524757800 +0000
@@ -12,6 +12,7 @@
#define __XML_XSLTLOCALE_H__
#include <libxml/xmlstring.h>
+#include "xsltexports.h"
#ifdef XSLT_LOCALE_XLOCALE
View gist:5191558
- (NSString*)getFilenameFromContentDisposition:(NSString*)contentDisposition {
// filename is optionally quoted.
//
// note that if the disposition indicates the asterisk
// notation - filename*= - this indicates an explicit encoding;
// in that case we will drop through to just using the responses
// suggestedFilename (don't want to deal with the complexity,
// hopefully the system has reasonably behaviour when the
// encoding is actually unambiguous)
NSString* suggestedFilename = nil;
View TouchTimerWorkaround.js
/**
Workaround for iOS 6 setTimeout bug using requestAnimationFrame to simulate timers during Touch/Gesture-based events
Author: Jack Pattishall (jpattishall@gmail.com)
This code is free to use anywhere (MIT, etc.)
Usage: Pass TRUE as the final argument for setTimeout or setInterval.
Ex:
setTimeout(func, 1000) // uses native code
setTimeout(func, 1000, true) // uses workaround