Skip to content

Instantly share code, notes, and snippets.

View LukeGary462's full-sized avatar

Luke Gary LukeGary462

  • Rye Effects Research
  • Philadelphia, PA
View GitHub Profile
@haschdl
haschdl / rename_pages.py
Created September 7, 2022 20:57
Updating Confluence pages with a three-like numbering (1, 1.1, etc)
from atlassian import Confluence
import configparser
import json
import re
from tabulate import tabulate
config = configparser.ConfigParser()
config.read('auth.cfg')
CONF_URL=config['Confluence']['URL']
@Guhan-SenSam
Guhan-SenSam / instructions.md
Last active February 24, 2025 23:41
Creating an AAB for python apps using Buildozer

Introduction

Recently Google made it compulsory that all new apps must be uploaded not as .apk files but as .aab files. Till just recently the tool Buildozer was only able to compile your python applications to .apk but recent changes have allowed us to compile to .aab format. This is an instruction set that can be used to create a release .aab.

What is an AAB

The new .aab format may be a little confusing. .aab stands for app bundles and consists of a bundle of apk's within it. When you upload an aab to the playstore you are basically uploading a bunch of apk. PlayStore then based on the device that is downloading your application will generate the required apk based on that devices architecture and other parameters.

The introduction of .aab doesn't mean that .apk are no longer useful. .aab are only used for releases where as .apk are still used for testing your application and sharing it with others to directly install(not through the store).

> Note: Test your applications

@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:

@justengel
justengel / office_to_html.py
Last active April 23, 2023 19:15
Convert Microsoft Office documents to html or pdf files that can be viewed in a web browser.
"""Convert office document to file formats that may be visible in a web browser. This file uses microsoft office to
convert the files, so Windows OS is assumed and required!
Requirements:
* pywin32>=228 # Not available for Python3.8 at this time
Server Requirements:
* uvicorn>=0.11.5
* fastapi>=0.58.0
* python-multipart>=0.0.5
@sharoonthomas
sharoonthomas / auth.py
Created October 9, 2019 12:30
Example of using fulfil authentication in a flask app
@blueprint.route('/login', methods=['GET', 'POST'])
def login():
"""
If there is no login, redirect the user to the authorization url
"""
oauth_session = get_oauth_session()
next = flask.request.args.get('next')
authorization_url, state = oauth_session.create_authorization_url(
redirect_uri=flask.url_for(
'.authorized',
@rikka0w0
rikka0w0 / ft2232_to_digilent_jtag.md
Last active December 3, 2025 18:24
FT2232 to Digilent JTag for Xilinx FPGAs (ISE/Vivado)

The Digilent JTag uses FT2232, but its configuration EEPROM contains secrete data needed to be recoginzed by Xilinx ISE/Vivado. The following method only works on linux (tested on Ubuntu16.04), but the patched FT2232 doggle also works on Windows. Since WSL1 does not provide USB device access, the following method will not work for WSL1.

DONT use FT_Prog on offical Digilent cable, as it can trash the firmware! The offical eeprom contains secrete data that cannot be handled correctly by FT_Prog.

Here are steps to create a Digilent-like Jtag that can be used in Xilinx ISE and Vivado

  1. Install softwares: sudo apt-get install libftdi1 ftdi-eeprom
  2. Create a file "flash_digilent.conf" with the following content:
@Jozo132
Jozo132 / float32encoding.js
Last active May 12, 2024 21:04
JavaScript (Node.js) IEEE 754 Single precision Floating-Point (32-bit) binary conversion from and to both Hex and Bin
/* ##### float32encoding.js #####
MIT License
- Forked 'toFloat' from https://gist.github.com/laerciobernardo/498f7ba1c269208799498ea8805d8c30
- Forked 'toHex' from stackoverflow answer https://stackoverflow.com/a/47187116/10522253
- Modifyed by: Jozo132 (https://github.com/Jozo132)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@peisenhower
peisenhower / serial-port.sh
Created July 13, 2018 13:22
wrapper for py-serials miniterm for logging serial ports and quick opening. Must make folder on path ~/Documents/serial-logs for logging to work. Add snippet to .bashrc
alias ports='python -m serial.tools.list_ports'
goofy() {
local logfile=~/Documents/serial-logs/two3-$1-$(date '+%F-%H:%M').log
echo "Logging $1@115200 to $logfile"
python -m serial.tools.miniterm $1 57600 -e --raw | tee $logfile
}
serial() {
local logfile=~/Documents/serial-logs/$1-$(date '+%F-%H:%M').log
@gcormier
gcormier / PCB-VORON
Last active July 10, 2021 21:44
VORON / Marlin / PCB / FlatCAM
1. Export Gerber file
2. Import into FlatCAM.
3. Make sure units are MM, make sure output format is
"cncjob_coordinate_format": "X%.4f Y%.4f"
4. Tool Diameter on Gerber object has to be small enough to resolve details, but not too big.
Tool Diameter : 0.15
Width : 5
Passe Overlap : 0.7
Select Combine Passes
@Fedik
Fedik / markdown_doc
Last active December 20, 2024 11:53 — forked from jiffyclub/markdown_doc
Turn Markdown into HTML using Python markdown library and wraps the result in a complete HTML document with default Bootstrap styling. Requires the python libraries markdown.
#!/usr/bin/env python
import argparse, sys, markdown
TEMPLATE = """<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="referrer" content="no-referrer" />
<meta name="referrer" content="unsafe-url" />