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
// This is a test |
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
### | |
Putting trust in Yahoo rather than OpenKeyval. | |
Probably not useful, just did it to see if it was possible. | |
### | |
okvGet = (key, callback) -> | |
yql_query = "select * from html where url='https://secure.openkeyval.org/#{key}' and xpath='/html/body/p/text()'" | |
$.ajax | |
url: 'https://query.yahooapis.com/v1/public/yql', |
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
loadDependencies = (callback) -> | |
requirements = {jq: '1.6.1', jqui: '1.8.7'} | |
getScript = (url, next) -> | |
script = document.createElement('script') | |
script.src = url | |
head = document.documentElement.childNodes[0] | |
script.onload = script.onreadystatechange = onScriptLoad script, next | |
head.appendChild script |
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 | |
import pygcurse | |
import pygame | |
from pygame.locals import * | |
WINWIDTH = 40 | |
WINHEIGHT = 50 | |
FPS = 40 |
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
def load_object(path): | |
"""Load an object given its absolute object path, and return it. | |
object can be a class, function, variable o instance. | |
path ie: 'scrapy.contrib.downloadermiddelware.redirect.RedirectMiddleware' | |
""" | |
# monkeypatch | |
if not isinstance(path, basestring): | |
return path |
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 MultiLoader(object): | |
def __init__(self): | |
self.d = {} | |
def load(self, values): | |
for k, v in zip(self.keys, values): | |
if k: | |
self.d[k] = self.process(k, v) | |
def process(self, key, value): |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<kml xmlns="http://earth.google.com/kml/2.2"> | |
<Document> | |
<Folder> | |
<name>a name</name> | |
<description>Here are multiple maps displayed in one</description> | |
<NetworkLink> | |
<open>0</open> |
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 re | |
from rest_framework import serializers, renderers, parsers | |
class JSONRenderer(renderers.JSONRenderer): | |
def render(self, data, *args, **kwargs): | |
if data: | |
data = recursive_key_map(underscore_to_camelcase, data) | |
return super(JSONRenderer, self).render(data, *args, **kwargs) |
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
Entering in ARM enviromnent | |
Compiler found at /Users/human/.buildozer/android/platform/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin//arm-linux-androideabi-gcc | |
/Users/human/Code/kivy/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' | |
warnings.warn(msg) | |
running build_ext | |
building 'jnius' extension | |
creating build | |
creating build/temp.macosx-10.4-x86_64-2.7 | |
creating build/temp.macosx-10.4-x86_64-2.7/jnius | |
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/human/.buildozer/android/platform/android-ndk-r9/platforms/android-14/arch-arm -DNDEBUG -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/human/.buildozer/android/platform/android-ndk-r9/platforms/android-14/arch-arm -I/Users/human/Code/kivy/.buildozer/android/platform/python-for-android/build/python-install/include/python2.7 -c jnius/jnius.c -o build/temp.macosx-10.4-x86_64 |
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
from kivy.app import App | |
from kivy.uix.button import Button | |
from android import activity | |
__version__ = '0.0.1' | |
class MyApp(App): | |
def __init__(self, *args, **kwargs): | |
super(MyApp, self).__init__(*args, **kwargs) |
OlderNewer