顯示具有 python 標籤的文章。 顯示所有文章
顯示具有 python 標籤的文章。 顯示所有文章

2020年11月2日 星期一

ActivePython 3.7 Update

ActivePython 3.7 Community Edition (CE) for Windows and Linux has been updated to v3.7.8, resolving recently discovered vulnerabilities associated with Bleach, Pillow and Django.

Download it from the ActiveState Platform.

2020年9月9日 星期三

These Python tools should be in every developer’s toolbox

 

Code for Thought:

Ever need to pull information from multiple websites, generate dummy data, blur image details or create a set of thumbnails? If you've had to do any of these kinds of menial tasks more than once, you should be automating it.

2020年9月1日 星期二

ActivePython 3.8.2 CE Available

 ActivePython 3.8.2 Community Edition is now available for download from the ActiveState Platform. Python 3.8 offers a number of minor improvements including the walrus operator (:=), which assigns values to variables as part of a larger expression.

Python 2.7 Security Fix

If you’re still using Python 2, you might be aware that urllib3 was recently found to have a critical vulnerability. For our enterprise users, we’ve released ActivePython 2.7.18.1 to address this issue. Learn more about our Python 2 support offering.

Get caught up on all the latest ActiveState Platform updates.

2020年6月14日 星期日

[USN-4333-1] Python vulnerabilities

---------- Forwarded message ---------
From: Leonidas S. Barbosa
Date: Apr 21, 2020 9:51PM

It was discovered that Python incorrectly stripped certain characters from
requests. A remote attacker could use this issue to perform CRLF injection.
(CVE-2019-18348)

It was discovered that Python incorrectly handled certain HTTP requests.
An attacker could possibly use this issue to cause a denial of service.
(CVE-2020-8492)

References:
  https://usn.ubuntu.com/4333-1
  CVE-2019-18348, CVE-2020-8492

2019年7月9日 星期二

ActiveState: Custom Python & Perl Runtimes for Windows

 Automatically build custom Python and Perl runtimes for Windows
Now you can automatically build runtimes for Windows on demand with the ActiveState Platform. Just select the language, packages and either Windows 7 or 10. The ActiveState Platform will automatically resolve all dependencies and build your runtime for you in minutes.

2018年12月1日 星期六

[USN-3817-1] Python vulnerabilities

---------- Forwarded message ---------
From: Marc Deslauriers
Date: 2018年11月14日 週三 上午1:03

Summary:

Several security issues were fixed in Python.

Software Description:
- python2.7: An interactive high-level object-oriented language
- python3.5: An interactive high-level object-oriented language
- python3.4: An interactive high-level object-oriented language

Details:

It was discovered that Python incorrectly handled large amounts of data. A
remote attacker could use this issue to cause Python to crash, resulting in
a denial of service, or possibly execute arbitrary code. This issue only
affected Ubuntu 14.04 LTS and Ubuntu 16.04 LTS. (CVE-2018-1000030)

It was discovered that Python incorrectly handled running external commands
in the shutil module. A remote attacker could use this issue to cause
Python to crash, resulting in a denial of service, or possibly execute
arbitrary code. (CVE-2018-1000802)

It was discovered that Python incorrectly used regular expressions
vulnerable to catastrophic backtracking. A remote attacker could possibly
use this issue to cause a denial of service. This issue only affected
Ubuntu 14.04 LTS and Ubuntu 16.04 LTS. (CVE-2018-1060, CVE-2018-1061)

It was discovered that Python failed to initialize Expat's hash salt. A
remote attacker could possibly use this issue to cause hash collisions,
leading to a denial of service. (CVE-2018-14647)

References:
  https://usn.ubuntu.com/usn/usn-3817-1
  CVE-2018-1000030, CVE-2018-1000802, CVE-2018-1060, CVE-2018-1061,
  CVE-2018-14647

2018年5月22日 星期二

Practical Python 3.6


This workshop introduces the Python language, progressing rapidly to the real-world examples spread across 4 modules and with a final test to ensure that you retained the knowledge. We cover all the basis, from working with local files to the usage of external APIs, working with CSV and JSON.
Module 1: How to get started with Python.
What you will learn …
  • Python’s philosophy.
  • How to install Python
  • How to use the python interpreter.
  • How Python imports work.
  • How to work on a virtual environment.
  • How to create and run a Python script.
  • Using text editors for coding.
  • Standards and PEP8.
  • Various modules which Python comes bundled with.
INSIDE
  • Why Python?
  • Introduction about python programming language
  • Learning the strengths of the language and what’s good with python
  • Learning where to use Python and why
  • Python as an interpreted language
  • How to choose correct interpreter, install it, run it
  • Python virtual environments
  • Text editor (kate, gedit, brackets)
  • How to create Hello world, from interpreter and with .py script
  • Standards and batteries included
  • Standards and PEP8
  • Batteries included
Module 2: Python Basics
What you will learn …
  • Python flow control statements
  • List, dictionaries and advanced operations on them (slicing and iterating)
  • The difference between classes and instances of an object
  • How Python initialises new objects
  • How to override Python’s built-in methods and types
  • How to login to Twitter through Python
  • How to get an instance’s attributes using the Python shell
INSIDE
  • Python data types and flow control statements
  • If / elif / else
  • For loops
  • While loops
  • Lists (slices), dictionaries (loop over items), sets
  • Lists
  • List slices
  • Dictionaries
  • Python Internals
  • Classes and object instances
  • Everything is an object (docs strings, getters, setters, override)
  • Practical example
Module 3: Files
What you will learn …
  • What the concept of duck typing is.
  • How files work.
  • The CSV Python module.
  • How to use the JSON Python module.
  • How to use these modules in a real life example to extract, process and save data.
INSIDE
  • Files
  • Duck typing
  • CSV files and CSVreader
  • Read
  • Write
  • SimpleJSON
  • Practical exercise
  • Read file with a sentence per line
  • Manipulate and gather metrics on each sentence
  • Output a file with the metrics obtained
Module 4: Practical Project – Weather forecast!
In this module, you will apply all the knowledge from the previous chapters in order to implement a Python module to read data from an API, process the information and display it, using Python plotting library. You need to do these steps in any development so that you will learn how to define what the module works:
  • Read data from an API (http://openweathermap.org)
  • Save the raw data in a file for safekeeping
  • Transform the data, so that it can be fed to the plot module
  • Plot a graph with the weather forecast
You will learn …
  • How to get data from an external API
  • How to transform data to suit your needs
  • How to work with the Python plotting
INSIDE
  • Get information from API
  • Data transformation
  • Plotting the data
Module 5: Final Tests
This test is made up of 20 questions in total. You can take as long as you need to answer each question.
Sample question:
Question 15:
What library can you use to create an object to store content in memory that behave like a file?
A – math
B – json
C – csv
D – StringIO
Meet the Instructor
Rui Silva is a computer Scientist from Portugal (http://alfasite.org/) He is a Python developer who loves open-source. He started working as a freelancer in 2008, while he finished his graduation in Computer Science in Universidade do Minho. After his graduation, he started pursuing a master’s degree, choosing the field of parallel computation, mobile and ubiquitous computing. He completed the mobile and ubiquitous computing course. In his 3 years of freelancing, he worked mostly with Python, developing Django websites, Drupal websites and some Magento stores. He also had to do some system administration. After that, he started working in Eurotux Informática, S.A. where he developed websites using Plone, Django and Drupal. He is also an IOS developer and sometimes he performs some system administration tasks. Besides his job, he works as a freelancer using mainly Django and other Python frameworks.
Course Format
The course is self-paced – you can visit the training whenever you want and your content will be there. Once you’re in, you keep access forever, even when you finish the course. There are no deadlines, except for the ones you set for yourself. We designed the course so that a diligent student will need about 18 hours of work to complete the training. Your time will be filled with reading, videos, and exercises.
REF: https://bsdmag.org/course/learn-to-program-using-python-practical-python-3-6/

2018年3月13日 星期二

Learn How to Develop Applications in Python



Why Python and why Python 3
Python has been around for quite some time now. It has become a widely used programming language very popular with machine learning for example. In this course, we will teach you to start using the language, but jump really fast to more complex examples. Hence, if you are not familiar with Python, maybe you should consider looking into Practical Python 3.6 - Learn to Program using Python.
INSIDE
Module 1 (Module 1 will be available online on Monday, the last changes are incorporated)
  • Why Python and why Python 3
  • Introduction to Python programming language
  • Python 3 and why you should use it
  • Why Python is widely used (machine learning, etc.)
Hands On
  • Install python 3
  • Install and use virtualenv
Right tools for development
  • Editors
  • PEP8
  • Pylint
  • Testing and TDD
Skills acquired after module 1:
  • A better understanding of the language, including how to install it.
  • Creating virtualenvs
  • Creating a python file and tests
Module 2
  • Starting a new app
  • Defining the app
  • Using version control: creating a repo in github
  • Structure your python package (http://docs.python-guide.org/en/latest/writing/structure/)
  • Explain the several config parameters of the setup.py
  • Config file Parsing
Skills acquired after module 2:
  • Knowing what you are doing before doing it
  • Creating a repository and commit to your code
  • Starting a python package with the needed structure for packaging it later
  • Understanding the package components
Module 3
  • App Development
  • Command line argument parsing
  • Config file
  • Exporting data (csv, text)
  • Accessing an external REST api
Skills acquired after module 3:
  • Creating a binary that can parse command line arguments
  • Using a config file with the app
  • Saving files in csv
  • Reading data from an REST api
Module 4
  • Testing the App
  • Create tests for the app
Skill acquired after module 4:
  • Testing the app to guarantee that it works as intended
Module 5
Final Exam
This test is made up of 20 questions in total. You can take as long as you need to answer each question.

2017年3月22日 星期三

python process xls

python3 can process xls easily with its packages.

# apt-get install python3 python3-pip
# pip3 install openpyxl --upgrade
# pip3 install pandas --upgrade