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.lang import Builder | |
from kivy.clock import Clock | |
from kivy.animation import Animation | |
# Blinks and rotates | |
kv = """ | |
<Blinky@Widget>: | |
angle: 45 | |
blink_size: 0 |
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.lang import Builder | |
from kivy.clock import Clock | |
from kivy.animation import Animation | |
# Makes a widget bounce around the screen | |
kv = """ | |
<AnimatedMenu@GridLayout>: | |
cols: 2 | |
spacing: 10, |
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.lang import Builder | |
from kivy.clock import Clock | |
from kivy.animation import Animation | |
# Loads an image from the web, changes it's color and angle. | |
kv = """ | |
<AnimatedImage@AsyncImage>: | |
color: (1,1,1,1) # Setting color for images works best on white images | |
color2: (1,0,0,1) |
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.lang import Builder | |
from kivy.clock import Clock | |
from kivy.animation import Animation | |
# Expands an element in a grid and adds a widget to it/ | |
kv = """ | |
<AnimatedListTile@FloatLayout>: | |
canvas.before: | |
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
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.clock import Clock | |
from kivy.animation import Animation | |
from kivy.garden.mapview import MapView | |
print("A") | |
# Animate moving around on a map | |
kv = """ | |
FloatLayout: |
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 os.path import join, dirname, realpath, exists, isdir, basename, dirname, abspath | |
from os import listdir, unlink, makedirs, environ, chdir, getcwd, walk, remove | |
def remove_junk(d): | |
exts = [".so.o"] | |
for root, dirnames, filenames in walk(d): | |
for fn in filenames: | |
if any([fn.endswith(ext) for ext in exts]): | |
print("Removing", join(root,fn)) | |
unlink(join(root, fn)) |
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
# Files are below, this is just to change the name of the gist |
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
BoxLayout: | |
Button: | |
text: "hello" | |
on_release: | |
app.pick_image() | |
Button: | |
text: "update" | |
on_release: | |
app.update() |
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
@interface NotchDetector : UIViewController | |
@end | |
@implementation NotchDetector | |
-(id)init { | |
NSLog(@"initializing NotchDetector"); | |
return self; | |
} | |
- (BOOL)hasTopNotch { | |
if (@available(iOS 13.0, *)) { |
OlderNewer