Simulate Your World With Hash.ai

We will admit that we often throw together software simulations of real-world things, but we’ll also admit they are usually quick and dirty and just dump out text that we might graph in a spreadsheet or using GNUPlot. But with Hash.ai, you can quickly generate simulations of just about anything quickly and easily. The simulations will have beautiful visualizations and graphs, too. The tool works with JavaScript or Python and you don’t have to waste your time writing the parts that don’t change.

The web-based tool works on the idea of agents. Each agent has one or more behaviors that run each time step. In the example simulation, which models wildfires in forests, the agent is named forest, although it really models one virtual tree. There’s also a behavior called forest which controls the tree’s rate of growth and chance of burning based on nearby trees and lightning. Other behaviors simulate a burning tree and what happens to a tree after burning — an ember — which may or may not grow back.

Continue reading “Simulate Your World With Hash.ai”

Hackaday Podcast 070: Memory Bump, Strontium Rain, Sentient Solder Smoke, And Botting Browsers

Hackaday editors Elliot Williams and Mike Szczys bubble sort a sample set of amazing hacks from the past week. Who has even used the smart chip from an old credit card as a functional component in their own circuit? This guy. There’s something scientifically devious about the way solder smoke heat-seeks to your nostrils. There’s more than one way to strip 16-bit audio down to five. And those nuclear tests from the 40s, 50s, and 60s? Those are still affecting how science takes measurements of all sorts of things in the world.

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (60 MB or so.)

Continue reading “Hackaday Podcast 070: Memory Bump, Strontium Rain, Sentient Solder Smoke, And Botting Browsers”

Scientific Calculator Whipped Up In Python

Scientific calculators were invaluable to most of us through high school and college, freeing us from the yoke of using tables to calculate logarithms and trigonometric functions. Once out in the real world, it’s no longer necessary to use an education board approved device to do your maths – you can do it all on your PC instead. For those keen to do so, [AstusRush]’s latest Python work may be just the ticket!

Far exceeding the capabilities of the usual calculator apps, there’s plenty of useful features under the hood. Particularly exciting is the LaTeX display, which shows equations in textbook-quality human-readable format. There’s also a graphing suite, and capability to handle matricies and vectors. LAN chat is implemented too, useful for working in teams.

It’s a useful tool that may suit better than a full-fat MATLAB install, particularly at the low, low price of free. This is one calculator that CASIO will have to keep their nose out of!

Python Is All You’ll Ever Need In This Linux Distro

Choosing the perfect Linux distribution that satisfies your personal needs and likings can be an impossible task, and oftentimes requires a hint of Stockholm syndrome as compromise. In extreme cases, you might end up just rolling your own distro. But while frustration is always a great incentive for change, for [Josh Moore] it was rather curiosity and playful interest that led him to create snakeware, a Linux distribution where the entire user space not only runs on Python, but is Python.

Imagine you would boot your Linux system, and instead of the shell of your choice, you would be greeted by an interactive Python interpreter, and everything you do on the system will be within the realms of that interpreter — that’s the gist of snakeware. Now, this might sound rather limiting at first, but keep in mind we’re talking about Python here, a language known for its versatility, with an abundance of packages that get things done quick and easy, which is exactly what [Josh] is aiming for. To get an idea of that, snakeware also includes snakewm, a graphical user interface written with pygame that bundles a couple of simple applications as demonstration, including a terminal to execute Python one-liners.

Note that this is merely a proof of concept at this stage, but [Josh] is inviting everyone to contribute and extend his creation. If you want to give it a go without building the entire system, the GitHub repository has a prebuilt image to run in QEMU, and the window manager will run as regular Python application on your normal system, too. To get just a quick glimpse of it, check the demo video after the break.

Sure, die-hard Linux enthusiasts will hardly accept a distribution without their favorite shell and preferable language, but hey, at least it gets by without systemd. And while snakeware probably won’t compete with more established distributions in the near future, it’s certainly an interesting concept that embraces thinking outside the box and trying something different. It would definitely fit well on a business card.

Continue reading “Python Is All You’ll Ever Need In This Linux Distro”

Digitize An Analogue Oscilloscope

Many of us will possess digital oscilloscopes which offer at an affordable price an array of features once unimaginable on the analogue CRT ‘scopes of yesteryear. But those old analogue beasts were fine pieces of equipment when they were made and remain so today. So how can they find a place in the digital age?

Perhaps [Joseph Eoff] has the answer, because he’s fitted his trusty Telequipment D43 with a camera in a 3D-printed attachment, paired with a piece of cross-platform Python/Qt custom software using OpenCV to identify, digitize, and quantify the traces. The software allows viewing the either the digitized trace or the real trace, and derives measurements of voltage and frequency from them. One limitation is that despite the ‘scope being a dual-trace model, the software only has a single set of cursors to measure one trace at a time. All the code can be had from the GitHub repository, should you wish to experiment with it or extend it.

It’s worth thinking for a minute at what price point a remotely decent digital ‘scope starts, then considering the ease with which surprisingly good older analogue instruments can be found on the second-hand market for not a lot. An approach such as this one makes them an even more attractive proposition.

If you’re looking further into enhancements for an analogue ‘scope, how about a logic analyser?

Job Application Script Automates The Boring Stuff With Python

Job hunting can certainly require a good amount of hoop-jumping in today’s age. Even if you’re lucky enough to have your application read by an actual human, there’s no guarantee the person on the other end has much of an understanding about your skill set. Oftentimes, the entire procedure is futile from the start, and as a recent graduate, [harshibar] is well aware of the soul-crushing experience investing a lot of time in it can be. Well, as the saying goes: if you can’t beat them, join them — and if you can’t join them, automate the hell out of the application process.

As the final piece of a “5 Python Projects in 5 Days” challenge [harshibar] set for herself — which also spawned a “Tinder for Netflix” for the web development section of it — she essentially created a web-scraper that gathers job openings for a specific search term, and automatically sends an application to each and every one of them. Using Beautiful Soup to parse the scraped pages of a certain job portal, Selenium’s browser automation functionality to fill out the online application forms, she can get all her information into the form saving countless hours in comparison to the manual alternative. The program even hits the apply button.

While the quantity-over-quality approach may not be for everyone, there’s of course room for more filtering and being more selective about the job openings beforehand, which [harshibar] also addresses in her video about the project (embedded below). And while this won’t fix the application process itself, we can definitely see the satisfaction a beating-them-at-their-own-game might provide — plus, it can’t have a worse miss rate than your typical LinkedIn “recruiter”. Still, if you’re looking for a more systematic approach, have a look at [Lewin Day]’s view on the subject, he even has advice job hunting is still further down the road for you.

Continue reading “Job Application Script Automates The Boring Stuff With Python”

CyberDÛCK Quacks Like A Cyberdeck

Over the last year or so, we’ve seen an explosion in the popularity of cyberdecks — those highly portable and occasionally wearable computers that would make William Gibson proud. A lot of the cyberdecks we see are based on NUCs or the Raspberry Pi and are essentially post-apocalyptic DIY laptops. But what if you want to play with microcontrollers on the go? Do you really need traditional computing power?

If you build [kmatch98]’s adorable cyberDÛCK, the answer is no. This duck can edit and run CircuitPython files anywhere without a separate computer, as long as you have some kind of USB keyboard. It has a text editor for writing Python scripts the regular way as well as a REPL for running commands on the fly.

One of the biggest hurdles in portable microcontrollering is getting HID access so you can communicate with a keyboard. Flip open cyberDÛCK and you’ll find two ItsyBitsy M4s — one being used as the USB host, and the other controls the display and is meant to be programmed. To get the keyboard input across, [kmatch98] adapted a MicroPython editor to take input from UART. Waddle past the break to check out the sprite demo, and stick around to see [kmatch98] discuss the duck in detail.

We understand if you can’t wait to make one of these yourself. In the meantime, did you know you can code CircuitPython directly from your phone?

Continue reading “CyberDÛCK Quacks Like A Cyberdeck”