The FSF's approach to using online videos for advocacy

FSF Blogs - Fri, 2020-08-07 14:49

A consistent bit of feedback we hear from both current and potential free software supporters is: do better at using video to communicate the importance of free software philosophy. If we aim to make free software a "kitchen table" issue, it is imperative we reach new audiences and make our points clearly, in formats that successfully engage people with limited time, across a diverse set of learning styles. From a technical perspective, this means reaching them where they are -- or more specifically -- on whatever device they are using at the moment.

Many unfortunately commonly used devices such as the iPhone do not support the video and audio formats we prefer to use in the world of free software. Apple's iron grip on the device prevents all but technically advanced users from installing the software necessary to play these formats: among them Ogg Vorbis, FLAC, and WebM. The Free Software Foundation (FSF) and other free software activists advocate for these formats due to the danger posed by software patents, a pernicious legal invention that casts a dark cloud over all software development. Software patents make it possible for patent owners who can state their case well enough to make claims against any piece of free software. This alone puts developers at risk. One doesn't even need to have a valid patent to threaten action: if the developer lacks the funds to defend themselves, an absurd patent claim could be equally dangerous.

In contrast to this, some authors of common formats choose to freely license any potential patent claims along with all other aspects of their project. Groups like these are intentionally helping to create the world we want to live in, and they are worthy of our support.

While we must continue campaigning against Apple and other companies for their support of software patents and insistence on trying to control users, we can't do that nearly as effectively if users of those platforms can't hear us. Without supporting video codecs other than those above, such as Advanced Video Coding (commonly called H.264), we run the risk of reaching only those who already know about free software.

To make it possible for users new to free software to watch the videos we make about free software, we've set up a "fallback" system for our embedded video player. Formats like WebM and Ogg Theora are preferred, but if these are not supported by the device, a file encoded in H.264 is played instead. Thus, without signing any agreement "buying" or attaining any supposed patent license, we can make sure that these users can access our materials. Ideally, these videos will motivate them to move to a device or operating system that respects their freedom. This brings one more person into the "free world," moving us closer to eliminating software patents and proprietary software altogether.

Although formats preferred by the free software community are now much more widespread than they were when we launched the PlayOgg campaign, most media sharing sites require you to use nonfree software (often in the form of JavaScript) or agree to ethically unacceptable terms of service (often claiming to prohibit you from writing your own software similar to that running the service). True to our principles, the FSF self-hosts all of its media, supports decentralization and federation, and never requires nonfree JavaScript. The FSF will continue campaigning against software patents, and will always ensure that our materials can be viewed by systems that exclusively run free software.

Categories: FLOSS Project Planets

Evolving Web: Get a Free Ebook About Drupal Accessibility!

Planet Drupal - Fri, 2020-08-07 13:19

Did you know that according to WebAim, a whopping 98% of the top million homepages on the web today present some sort of barrier to accessibility? This has serious implications for the 1 in 5 people worldwide living with some form of disability. Building a more accessible, inclusive web is truly everyone's business.

There's a ton of information out there on web accessibility, and it isn't always clear where to start and what you should be focusing on.

We've put together a simple, straightforward, informative guide to help designers, developers, and anyone working with a Drupal website navigate the ins and outs of the accessible web. Head over here to download your copy. It's free!

Ebook Chapters 1. Why web accessibility matters

Find out why making your website accessible should be a business priority.

2. What is web accessibility?

Learn about the key principles of accessibility and what standards and guidelines currently exist.

3. Assistive technologies you can start using today

Spend some time in the shoes of a user with a disability to experience first-hand why accessibility is so important, and whether your website really works for everyone.

4. Why Drupal is great for building accessible sites

The Drupal CMS comes with robust accessibility features out of the box. Find out how switching to Drupal can help your accessibility journey.

5. 18 tips for making your website WCAG compliant

Start making simple changes with a big impact today.

6. Tools for checking website accessibility

You're not alone! Discover some must-have accessibility testing tools.

7. Drupal modules for web accessibility

Need even more features? Explore our favourite Drupal modules that extend the CMS's accessibility capability even further.

Download Your Copy!

Click here to get your free copy of Building a More Inclusive Drupal Website: Your Accessibility Guide.

+ more awesome articles by Evolving Web
Categories: FLOSS Project Planets

Python Engineering at Microsoft: Need an Intro to VS Code? Let Tech with Tim Help!

Planet Python - Fri, 2020-08-07 11:58

We have been spoiled to have Tim Ruscica, founder and star of the very informative and popular “Tech with Tim” YouTube channel, work on our team as a Software Engineering intern this summer! During his time here he implemented several features for our extension, including the much desired export notebook to HTML and PDF, as well as influence the discussion and design of other features we have been actively working on and shipping. We’re honored to have him spotlight a few of his favorite VS Code Python Extension features (not just those he worked on) in a recent video! Please check it out and give Tim some much deserved kudos!


If you’re interested in learning about something specific, follow the timestamps below!

00:22 – VSCode Python Setup

00:50 – Jupyter Notebooks

01:38 – Interactive Window

03:28 – Variable Explorer

04:41 – Run By Line

05:50 – Dataframe Viewer

06:10 – Notebook Exports

06:56 – Gather

08:28 – Pylance


Did Tim’s video give you an idea for a feature? Let us know here!

The post Need an Intro to VS Code? Let Tech with Tim Help! appeared first on Python.

Categories: FLOSS Project Planets

Stack Abuse: Integrating H2 with Python and Flask

Planet Python - Fri, 2020-08-07 08:30

H2 is a lightweight database server written in Java. It can be embedded in Java applications, or run as a standalone server.

In this tutorial, we'll review why H2 can be a good option for your projects. We'll also learn how to integrate H2 with Python by building a simple Flask API.

The Features of H2

H2 was built with performance in mind.

"H2 is a combination of: fast, stable, easy to use, and features".

Although H2 is prominent mainly because it can be embedded in Java applications, it has some interesting features that also apply to its server version. Let's see some of them next.

Size and Performance

The .jar file used for the server version is around 2MB. We can download it from the H2 site, bundled with extra scripts and documentation. If we search in Maven Central though, we can download the .jar file on its own.

H2 performance shines in its embedded version. Even so, the official benchmark shows that its client-server version is also impressive.

In-Memory Databases and Encryption

In-Memory databases are not persistent. All data is stored in memory, so speed is greatly increased.

The H2 site explains that In-Memory databases are particularly useful when prototyping, or when using read-only databases.

Encryption is another useful feature to protect data at rest. Databases can be encrypted with the AES-128 algorithm.

Other Useful Features

H2 also provides a cluster mode, the ability to run multiple servers and connect them together. Writes are done in all servers at the same time, while reads are done from the first server in the cluster.

H2 surprises for its simplicity. It provides several useful features and it's easy to set up.

Let's start an H2 server in preparation for the following sections:

$ java -cp ./h2-1.4.200.jar org.h2.tools.Server -tcp -tcpAllowOthers -tcpPort 5234 -baseDir ./ -ifNotExists

The arguments that start with tcp enable communication to the server. The ifNotExists argument allows the database to be created when accessing it for the first time.

Description of the API and General Diagram

Let's suppose we are writing an API to register all exoplanets found to date. Exoplanets are planets found outside our Solar System, orbiting other stars.

This is our simple API definition, a CRUD for one resource:

This definition along with the rest of the code we'll see next is available in this GitHub repo.

This is how our application will look like at the end of this tutorial:

Left of the diagram we see the API Client. That client can be the "Try it out" function of the Swagger Editor, or any other client, like Postman or cURL.

On the other end we find the H2 database server, running on TCP port 5234 as explained above.

Finally, our application in the middle is composed of three Python files. The first one will have the Flask app that will answer all REST API requests. All endpoints we described in the definition above will be added to this file.

The second file will have the persistence, functions that access the database to execute the CRUD operations, using the JayDeBeApi package.

Lastly, a third file will contain a schema representing the resource the API manages, the Exoplanet. We'll use the Marshmallow package to represent that schema. The first two python files will use this schema to represent resources and pass them to each other.

Let's start off with the persistence file.

Database Schema

To store the Exoplanet resource to an H2 database we should write the basic CRUD functions first. Let's start by writing the creation of the database. We use the JayDeBeApi package to access databases through JDBC:

import jaydebeapi def initialize(): _execute( ("CREATE TABLE IF NOT EXISTS exoplanets (" " id INT PRIMARY KEY AUTO_INCREMENT," " name VARCHAR NOT NULL," " year_discovered SIGNED," " light_years FLOAT," " mass FLOAT," " link VARCHAR)")) def _execute(query, returnResult=None): connection = jaydebeapi.connect( "org.h2.Driver", "jdbc:h2:tcp://localhost:5234/exoplanets", ["SA", ""], "../h2-1.4.200.jar") cursor = connection.cursor() cursor.execute(query) if returnResult: returnResult = _convert_to_schema(cursor) cursor.close() connection.close() return returnResult

The initialize() function is simple enough because of the helper functions after. It creates the exoplanets table if it doesn't exist already. This function should be executed before our API starts receiving requests. We'll see later where to do that with Flask.

The _execute() function contains the connection string and credentials to access the database server. It is simpler for this example, but there is room for improvement regarding security. We could save our credentials elsewhere, like environment variables for example.

Also, we added the path to the H2 jar file to the connect() method, as it has the driver we need to connect to H2 - org.h2.Driver.

The JDBC connection string ends in /exoplanets. This means that when connecting for the first time a database called exoplanets will be created.

You may have noticed that _execute() can return the result of the SQL query using the _convert_to_schema() function. Let's now see how that function works.

Marshmallow Schemas and CRUD Database Functions

Some SQL queries return tabular results, particularly the SELECT statement. JayDeBeApi will format those results as a list of tuples. For example, for the schema defined in the last section we could get a result similar to this:

>>> connection = jaydebeapi.connect(... >>> cursor = connection.cursor() >>> cursor.execute("SELECT * FROM exoplanets") >>> cursor.fetchall() [(1, 'Sample1', 2019, 4.5, 1.2, 'http://sample1.com')]

Nothing's stopping us from managing results in this format and eventually return it to the API client. But looking ahead we know we will use Flask, so it would be good to already return results in a format Flask recommends.

In particular, we'll be using Flask-RESTful to facilitate the use of API routes. That package recommends to use Marshmallow to parse requests. This step allows for normalization of the objects. This way we can discard unknown properties and highlight validation errors, for example.

Let's see how the Exoplanet class would look so we can discuss further:

from marshmallow import Schema, fields, EXCLUDE class ExoplanetSchema(Schema): id = fields.Integer(allow_none=True) name = fields.Str(required=True, error_messages={"required": "An exoplanet needs at least a name"}) year_discovered = fields.Integer(allow_none=True) light_years = fields.Float(allow_none=True) mass = fields.Float(allow_none=True) link = fields.Url(allow_none=True) class Meta: unknown = EXCLUDE

The definition of the properties looks familiar. It's the same as the database schema, including the definition of required fields. All fields have a type that defines some default validation. For example, the link field is defined as an URL, so a string that doesn't look like an URL won't be valid.

Specific error messages can also be included here, like the validation for a name.

For this example project, we want to discard, or exclude, all unknown fields and API client may send erroneously. This is achieved in the Meta nested class.

Now we can use the load() and loads() Marshmallow methods to convert and validate our resources.

Now that we're acquainted with Marshmallow, we can explain what the _convert_to_schema() does:

def _convert_to_schema(cursor): column_names = [record[0].lower() for record in cursor.description] column_and_values = [dict(zip(column_names, record)) for record in cursor.fetchall()] return ExoplanetSchema().load(column_and_values, many=True)

In JayDeBeApi, column names are saved in the description field of the cursor, while the data can be obtained with the fetchall() method. We used list comprehensions in the first two lines to get the column names and values, and zip() to merge them.

The last line takes the merged result and converts them to ExoplanetSchema objects that Flask can further process.

Now that we explained the _execute() function and the ExoplanetSchema class, let's see all the CRUD database functions:

def get_all(): return _execute("SELECT * FROM exoplanets", returnResult=True) def get(Id): return _execute("SELECT * FROM exoplanets WHERE id = {}".format(Id), returnResult=True) def create(exoplanet): count = _execute("SELECT count(*) AS count FROM exoplanets WHERE name LIKE '{}'".format(exoplanet.get("name")), returnResult=True) if count[0]["count"] > 0: return columns = ", ".join(exoplanet.keys()) values = ", ".join("'{}'".format(value) for value in exoplanet.values()) _execute("INSERT INTO exoplanets ({}) VALUES({})".format(columns, values)) return {} def update(exoplanet, Id): count = _execute("SELECT count(*) AS count FROM exoplanets WHERE id = {}".format(Id), returnResult=True) if count[0]["count"] == 0: return values = ["'{}'".format(value) for value in exoplanet.values()] update_values = ", ".join("{} = {}".format(key, value) for key, value in zip(exoplanet.keys(), values)) _execute("UPDATE exoplanets SET {} WHERE id = {}".format(update_values, Id)) return {} def delete(Id): count = _execute("SELECT count(*) AS count FROM exoplanets WHERE id = {}".format(Id), returnResult=True) if count[0]["count"] == 0: return _execute("DELETE FROM exoplanets WHERE id = {}".format(Id)) return {}

All functions are mainly SQL queries, but create() and update() deserve some more explanation.

The INSERT SQL statement can receive column and values separated, in the form INSERT INTO table (column1Name) VALUES ('column1Value'). We can use the join() function to merge all columns and separate them with commas, and do something similar to join all values we want to insert.

The UPDATE SQL statement is a bit more complex. Its form is UPDATE table SET column1Name = 'column1Value'. So we need to alternate keys and values, and we did it using the zip() function.

All these functions return None when there is a problem. Later when we call them we will have to check for that value.

Let's save all database functions on its own file, persistence.py, so we can add some context when we call the functions, like this:

import persistence persistence.get_all() REST API With Flask

Now that we wrote a layer to abstract the access to the database, we are ready to write the REST API. We'll use the Flask and Flask-RESTful packages to make our definition as easy as possible. As we learned before, we'll also use Marshmallow to validate resources.

Flask-RESTful requires to define one class per API resource, in our case the Exoplanet resource only. Then we can associate that resource with a route like this:

from flask import Flask from flask_restful import Resource, Api app = Flask(__name__) api = Api(app) class Exoplanet(Resource): # ... api.add_resource(Exoplanet, "/exoplanets", "/exoplanets/<int:Id>")

This way all our routes, /exoplanets and /exoplanets/<int:Id> will be directed to the class we defined.

For example, the GET /exoplanets endpoint will be answered by a method called get() inside the Exoplanet class. Because we also have the GET /exoplanet/<Id> endpoint, that get() method must have an optional parameter called Id.

Let's see the whole class to understand this better:

from flask import request from flask_restful import Resource, abort from marshmallow import ValidationError import persistence class Exoplanet(Resource): def get(self, Id=None): if Id is None: return persistence.get_all() exoplanet = persistence.get(Id) if not exoplanet: abort(404, errors={"errors": {"message": "Exoplanet with Id {} does not exist".format(Id)}}) return exoplanet def post(self): try: exoplanet = ExoplanetSchema(exclude=["id"]).loads(request.json) if not persistence.create(exoplanet): abort(404, errors={"errors": {"message": "Exoplanet with name {} already exists".format(request.json["name"])}}) except ValidationError as e: abort(405, errors=e.messages) def put(self, Id): try: exoplanet = ExoplanetSchema(exclude=["id"]).loads(request.json) if not persistence.update(exoplanet, Id): abort(404, errors={"errors": {"message": "Exoplanet with Id {} does not exist".format(Id)}}) except ValidationError as e: abort(405, errors=e.messages) def delete(self, Id): if not persistence.delete(Id): abort(404, errors={"errors": {"message": "Exoplanet with Id {} does not exist".format(Id)}})

The remaining HTTP verbs are processed in the same way as GET, by the methods with name post(), put() and delete() .

As we said before, logic errors when accessing the database will cause the functions to return None. Those errors are captured here when needed.

Also, exceptions that represent validation errors are triggered by Marshmallow, so those errors are also captured and returned to the user along with an appropriate return error.


H2 is a useful database server, performant and easy to use. Although it is a Java package, it can also run as a standalone server, so we can use it in Python with the JayDeBeApi package.

In this tutorial we defined a simple CRUD application to illustrate how to access the database, and which functions are available. After that, we defined a REST API with Flask and Flask-RESTful.

Although several concepts were omitted for the sake of brevity, like authentication and paging, this tutorial is a good reference to start using H2 in our Flask projects.

Categories: FLOSS Project Planets

Real Python: The Real Python Podcast – Episode #21: Exploring K-means Clustering and Building a Gradebook With Pandas

Planet Python - Fri, 2020-08-07 08:00

Do you want to learn the how and when of implementing K-means clustering in Python? Would you like to practice your pandas skills with a real-world project? This week on the show, David Amos is back with another batch of PyCoder’s Weekly articles and projects.

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

Jonathan Dowland: Vimwiki

Planet Debian - Fri, 2020-08-07 06:55

At the start of the year I begun keeping a daily diary for work as a simple text file. I've used various other approaches for this over the years, including many paper diaries and more complex digital systems. One great advantage of the one-page text file was it made assembling my weekly status report email very quick, nearly just a series of copies and pastes. But of course there are drawbacks and room for improvement.

vimwiki is a personal wiki plugin for the vim and neovim editors. I've tried to look at it before, years ago, but I found it too invasive, changing key bindings and display settings for any use of vim, and I use vim a lot.

I decided to give it another look. The trigger was actually something completely unrelated: Steve Losh's blog post "Coming Home to vim". I've been using vim for around 17 years but I still learned some new things from that blog post. In particular, I've never bothered to Use The Leader for user-specific shortcuts.

The Leader, to me, feels like a namespace that plugins should not touch: it's like the /usr/local of shortcut keys, a space for the local user only. Vimwiki's default bindings include several incorporating the Leader. Of course since I didn't use the leader, those weren't the ones that bothered me: It turns out I regularly use carriage return and backspace for moving the cursor around in normal mode, and Vimwiki steals both of those. It also truncates the display of (what it thinks are) URIs. It turns out I really prefer to see exactly what's in the file I'm editing. I haven't used vim folds since I first switched to it, despite them being why I switched.

Disabling all the default bindings and URI concealing stuff and Vimwiki is now much less invasive and I can explore its features at my own pace:

let g:vimwiki_key_mappings = { 'all_maps': 0, } let g:vimwiki_conceallevel = 0 let g:vimwiki_url_maxsave = 0

Followed by explicitly configuring the bindings I want. I'm letting it steal carriage return. And yes, I've used some Leader bindings after all.

nnoremap <leader>ww :VimwikiIndex<cr> nnoremap <leader>wi :VimwikiDiaryIndex<cr> nnoremap <leader>wd :VimwikiMakeDiaryNote<cr> nnoremap <CR> :VimwikiFollowLink<cr> nnoremap <Tab> :VimwikiNextLink<cr> nnoremap <S-Tab> :VimwikiPrevLink<cr> nnoremap <C-Down> :VimwikiDiaryNextDay<cr> nnoremap <C-Up> :VimwikiDiaryPrevDay<cr>

,wd (my leader) now brings me straight to today's diary page, and I can create separate, non-diary pages for particular work items (e.g. a Ticket reference) that will span more than one day, and keep all the relevant stuff in one place.

Categories: FLOSS Project Planets

libredwg @ Savannah: libredwg-0.11 released

GNU Planet! - Fri, 2020-08-07 06:49

New features:
  * new programs dwgfilter, dxfwrite.
    dwgfilter allows custom jq queries.
    dxfwrite allows version conversions, which dwgwrite does not yet support.
  * Can now read all 2004+ section types: added AppInfo, FileDepList,
    Template, ObjFreeSpace;
    and as blob: RevHistory, Security, AppInfoHistory.
    AcDsPrototype_1b datastore not fully yet, so we cannot reliably yet read
    new ACIS r2013+ SAB blobs stored there, but we extract them from the AcDs
    blob by brute-force.
  * Added new string types: T and T16, TU16, T32 (for those sections)
  * Convert ACIS BinaryFile v2 SAB to old encrypted ACIS SAT v1 data, needed
    to convert pre-r2013 ACIS v2 entities to DXF.
  * Added support for many object/entity types:



    Demoted to Unstable: SPATIAL_INDEX

    Note: Unstable objects are not preserved via DXF conversion, just
    the external import is supported.

    Add most Constraint (ASSOC*) and DYNBLOCK objects (BLOCK*).
    Debugging classes added (needs --with-debug option):


  * Started support to write r2004+ format DWG's (which includes also r2010,
    r2013, r2018, but not r2007), but this does not work fully yet.
  * Added all remaining Dwg_Version types: R_1_3 for AC1.3, R_2_4 for AC1001, and
    AC1013 for R_13c3.
  * The header can now be compiled wth C++ compilers, needed for some bindings.
    Re-arranged nested structs, names, malloc casts, reserved keywords like this,
    Started with the gambas bindings, a Visual Basic clone for unix.
  * DXF and JSON importers now create PLACEHOLDER objects for unsupported
  * 3DSOLID got now material properties and revisionguid fields.
  * Many parts of the API are now auto-generated/updated: dwg.i, dwg_api.c, dwg_api.h,
    unions and setup in dwg.h
  * Added geojsonhint or gjv linter support. Fixed all violations (esp. point arrays,
    and POLYLINE_2D). Add a Feature id (the handle)
  * Added support for GeoJSON RFC7946, write closed polygons, re-order by the
    right-hand rule..
  * new API functions:
    dwg_ctrl_table, dwg_handle_name, dwg_find_dicthandle_objname, dwg_variable_dict,
    dwg_next_entity, get_next_owned_block_entity, dwg_section_name,
    dwg_version_type, dwg_version_as, dwg_errstrings,  dwg_rgb_palette,
  * new dynapi functions: dwg_dynapi_subclass_value, dwg_dynapi_subclass_field,
    (BTW. the dynapi proved to be a godsend for the json importer)

API breaking changes:
  * Renamed dwg_section_type to dwg_section_wtype, added a new dwg_section_type
    for ASCII names.
  * Removed all extra null_handle fields, and add the missing handle fields.
  * Renamed all dwg_add_OBJECT functions to dwg_setup_OBJECT. They didn't add them, just setup
    the internal structures.
    Also section enum SECTION_VPORT_ENTITY to SECTION_VX and dwg->vport_entity_control likewise.
  * Hundreds of field renames due to harmonization efforts with the more generic
    JSON importer. Note that some deprecated dwg_api accessor functions were also
    renamed accordingly, but not all.

    For the stable objects:
    TEXT,ATTRIB,ATTDEF,SHAPE,STYLE: oblique_ang => oblique_angle,
    TEXT,ATTRIB,ATTDEF,SHAPE,MTEXT,UNDERLAY,TABLE,...: insertion_pt => ins_pt,
    DIMENSION_* _13_pt => xline1_pt, _14_pt => xline2_pt,
      ext_line_rotation => oblique_angle
    DIMENSION_ANG2LN _16_pt => xline1start_pt, _14_pt => xline2start_pt,
      _13_pt => xline1end_pt, first_arc_pt => xline2end_pt
    VIEW,VIEWPORT: view_direction => VIEWDIR (as it overrides this header),
      view_twist => twist_angle,
      view_height => VIEWSIZE,
      snap_angle => SNAPANG,
      view_center => VIEWCTR,
      snap_base => SNAPBASE,
      snap_spacing => SNAPUNIT,
      grid_spacing => GRIDUNIT,
      ucs_per_viewport => UCSVP,
      ucs_origin => ucsorg,
      ucs_x_axis => ucsxdir,
      ucs_y_axis => ucsydir,
      ucs_ortho_view_type => UCSORTHOVIEW
    OLEFRAME.data_length => data_size,
    LEADER.offset_to_block_ins_pt => inspt_offset
    TOLERANCE.text_string => text_value
    STYLE.vertical => is_vertical, shape_file => is_shape, fixed_height => text_size,
      extref => xref
    DICTIONARYVAR.intval => schema, str => strvalue

    COMMON_TABLE_FIELDS: xrefref => is_xref_ref, xrefindex_plus1 => is_xref_resolved,
      xrefdep => is_xref_dep. new common xref HANDLE field (was null_handle in many objects)

    LAYER got a new visualstyle handle.
    LTYPE.dashes got a new style handle and text field.
    LTYPE has no styles H* anymore, moved to dashes.
    LTYPE.text_area_is_present => has_strings_area, extref_handle => xref.
      height => VIEWSIZE, width => view_width, center => VIEWCTR, target => view_target,
      direction => VIEWDIR, front_clip => front_clip_z, back_clip => back_clip_z,
      pspace_flag => is_pspace,
      origin => ucsorg, x_direction => ucsxdir, y_direction => ucsydir,
      elevation => ucs_elevation, orthographic_view_type => UCSORTHOVIEW,
      camera_plottable => is_camera_plottable

    UCS got a new orthopts array, and the renames as above.
    DIMSTYLE got a new flag0. flag is computed from that.
    VPORT_ENTITY_HEADER flag1 => is_on, vport_entity => viewport, xref_handle => xref,
      new prev_entity handle.
    MLINESTYLE index/ltype union changed to seperate lt_index, lt_ltype fields.
      They were overwriting each other on version conversions.
    MLINESTYLE.desc => description, data_length => data_size.
    HATCH booleans got a is_ prefix.
    MTEXT.annotative => is_annotative.
    MTEXT.drawing_dir => flow_dir.
    XRECORD.num_databytes => xdata_size
    MLEADERSTYLE text_frame => is_text_frame, is_new_format removed.
      changed => is_changed.
    DICTIONARYYWDFLT got a new format_flags and data_handle
    SCALE.has_unit_scale => is_unit_scale
    SORTENTSTABLE.dictionary => block_owner

    Type changes in stable objects:
    SPLINE.fit_pts are now ordinary BITCODE_3DPOINT*
    SPLINE.color is BL, scale is now 3BD
  * Changed truecolor attributes in GeoJSON with a # prefix.

Major bugfixes:
  * Fixed converting ASCII from and to Unicode strings, when converting across
    versions. Embed Unicode as \U+XXXX into ASCII, and decode it back to Unicode.
    Honor dat,dwg->from_version and use the new FIELD_T as seperate type. (#185)
  * Invalid numbers (read failures) are converted to 0.0 in the released version.
  * Fixed wrong CMC color reads and writes, check the method, lookup the index,
    support a CMTC truecolor-only type.
  * Fixed EED writes, by writing to seperate streams and merging them at the end,
    with proper size calculation.
  * All remaining assertions are now protected. (GH #187)

Minor bugfixes:
  * Fixed uncompressed sections overflows, some fuzzed (GH #183), some
    with the new sections.
  * Normalize extrusion vectors.
  * Fix bit_write_BT, the thickness vector pre-R2000.
  * Added many overflow checks, due to extensive fuzzing campains.
  * Fixed wrong julian date conversions with TIMEBLL types.
  * Fxed keyword conflicts with the bindings: No next, from, self fieldnames.
  * Many more, see the ChangeLog.

Other newsworthy changes:
  * Harmonized 2004 section search with the better 2007 variant. Added a new
    section and info fixedtype field.
  * Added unit-tests for all supported objects.
  * Added src/classes.c defining the class stability (stable, unstable, debugging, unhandled).
  * Need now -lm, the system math library, in all cases.
  * Got a complete collection of old DWGs to cross-check against. Many new object types
    could be stabilized because of this. Many thanks to Michal Josef Špaček.
  * CMC color got 2 new fields: raw (EMC only), method (the first rgb byte).
  * Many DXF re-ordering fixes.

Notes: The new constraint and dynblock objects just miss a major refactor into seperate
impl subclasses, and subent and curve support.

Here are the compressed sources:
  http://ftp.gnu.org/gnu/libredwg/libredwg-0.11.tar.gz  (16.0MB)
  http://ftp.gnu.org/gnu/libredwg/libredwg-0.11.tar.xz   (7.9MB)

Here are the GPG detached signatures[*]:

Use a mirror for higher download bandwidth:

Here are more binaries:

Here are the SHA256 checksums:
6b48304c50320b1ee7fbfea63c3b1437bbc3d4cd1b0ecb7fecd5f00ed4f4bdc8  libredwg-0.11.tar.gz
c25bbab29e7814663a203c38df8cbcce850d0b003a7132cf3f849429468ca7ed  libredwg-0.11.tar.xz

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify libredwg-0.11.tar.gz.sig

If that command fails because you don't have the required public key, then run this command to import it:

  gpg --keyserver keys.gnupg.net --recv-keys B4F63339E65D6414

and rerun the 'gpg --verify' command.

Categories: FLOSS Project Planets

FSF Blogs: The University of Costumed Heroes: A video from the FSF

GNU Planet! - Fri, 2020-08-07 01:55

This video is the second in a series of animated videos created by the Free Software Foundation's (FSF), and this one is themed around our campaign against the use of proprietary remote education software.

We must reverse the trend of forsaking young people's freedom, which has been accelerating as corporations try to capitalize on the need to establish new remote education practices. Free software not only protects the freedoms of your child or grandchild by allowing people to study the source code for any malicious functionalities, it also communicates important values like autonomy, sharing, social responsibility, and collaboration.

Support our work

To further help us bring attention to, and start a conversation with, institutions that are endangering students' futures and jeopardizing their education by relying on proprietary software , please show your support for free software in education and this video by promoting it.

If you enjoy this video, consider becoming an FSF associate member or donating to the FSF to help us create more videos like this to help spread free software awareness.

Download the video:

More information about the different formats the FSF chooses to use.

Subtitles and translations

Help us translate to many different languages so we can share this video across the globe! Translation drafts and the how-to explanation can be found on our the LibrePlanet wiki. Once you have finalized a translation, email campaigns@fsf.org and we will publish it.

Subtitle files: English


Embed The University of Costumed Heroes on your site or blog with this code:

<iframe src="https://static.fsf.org/nosvn/videos/fsf-heroes/" id="fsf-heroes-video" scrolling="no" style="overflow: hidden; margin: 0; border: 0 none; display: block; width: 100%; height: 67vw; max-height: 550px;"></iframe> Video credits:

The University of Costumed Heroes by the Free Software Foundation
LENGTH: 02:33
STORY: Douglas J. Eboch
ANIMATOR: Zygis Luksas

The University of Costumed Heroes by the Free Software Foundation Copyright Š 2020 is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.

Categories: FLOSS Project Planets

The University of Costumed Heroes: A video from the FSF

FSF Blogs - Fri, 2020-08-07 01:55

This video is the second in a series of animated videos created by the Free Software Foundation's (FSF), and this one is themed around our campaign against the use of proprietary remote education software.

We must reverse the trend of forsaking young people's freedom, which has been accelerating as corporations try to capitalize on the need to establish new remote education practices. Free software not only protects the freedoms of your child or grandchild by allowing people to study the source code for any malicious functionalities, it also communicates important values like autonomy, sharing, social responsibility, and collaboration.

Support our work

To further help us bring attention to, and start a conversation with, institutions that are endangering students' futures and jeopardizing their education by relying on proprietary software , please show your support for free software in education and this video by promoting it.

If you enjoy this video, consider becoming an FSF associate member or donating to the FSF to help us create more videos like this to help spread free software awareness.

Download the video:

More information about the different formats the FSF chooses to use.

Subtitles and translations

Help us translate to many different languages so we can share this video across the globe! Translation drafts and the how-to explanation can be found on our the LibrePlanet wiki. Once you have finalized a translation, email campaigns@fsf.org and we will publish it.

Subtitle files: English


Embed The University of Costumed Heroes on your site or blog with this code:

<iframe src="https://static.fsf.org/nosvn/videos/fsf-heroes/" id="fsf-heroes-video" scrolling="no" style="overflow: hidden; margin: 0; border: 0 none; display: block; width: 100%; height: 67vw; max-height: 550px;"></iframe> Video credits:

The University of Costumed Heroes by the Free Software Foundation
LENGTH: 02:33
STORY: Douglas J. Eboch
ANIMATOR: Zygis Luksas

The University of Costumed Heroes by the Free Software Foundation Copyright © 2020 is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.

Categories: FLOSS Project Planets

Reproducible Builds (diffoscope): diffoscope 155 released

Planet Debian - Thu, 2020-08-06 20:00

The diffoscope maintainers are pleased to announce the release of diffoscope version 155. This version includes the following changes:

[ Chris Lamb ] * Bump Python requirement from 3.6 to 3.7 - most distributions are either shipping3.5 or 3.7, so supporting 3.6 is not somewhat unnecessary and also more difficult to test locally. * Improvements to setup.py: - Apply the Black source code reformatter. - Add some URLs for the site of PyPI.org. - Update "author" and author email. * Explicitly support Python 3.8. [ Frazer Clews ] * Move away from the deprecated logger.warn method logger.warning. [ Mattia Rizzolo ] * Document ("classify") on PyPI that this project works with Python 3.8.

You find out more by visiting the project homepage.

Categories: FLOSS Project Planets

Dirk Eddelbuettel: nanotime 0.3.0: Yuge New Features!

Planet Debian - Thu, 2020-08-06 19:53

A fresh major release of the nanotime package for working with nanosecond timestamps is hitting CRAN mirrors right now.

nanotime relies on the RcppCCTZ package for (efficient) high(er) resolution time parsing and formatting up to nanosecond resolution, and the bit64 package for the actual integer64 arithmetic. Initially implemented using the S3 system, it has benefitted greatly from work by Leonardo Silvestri who rejigged internals in S4—and now added new types for periods, intervals and durations. This is what is commonly called a big fucking deal!! So a really REALLY big thank you to my coauthor Leonardo for all these contributions.

With all these Yuge changes patiently chisseled in by Leonardo, it took some time since the last release and a few more things piled up. Matt Dowle corrected something we borked for integration with the lovely and irreplacable data.table. We also switched to the awesome yet minimal tinytest package by Mark van der Loo, and last but not least we added the beginnings of a proper vignette—currently at nine pages but far from complete.

The NEWS snippet adds full details.

Changes in version 0.3.0 (2020-08-06)
  • Use tzstr= instead of tz= in call to RcppCCTZ::parseDouble()) (Matt Dowle in #49).

  • Add new comparison operators for nanotime and charcters (Dirk in #54 fixing #52).

  • Switch from RUnit to tinytest (Dirk in #55)

  • Substantial functionality extension in with new types nanoduration, nanoival and nanoperiod (Leonardo in #58, #60, #62, #63, #65, #67, #70 fixing #47, #51, #57, #61, #64 with assistance from Dirk).

  • A new (yet still draft-ish) vignette was added describing the four core types (Leonardo and Dirk in #71).

  • A required compilation flag for Windows was added (Leonardo in #72).

  • RcppCCTZ function are called in new 'non-throwing' variants to not trigger exeception errors (Leonardo in #73).

We also have a diff to the previous version thanks to CRANberries. More details and examples are at the nanotime page; code, issue tickets etc at the GitHub repository.

If you like this or other open-source work I do, you can now sponsor me at GitHub. For the first year, GitHub will match your contributions.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

Categories: FLOSS Project Planets

Chris Lamb: The Bringers of Beethoven

Planet Debian - Thu, 2020-08-06 17:48

This is a curiously poignant work to me that I doubt I would ever be able to communicate in writing. I found it first about fifteen years ago with a friend who I am quite regrettably no longer in regular contact with, so there was some complicated nostalgia entangled with rediscovering it today.

What might I say about it instead? One tell-tale sign of 'good' art is that you can find something new in it, or yourself, each time. In this sense, despite The Bringers of Beethoven being more than a little ridiculous, it is somehow 'good' music to me. For example, it only really dawned on me now that the whole poem is an allegory for a GDR-like totalitarianism.

But I also realised that it is not an accident that it is Beethoven himself (quite literally the soundtrack for Enlightenment humanism) that is being weaponised here, rather than some fourth-rate composer of military marches or one with a problematic past. That is to say, not only is the poem arguing that something universally recognised as an unalloyed good can be subverted for propagandistic ends, but that is precisely the point being made by the regime. An inverted Clockwork Orange, if you like.

Yet when I listen to it again I can't help but laugh. I think of the 18th-century poet Alexander Pope, who first used the word bathos to refer to those abrupt and often absurd transitions from the elevated to the ordinary, contrasting it with the concept of pathos, the sincere feeling of sadness and tragedy. I can't think of two better words.

Categories: FLOSS Project Planets

PSF GSoC students blogs: Week 10 Blog

Planet Python - Thu, 2020-08-06 17:05

Hello everyone

I know I am late for the weekly blog. My apologies for that.
The previous week was my first week post my exams. I had mentioned in the last blog that I will be working on the documentation for panda3d.
So, just as I mentioned, I was able to complete the documentation part in one week. The documentation includes documentation for both python and c++, the languages supported by panda3d for game development. The appropriate code snippets have been included along with the screenshots of the corresponding output.
The challenges were to understand the reStructured text format by Sphinx ans write the code for documentation with proper identation and tags so as to build separate docs for python and c++.
You may find the Pull Request here: #71

This week I am working on the sample code. Some part of work has been done and hopefully it will be completed by the weekend. I will share more about the same in my next blog.

Thank you!

Stay Safe!

Categories: FLOSS Project Planets

Joey Hess: Mr Process's wild ride

Planet Debian - Thu, 2020-08-06 16:02

When a unix process is running in a directory, and that directory gets renamed, the process is taken on a ride to a new location in the filesystem. Suddenly, any "../" paths it might be using point to new, and unexpected locations.

This can be a source of interesting behavior, and also of security holes.

Suppose root is poking around in ~user/foo/bar/ and decides to vim ../../etc/conffile

If the user notices this process is running, they can mv ~/foo/bar /tmp and when vim saves the file, it will write to /tmp/bar/../../etc/conffile AKA /etc/conffile.

(Vim does warn that the file has changed while it was being edited. Other editors may not. Or root may be feeling especially BoFH and decide to overwrite the user's changes to their file. Or the rename could perhaps be carefully timed to avoid vim's overwrite protection.)

Or, suppose root, in the same place, decides to archive ../../etc with tar, and then delete it:

tar cf etc.tar ../../etc; rm -rf ../../etc

Now the user has some time to take root's shell on a ride, before the rm starts ... and make it delete all of /etc!

Anyone know if this class of security hole has a name?

Categories: FLOSS Project Planets

Codementor: How to use DLLs/COM objects from Python or - How to send a fax with Python

Planet Python - Thu, 2020-08-06 13:34
Leverage DLLs from Python. Send faxes with Python without writing any code to send faxes.
Categories: FLOSS Project Planets

Christian Kastner: My new favorite utility: autojump

Planet Debian - Thu, 2020-08-06 10:41

Like any developer, I have amassed an impressive collection of directory trees both broad and deep. Navigating these trees became increasingly cumbersome, and setting CDPATH, using auto-completion, and working with the readline history search alleviated this only somewhat.

Enter autojump, from the package of the same name.

Whatever magic it uses is unbelievably effective. I estimate that in at least 95% of my cases, typing j <name-fragment> changes to the directory I was actually thinking of.

Say I'm working on package scikit-learn. My clone of the Salsa repo is in ~/code/pkg-scikit-learn/scikit-learn. Changing to that directory is trivial, I only need to specify a name fragment:

$ j sci /home/christian/code/pkg-scikit-learn/scikit-learn christian@workstation:~/code/pkg-scikit-learn/scikit-learn

But what if I want to work on scikit-learn upstream, to prepare a patch, for example? That repo has been cloned to ~/code/github/scikit-learn. No problem at all, just add another name fragment:

$ j gi sci /home/christian/code/github/scikit-learn christian@workstation:~/code/github/scikit-learn

The magic, however, is most evident with directory trees I rarely enter. As in: I have a good idea of the directory name I wish to change to, but I don't really recall its exact name, nor where (in the tree) it is located. I used to rely on autocomplete to somehow get there which can involve hitting the [TAB] key far too many times, and falling back to find in the worst case, but now, autojump always seems gets me there on first try.

I can't believe that this has been available in Debian for 10 years and I only discovered it now.

Categories: FLOSS Project Planets

Sam Hartman: Good Job Debian: Compatibility back to 1999

Planet Debian - Thu, 2020-08-06 08:54
So, I needed a container of Debian Slink (2.1), released back in 1999. I expected this was going to be a long and involved process. Things didn't look good from the start:
root@mount-peerless:/usr/lib/python3/dist-packages/sqlalchemy# debootstrap slink /build/slink2 http://archive.debian.org/debian E: No such script: /usr/share/debootstrap/scripts/slink
Hmm, I thought I remembered slink support for debootstrap--not that slink used debootstrap by default--back when I was looking through the debootstrap sources years ago. Sure enough looking through the changelogs, slink support was dropped back in 2005.
Okay, well, this isn't going to work either, but I guess I could try debootstrapping sarge and from there go back to slink.
Except it worked fine.
Go us!
Categories: FLOSS Project Planets

PyCharm: Webinar: “Django Database Performance Tips” with Andrew Brookins

Planet Python - Thu, 2020-08-06 08:23

Django is one of the most popular Python Web Frameworks. However, optimizing django performance can often be difficult. Most performance problems boil down to one thing: the database. According to our guest speaker, Andrew Brookins, the only way to master Django performance is to master database performance.

In this Webinar, Andrew is going to take us on a journey through an app that he created to demonstrate all the bottlenecks that arise when trying to optimize your Django app.

  • Monday, August 10
  • 7:00PM CEST – 1:00PM Eastern Daylight Time
  • Register here

  • Querying
    • Tackling the N+1 Problem: Reducing the number of queries to make your pages faster.
    • Annotations: Getting your database to do the heavy lifting for you
    • Iterator(): Get Django to chuck responses from your database
  • Indexing
    • Covering Indexes: Turning queries that take several hundred milliseconds to tens of milliseconds.
    • Materialized Views: One of the most powerful ways to have large queries created for you
  • Caching with Redis
    • Using Redis as a Cache
    • Custom Redis Authentication
About the Speaker

Andrew Brookins has over a decade of experience with Django and Relational Databases. That experience spans DevOps, application development, and platform engineering. He has worked on ecommerce sites, mobile APIs, comic book readers, particle simulation systems, learning and volunteering apps, and now works on a Databases as a Service at Redis Labs.

Andrew has also authored "Temple of Django Database Performance" which dives into the even greater detail than this webinar does. Furthermore, he has recently released a course on "Redis for Python Developers" at Redis University.

Andrew lives in Portland, Oregon with his wife and two wonderful children.

Categories: FLOSS Project Planets

wishdesk.com: Migrating to Drupal 8/9: essential steps to make about your website

Planet Drupal - Thu, 2020-08-06 08:00
Still on Drupal 7? Let’s discuss migrating to Drupal 8/9 and the essential steps for doing this. Our website maintenance and support team is ready to seamlessly perform them all for you.
Categories: FLOSS Project Planets