Skip to content

Instantly share code, notes, and snippets.

View kengoon's full-sized avatar
:octocat:
Awake to steal

Kenechukwu Akubue kengoon

:octocat:
Awake to steal
View GitHub Profile
BoxLayout:
orientation: 'vertical'
Label:
size_hint_y: None
height: '50dp'
id: calc
text: ''
GridLayout:
cols: 4
@jokertarot
jokertarot / clfontpng.cc
Created November 21, 2013 15:43
How to render color emoji font with FreeType 2.5
// = 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>
@tito
tito / README.md
Created February 8, 2019 10:41
Using P4A Hooks

P4A hook example with buildozer

  1. create a tools/hooks/
  2. put your hook.py + hook_something.py...
  3. in buildozer.spec, reference p4a.hook = tools/hooks/hook.py
  4. adjust
@tshirtman
tshirtman / kivy_pdf.py
Last active November 16, 2023 13:34
a very limited pdf viewer implemented directly with kivy widgets, using pdfminer to get the content
# adapted from https://github.com/dpapathanasiou/pdfminer-layout-scanner
from os.path import exists
from tempfile import mkdtemp, mkstemp
from shutil import rmtree
from binascii import b2a_hex
from os import write, close
from threading import Thread
from pdfminer.pdfpage import PDFPage
@rb-dahlb
rb-dahlb / opengl-fix-hd-graphics-windows-10.md
Last active July 17, 2024 14:20
OpenGL fix for Intel HD Graphics 3000 on Windows 10

Fix for Open GL on Intel HD Graphics 3000 - Windows 10

The drivers for Intel HD Graphics 3000 in Windows 10 does not expose all Open GL capabilities of the GPU. So software relying on Open GL features not present in Open GL 1.1 will not work. Using older versions of Windows or Linux might work since the chip have more features than the driver exposes.

The fix is to add a compatibility shim using the Windows ADK software.

1. Download and install Windows ADK

Link: https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install

@immujahidkhan
immujahidkhan / List-Of-Emergency-Telephone-Numbers
Last active April 23, 2023 17:08
List of emergency telephone numbers JSON
[
{
"Country": {
"Name": "Afghanistan",
"ISOCode": "AF",
"ISONumeric": "4"
},
"Ambulance": {
"All": [
"112"
@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
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))
@kannansuresh
kannansuresh / Get Android phone call history.md
Last active June 4, 2024 10:10
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"
@Guhan-SenSam
Guhan-SenSam / 1info.md
Last active May 19, 2024 18:59
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: