Quantcast
Channel: Planet Python
Viewing all 22414 articles
Browse latest View live

NumFOCUS: MDAnalysis joins NumFOCUS Sponsored Projects

$
0
0

NumFOCUS is pleased to announce the newest addition to our fiscally sponsored projects: MDAnalysis MDAnalysis is a Python library for the analysis of computer simulations of many-body systems at the molecular scale, spanning use cases from interactions of drugs with proteins to novel materials. It is widely used in the scientific community and is written […]

The post MDAnalysis joins NumFOCUS Sponsored Projects appeared first on NumFOCUS.


NumFOCUS: Announcing JupyterCon 2020

$
0
0

NumFOCUS is excited to be a part of JupyterCon 2020. JupyterCon will be held August 10 – 14 in Berlin, Germany at the Berlin Conference Center. Read the full announcement here. JupyterCon 2020 is an event brought to you in partnership by Project Jupyter and NumFOCUS.

The post Announcing JupyterCon 2020 appeared first on NumFOCUS.

Python Insider: Python 3.8.2rc2 is now available for testing

$
0
0
Python 3.8.2rc2 is the second release candidate of the second maintenance release of Python 3.8. Go get it here:

https://www.python.org/downloads/release/python-382rc2/


Why a second release candidate?

The major reason for RC2 is that GH-16839 has been reverted.

The original change was supposed to fix for some edge cases in urlparse (numeric paths, recognizing netlocs without //; details in BPO-27657). Unfortunately it broke third parties relying on the pre-existing undefined behavior.

Sadly, the reverted fix has already been released as part of 3.8.1 (and 3.7.6 where it’s also reverted now). As such, even though the revert is itself a bug fix, it is incompatible with the behavior of 3.8.1.

Please test.

Timeline

Assuming no critical problems are found prior to 2020-02-24, the currently scheduled release date for  3.8.2 (as well as 3.9.0 alpha 4!), no code changes are planned between this release candidate and the final release.

That being said, please keep in mind that this is a pre-release of 3.8.2 and as such its main purpose is testing.

Maintenance releases for the 3.8 series will continue at regular bi-monthly intervals, with 3.8.3 planned for April 2020 (during sprints at PyCon US).

What’s new?

The Python 3.8 series is the newest feature release of the Python language, and it contains many new features and optimizations. See the “What’s New in Python 3.8” document for more information about features included in the 3.8 series.

Detailed information about all changes made in version 3.8.2 specifically can be found in its change log.

We hope you enjoy Python 3.8!

Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation.

Codementor: Personalize your python prompt

$
0
0
Personalization is what we all love. In this article we find how we could personalize the Python interpreter prompt >>>

Kushal Das: Maintaining your Qubes system using Salt part 1

$
0
0

Last year I published qubes-ansible project. This enables maintaining your Qubes OS system via Ansible. But, to do the same, you will have to take a few steps as Ansible is not in the default Qubes.

Qubes uses Salt to maintain the system. It also has helpful documentation to explain the idea. In this post and with a few more in the future, I am planning to write a series with basic examples of the same, so that you can maintain your Qubes laptop with the Salt itself.

Working in dom0

You can either directly the required files in dom0, or write them in your standard development VM, and then copy them over to dom0. The choice is yours.

I am directly writing them into dom0 using vim as my editor.

The outcome

I want to create the following:

  • A new template called fancy-template based on debian-10
  • Install a few packages into it.
  • Create a new apt repo for VS Code in it.
  • Install VS Code in it.
  • Create an AppVM called fancy using the template with 3000MB RAM.

Creating .top and .sls files

The .top file will help us to link between any machine (VMs or dom0) and some state files (.sls).

To find the currently enabled top files use the following command:

qubesctl top.enabled

Now, we will create our own top file.

Create the following file as /srv/salt/learnqubes.top

base:
  dom0:
    - fancy-template

Here we are saying for the dom0 machine (VM) use the state file named fancy-template. The state files contain state and configuration of the machines (VMs).

Creating the first state file

Copy paste the following in /srv/salt/fancy-template.sls file.

create-fancy-template:
  qvm.vm:
    - name: fancy-template
    - clone:
      - source: debian-10
      - label: blue
    - tags:
      - add:
        - playground

create-fancy-vm:
  qvm.vm:
    - name: fancy
    - present:
      - template: fancy-template
      - label: red
      - mem: 3000
    - prefs:
      - template: fancy-template

First, we are using a unique name for that step, where we are asking for a qvm.vm (VM), saying that the name is fancy-template, and it is a clone of debian-10. We are also mentioning the label color and adding a tag to the template.

In the next step, we are creating the AppVM named fancy, from the template, red as the label, and 3000MB RAM.

Enabling the .top first

# qubesctl top.enable learnqubes

This command will enable our top file. You can recheck the list of enabled .top files after this.

Applying the state to dom0

# qubesctl --show-output state.highstate

This command will make sure that all the states from all of the enabled top files will be applied to dom0. After this command finished, you should be able to see our new template and the AppVM.

Enabling vscode repo and installing the packages

We will first write a new state file for the steps, write the following to /srv/salt/add-my-fancy-system.sls file.

install-packages:
  pkg.installed:
    - pkgs:
      - htop
      - sl
      - git
  - refresh: True

install-python-apt-for-repo-config:
  pkg.installed:
    - pkgs:
      - python-apt
   
configure-apt-test-apt-repo:
  pkgrepo.managed:
    - name: "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
    - file: /etc/apt/sources.list.d/vscode.list
    - key_url: "salt://microsoft.asc"
    - clean_file: True # squash file to ensure there are no duplicates
    - require:
      - pkg: install-python-apt-for-repo-config

install-vscode:
  pkg.installed:
    - pkgs:
      - code

You can read all the details about pkg module, and here we are installing a few packages first. While installing the initial packages, we also make sure to refresh the database (think about apt update). To create the apt repository, we used pkgrepo salt module. You will find one interesting thing in that section, and we are mentioning a GPG public key for the repository.

We actually have to download it in a VM and move it to the dom0 in the same /srv/salt directory.

# qvm-run --pass-io devvm ‘cat /home/user/microsoft.asc’ > /srv/salt/microsoft.asc

Remember to replace devvm with the right AppVM in your system.

We will also update the top file so that it knows to use the make-my-fancy-system.sls file for our fancy-template.

The following is the updated top file.

base:
  dom0:
    - fancy-template

  fancy-template:
    - make-my-fancy-system

Then, we can ask Qubes to apply the state to only the fancy-template VM.

# qubesctl --show-output --skip-dom0 --targets fancy-template state.highstate

This command should create the right state in the fancy-template. Remember to shut down the template and the AppVM (if they are running), and then start the fancy AppVM again. You will find it has all the packages, including VS Code.

Matt Layman: Templates and Logic - Building SaaS #45

$
0
0
In this episode, we added content to a template and talked about the N+1 query bug. I also worked tricky logic involving date handling. The first change was to update a course page to include a new icon for any course task that should be graded. After adding this, we hit an N+1 query bug, which is a performance bug that happens when code queries a database in a loop. We talked about why this happens and how to fix it.

Talk Python to Me: #252 What scientific computing can learn from CS

$
0
0
Did you come into Python from a computational science side of things? Were you just looking for something better than Excel or Matlab and got pulled in by all the Python has to offer?

Quansight Labs Blog: My Unexpected Dive into Open-Source Python

$
0
0

Header ImageHeader illustration by author, Mars Lee

I'm very happy to announce that I have joined Quansight as a front-end developer and designer! It was a happy coincidence how I joined- the intersection of my skills and the open source community's expanded vision.

Read more… (4 min remaining to read)


Catalin George Festila: Python 3.7.5 : This python package can work with ArcGIS platform.

$
0
0
This python package is named like the ArcGIS platform and can be used for spatial analysis, mapping, and GIS. The ArcGIS package uses the ArcGIS platform for organizations to create, manage, share, and analyze spatial data. This platform has a server component, mobile and desktop applications, and developer tools. [mythcat@desk projects]$ pip3 install arcgis --user ...You can test it on your

Codementor: Automating Everything With Python: Reading Time: 3 Mins

$
0
0
How Python is used to automate for work. With tons of areas like sales & marketing, system administration, software testing.

Weekly Python StackOverflow Report: (ccxvi) stackoverflow python report

$
0
0

Roberto Alsina: Episodio 22: Color, Color, Color!

$
0
0

Cosas que uso en mi terminal. ¿Qué terminal? ¿Qué shell? ¿Que font? ¿Vale la pena reemplazar herramientas que tienen 50 años como "cat"? Todo eso y alguito más!

Fish shell: https://fishshell.com/ Alacritty: https://github.com/alacritty/alacritty CP Mono 07: https://github.com/chrissimpkins/codeface/tree/master/fonts/cp-mono powerline-rs: https://github.com/jD91mZM2/powerline-rs bat: https://github.com/sharkdp/bat delta: https://github.com/dandavison/delta virtualfish: https://github.com/excitedleigh/virtualfish

Mike Driscoll: Python 101 2nd Edition Sample Chapters

$
0
0

I have put together some sample chapters for the 2nd edition of Python 101 which is coming out later this year. You can download the PDF version of these sample chapters here. Note that these chapters may have minor typos in them. Feel free to let me know if you find any bugs or errors.

If you are interested in getting a copy of the book, you can do so over on Kickstarter.

Python 101 2nd Ed Kickstarter

The post Python 101 2nd Edition Sample Chapters appeared first on The Mouse Vs. The Python.

Catalin George Festila: Python 3.7.6 : The SELinux python package.

$
0
0
The tutorial for today is about the SELinux python package. The official webpage is this. First, I update my pip tool and I used the python 3.7.6 version: [mythcat@desk ~]$ pip install --upgrade pip --user ... Successfully installed pip-20.0.2 Let's install the python package named selinux: [mythcat@desk ~]$ pip3 install selinux --user ... Requirement already satisfied: selinux in /usr/lib64/

Hynek Schlawack: Python Packaging Metadata

$
0
0

Since this topic keeps coming up, I’d like to briefly share my thoughts on Python package metadata because it’s – as always – more complex than it seems.


Hynek Schlawack: Python in Production

$
0
0

I’m missing a key part from the public Python discourse and I would like to help to change that.

Tryton News: Release 0.7.0 of GooCalendar

$
0
0

@ced wrote:

We are proud to announce the release 0.7.0 of GooCalendar.

GooCalendar is a Python library that implements a calendar widget for GTK+ using GooCanvas .

In addition to bug-fixes, this release contains this following improvements:

  • Use Gtk default font as font by default
  • Manage non editable event
  • Add support for Python 3.8
  • Replace font-desc properties by font

GooCalendar is available on PyPI: https://pypi.org/project/GooCalendar/0.7.0/

Posts: 1

Participants: 1

Read full topic

Will McGugan: Better Python tracebacks with Rich

$
0
0

One of my goals in writing Rich was to render really nice Python tracebacks. And now that feature has landed.

I've never found Python tracebacks to be a great debugging aid beyond telling me what the exception was, and where it occurred. In a recent update to Rich, I've tried to refresh the humble traceback to give enough context to diagnose errors before switching back to the editor.

Here's an example of a rich traceback:

© 2020 Will McGugan

Rich traceback on OSX

There is syntax highlighting to help pick out filename, line, and function, etc. There's also a snippet of code for each stack frame, with line numbers and syntax highlighting. It's configurable, but I find that 7 lines of code are enough to make it relatable to the file in your editor, and give you a better understanding of the context that lead to the exception.

Here's how tracebacks render on Windows:

© 2020 Will McGugan

Rich traceback on Windows terminal

For reference, here's the same traceback rendered in a more traditional way:

© 2020 Will McGugan

Just a regular old traceback

To try out rich tracebacks, install the exception handler as follows:

from rich.traceback import install
install()

Now any uncaught exceptions will rendered by Rich. See the docs for details.

Rich is quite usable as a library now, but is still in active development. If you have any ideas on how to improve rich tracebacks or any other aspect of the library, let me know.

Mike Driscoll: PyDev of the Week: Hameer Abbasi

$
0
0

This week we welcome Hameer Abbasi as our PyDev of the Week! Hameer works on the PyData Sparse project. You can check out what else Hameer is working on over on Github. Let’s take some time to get to know him better!

Can you tell us a little about yourself (hobbies, education, etc):

My hobby is, and has been for a while, scientific computing in general, the ecosystem and how to make it better. I’m lucky and grateful to have found a job in that same field, even though my formal education wasn’t in either Mathematics or Computer Science. Moving over to my education, I completed my Bachelors in Electrical (Telecommunications) Engineering from National University of Sciences and Technology, Pakistan in July 2014. After being a professional for a year at LMK Resources, Pakistan until September, 2015, I moved to Germany and completed my Masters in Information and Communication Engineering from Technische Universität Darmstadt (English: Technical University of Darmstadt) in October, 2015. I started with Quansight as a contractor then, and I’m continuing that to date.

Why did you start using Python?

I was doing a Hilfswissenschaftler job (sort of like a Research Assistant in the USA), and there I was presented the problem of scaling a sparse system to a larger space. I discovered the PyData/Sparse project back then (it was in Matthew Rocklin’s personal repository at the time), and was immediately fascinated by the idea of computational gains to be had if one moved to a sparse representation. I’m now the maintainer for that project, and I’m grateful I chose that path, as it landed me a talk at SciPy 2018 and a client in the form of Quansight.

What other programming languages do you know and which is your favorite?

I’ve dabbled in a lot of programming languages over the years. Started with Visual Basic 2000, moved on to Visual Basic .NET, HTML, Java, Javascript, C++. The ones I really feel I know, though are Python and C#, because I have hands on experience on real projects with these. I like Rust’s “do it right the first time” model.

My favourite of all these to work with is probably C#, because of the excellent tooling around it, but as a language I like Python more.

What projects are you working on now?

I’m working on a number of client projects with Quansight, along with others that are in their Labs division. These include uarray, a backend-dispatch system with various utilities, unumpy, a “backend-agnostic” version of NumPy, and udiff, an automatic differentiation library built on top of unumpy. I also recently started some research on PyData/Sparse again. I’d like to talk about the uarray family a bit more — It’s awesome that you can just take a piece of code, change out a with statement and/or an import, and watch the magic.

Which Python libraries are your favorite (core or 3rd party)?

Probably XND, it’s really well engineered and shows a lot of potential. Now if there was an active maintainer on it…

How did you get started with the PyData/Sparse project?

I, honestly, was slacking off from my thesis working on what interested me, the idea of huge computational gain just from moving to a sparse structure.

What makes PyData/Sparse great?

Well, try it and find out. ????

Can you describe any current challenges that you see for Python in data science?

The need for paid maintainers on projects that have core infrastructure. Travis Oliphant (CEO at Quansight and OpenTeams) has talked about this in length.

Thanks for doing the interview, Hameer!

The post PyDev of the Week: Hameer Abbasi appeared first on The Mouse Vs. The Python.

Roberto Alsina: Episodio 23: Androides Linuxeros

$
0
0

Demostrando Anbox, una aplicación para usar aplicaciones Android en Linux!

Viewing all 22414 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>