Language Selection

English French German Italian Portuguese Spanish

Programming: Bash, Python and How to Program a Really Cheap Microcontroller

Filed under
Development
  • Converting Decimals to Roman Numerals with Bash

    My last few articles have given me a chance to relive my undergraduate computer science degree and code a Roman numeral to decimal converter. It's quite handy when you're watching old movies (when was MCMLVII anyway?), and the basic coding algorithm was reasonably straightforward. (See Dave's "Roman Numerals and Bash" and "More Roman Numerals and Bash".)

    The trick with Roman numerals, however, is that it's what's known as a subtractive notation. In other words, it's not a position → value or even symbol → value notation, but a sort of hybrid. MM = 2000, and C = 100, but MMC and MCM are quite different: the former is 2100, and the latter is 1000 + (–100 + 1000) = 1900.

    This means that the conversion isn't quite as simple as a mapping table, which makes it a good homework assignment for young comp-sci students!

  • Creating a containerized Python/Flask development environment with Red Hat CodeReady Workspaces

    Red Hat CodeReady Workspaces provide developers with containerized development environments hosted on OpenShift/Kubernetes. DevOps teams can now use a hosted development environment that’s pre-built for their chosen stack and customized for their project.

    CodeReady Workspaces can help you rapidly onboard developers for your project as everything they need to develop is running in a containized workspace. In this post, we’re going to use CodeReady Workspaces to get up and running quickly with an existing open source project, Peak. Peak is a multi-container Kubernetes application for performance testing web services, and it allows you to create distributed performance tests using the Kubernetes Batch API for test orchestration. We’ll make some modifications to Peak’s Flask front end, a stateless web interface that interacts with a Falcon RESTful API to return data about performance tests. You won’t need the complete Peak application deployed, though if you like, you can find steps to deploy it to OpenShift here.

  • How to Run Your Python Scripts

    One of the most important skills you need to build as a Python developer is to be able to run Python scripts and code. This is going to be the only way for you to know if your code works as you planned. It’s even the only way of knowing if your code works at all!

    This step-by-step tutorial will guide you through a series of ways to run Python scripts, depending on your environment, platform, needs, and skills as a programmer.

  • Mike Driscoll: PyDev of the Week: Maria McKinley

    This week we welcome Maria McKinley (@twiteness) as our PyDev of the Week. Maria is a Senior Software Engineer at the Walt Disney Company and will be a speaker at PyCascades 2019. She is also teaching the Python Certificate Program at the University of Washington Continuing Education. Let’s spend a few moments getting to know her better.

  • How To Program A Really Cheap Microcontroller

    There are rumors of a cheap chip that does USB natively, has an Open Source toolchain, and costs a quarter. These aren’t rumors: you can buy the CH552 microcontroller right now. Surprisingly, there aren’t many people picking up this cheap chip for their next project. If there’s no original projects using this chip, no one is going to use this chip. Catch 22, and all that.

    Like a generous god, [Aaron Christophel] has got your back with a working example of programming this cheap chip, and doing something useful with it. It blinks LEDs, it writes to an I2C display, and it does everything you would want from a microcontroller that costs a few dimes.

    The CH552, and its friends the small CH551 all the way up to the CH559, contain an 8051 core, somewhere around 16 kB of flash, the high-end chips have a USB controller, there’s SPI, PWM, I2C, and it costs pennies. Unlike so many other chips out there, you can find SDKs and toolchains. You can program the chip over USB. Clearly, we’re looking at something really cool if someone writes an Arduino wrapper for it. We’re not there yet, but we’re close.

More in Tux Machines

today's leftovers

  • This Open Source Extension Displays Hidden Google Search Results
    Google receives tonnes of requests from copyright holders daily for removing infringing content. The company then analyzes the received requests and removes the content that violates copyright claims. The number of DMCA notices received by Google has increased manifold over time. As reported by TorrentFreak, content creators have asked Google to remove over four billion pirate links till date. Whenever Google removes links from its search results, it displays a notice at the bottom with the number of results removed from a search page. Google also provides links to the DMCA notices on LumenDatabase which led to the removal of links.
  • Mozilla Open Policy & Advocacy Blog: EU copyright reform: a missed opportunity
    We’ve been engaged in the discussions around the EU Copyright directive since the very beginning. During that time, we deployed various tools, campaigns, and policy assessments to highlight to European lawmakers the importance of an ambitious copyright reform that puts the interests of European internet users and creators at the centre of the process. Sadly, despite our best efforts – as well as the efforts of academics, creator and digital rights organisations, internet luminaries, and over five million citizens – our chances of reversing the EU’s march towards a bad legislative outcome diminished dramatically last September, after the draft law passed a crucial procedural milestone in the European Parliament. Over the last several months, we have worked hard to minimise the damage that these proposals would do to the internet in Europe and to Europeans’ rights. Although the draft law is still deeply flawed, we are grateful to those progressive lawmakers who worked with us to improve the text.
  • Mozilla’s Firefox Send File Sharing Service Now Available As Android App
    Mozilla recently introduced its file-sharing service, Firefox Send, which was initially available on the web. As promised previously, the service now has an Android app, currently available in the form of a beta. Firefox Send allows users to share files with other users, in a secure and end-to-end encrypted form.
  • Jelmer Vernooij: Breezy evolves
    Last month Martin, Vincent and I finally released version 3.0.0 of Breezy, a little over a year after we originally forked Bazaar. When we started working on Breezy, it was mostly as a way to keep Bazaar working going forward - in a world where Python 2 has mostly disappeared in favour of Python 3).
  •  

Linux Foundation and Servers Leftovers

  • How Open Source Is Accelerating NFV Transformation
    Red Hat is noted for making open source a culture and business model, not just a way of developing software, and its message of open source as the path to innovation resonates on many levels. In anticipation of the upcoming Open Networking Summit, we talked with Thomas Nadeau, Technical Director NFV at Red Hat, who gave a keynote address at last year’s event, to hear his thoughts regarding the role of open source in innovation for telecommunications service providers. One reason for open source’s broad acceptance in this industry, he said, was that some very successful projects have grown too large for any one company to manage, or single-handedly push their boundaries toward additional innovative breakthroughs.
  • Why The CDF Launch From Linux Foundation Is Important For The DevOps And Cloud Native Ecosystem
    Continuous Integration and Continuous Delivery (CI/CD) has become an essential building block of modern application lifecycle management. This technique allows business to increase the velocity of delivering software to users. Through CI/CD, what was once confined to large, web-scale companies became available to early-stage startups and enterprises.
  • Five layers of security for Red Hat Data Grid on OpenShift
    Red Hat Data Grid is an in-memory, distributed, NoSQL datastore solution. With it, your applications can access, process, and analyze data at in-memory speed to deliver a superior user experience. In-memory Data Grid has a variety of use cases in today’s environment, such as fast data access for low-latency apps, storing objects (NoSQL) in a datastore, achieving linear scalability with data distribution/partitioning, and data high-availability across geographies, among many others. With containers getting more attention, the need to have Data Grid running on a container platform like OpenShift is clear, and we are seeing more and more customers aligning their architecture with a datastore running natively on a container platform. In this article, I will talk about multiple layers of security available while deploying Data Grid on OpenShift. The layers of security offer a combination of security measures provided by Data Grid as well as by OpenShift/Kubernetes.
  • Rebooting UUCP to redecentralize the net
    UUCP (Unix-to-Unix Copy Protocol) is a venerable, non-hierarchical networking protocol that was used as transport for early email and Usenet message boards; its intrinsic decentralization and its cooperative nature (UUCP hosts store and forward messages for one another) make it a kind of symbol of the early, decentralized robustness that characterized the early net and inspired so much optimism about a fundamentally distributed arrangement of peers rising up to replace the top-down phone companies and other centralized systems. As part of the decentralized web movement, UUCP has been rebooted by Dataforge, a Fort Worth, Texas-based "hybrid shell provider/tilde server" whose proprietor Wesley "praetor" Banderia uses his decades of Unix systems administration to keep the system running on a cluster of lovingly maintained vintage SGI machines with a Google Cloud VPS for backup.

5 Julia-Specific IDEs Developers Should Know

If you already are a Julia programmer or developer, you would be interested to know what are the top IDEs one can use. Julia is easier to work with when you make use of an IDE such as Juno which is an excellent IDE. For developers who wish to create complex applications, IDEs can be very helpful but it must be noted that there is no such specific feasible IDE for this language and one must choose their IDE according to their comfort level as well as accessibility to that language. In this article, we list down 5 Julia-specific IDEs along with some prominent alternative IDEs. Read more Also: Release of GooCalendar 0.5

Android Leftovers