This file contains hidden or 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
x@x-1005HA ~/clones/inclement_gradle/testapps/testapp $ /usr/bin/python -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name gradlemyapppy3 --name 'Gradle My ApplicationPy3' --version 0.1 --package org.test.gradlemyapppy3 --android_api 19 --minsdk 9 --private /home/x/clones/inclement_gradle/testapps/testapp/.buildozer/android/app --permission VIBRATE --orientation portrait --window --copy-libs --arch armeabi-v7a --color=always --storage-dir=/home/x/clones/inclement_gradle/testapps/testapp/.buildozer/android/platform/build | |
[INFO]: Will compile for the following archs: armeabi-v7a | |
[INFO]: Found possible SDK dirs in buildozer dir: android-sdk-20 | |
[INFO]: Will attempt to use SDK at /home/x/.buildozer/android/platform/android-sdk-20 | |
[WARNING]: This SDK lookup is intended for debug only, if you use python-for-android much you should probably maintain your own SDK download. | |
[INFO]: Getting Android API version from user argument | |
[INFO]: Available Android APIs are (19) | |
[INFO]: Reques |
This file contains hidden or 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 jnius import find_javaclass | |
froj jnius.reflect import get_signature | |
c = find_javaclass('android.bluetooth.BluetoothDevice') | |
methods = c.getMethods() | |
for m in methods: | |
if m.getName == 'connectGatt': | |
print(get_signature(m)) |
This file contains hidden or 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
$CSsource = @" | |
using System; | |
using System.Runtime.InteropServices; | |
using System.Diagnostics; | |
namespace Win { | |
public static class API { | |
[DllImport("user32.dll")] | |
static extern IntPtr FindWindow( | |
string lpClassName, |
This file contains hidden or 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 simple example of how to use suggestion text. | |
In this example you setup a word_list at the begining. In this case | |
'the the quick brown fox jumps over the lazy old dog'. This list along | |
with any new word written word in the textinput is available as a | |
suggestion when you are typing. You can press tab to auto complete the text. | |
''' | |
import sys | |
from kivy.clock import Clock | |
from kivy.app import App | |
from kivy.uix.textinput import TextInput |
This file contains hidden or 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
// = Requirements: freetype 2.5, libpng, libicu, libz, libzip2 | |
// = How to compile: | |
// % export CXXFLAGS=`pkg-config --cflags freetype2 libpng` | |
// % export LDFLAGS=`pkg-config --libs freetype2 libpng` | |
// % clang++ -o clfontpng -static $(CXXFLAGS) clfontpng.cc $(LDFLAGS) \ | |
// -licuuc -lz -lbz2 | |
#include <cassert> | |
#include <cctype> | |
#include <iostream> | |
#include <memory> |
This file contains hidden or 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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
This file contains hidden or 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
# License: CC0, do what you want. | |
from kivy.app import App | |
from kivy.properties import NumericProperty | |
from kivy.uix.screenmanager import ScreenManager, Screen | |
from kivy.lang import Builder | |
Builder.load_string(''' | |
#:import random random.random | |
#:import SlideTransition kivy.uix.screenmanager.SlideTransition |
This file contains hidden or 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
""" | |
Turn a piano MIDI file into a basic 3D animated piano video. | |
See the result here: | |
I am leaving it as a script because it is not tested on enough MIDI files yet. | |
Zulko 2014 | |
This script is released under a Public Domain (Creative Commons 0) licence. |
This file contains hidden or 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.base import runTouchApp | |
from kivy.event import EventDispatcher | |
from kivy.lang import Builder | |
from kivy.properties import ObjectProperty, ListProperty, StringProperty, \ | |
NumericProperty, Clock, partial | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.uix.textinput import TextInput | |
import os | |
import subprocess | |
import threading |
This file contains hidden or 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/env python | |
# | |
# Convert a set of similarly-structured .xlsx files into a SQLite DB. | |
# | |
# For example, say you have hundreds of Excel files in a directory | |
# called "big-analysis-project" and that each of these Excel files | |
# has a worksheet containing the same set of columns. Rather than | |
# having hundreds of separate Excel files, it would be handy to have | |
# all their data inside one relational database management system. | |
# |