-
Archives
- January 2020
- May 2019
- April 2019
- March 2019
- February 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- September 2014
- August 2014
- June 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- May 2013
- April 2013
- March 2013
- February 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- November 2010
- October 2010
- September 2010
- August 2010
- April 2010
- February 2010
- December 2009
- November 2009
- August 2009
- May 2009
- January 2009
- December 2008
- October 2008
- September 2008
- August 2008
- July 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- April 2006
- March 2006
- January 2006
- December 2005
- November 2005
- October 2005
- April 2004
CPU Usage Percent – Python One-Liner for Load Average per CPU
Processor usage is 88%. But how do I get a number like this? For gurus, this Python one-liner prints CPU usage $ python3 -c “print(‘{:.0f}%’.format( float(‘$(cat /proc/loadavg)’.split()[0]) / float(‘$(nproc)’)*100 ) )” 12% The rest of us can read on how … Continue reading
Vulnerable Super Secure Password Recover – SQL Injection Example
Can you exploit OWASP #1 vulnerability? I wrote a simple vulnerable password recovery app for practicing SQL injections. (Vulnerable) Super Secure Password Recover ™ is written with Python 3, Flask and Postgres. You can do bad code even with the … Continue reading
Posted in Uncategorized
Tagged flask, Python 3, SQL injection, SQLAlchemy, vulnerable
Comments Off on Vulnerable Super Secure Password Recover – SQL Injection Example
pydoc3 str – Python Reference in Your Command Line – Airplane & Cottage Entertainment
You can read Python documentation offline with pydoc3. It’s installed automatically with Python, and it always shows documentation for the version of Python you have installed. $ pydoc3 str You can see reference for a library ‘pydoc3 re’ or a single … Continue reading
Python RegEx One-Liner in a Pipe – Remove Hard Line Wrapping – No Perl
Just put Python in your pipe and let Perl rest in peace. Python can be used as a one-liner in a pipe. Replacing text with a regular expression used to be the last holdout of perl, but now you can … Continue reading
Posted in Uncategorized
Tagged multiline, one-liner, oneliner, perl, pipe, Python 3, regexp, regular expression, replace, shell, text manipulation
Comments Off on Python RegEx One-Liner in a Pipe – Remove Hard Line Wrapping – No Perl
Hello Flask Web App – Python 3 Flask Development Server Install on Ubuntu 16.04
You can create web apps with Python and Flask. This short “Hello World” tutorial shows you how to install development server for Python 3 and Flask. There are two very successful Python web frameworks. Flask is the simple one, Django … Continue reading
Posted in Uncategorized
Tagged CRUD, flask, framework, hello world, microframework, Python 3, python3, python3-flask, simple, tutorial, web
1 Comment
Using Web APIs with Python – Read Weather Forecast and Send to Your Own IoT Device
Do you want get weather forecast, BitCoin vs EUR valuation and know your power consumption? A lot of data is available on free APIs. Your program can just make a regular HTTP GET request – it’s just like loading a … Continue reading
Django on Apache – with Python 3 and Apache mod_wsgi on Ubuntu 16.04
Install Python 3 Django on Apache, similar to production installations. These terse notes show how to install Python Django, configure it to use templates and access PostgreSQL database. Finally, we create a simple app to read records from database and … Continue reading
Posted in Uncategorized
Tagged apache, django, mod_wsgi, Python, Python 3, python-django, WSGI
Comments Off on Django on Apache – with Python 3 and Apache mod_wsgi on Ubuntu 16.04
Write Python 3 Web Apps with Apache2 mod_wsgi – Install Ubuntu 16.04 xenial – Every Tiny Part Tested Separately
Python is a popular language for web applications, used by Youtube, DropBox, Facebook, Pintrest, Reddit, Instagram, Spotify, Washington Post and many others. Apache is the most popular web server in the world. Mod_wsgi is the recommended way to use Python … Continue reading
Posted in Uncategorized
Tagged apache, apache2, Backend, django, flask, mod_wsgi, Python, Python 3, Server Side Scripting
3 Comments
Install OpenAI Universe on Ubuntu 16.04
OpenAI: Write Python program that plays any game. Optionally, use machine learning so that computer learns the game by itself. OpenAI “hello world” is just ten lines. But installing the environment is difficult. This article shows you how to install … Continue reading
Posted in Uncategorized
Tagged artificial intelligence, automation, difficult install, docker, game, git, github, machine learning, OpenAI, OpenAI Universe, Python 3, python3, ThightVNC, virtual machine, VNC, xenial
5 Comments
Deploy Flask & Python3 on Apache2 & Ubuntu
Deploy Flask, a Python 3 microframework, on Apache web server on Ubuntu. Then you can write your own web pages in Python. Flask is a very simple framework for writing server side applications with Python. This article shows how to … Continue reading
Posted in Uncategorized
Tagged apache, apache2, daemon, deploy, flask, framework, light, mod_wsgi, production, Python, Python 3, python3, ubuntu, web server, Werkzeug
13 Comments