Compare commits
No commits in common. "af3335f8b3b814bad2e927ce717bc1aa533cf045" and "e3312b5d60fde7fd5384055c7acd52b3d64c569b" have entirely different histories.
af3335f8b3
...
e3312b5d60
6 changed files with 1 additions and 907 deletions
|
|
@ -1,22 +0,0 @@
|
||||||
import matplotlib
|
|
||||||
matplotlib.use('agg')
|
|
||||||
import pandas as pd
|
|
||||||
from bottle import Bottle
|
|
||||||
|
|
||||||
app = Bottle()
|
|
||||||
|
|
||||||
@app.route('/index')
|
|
||||||
def index():
|
|
||||||
title = 'Hello World'
|
|
||||||
plot = 'plot placeholder'
|
|
||||||
footer = 'created fron an android device using Termux'
|
|
||||||
html = f'''<h1> {title} </h1>
|
|
||||||
<br>
|
|
||||||
{plot}
|
|
||||||
<br>
|
|
||||||
{footer}'''
|
|
||||||
return html
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
app.run()
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
import pandas as pd
|
|
||||||
df = pd.read_csv('https://query.data.world/s/bc2a2nmk6avafkdwy9x5jt7zz')
|
|
||||||
702
co2plot.html
702
co2plot.html
File diff suppressed because one or more lines are too long
32
co2plot.py
32
co2plot.py
|
|
@ -1,32 +0,0 @@
|
||||||
#' #Testing out pweave on android with Termux
|
|
||||||
|
|
||||||
import matplotlib
|
|
||||||
matplotlib.use('agg')
|
|
||||||
from tabulate import tabulate
|
|
||||||
from co2data import df
|
|
||||||
|
|
||||||
#' ## raw data
|
|
||||||
#' *from data.world*
|
|
||||||
# This example will plot the co2 emissions trend for the top 5 countries in 2011
|
|
||||||
|
|
||||||
|
|
||||||
print(tabulate(df.iloc[0:10, 0:5], headers=df.columns, tablefmt='simple'))
|
|
||||||
|
|
||||||
#' ## Transform Data for plotting
|
|
||||||
#'
|
|
||||||
plot_df = (df
|
|
||||||
.set_index('CO2 emission total')
|
|
||||||
.sort_values('2011', ascending=False)
|
|
||||||
.head(5)
|
|
||||||
.T
|
|
||||||
.dropna(how='all')
|
|
||||||
)
|
|
||||||
|
|
||||||
print(tabulate(plot_df.iloc[0:10, 0:5], headers=plot_df.columns, tablefmt='simple'))
|
|
||||||
|
|
||||||
#' Plot the data
|
|
||||||
title = 'Top 5 countries CO2 emissions trend\n(based on 2011 emissions data)'
|
|
||||||
ax = plot_df.plot(title=title)
|
|
||||||
ax.figure.savefig('tmp.png')
|
|
||||||
|
|
||||||
|
|
||||||
122
history.txt
122
history.txt
|
|
@ -1,122 +0,0 @@
|
||||||
1 pip list
|
|
||||||
2 python
|
|
||||||
3 nano temp.py
|
|
||||||
4 packages install nano
|
|
||||||
5 packages install nano
|
|
||||||
6 nano temp.py
|
|
||||||
7 python temp.py
|
|
||||||
8 vim
|
|
||||||
9 ls
|
|
||||||
10 info bash
|
|
||||||
11 $dir
|
|
||||||
12 $dirname
|
|
||||||
13 cd ..
|
|
||||||
14 ls
|
|
||||||
15 cd home
|
|
||||||
16 ls
|
|
||||||
17 cd ..
|
|
||||||
18 cd usr
|
|
||||||
19 ls
|
|
||||||
20 cd bin
|
|
||||||
21 ls
|
|
||||||
22 cd ..
|
|
||||||
23 cd
|
|
||||||
24 cd..
|
|
||||||
25 ls
|
|
||||||
26 git
|
|
||||||
27 nano temp.py
|
|
||||||
28 vi temp.py
|
|
||||||
29 python temp.py
|
|
||||||
30 nano temp.py
|
|
||||||
31 python temp.py
|
|
||||||
32 pip install pandas
|
|
||||||
33 python
|
|
||||||
34 pip3 install pandas
|
|
||||||
35 pip install numpy --use-wheel
|
|
||||||
36 apt install conda
|
|
||||||
37 apt-get conda
|
|
||||||
38 apt-get install conda
|
|
||||||
39 apt install Miniconda3
|
|
||||||
40 bash Miniconda3
|
|
||||||
41 bash Anaconda-2.3.0-Linux-x86_64.sh
|
|
||||||
42 apt install wget
|
|
||||||
43 wget -c http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
|
|
||||||
44 conda install pandas
|
|
||||||
45 cknda
|
|
||||||
46 minicomda
|
|
||||||
47 miniconda
|
|
||||||
48 ls
|
|
||||||
49* bash Miniconda-latest-Linux-x86_64.sh w
|
|
||||||
50 rm Miniconda-latest-Linux-x86_64.sh
|
|
||||||
51 ls
|
|
||||||
52 wget -c http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86.sh
|
|
||||||
53 sudo pip install numpy
|
|
||||||
54 apt install sudo
|
|
||||||
55 apt install python-numpy
|
|
||||||
56 pip install numpy
|
|
||||||
57 apt install gcc
|
|
||||||
58 apt install brew
|
|
||||||
59 apt-get install build-essential
|
|
||||||
60 apt get clang -std=c++14
|
|
||||||
61 apt install clang++ -std=c++14
|
|
||||||
62 pip install numpy
|
|
||||||
63 clang
|
|
||||||
64 apt install clang
|
|
||||||
65 pip install numpy
|
|
||||||
66 apt install g++
|
|
||||||
67 apt remove clang
|
|
||||||
68 pip install numpy
|
|
||||||
69 apt install g++
|
|
||||||
70 pip install numpy
|
|
||||||
71 pip install python-dev
|
|
||||||
72 pip install python-devel
|
|
||||||
73 apt install python-dev
|
|
||||||
74 pip install numpy
|
|
||||||
75 pip install pandas
|
|
||||||
76 pip install matplotlib
|
|
||||||
77 python
|
|
||||||
78 pip install matplotlib
|
|
||||||
79 pip install freetype
|
|
||||||
80 python
|
|
||||||
81 apt-get libfreetype6-dev
|
|
||||||
82 apt-get install libfreetype6-dev
|
|
||||||
83 apt install libfreetype6e-dev
|
|
||||||
84 apt install libfreetype6-dev
|
|
||||||
85 apt install freetype
|
|
||||||
86 pip install matplotlib
|
|
||||||
87* apt install freetype-devw
|
|
||||||
88 pip install matplotlib
|
|
||||||
89 pip install matplotlib
|
|
||||||
90 python
|
|
||||||
91 pip install pyobject
|
|
||||||
92 pip install pygobject
|
|
||||||
93 python
|
|
||||||
94 python
|
|
||||||
95 ls
|
|
||||||
96 test.png
|
|
||||||
97 open
|
|
||||||
98 xdg-open test.png
|
|
||||||
99 pip install bottle
|
|
||||||
100 pip install jupyter
|
|
||||||
101 jupyter notebook
|
|
||||||
102 apt install zmq_strerror
|
|
||||||
103 ipython
|
|
||||||
104 apt install git
|
|
||||||
105 mkdir test
|
|
||||||
106 cd test
|
|
||||||
107 echo "# test /n testing git from termux" >> readme.md
|
|
||||||
108 git init
|
|
||||||
109 git add readme.md
|
|
||||||
110 git commit -m "first commit"
|
|
||||||
111 git config --glob user.email quadmx08@gmail.com
|
|
||||||
112 git config --global user.email quadmx08@gmail.com
|
|
||||||
113 git config --global user.name "Waylon Walker"
|
|
||||||
114 git commit -m "first commit"
|
|
||||||
115 remote add origin https://github.com/WaylonWalker/test.git
|
|
||||||
116 git remote add origin https://github.com/WaylonWalker/test.git
|
|
||||||
117 git push -u origin master
|
|
||||||
118 nano readme.md
|
|
||||||
119 git commit . "updated readme.md"
|
|
||||||
120 git commit . -m "updated readme.md"
|
|
||||||
121 git push
|
|
||||||
122 history >> history.txt
|
|
||||||
28
readme.md
28
readme.md
|
|
@ -1,27 +1 @@
|
||||||
# test
|
# test /n testing git from termux
|
||||||
|
|
||||||
testing git from Termux for android. This repo was made
|
|
||||||
entirely fom an android phone using Termux.
|
|
||||||
|
|
||||||
## install
|
|
||||||
|
|
||||||
install a text editor (vim or nano), python-dev, and
|
|
||||||
freetype-dev. I found python-dev better than python for `pip`
|
|
||||||
installing packages that required a compiler. freetype-dev was
|
|
||||||
required for matplotlib.
|
|
||||||
|
|
||||||
```
|
|
||||||
apt install nano
|
|
||||||
apt install python-dev
|
|
||||||
apt install freetype-dev
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
Now setup your python environment with your favorite packages.
|
|
||||||
```
|
|
||||||
pip install pandas matplotlib bottle
|
|
||||||
```
|
|
||||||
## Example
|
|
||||||
|
|
||||||
CO2 emissions data from data.world [report](http://htmlpreview.github.io/?https://github.com/WaylonWalker/test/blob/gh-pages/co2plot.html)
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue