- create a tools/hooks/
- put your hook.py + hook_something.py...
- in buildozer.spec, reference p4a.hook = tools/hooks/hook.py
- adjust
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.uix.relativelayout import RelativeLayout | |
from kivy.properties import BooleanProperty, NumericProperty | |
from kivy.animation import Animation | |
class VisibleContainer(RelativeLayout): | |
visible = BooleanProperty(True) | |
animated = BooleanProperty(False) | |
duration = NumericProperty(0.2) | |
capture = BooleanProperty(False) |
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
""" | |
Refactoring tool using ChatGPT from Vue 2 to Vue 3 | |
$ export OPENAPI_APIKEY=sk......... | |
$ python refactor.py MyView.vue | |
""" | |
import os | |
import re | |
import sys |
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
openapi: 3.0.0 | |
info: | |
title: Example API | |
version: 1.0.0 | |
servers: | |
- url: https://example.com/ | |
paths: | |
/example2: | |
get: | |
tags: |
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
""" | |
Kivy/ffpyplayer example to read transparent video | |
================================================= | |
Right now, VP9/ffmpeg encoder supports alpha channel, under the yuva420p | |
pixel format. But for decoding, the default libvp9 used by ffmpeg doesn't | |
support it, so we need to ask for libvpx-vp9 instead. | |
I was using a set of png image as a source, and got a VP9+alpha video with:: |
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 pandawrapper import PandaApp | |
from kivy.base import runTouchApp | |
try: | |
from kaki.app import App | |
with_kaki = True | |
except ImportError: | |
from kivy.app import App | |
with_kaki = False | |
from kivy.factory import Factory as F |
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 os | |
os.environ['KIVY_WINDOW'] = '' # noqa | |
os.environ['KIVY_GL_BACKEND'] = 'gl' | |
from kivy.base import EventLoop, runTouchApp | |
from kivy.core.window import WindowBase | |
from kivy.graphics import Callback, opengl as gl | |
from kivy.lang import Builder | |
from kivy.properties import ObjectProperty |
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
# to add in the spcec: | |
android.api = 28 | |
android.minapi = 26 | |
android.ndk = 17c | |
p4a.hook = p4a_hook.py | |
# i have my own set of java tools, don't use it if you don't want it | |
android.add_src = java/src/ | |
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.lang import Builder | |
from kivy.factory import Factory as F | |
from kivy.properties import StringProperty, ObjectProperty, BooleanProperty | |
from kivy.core.image import Image as CoreImage | |
Builder.load_string(""" | |
<ImgScatter>: | |
size_hint: None, None | |
canvas: | |
Color: |
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
diff --git a/mapview/downloader.py b/mapview/downloader.py | |
index f5b9509..c3b1d75 100644 | |
--- a/mapview/downloader.py | |
+++ b/mapview/downloader.py | |
@@ -77,7 +77,8 @@ class Downloader(object): | |
print("Downloader: use cache {}".format(cache_fn)) | |
return tile.set_source, (cache_fn, ) | |
tile_y = tile.map_source.get_row_count(tile.zoom) - tile.tile_y - 1 | |
- uri = tile.map_source.url.format(z=tile.zoom, x=tile.tile_x, y=tile_y, | |
+ tile_x = tile.tile_x % (tile.map_source.get_col_count(tile.zoom)) |
NewerOlder