- list one
- nested list
- nested list 2
- list two
This file contains 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 os | |
import sys | |
import subprocess | |
import functools | |
run = functools.partial(subprocess.call, shell=True) | |
run('virtualenv -p python3 .env') | |
run('.env/bin/pip install --upgrade setuptools') |
This assuming you are on Linux or OSX machine. Make sure python version is 3.5 and above.
Create your project directory, let say we're building application named webby:-
mkdir webby
cd webbpy
Create new virtualenv that will be the PYTHON that we will use going forward in this project:-
This is on Ubuntu 14.04, but should work in any Linux/OSX system:-
mkdir -p $HOME/python/3.6
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar xzf Python-3.6.0.tgz
cd Python-3.6.0/
./configure --prefix=$HOME/python/3.6
make
make test
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am k4ml on github. | |
* I am k4ml (https://keybase.io/k4ml) on keybase. | |
* I have a public key ASCZeLsQwrBVZescEQhSO6a9e0jJxvGbB0p9mw8_7epr_Ao | |
To claim this, I am signing this object: |
This file contains 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 bottle | |
import requests | |
@bottle.route('/', method='POST') | |
def telegram_bot(): | |
data = bottle.request.json | |
url = 'https://api.telegram.org/bot<YOUR_TOKEN>/sendMessage' | |
try: |
This file contains 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
# curl -LO http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.3/releases/x86_64/alpine-3.3.3-x86_64.iso | |
curl -LO http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.3/releases/x86/alpine-3.3.3-x86.iso | |
# create hdd image (8GB) | |
dd if=/dev/zero of=hdd.img bs=1g count=8 | |
# extract kernel and initramfs | |
brew install cdrtools | |
isoinfo -i alpine-3.3.1-x86.iso -J -x /boot/initramfs-grsec > initramfs-grsec | |
isoinfo -i alpine-3.3.1-x86.iso -J -x /boot/vmlinuz-grsec > vmlinuz-grsec |
This file contains 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
from reportlab.pdfgen.canvas import Canvas | |
class NumberedCanvas(Canvas): | |
def __init__(self, *args, **kwargs): | |
Canvas.__init__(self, *args, **kwargs) | |
self._saved_page_states = [] | |
def showPage(self): | |
self._saved_page_states.append(dict(self.__dict__)) | |
self._startPage() |