Skip to content

Instantly share code, notes, and snippets.

View alanjds's full-sized avatar

Alan Justino da Silva alanjds

  • Santo André, São Paulo/SP - Brazil
View GitHub Profile
We couldn’t find that file to show.
@alanjds
alanjds / oraexpy.py
Created September 27, 2011 14:32 — forked from felclef/oraexpy.py
Oracle exp over py yay =D
# -*- coding: cp1252 -*-
import os
import time
import re
import cx_Oracle
class Exec:
debug = True
@staticmethod
@alanjds
alanjds / binascii.py
Last active December 20, 2015 07:09
Solves: "LookupError: unknown encoding: hex"
# Adapted from: https://bitbucket.org/pypy/pypy/src/f2bf94943a41/lib_pypy/binascii.py
"""A pure Python implementation of binascii.
Rather slow and buggy in corner cases.
PyPy provides an RPython version too.
"""
try:
from _binascii import *
diff --git a/bootstrap/minimal/jni/main.c b/bootstrap/minimal/jni/main.c
index ca1a7de..252059e 100644
--- a/bootstrap/minimal/jni/main.c
+++ b/bootstrap/minimal/jni/main.c
@@ -1,5 +1,7 @@
#include <jni.h>
#include <errno.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include <android/log.h>
@alanjds
alanjds / README
Last active August 29, 2015 14:06 — forked from tito/README
P4A_pyjnius_DIR=~/code/pyjnius ./distribute.sh -b minimal -m 'pyjnius python' -u pyjnius
cd .; ./build.py --package org.minimal.test --name _MINIMAL --version 1 --private ~/code/testmininal --asset debug installd
adb logcat *:S python:D
@alanjds
alanjds / README
Last active August 29, 2015 14:06 — forked from tito/README
P4A_pyjnius_DIR=~/code/pyjnius ./distribute.sh -b minimal -m 'pyjnius python' -u pyjnius
cd .; ./build.py --package org.minimal.test --name _MINIMAL --version 1 --private ~/code/testmininal --asset debug installd
adb logcat *:S python:D
@alanjds
alanjds / README
Last active August 29, 2015 14:06 — forked from tito/README
P4A_pyjnius_DIR=~/code/pyjnius ./distribute.sh -b minimal -m 'pyjnius python' -u pyjnius
cd .; ./build.py --package org.minimal.test --name _MINIMAL --version 1 --private ~/code/testmininal --asset debug installd
adb logcat *:S python:D
@alanjds
alanjds / logs
Last active August 29, 2015 14:06
09-26 00:18:56.167: I/python(10572): PATH: ['/data/app/org.test.minimalcalc-1.apk/assets', '/data/app/org.test.minimalcalc-1.apk/assets/lib/python2.7/', '/data/app/org.test.minimalcalc-1.apk/assets/lib/python2.7/site-packages/']
09-26 00:18:56.168: I/python(10572): PWD: /
09-26 00:18:56.168: I/python(10572): PWD: /
09-26 00:18:56.170: I/python(10572): Traceback (most recent call last):
09-26 00:18:56.170: I/python(10572): File "/data/data/org.test.minimalcalc/files/_bootstrap.py", line 127, in <module>
09-26 00:18:56.170: I/python(10572): runpy._run_module_as_main(main_module, False)
09-26 00:18:56.170: I/python(10572): File "/Users/alanjds/src/git/python-for-android/dist/default/private/lib/python2.7/runpy.py", line 162, in _run_module_as_main
09-26 00:18:56.171: I/python(10572): File "/Users/alanjds/src/git/python-for-android/dist/default/private/lib/python2.7/runpy.py", line 72, in _run_code
09-26 00:18:56.171: I/python(10572): File "/Users/alanjds/src/git/p4a-minimal-shell/main.py", line 44, i
@alanjds
alanjds / __init__.py
Created August 10, 2015 14:03
Error on pycryptodome recipe (p4a)
#coding: utf-8
from pythonforandroid.toolchain import CompiledComponentsPythonRecipe, PythonRecipe
class PyCryptodomeRecipe(PythonRecipe):
version = '3.1'
url = 'https://pypi.python.org/packages/source/p/pycryptodome/pycryptodome-{version}.zip'
site_packages_name= 'pycrypto'
@alanjds
alanjds / awslambda.bootstrap.py
Created April 16, 2018 22:18 — forked from lucasrcosta/awslambda.bootstrap.py
AWS Lambda Python Runtime
# -*- coding: utf-8 -*-
# /var/runtime/awslambda/bootstrap.py
"""
aws_lambda.bootstrap.py
Amazon Lambda
Copyright (c) 2013 Amazon. All rights reserved.
Lambda runtime implemention
"""