Language Selection

English French German Italian Portuguese Spanish

Development

Python Programming Leftovers

Filed under
Development
  • Onboarding - Building SaaS #48

    I started the stream with a quick fix to the main app view.

    After that, we started a new project in the app. I needed to design the starting experience for a user.

    I explained to the stream all of the data that a user needs to be successful with the app. We looked at django-extensions and the graph of all the models that it can produce.

  • PyCharm 2020.1 Beta

    We have a new Beta version of PyCharm that can now be downloaded from our website

    This Beta brings us closer to the 2020.1 release: we’re working on polishing everything to get it ready, and this week’s version brings some great improvements.

    [...]

    We recently improved how stepping works in the Python debugger. Previously we had a separate ‘Smart step into’ option that allows you to which function call you’d like to step into if there are multiple function calls on the same line. Unfortunately, we had a small issue where in some cases we skipped a couple lines while stepping. This has now been fixed.

  • Let’s Build A Simple Interpreter. Part 19: Nested Procedure Calls

    As I promised you last time, today we’re going to expand on the material covered in the previous article and talk about executing nested procedure calls. Just like last time, we will limit our focus today to procedures that can access their parameters and local variables only. We will cover accessing non-local variables in the next article.

  • What to do About Email: How to Extract Data from Microsoft PST Files
  • 4 Common Mistakes When Learning Python and Programming

    How are you progressing with your Python? What could be holding you back?

    I gave it some thought and identified 4 issues we commonly see that hold people back from becoming a proficient Pythonista and programmer.

  • hplip 3.20.3-2 update requires manual intervention

    The hplip package prior to version 3.20.3-2 was missing the compiled python modules. This has been fixed in 3.20.3-2, so the upgrade will need to overwrite the untracked pyc files that were created.

  • How to filter a list of strings in Python

    Python uses list data type to store multiple data in a sequential index. It works like a numeric array of other programming languages. filter() method is a very useful method of Python. One or more data values can be filtered from any string or list or dictionary in Python by using filter() method. It filters data based on any particular condition. It stores data when the condition returns true and discard data when returns false. How the string data in a list can be filtered in Python is shown in this article by using different examples. You have to use Python 3+ to test the examples of this article.

Programming Leftovers

Filed under
Development
  • Excellent Free Tutorials to Learn VimL

    VimL is a powerful scripting language of the Vim editor. You can use this dynamic, imperative language to design new tools, automate tasks, and redefine existing features of Vim. At an entry level, writing VimL consists of editing the vimrc file. Users can mould Vim to their personal preferences. But the language offers so much more; writing complete plugins that transform the editor. Learning VimL also helps improve your efficiency in every day editing.

    VimL supports many common language features: variables, control structures, built-in functions, user-defined functions, expressions first-class strings, high-level data structures (lists and dictionaries), terminal and file I/O, regex pattern matching, exceptions, as well as an integrated debugger. Vim’s runtime features are written in VimL.

    VimL is often known as Vimscript or Vim script.

  • RcppCCTZ 0.2.7

    RcppCCTZ uses Rcpp to bring CCTZ to R. CCTZ is a C++ library for translating between absolute and civil times using the rules of a time zone. In fact, it is two libraries. One for dealing with civil time: human-readable dates and times, and one for converting between between absolute and civil times via time zones. And while CCTZ is made by Google(rs), it is not an official Google product. The RcppCCTZ page has a few usage examples and details. This package was the first CRAN package to use CCTZ; by now at least three others do—using copies in their packages which remains less than ideal.

  • JavaFX 14 enhances API, mobile support

    JavaFX 14, the latest version of the open source, Java-based, rich client application platform, has arrived. The new version features improvements related to the top-level API as well as mobile development.

    For the API, functionality was added to make it easier for developers to build custom controls. In the mobile vein, JavaFX for mobile SDKs are now built from OpenJFX, the same source as for desktop JavaFX. Combined with the GraalVM native image AOT (ahead-of-time) compiler, JavaFX now achieves high performance on mobile, while developers can use the same JavaFX APIs for mobile as for the desktop.

  • How I Optimise My Website Performance

    WordPress is not slow. This website uses WordPress and is pretty darn quick, I think you will agree? In this post I want to talk a little bit about how I’ve optimised the performance of this website so that it loads in less than 2 seconds.

  • Advices for working remotely from home

    A few days ago, as someone working remotely since 3 years I published some tips to help new remote workers to feel more confident into their new workplace: home

    I’ve been told I should publish it on my blog so it’s easier to share the information, so here it is.

  • Join Our Second Documentation Hackathon March 22-30

    Documentation is extremely valuable to the health of open source software projects, but it is often overlooked. We are a small team at Tor, and as a nonprofit organization with a big mission, we rely on volunteer contributions around the world to keep up with an ever-changing [Internet] freedom landscape with the appropriate tools to navigate it. Keeping Tor's documentation up-to-date, organized, and accessible is a way to potentially help millions of people access a private, secure, and uncensored [Internet] by using our tools.

    Between 22 and 30 March, the Tor Project will host the second edition of our user documentation hackathon, the DocsHackathon. The DocsHackathon is a totally remote and online event.

Python Programming Leftovers

Filed under
Development
  • CudaText

    CudaText is a free, open-source, cross-platform (runs on Microsoft Windows, Linux, macOS or FreeBSD) code editor written in Lazarus. It evolved from the previous editor named SynWrite which is no longer developed. It is extensible by Python add-ons (plugins, linters, code tree parsers, external tools). Syntax parser is feature-rich, based on EControl engine (though not as fast as in some competitors).

  • PyCharm 2019.3.4

    We’ve fixed a couple of issues in PyCharm 2019.3. You can get it from within PyCharm (Help | Check for Updates), using JetBrains Toolbox, or by downloading the new version from our website.

  • How to use Pandas Scatter Matrix (Pair Plot) to Visualize Trends in Data

    In this Python data visualization tutorial, we will work with Pandas scatter_matrix method to explore trends in data. Previously, we have learned how to create scatter plots with Seaborn and histograms with Pandas, for instance. In this post, we’ll focus on scatter matrices (pair plots) using Pandas. Now, Pandas is using Matplotlib to make the scatter matrix.

  • How We’re Responding to COVID-19

    We are all facing a dynamic and difficult situation in the face of the COVID-19 pandemic. Our families, friends, customers, employees, and communities are all dramatically affected by the impact of the virus and its impact on the global economy. During this time, I wanted to reach out and tell you how Anaconda is responding to the situation.

    Most importantly, our hearts go out to anyone impacted by the virus, especially those who are sick. We are also incredibly grateful to the healthcare workers, first responders, and other people who work to ensure we have healthcare, food, safety, shelter, and sanitation.

    Along with so many others, we are prioritizing the safety of our employees, customers, and the communities in which we operate. Our teams have been working from home since March 9, and we have eliminated all travel for the time being. This means that our touchpoints with you will be entirely digital for the foreseeable future; in today’s world this is a minor adjustment and we plan to make every effort to minimize disruption.

  • Python Scope & the LEGB Rule: Resolving Names in Your Code

    The concept of scope rules how variables and names are looked up in your code. It determines the visibility of a variable within the code. The scope of a name or variable depends on the place in your code where you create that variable. The Python scope concept is generally presented using a rule known as the LEGB rule.

    The letters in the acronym LEGB stand for Local, Enclosing, Global, and Built-in scopes. This summarizes not only the Python scope levels but also the sequence of steps that Python follows when resolving names in a program.

  • How is frame evaluation used in pydevd?

    Since Python 3.6, CPython has a mechanism which allows clients to override how it evaluates frames. This is done by changing PyThreadState.interp.eval_frame to a different C-function (the default being _PyEval_EvalFrameDefault). See: pydevd_frame_evaluator.pyx#L370 in pydevd (note that Cython is used there).

    Note that this affects the Python runtime globally, whereas the regular Python tracing function -- set through sys.settrace() -- affects only the current thread (so, some of the caches for frame evaluation in pydevd are thread-local due to that).

  • How to Debug a Hanging Test Using pytest

    Today a wanted to share a neat trick that might save you some headache: debugging a hanging test.

Programming: Red Hat Developer Tools, Open Letter to Web Developers, Python and Java

Filed under
Development
  • Cross-language link-time optimization using Red Hat Developer Tools

    Several months ago, the LLVM project blog published an article, Closing the gap: cross-language LTO between Rust and C/C++. In it, they explained that link-time optimization can improve performance by optimizing throughout the whole program, such as inlining function calls between different objects. Since Rust and Clang both use LLVM for code generation, we can even achieve this benefit across different programming languages.

  • An Open Letter to Web Developers

    Why is this important?

    For several reasons, but primarily because it completely goes against the traditional structure of the web being an open and accessible place that isn't inherently locked down to opaque structures or a single client. WebComponents used "in full" (i.e. dynamically) inherently creates complex web page structures that cannot be saved, archived or even displayed outside of the designated targeted browsers (primarily Google Chrome).

    One could even say that this is setting the web up for becoming fully content-controlled.

    The more additional "features" are tacked on to these components, the less likely it is for non-Google clients to be able to display sites in full or properly. It creates problems for people who are in limited environments, need special web clients for e.g. limited physical accessibility, or need to strictly protect their privacy. What of people on older hardware who don't have the computing power to basically run all these JavaScript applications fully off-loaded in their browser just to be able to render a page? Not to mention other software that needs to be able to parse web pages as a whole like alternative search engines (another thing one could consider unfair competition from Google).

  • Share data between C and Python with this messaging library

    I've had moments as a software engineer when I'm asked to do a task that sends shivers down my spine. One such moment was when I had to write an interface between some new hardware infrastructure that requires C and a cloud infrastructure, which is primarily Python.

    One strategy could be to write an extension in C, which Python supports by design. A quick glance at the documentation shows this would mean writing a good amount of C. That can be good in some cases, but it's not what I prefer to do. Another strategy is to put the two tasks in separate processes and exchange messages between the two with the ZeroMQ messaging library.

    When I experienced this type of scenario before discovering ZeroMQ, I went through the extension-writing path. It was not that bad, but it is very time-consuming and convoluted. Nowadays, to avoid that, I subdivide a system into independent processes that exchange information through messages sent over communication sockets. With this approach, several programming languages can coexist, and each process is simpler and thus easier to debug.

  • Learn Data Science by Analyzing COVID-19

    COVID-19 has hit hard in the past couple of weeks and its impact has been notorious both from a sanitary perspective and an economic one. Plenty has been written about it, especially statistical reports on its exponential growth and the importance of “flattening the curve”.

    At RMOTR, we wanted to help raise awareness of the issues associated with the spread of COVID-19 by making a dynamic and interactive analysis of the situation using Python and Data Science.

    We’ve made an interactive project that you can fork and follow step by step. You can see the process that Data Scientists follow to analyze the situation and make predictions. Here is a quick summary.

  • Java 14 Reaches General Availability With Garbage Collection Improvements

    Java 14 has reached general availability today with numerous updates to the JDK.

    Among the changes with Java 14 are:

    - Records is available in a preview state. Records provide a compact syntax for declaring classes that are transparent holders for shallowly immutable data.

Some good coronavirus news: Monster Google-Oracle API copyright battle on hold as bio-nasty shuts Supremes

Filed under
Development
Google
OSS
Legal

The ten-year monster battle between Google and Oracle over the use of Java APIs will be delayed until further notice – after the US Supreme Court announced it was suspending oral arguments over coronavirus fears.

The two sides were due to present their argument to the court on Tuesday, March 24 and there has been a flood of filings in the case in the past month. But on Monday, the Supreme Court said that “in keeping with public health precautions recommended in response to COVID-19, the Supreme Court is postponing the oral arguments currently scheduled for the March session (March 23-25 and March 30-April 1).”

It’s not yet known when the case will be rescheduled - a meeting on Friday should provide more details. The court’s statement also noted that its closure is “not unprecedented,” but then gave two precedents there weren’t exactly comforting:

“The Court postponed scheduled arguments for October 1918 in response to the Spanish flu epidemic. The Court also shortened its argument calendars in August 1793 and August 1798 in response to yellow fever outbreaks.” How reassuring.

Read more

Also: Supreme Court Postpones Oral Arguments

Python Programming

Filed under
Development
  • Python 3.6.9 : My colab tutorials - part 003.
  • How to get Absolute Value in Python with abs() and Pandas

    In this Python tutorial, we will learn how to get the absolute value in Python. First, we will use the function abs() to do this. In this section, we will go through a couple of examples of how to get the absolute value. Second, we will import data with Pandas and use the abs method to get the absolute values in a Pandas dataframe.

  • Leysin 2020 Sprint Report

    At the end of February ten of us gathered in Leysin, Switzerland to work on
    a variety of topics including HPy, PyPy Python 3.7 support and the PyPy
    migration to Heptapod.

  • How to merge dictionaries in Python

    Dictionary data type is used in python to store multiple values with keys. A new dictionary can be created by merging two or more dictionaries. Merging data is required when you need to combine same type of data that is stored in multiple dictionaries. For example, department wise employee data of any company is stored in many dictionaries. To generate a list of all employees of the company we will need to merge the data from these dictionaries. Many ways exist in Python for merging dictionaries. How you can merge dictionaries are shown in this article by using various examples.

  • Working with tempfile in python

    Sometimes we need to store data temporarily in a file for doing any task temporarily. For example, the monthly sales report of any organization can be generated by using storing sales data into a temporary file. It is better to store the data in a temporary file for generating the report to prevent any accidental modification of the original data. A temporary file can also be used for securing sensitive data. Creating a temporary file and doing these types of tasks can be done easily in Python by using tempfile module. This module contains many functions to create temporary files and folders, and access them easily. The uses of tempfile module in Python are shown in this article.

  • How to use Python dictionary of dictionaries

    In most of the programming languages, an associative array is used to store data using key-value pairs. Dictionaries are used in Python to do the same task. The curly brackets ({}) are used to declare any dictionary variable. The dictionary contains a unique key value as an index and each key represents a particular value. The third brackets ([]) are to read the value of any particular key. Another data type exists in Python to store multiple data which is called List. The list works like a numeric array and its index starts from 0 and maintains order. But the key values of the dictionary contain different types of values that don’t need to maintain any order. When one or more dictionaries are declared inside another dictionary then it is called a nested dictionary or dictionaries of the dictionary. How you can declare nested dictionaries and access data from them are described in this article by using different examples.

Making a Keyboard: The System76 Approach

Filed under
Development
Interviews

We like knocking down the garden wall wherever we can. Your technology is your technology after all; you should be able to change it in any way that suits your needs. That’s why we’re making a keyboard. Everyone uses their keyboard differently due to ergonomics, convenience, or to account for a dominant hand, and it’s time we created a keyboard to accommodate that.

CEO Carl Richell sat down for an interview with us at a CDC-approved distance to discuss plans for System76’s latest project: The keyboard.

Read more

Programming Leftovers

Filed under
Development

Programming Leftovers

Filed under
Development
  • It's 2020 - Oracle Adds Meson Build System To Solaris

    Oracle continues releasing new updates to Solaris 11.4 but there still aren't any public signs of life past v11.4. Out now is Oracle Solaris 11.4 SRU19 with one interesting addition.

    As usual for Solaris 11.4 SRUs, it's mostly stable version updates for included packages and other package updates stemming from security issues. With Solaris 11.4 SRU19 this means Cython 0.29.14, MySQLClient 1.4.5, Git 2.19.3, Python 3.7.5, PHP 7.3.14, Firefox 68.5 ESR, and other mostly mundane updates.

  • Rcpp 1.0.4: Lots of goodies

    The fourth maintenance release 1.0.4 of Rcpp, following up on the 10th anniversary and the 1.0.0. release sixteen months ago, arrived on CRAN this morning. This follows a few days of gestation at CRAN. To help during the wait we provided this release via drat last Friday. And it followed a pre-release via drat a week earlier. But now that the release is official, Windows and macOS binaries will be built by CRAN over the next few days. The corresponding Debian package will be uploaded as a source package shortly after which binaries can be built.

    As with the previous releases Rcpp 1.0.1, Rcpp 1.0.2 and Rcpp 1.0.3, we have the predictable and expected four month gap between releases which seems appropriate given both the changes still being made (see below) and the relative stability of Rcpp. It still takes work to release this as we run multiple extensive sets of reverse dependency checks so maybe one day we will switch to six month cycle. For now, four months still seem like a good pace.

  • Librsvg accepting interns for Summer of Code 2020

    Are you a student qualified to run for Summer of Code 2020? I'm willing to mentor the following project for librsvg.

  • Excellent Free Tutorials to Learn Erlang

    Erlang is a general-purpose, concurrent, declarative, functional programming language and runtime environment developed by Ericsson, a Swedish multinational provider of communications technology and services. Erlang is dynamically typed and has a pattern matching syntax. The language solves difficult problems inherent in parallel, concurrent environments. It uses sets of parallel supervised processes, not a single sequential process as found in most programming languages.

    Erlang was created in 1986 at the Ellemtel Telecommunication Systems Laboratories for telecommunication systems. The objective was to build a simple and efficient programming language resilient large-scale concurrent industrial applications.

    Besides telecommunication systems and applications and other large industrial real-time systems, Erlang is particularly suitable for servers for internet applications, e-commerce, and networked database applications. The versatility of the language is, in part, due to its extensive collection of libraries.

  • EuroPython 2020: Going virtual EuroPython 2021: Dublin, Ireland

    In our blog post on the COVID-19 last week, we were still hopeful that the situation would improve in time for the event in July. The last few days have shown us that we need to have a more realistic view on how things will develop in the coming months.

    Right now, we are at a point in the conference organization where we have invested a lot of time into the preparation of the conference, but have not started ticket sales, entered sponsorship agreements or ordered conference and marketing material.

    We also had discussions with the venue and caterer on possible options to address the risk of not being able to hold the event in July due to government regulations preventing indoor gatherings.

  • Zope May sprint goes remote

    Earl Zope was inviting to the Zope May sprint, hoping for many volunteers to come. Due to restrictions to prevent spreading of COVID-19 (Corona) this sprint is going to be remote-only. – By now all of the organizers and their families are fine, so you do not have to worry about us.

  • Message to my IT/hacking friends (Mar17)

    Some thoughts and advises on March 17 from BB33, a little office and hackerspace in Freiburg in the black forest. Sitting here alone. My 8yo and partner are good, a few streets further, as is her family, for now. My sisters and many other friends are less well but i won’t detail this here. School has ended but my 8yo is totally angry with Covid-19 … is asking if it could be killed by throwing a host of atomic bombs on it … to which my answer is: “nuclear power can not kill covid-19 even it would kill all human life on the planet. But yes, sincerely, i understand your frustration — let’s take a bicicly ride together.”

    If you are like me and many of my friends you’ll get a host of demands because suddenly remote learning and working is in so many minds, also minds who have access to money while others are in urgent need. How to react and how to care?

  • Productivity Mondays - Tips from Adam Grant

Programming: GNU Debugger (GDB), Scripting, Raspberry Pi, Perl Mourns Jeff Goff, and Python Leftovers

Filed under
Development
  • GNU Debugger Lands Microsoft Windows Support Improvement

    The GNU Debugger (GDB) is seeing the start of improvements to enhance its Microsoft Windows debugging experience. 

    GDB debugging for Windows executables is not new, but up until now it has used the Cygwin OS ABI for everything on the platform -- including for the likes of MinGW produced binaries. 

  •                

  • Text processing in the shell

                     

                       

    One of the things that makes the shell an invaluable tool is the amount of available text processing commands, and the ability to easily pipe them into each other to build complex text processing workflows. These commands can make it trivial to perform text and data analysis, convert data between different formats, filter lines, etc.

                       

    When working with text data, the philosophy is to break any complex problem you have into a set of smaller ones, and to solve each of them with a specialized tool.

                       

    The examples in that chapter might seem a little contrived at first, but this is also by design. Each of these tools were designed to solve one small problem. They however become extremely powerful when combined.

  •                

         

  • Recreate Flappy Bird’s flight mechanic | Wireframe #29

           

             

    From last year’s issue 29 of Wireframe magazine: learn how to create your own version of the simple yet addictive side-scroller Flappy Bird. Raspberry Pi’s Rik Cross shows you how.

  •       

  • 2020.11 Farewell Good Friend

    On Saturday 14 March, it became known that our well-loved Jeff has died in a snorkelling accident during or shortly after the JoCoCruise 2020. The Perl and Raku communities learned a lot from Jeff Goff, from his many areas of interest: Mathematics, programming, making music, glass blowing, game playing, origami, taking care of parrots, Parrot, terrible movies and food, to name but a few. Or just from hanging out with the stories he would tell.

  • Get started using treq to make async calls in Python

    The Twisted Requests (treq) package is an HTTP client built on the popular Twisted library that is used for asynchronous requests. Async libraries offer the ability to do large amounts of network requests in parallel with relatively little CPU impact. This can be useful in HTTP clients that need to make several requests before they have all the information they need. In this article, we'll work through an example of making async calls to explore using treq.

  • Coding Starter Kit Humble Bundle

    I am very excited to share that "Doing Math with Python" is part of No Starch Press's Coding Starter Humble Bundle. Of course, you get No Starch Press's other excellent coding books as part of the bundle.

  • 5 Examples of Python While Loop

    Even though the for loop achieves the same thing with fewer lines of code, you might want to know how a “while” loop works.

    Of course, if you know any other programming languages, it will be very easy to understand the concept of loops in Python.

    In this article, I shall highlight a few important examples to help you know what a while loop is and how it works.

Syndicate content

More in Tux Machines

LibreOffice 6.4.3 Release Candidate Version 1 Released Today!

LibreOffice 6.4.3 RC1 Released: LibreOffice is one of the best open-source text editors. LibreOffice comes as default application release of Linux OS. LibreOffice is developed by Team Document Foundation. Today they announced that the LibreOffice 6.4.3 RC1 version has been released. As per their calendar, LibreOffice 6.4.3 RC1 has been released exactly on today!. This RC1 version has many bugs fixes and tweaks in essential features. Read more

Unifont 13.0.01 Released

Unifont 13.0.01 is now available. This is a major release. Significant changes in this version include the addition of these new scripts in Unicode 13.0.0: U+10E80..U+10EBF: Yezidi, by Johnnie Weaver U+10FB0..U+10FDF: Chorasmian, by Johnnie Weaver U+11900..U+1195F: Dives Akuru, by David Corbett U+18B00..U+18CFF: Khitan Small Script, by Johnnie Weaver U+1FB00..U+1FBFF: Symbols for Legacy Computing, by Rebecca Bettencourt Read more

Programming: micro.sth, RProtoBuf, Perl and Python

  • Introducing micro.sth

    Many developers turn their noses up at PHP, but I have a soft spot for it. For me, it's the most approachable programming language by far. It feels intuitive in a way no other languages do, and it makes it possible to cobble together a working application with just a handful of lines of code. So whenever I can't find a tool for a specific job, I try to build one myself. The latest project of mine is a case in point. I was looking for a simple application for keeping a photographic diary, and I was sure that I'd be able to find an open-source tool for that. I searched high and low, but I came back empty-handed. Sure, there are plenty of static website generators, but I'd prefer something that doesn't require me to perform the write-generate-upload dance every time I want to post a quick update. And I need something that I can use not only to maintain a simple diary, but also store notes, manage tasks, and draft articles -- all this without getting bogged down by configuring templates, defining categories, and tweaking settings. And because I want most of my content to be private, I should be able to protect access to it with a password.

  • Dirk Eddelbuettel: RProtoBuf 0.4.17: Robustified

    A new release 0.4.17 of RProtoBuf is now on CRAN. RProtoBuf provides R with bindings for the Google Protocol Buffers (“ProtoBuf”) data encoding and serialization library used and released by Google, and deployed very widely in numerous projects as a language and operating-system agnostic protocol. This release contains small polishes related to the release 0.4.16 which added JSON support for messages, and switched to ByteSizeLong. This release now makes sure JSON functionality is only tested where available (on version 3 of the Protocol Buffers library), and that ByteSizeLong is only called where available (version 3.6.0 or later). Of course, older versions build as before and remain fully supported.

  • Perl Weekly Challenge 53: Rotate Matrix and Vowel Strings

    These are some answers to the Week 53 of the Perl Weekly Challenge organized by Mohammad S. Anwar.

  • Weekly Python StackOverflow Report: (ccxxi) stackoverflow python report
  • Python: Is And ==

    In Python, == compares the value of two variables and returns True as long as the values are equal.

today's howtos