Note: I'm currently taking a break from this course to focus on my studies so I can finally graduate
This file contains hidden or 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
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 |
This file contains hidden or 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
#!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 |
This file contains hidden or 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
#!/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(): |
This file contains hidden or 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
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 |
This file contains hidden or 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
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 = [] |
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.