Skip to content

Instantly share code, notes, and snippets.

View kengoon's full-sized avatar
🎯
Focusing

Kenechukwu Akubue kengoon

🎯
Focusing
View GitHub Profile
@hardikfuria12
hardikfuria12 / encrypt_decrypt.py
Created September 9, 2024 16:59
Encrypt and Decrypt Python Dictionary to Java Payload
from kivy import platform
from jnius import autoclass
if platform == "android":
DataSnapshot = autoclass('com.google.firebase.database.DataSnapshot')
HashMap = autoclass('java.util.HashMap')
ArrayList = autoclass('java.util.ArrayList')
Boolean = autoclass('java.lang.Boolean')
String = autoclass('java.lang.String')
Integer = autoclass('java.lang.Integer')
Double = autoclass('java.lang.Double')
@Cheaterman
Cheaterman / main.py
Created August 24, 2024 16:33
A radial progress bar with a gradient!
from kivy.animation import Animation
from kivy.app import App
from kivy.lang import Builder
from kivy.properties import AliasProperty, ColorProperty, NumericProperty
from kivy.uix.effectwidget import AdvancedEffectBase, EffectWidget
class TangentGradient(AdvancedEffectBase):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@kengoon
kengoon / recycleview.py
Last active November 27, 2023 11:57
Kivy RecycleView with extra features
from kivy.uix.recycleview import RecycleView
from kivy.clock import Clock
from kivy.properties import OptionProperty, BooleanProperty, ObjectProperty, NumericProperty, ListProperty
from kivy.animation import Animation
from kivymd.uix.behaviors import StencilBehavior, SpecificBackgroundColorBehavior
from kivymd.uix.boxlayout import MDBoxLayout
from kivy.uix.widget import Widget
from Components.effects import LowerScrollEffect, LowerDampedScrollEffect
@kengoon
kengoon / datepicker.py
Last active November 22, 2023 08:44
A re-implementation of Adam's kivy widget (https://stackoverflow.com/users/1281548/adam) (https://stackoverflow.com/questions/13714074/kivy-date-picker-widget#) in Material Design using KivyMD
from kivy.event import EventDispatcher
from kivy.metrics import dp
from kivy.properties import ListProperty, StringProperty
from kivymd.uix.behaviors import FakeRectangularElevationBehavior
from kivymd.uix.card import MDCard
from kivy.uix.behaviors import ToggleButtonBehavior
from kivy.uix.gridlayout import GridLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
@kulothunganug
kulothunganug / README.md
Last active January 19, 2025 16:33
Guide to compile a kivy app into apk using github

Follow these steps to compile your kivy application to an APK on GitHub (No linux needed).

Note: This method is only recommended if you don't have access to a linux or mac system

  1. Create an github account if you don't have.

  2. Create a repository, you could also create it as private.

  3. Goto your project directory (where main.py exists) and create a file in .github/workflows/build.yml (Create the folders if not already existed).

@Guhan-SenSam
Guhan-SenSam / 1info.md
Last active June 7, 2025 12:07
Methods to Optimizing Kivy Performance

Many people state that kivy is slow. While this may be true it is mostly due to that python is slow to run on android devices.Thus it is in the programmer's hands to properly optimize their code so as to create a performant application.

Most of the lag on android devices runing kivy apps arise due to widget creation. Widget creation remains the slowest step in a kivy app. Here are some of the methods that I follow to optimize my apps and ensure I can hit 60fps even on old devices

Optimization Methods:

@kannansuresh
kannansuresh / Get Android phone call history.md
Last active August 8, 2025 05:00
Get Android phone call history/log programmatically

Source: AndroidDev

To get call history programmatically first add read contact permission in Manifest file:

<uses-permission android:name="android.permission.READ_CONTACTS" />

Create xml file. Add the below code in xml file:

<Linearlayout android:layout_height="fill_parent"
def luhn_checksum(card_number):
def digits_of(n):
return [int(d) for d in str(n)]
digits = digits_of(card_number)
odd_digits = digits[-1::-2]
even_digits = digits[-2::-2]
checksum = 0
checksum += sum(odd_digits)
for d in even_digits:
checksum += sum(digits_of(d*2))
@kengoon
kengoon / calc.kv
Created October 12, 2020 21:02 — forked from tshirtman/calc.kv
BoxLayout:
orientation: 'vertical'
Label:
size_hint_y: None
height: '50dp'
id: calc
text: ''
GridLayout:
cols: 4
@immujahidkhan
immujahidkhan / List-Of-Emergency-Telephone-Numbers
Last active November 2, 2024 13:28
List of emergency telephone numbers JSON
[
{
"Country": {
"Name": "Afghanistan",
"ISOCode": "AF",
"ISONumeric": "4"
},
"Ambulance": {
"All": [
"112"