#################################################################
# How to install Arch in your Android (into the App TermuxArch)
# and be able to use your Android device like a personal computer
# even running a X server to have GUI
#################################################################
###############################
# Install Termux
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
| """ Shows how to use flask and matplotlib together. | |
| Shows SVG, and png. | |
| The SVG is easier to style with CSS, and hook JS events to in browser. | |
| python3 -m venv venv | |
| . ./venv/bin/activate | |
| pip install flask matplotlib | |
| python flask_matplotlib.py | |
| """ |
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 keras | |
| from keras.datasets import mnist | |
| from keras.models import Sequential | |
| from keras.layers import Dense, Dropout, Flatten | |
| from keras.layers import Conv2D, MaxPooling2D | |
| import numpy as np |
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 turtle | |
| def turn(i): | |
| left = (((i & -i) << 1) & i) != 0 | |
| return 'L' if left else 'R' | |
| def curve(iteration): | |
| return ''.join([turn(i + 1) for i in range(2 ** iteration - 1)]) | |
| if __name__ == '__main__': |
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/bin/python | |
| import sys, os | |
| from PIL import Image | |
| import numpy | |
| import scipy.fftpack | |
| sourceImage = sys.argv[1] | |
| image = Image.open(sourceImage) |
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
| """CONVENTIONS: | |
| positions are done row-column from the bottom left and are both numbers. This corresponds to the alpha-number system in traditional chess while being computationally useful. they are specified as tuples | |
| """ | |
| import itertools | |
| WHITE = "white" | |
| BLACK = "black" | |