Skip to content

Instantly share code, notes, and snippets.

View kevingoh's full-sized avatar

stakOverflow kevingoh

  • ITS-Industrial Turbine Services GmbH
  • Malaysia <-> Austria
View GitHub Profile
@kevingoh
kevingoh / neural_v13.py
Created April 20, 2019 21:17 — forked from JMV38/neural_v13.py
neural_v13.py
import ui, io, gc
import numpy as np
import matplotlib.pyplot as plt
from PIL import Image as PILImage
from PIL import ImageChops as chops
from ImageColor import getrgb
import console, math, random, ImageMath
from time import time
import objc_util
@kevingoh
kevingoh / CoreML Image Recognition.py
Created April 21, 2019 05:12 — forked from omz/CoreML Image Recognition.py
CoreML Image Recognition.py
#!python3
'''
This is a demo of how you can use the CoreML framework (via objc_util) to classify images in Pythonista. It downloads the trained 'MobileNet' CoreML model from the Internet, and uses it to classify images that are either taken with the camera, or picked from the photo library.
'''
import requests
import os
import io
import photos
import dialogs
@kevingoh
kevingoh / Python PDF Password
Created May 23, 2019 06:41 — forked from mrpollo/Python PDF Password
Python PDF Password cracker
#!/usr/local/bin/python
from pyPdf import PdfFileWriter, PdfFileReader
import random
from pprint import pprint as pp
import sys
# sys.setrecursionlimit(10000000)
seed = 'BN9F'
pile = [1]
def getNumber():
Borrowed from: http://www.labnol.org/software/wget-command-examples/28750/
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute.
1. Download a single file from the Internet
wget http://example.com/file.iso
2. Download a file but save it locally under a different name
wget ‐‐output-document=filename.html example.com
@kevingoh
kevingoh / genBitsReversal.py
Created July 24, 2020 12:46 — forked from rosek86/genBitsReversal.py
Bits reversal for CMSIS-DSP FFT
import math
import argparse
from sympy.combinatorics import Permutation
def bits_for_value(value):
return int(math.log2(value))
def decompose(N, R):
logN2 = bits_for_value(N)
logR2 = []
@kevingoh
kevingoh / 0-startup-overview.md
Created July 26, 2020 06:20 — forked from dideler/0-startup-overview.md
Startup Engineering notes
@kevingoh
kevingoh / QEMU_ON_M1.md
Last active February 25, 2021 12:29 — forked from citruz/QEMU_ON_M1.md
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@kevingoh
kevingoh / RPIwithQEMU.md
Created February 25, 2021 12:54 — forked from plembo/RPIwithQEMU.md
Emulating a Raspberry Pi with QEMU

Emulating a Raspberry Pi with QEMU

Goal: Emulate a Raspberry Pi with QEMU in order to run the Raspbian O/S (based on Debian Linux).

The current setup is not ideal. For one thing, the maximum RAM allowed using the "versatile-pb" firmware is 256 Mb. In addition, only the most basic peripherals, a keyboard and mouse, are supported.

A number of articles have been written on this topic. Most are outdated, and the few recent ones are missing key information.